summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Skype/Skype_10.vcxproj2
-rw-r--r--protocols/Skype/Skype_10.vcxproj.filters6
-rw-r--r--protocols/Skype/res/Resource.rc4
-rw-r--r--protocols/Skype/res/call.icobin0 -> 15086 bytes
-rw-r--r--protocols/Skype/res/conf_invite.icobin0 -> 17542 bytes
-rw-r--r--protocols/Skype/res/main.icobin5430 -> 90243 bytes
-rw-r--r--protocols/Skype/src/resource.h5
-rw-r--r--protocols/Skype/src/skype.h3
-rw-r--r--protocols/Skype/src/skype_avatars.cpp2
-rw-r--r--protocols/Skype/src/skype_events.cpp16
-rw-r--r--protocols/Skype/src/skype_hooks.cpp9
-rw-r--r--protocols/Skype/src/skype_icons.cpp7
-rw-r--r--protocols/Skype/src/skype_menus.cpp2
-rw-r--r--protocols/Skype/src/skype_proto.cpp13
-rw-r--r--protocols/Skype/src/skype_proto.h2
-rw-r--r--protocols/Skype/src/skype_utils.cpp4
16 files changed, 52 insertions, 23 deletions
diff --git a/protocols/Skype/Skype_10.vcxproj b/protocols/Skype/Skype_10.vcxproj
index a213b0e6d3..236aaa0684 100644
--- a/protocols/Skype/Skype_10.vcxproj
+++ b/protocols/Skype/Skype_10.vcxproj
@@ -239,6 +239,8 @@
<None Include="res\auth_grant.ico" />
<None Include="res\auth_request.ico" />
<None Include="res\auth_revoke.ico" />
+ <None Include="res\call.ico" />
+ <None Include="res\conf_invite.ico" />
<None Include="res\Main.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/protocols/Skype/Skype_10.vcxproj.filters b/protocols/Skype/Skype_10.vcxproj.filters
index aad1753c47..b66e82527c 100644
--- a/protocols/Skype/Skype_10.vcxproj.filters
+++ b/protocols/Skype/Skype_10.vcxproj.filters
@@ -189,5 +189,11 @@
<None Include="..\..\..\SkypeKit\keypair.bin">
<Filter>Resource Files\Bin</Filter>
</None>
+ <None Include="res\call.ico">
+ <Filter>Resource Files\Icons</Filter>
+ </None>
+ <None Include="res\conf_invite.ico">
+ <Filter>Resource Files\Icons</Filter>
+ </None>
</ItemGroup>
</Project> \ No newline at end of file
diff --git a/protocols/Skype/res/Resource.rc b/protocols/Skype/res/Resource.rc
index c933a67bbb..2883f15109 100644
--- a/protocols/Skype/res/Resource.rc
+++ b/protocols/Skype/res/Resource.rc
@@ -275,10 +275,12 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_ICON ICON "Main.ico"
+IDI_ICON ICON "main.ico"
IDI_AUTH_GRANT ICON "auth_grant.ico"
IDI_AUTH_REQUEST ICON "auth_request.ico"
IDI_AUTH_REVOKE ICON "auth_revoke.ico"
+IDI_CALL ICON "call.ico"
+IDI_CONF_INVITE ICON "conf_invite.ico"
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/protocols/Skype/res/call.ico b/protocols/Skype/res/call.ico
new file mode 100644
index 0000000000..59dc94bdce
--- /dev/null
+++ b/protocols/Skype/res/call.ico
Binary files differ
diff --git a/protocols/Skype/res/conf_invite.ico b/protocols/Skype/res/conf_invite.ico
new file mode 100644
index 0000000000..7dfe6dc261
--- /dev/null
+++ b/protocols/Skype/res/conf_invite.ico
Binary files differ
diff --git a/protocols/Skype/res/main.ico b/protocols/Skype/res/main.ico
index 8f824f2e3d..77d85affad 100644
--- a/protocols/Skype/res/main.ico
+++ b/protocols/Skype/res/main.ico
Binary files differ
diff --git a/protocols/Skype/src/resource.h b/protocols/Skype/src/resource.h
index b6c51c5a9d..524a4ff0fa 100644
--- a/protocols/Skype/src/resource.h
+++ b/protocols/Skype/src/resource.h
@@ -15,6 +15,9 @@
#define IDI_AUTH_REVOKE 105
#define IDD_PASSWORD_REQUEST 106
#define IDR_KEY 107
+#define IDI_CALL 108
+#define IDI_ICON1 109
+#define IDI_CONF_INVITE 109
#define IDC_CCLIST 173
#define IDC_EDITSCR 174
#define IDC_ADDSCR 175
@@ -48,7 +51,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 108
+#define _APS_NEXT_RESOURCE_VALUE 110
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1025
#define _APS_NEXT_SYMED_VALUE 101
diff --git a/protocols/Skype/src/skype.h b/protocols/Skype/src/skype.h
index b8463cb10a..3faceb3bf8 100644
--- a/protocols/Skype/src/skype.h
+++ b/protocols/Skype/src/skype.h
@@ -53,7 +53,8 @@
#define SKYPE_SEARCH_BYEMAIL 1002
#define SKYPE_SEARCH_BYNAMES 1003
-#define SKYPE_DB_EVENT_TYPE_CALL 9000
+#define SKYPE_DB_EVENT_TYPE_EMOTE 10001
+#define SKYPE_DB_EVENT_TYPE_CALL 10010
#define CMI_AUTH_REVOKE 0
#define CMI_AUTH_REQUEST 1
diff --git a/protocols/Skype/src/skype_avatars.cpp b/protocols/Skype/src/skype_avatars.cpp
index c95d4e3d2a..adf956edeb 100644
--- a/protocols/Skype/src/skype_avatars.cpp
+++ b/protocols/Skype/src/skype_avatars.cpp
@@ -210,7 +210,7 @@ INT_PTR __cdecl CSkypeProto::SetMyAvatar(WPARAM, LPARAM lParam)
return iRet;
}
- uint newTS = this->account->GetUintProp(/* *::P_AVATAR_TIMESTAMP */ 182);
+ uint newTS = this->account->GetUintProp(Account::P_AVATAR_IMAGE);
::db_set_dw(NULL, this->m_szModuleName, "AvatarTS", newTS);
iRet = 0;
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp
index ac5bebdab2..bbe7aaf9fe 100644
--- a/protocols/Skype/src/skype_events.cpp
+++ b/protocols/Skype/src/skype_events.cpp
@@ -98,6 +98,9 @@ void CSkypeProto::OnMessageReceived(CConversation::Ref &conversation, CMessage::
{
SEString data;
+ CMessage::TYPE messageType;
+ message->GetPropType(messageType);
+
uint timestamp;
message->GetPropTimestamp(timestamp);
@@ -150,6 +153,9 @@ void CSkypeProto::OnMessageSended(CConversation::Ref &conversation, CMessage::Re
{
SEString data;
+ CMessage::TYPE messageType;
+ message->GetPropType(messageType);
+
uint timestamp;
message->GetPropTimestamp(timestamp);
@@ -366,9 +372,6 @@ void CSkypeProto::OnMessage(CConversation::Ref conversation, CMessage::Ref messa
switch (messageType)
{
case CMessage::POSTED_EMOTE:
- //int i = 0;
- break;
-
case CMessage::POSTED_TEXT:
{
SEString author;
@@ -485,7 +488,7 @@ void CSkypeProto::OnMessage(CConversation::Ref conversation, CMessage::Ref messa
break;
case CMessage::STARTED_LIVESESSION:
- //conversation->LeaveLiveSession();
+ conversation->LeaveLiveSession();
uint timestamp;
message->GetPropTimestamp(timestamp);
@@ -498,15 +501,14 @@ void CSkypeProto::OnMessage(CConversation::Ref conversation, CMessage::Ref messa
HANDLE hContact = this->AddContact(author);
- wchar_t *message = new wchar_t[14];
- ::wcscpy(message, L"Incoming call");
+ char *message = ::mir_utf8encode(Translate("Incoming call"));
this->AddDBEvent(
hContact,
SKYPE_DB_EVENT_TYPE_CALL,
timestamp,
DBEF_UTF,
- (DWORD)::wcslen(message) + 1,
+ (DWORD)::strlen(message) + 1,
(PBYTE)message);
break;
diff --git a/protocols/Skype/src/skype_hooks.cpp b/protocols/Skype/src/skype_hooks.cpp
index 9fb927f1a2..6a2e9073d7 100644
--- a/protocols/Skype/src/skype_hooks.cpp
+++ b/protocols/Skype/src/skype_hooks.cpp
@@ -18,8 +18,13 @@ void CSkypeProto::UninitHookList()
void CSkypeProto::InitInstanceHookList()
{
- this->HookEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit);
- this->HookEvent(ME_USERINFO_INITIALISE, &CSkypeProto::OnUserInfoInit);
+ this->instanceHookList.insert(
+ this->HookEvent(ME_OPT_INITIALISE, &CSkypeProto::OnOptionsInit));
+ this->instanceHookList.insert(
+ this->HookEvent(ME_USERINFO_INITIALISE, &CSkypeProto::OnUserInfoInit));
+
+ this->instanceHookList.insert(
+ this->HookEvent(ME_MSG_PRECREATEEVENT, &CSkypeProto::OnMessagePreCreate));
}
void CSkypeProto::UninitInstanceHookList()
diff --git a/protocols/Skype/src/skype_icons.cpp b/protocols/Skype/src/skype_icons.cpp
index 9a739f57ae..87294370ec 100644
--- a/protocols/Skype/src/skype_icons.cpp
+++ b/protocols/Skype/src/skype_icons.cpp
@@ -2,7 +2,10 @@
_tag_iconList CSkypeProto::IconList[] =
{
- { LPGENT("Protocol icon"), "main", IDI_ICON },
+ { LPGENT("Protocol icon"), "main", IDI_ICON },
+
+ { LPGENT("Call"), "call", IDI_CALL },
+ { LPGENT("Invite to conference"), "confInvite", IDI_CONF_INVITE },
{ LPGENT("Revoke authorization"), "authRevoke", IDI_AUTH_REVOKE },
{ LPGENT("Request authorization"), "authRequest", IDI_AUTH_REQUEST },
{ LPGENT("Grant authorization"), "authGrant", IDI_AUTH_GRANT },
@@ -38,7 +41,7 @@ HANDLE CSkypeProto::GetIconHandle(const char* name)
{
for (size_t i = 0; i < SIZEOF(CSkypeProto::IconList); i++)
{
- if (::strcmp(CSkypeProto::IconList[i].Name, name) == 0)
+ if (::stricmp(CSkypeProto::IconList[i].Name, name) == 0)
return CSkypeProto::IconList[i].Handle;
}
return 0;
diff --git a/protocols/Skype/src/skype_menus.cpp b/protocols/Skype/src/skype_menus.cpp
index 48efbfe558..565d97198f 100644
--- a/protocols/Skype/src/skype_menus.cpp
+++ b/protocols/Skype/src/skype_menus.cpp
@@ -188,7 +188,7 @@ void CSkypeProto::OnInitStatusMenu()
mi.position = -1999901006;
mi.hParentMenu = HGENMENU_ROOT;
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.icolibItem = CSkypeProto::GetIconHandle("Skype_main");
+ mi.icolibItem = CSkypeProto::GetIconHandle("main");
hJabberRoot = m_hMenuRoot = ::Menu_AddProtoMenuItem(&mi);
}
else {
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index 9b5dd72dd3..ba2caabe44 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -11,12 +11,17 @@ CSkypeProto::CSkypeProto(const char* protoName, const TCHAR* userName) :
this->SetAllContactStatus(ID_STATUS_OFFLINE);
DBEVENTTYPEDESCR dbEventType = { sizeof(dbEventType) };
- dbEventType.module = m_szModuleName;
- dbEventType.eventType = SKYPE_DB_EVENT_TYPE_CALL;
- dbEventType.descr = "Skype call";
+ dbEventType.module = this->m_szModuleName;
+ dbEventType.flags = DETF_HISTORY | DETF_MSGWINDOW;
+
+ dbEventType.eventType = SKYPE_DB_EVENT_TYPE_EMOTE;
+ dbEventType.descr = "Skype emote";
::CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
- this->HookEvent(ME_MSG_PRECREATEEVENT, &CSkypeProto::OnMessagePreCreate);
+ dbEventType.eventType = SKYPE_DB_EVENT_TYPE_CALL;
+ dbEventType.descr = "Skype call";
+ dbEventType.eventIcon = CSkypeProto::GetIconHandle("call");
+ ::CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
this->InitInstanceServiceList();
}
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h
index bb8388c669..ed9f407c0d 100644
--- a/protocols/Skype/src/skype_proto.h
+++ b/protocols/Skype/src/skype_proto.h
@@ -369,7 +369,7 @@ protected:
void CreateServiceObjParam(const char* szService, SkypeServiceFunc serviceProc, LPARAM lParam);
HANDLE CreateEvent(const char* szService);
- void HookEvent(const char*, SkypeEventFunc);
+ HANDLE HookEvent(const char*, SkypeEventFunc);
int SendBroadcast(int type, int result, HANDLE hProcess, LPARAM lParam);
int SendBroadcast(HANDLE hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp
index 2bd14e00a5..4ad81024b3 100644
--- a/protocols/Skype/src/skype_utils.cpp
+++ b/protocols/Skype/src/skype_utils.cpp
@@ -278,9 +278,9 @@ HANDLE CSkypeProto::CreateEvent(const char* szService)
return ::CreateHookableEvent(moduleName);
}
-void CSkypeProto::HookEvent(const char* szEvent, SkypeEventFunc handler)
+HANDLE CSkypeProto::HookEvent(const char* szEvent, SkypeEventFunc handler)
{
- ::HookEventObj(szEvent, (MIRANDAHOOKOBJ)*( void**)&handler, this);
+ return ::HookEventObj(szEvent, (MIRANDAHOOKOBJ)*( void**)&handler, this);
}
void CSkypeProto::FakeAsync(void *param)