summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_db.cpp41
-rw-r--r--protocols/SkypeWeb/src/skype_events.cpp41
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h4
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp4
5 files changed, 46 insertions, 46 deletions
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index 9f5f7fe62d..ab56d537db 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -293,7 +293,7 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response)
do
{
LIST<char> users(1);
- for (; i < skypenames.getCount() && users.getCount() < 25; i++)
+ for (; i < skypenames.getCount() && users.getCount() <= 50; i++)
users.insert(skypenames[i]);
PushRequest(new GetContactsInfoRequest(m_szTokenSecret, users), &CSkypeProto::LoadContactsInfo);
diff --git a/protocols/SkypeWeb/src/skype_db.cpp b/protocols/SkypeWeb/src/skype_db.cpp
index a449070524..9e0f04a25a 100644
--- a/protocols/SkypeWeb/src/skype_db.cpp
+++ b/protocols/SkypeWeb/src/skype_db.cpp
@@ -128,4 +128,45 @@ MEVENT CSkypeProto::AddEventToDb(MCONTACT hContact, WORD type, DWORD timestamp,
dbei.pBlob = pBlob;
dbei.flags = flags;
return db_event_add(hContact, &dbei);
+}
+
+void CSkypeProto::InitDBEvents()
+{
+ db_set_resident(m_szModuleName, "LastAuthRequestTime");
+
+ // custom event
+ DBEVENTTYPEDESCR dbEventType = { sizeof(dbEventType) };
+ dbEventType.module = m_szModuleName;
+ dbEventType.flags = DETF_HISTORY | DETF_MSGWINDOW;
+ dbEventType.iconService = MODULE "/GetEventIcon";
+ dbEventType.textService = MODULE "/GetEventText";
+
+ dbEventType.eventType = SKYPE_DB_EVENT_TYPE_EDITED_MESSAGE;
+ dbEventType.descr = Translate("Edited message");
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+
+ dbEventType.eventType = SKYPE_DB_EVENT_TYPE_ACTION;
+ dbEventType.descr = Translate("Action");
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+
+ dbEventType.eventType = SKYPE_DB_EVENT_TYPE_CALL_INFO;
+ dbEventType.descr = Translate("Call information");
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+
+ dbEventType.eventType = SKYPE_DB_EVENT_TYPE_FILETRANSFER_INFO;
+ dbEventType.descr = Translate("File transfer information");
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+
+ dbEventType.eventType = SKYPE_DB_EVENT_TYPE_URIOBJ;
+ dbEventType.descr = Translate("URI object");
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+
+ dbEventType.eventType = SKYPE_DB_EVENT_TYPE_UNKNOWN;
+ dbEventType.descr = Translate("Unknown event");
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+
+ dbEventType.eventType = SKYPE_DB_EVENT_TYPE_INCOMING_CALL;
+ dbEventType.descr = Translate("Incoming call");
+ dbEventType.flags |= DETF_NONOTIFY;
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
} \ No newline at end of file
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp
index 58095bb8ee..c9089e231f 100644
--- a/protocols/SkypeWeb/src/skype_events.cpp
+++ b/protocols/SkypeWeb/src/skype_events.cpp
@@ -219,47 +219,6 @@ INT_PTR CSkypeProto::EventGetIcon(WPARAM wParam, LPARAM lParam)
return (INT_PTR)((wParam & LR_SHARED) ? icon : CopyIcon(icon));
}
-void CSkypeProto::InitDBEvents()
-{
- db_set_resident(m_szModuleName, "LastAuthRequestTime");
-
- // custom event
- DBEVENTTYPEDESCR dbEventType = { sizeof(dbEventType) };
- dbEventType.module = m_szModuleName;
- dbEventType.flags = DETF_HISTORY | DETF_MSGWINDOW;
- dbEventType.iconService = MODULE "/GetEventIcon";
- dbEventType.textService = MODULE "/GetEventText";
-
- dbEventType.eventType = SKYPE_DB_EVENT_TYPE_EDITED_MESSAGE;
- dbEventType.descr = Translate("Edited message");
- CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
-
- dbEventType.eventType = SKYPE_DB_EVENT_TYPE_ACTION;
- dbEventType.descr = Translate("Action");
- CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
-
- dbEventType.eventType = SKYPE_DB_EVENT_TYPE_CALL_INFO;
- dbEventType.descr = Translate("Call information");
- CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
-
- dbEventType.eventType = SKYPE_DB_EVENT_TYPE_FILETRANSFER_INFO;
- dbEventType.descr = Translate("File transfer information");
- CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
-
- dbEventType.eventType = SKYPE_DB_EVENT_TYPE_URIOBJ;
- dbEventType.descr = Translate("URI object");
- CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
-
- dbEventType.eventType = SKYPE_DB_EVENT_TYPE_UNKNOWN;
- dbEventType.descr = Translate("Unknown event");
- CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
-
- dbEventType.eventType = SKYPE_DB_EVENT_TYPE_INCOMING_CALL;
- dbEventType.descr = Translate("Incoming call");
- dbEventType.flags |= DETF_NONOTIFY;
- CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
-}
-
int CSkypeProto::ProcessSrmmEvent(WPARAM, LPARAM lParam)
{
debugLogA(__FUNCTION__);
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index b3c2344ebb..4694732ca1 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -302,7 +302,7 @@ private:
void ProcessThreadUpdateRes(const JSONNode &node);
// utils
- static void CSkypeProto::FreeCharList(LIST<char> lst);
+ static void CSkypeProto::FreeCharList(const LIST<char> &lst);
__forceinline bool IsOnline()
{ return (m_iStatus > ID_STATUS_OFFLINE && m_hPollingThread);
@@ -316,7 +316,7 @@ private:
CMStringA GetStringChunk(const char *haystack, const char *start, const char *end);
int SkypeToMirandaStatus(const char *status);
- char *MirandaToSkypeStatus(int status);
+ const char *MirandaToSkypeStatus(int status);
void ShowNotification(const TCHAR *message, MCONTACT hContact = NULL);
void ShowNotification(const TCHAR *caption, const TCHAR *message, MCONTACT hContact = NULL, int type = 0);
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index ae45138d40..11e149adbc 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma warning(disable:4566)
-void CSkypeProto::FreeCharList(LIST<char> lst)
+void CSkypeProto::FreeCharList(const LIST<char> &lst)
{
for (int i = 0; i < lst.getCount(); i++)
mir_free(lst[i]);
@@ -423,7 +423,7 @@ bool CSkypeProto::IsMe(const char *skypeName)
return (!mir_strcmpi(skypeName, m_szSelfSkypeName) || !mir_strcmp(skypeName, ptrA(getStringA("SelfEndpointName"))));
}
-char *CSkypeProto::MirandaToSkypeStatus(int status)
+const char *CSkypeProto::MirandaToSkypeStatus(int status)
{
switch (status)
{