diff options
Diffstat (limited to 'protocols/Skype/src/skype_proto.h')
-rw-r--r-- | protocols/Skype/src/skype_proto.h | 63 |
1 files changed, 4 insertions, 59 deletions
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h index 0b8e41e2f5..f42d581b35 100644 --- a/protocols/Skype/src/skype_proto.h +++ b/protocols/Skype/src/skype_proto.h @@ -1,6 +1,7 @@ #pragma once
#include "skype.h"
+#include "string_list.h"
#include "skypekit\skypekit.h"
#include <map>
@@ -11,59 +12,6 @@ typedef int (__cdecl CSkypeProto::* SkypeEventFunc)(WPARAM, LPARAM); typedef INT_PTR (__cdecl CSkypeProto::* SkypeServiceFunc)(WPARAM, LPARAM);
typedef INT_PTR (__cdecl CSkypeProto::* SkypeServiceFuncParam)(WPARAM, LPARAM, LPARAM);
-struct StringList : public LIST<wchar_t>
-{
- static int compare(const wchar_t* p1, const wchar_t* p2) { return ::wcsicmp(p1, p2); }
-
- StringList() : LIST<wchar_t>(2, compare) {}
- StringList(const wchar_t* string, const wchar_t *delimeters = L" ") : LIST<wchar_t>(2, compare)
- {
- wchar_t *data = ::mir_wstrdup(string);
- if (data)
- {
- wchar_t *p = ::wcstok(data, delimeters);
- if (p)
- {
- this->insert(::mir_wstrdup(p));
- while (p = wcstok(NULL, delimeters))
- {
- this->insert(::mir_wstrdup(p));
- }
- }
- ::mir_free(data);
- }
- }
- ~StringList() { destroy(); }
-
- void destroy( void )
- {
- for (int i=0; i < count; i++)
- mir_free(items[i]);
-
- List_Destroy((SortedList*)this);
- }
-
- int insertn(const wchar_t* p) { return insert(::mir_wstrdup(p)); }
-
- int remove(int idx)
- {
- mir_free(items[idx]);
- return List_Remove((SortedList*)this, idx);
- }
-
- int remove(const wchar_t* p)
- {
- int idx;
- return List_GetIndex((SortedList*)this, (wchar_t*)p, &idx) == 1 ? remove(idx) : -1;
- }
-
- bool contains(wchar_t* p)
- {
- int idx;
- return List_GetIndex((SortedList*)this, (wchar_t*)p, &idx) == 1;
- }
-};
-
struct _tag_iconList
{
wchar_t* Description;
@@ -72,10 +20,6 @@ struct _tag_iconList HANDLE Handle;
};
-#define LI_STRING 0
-#define LI_LIST 1
-#define LI_NUMBER 2
-
struct SettingItem
{
const TCHAR *szDescription;
@@ -312,15 +256,16 @@ protected: void ChatValidateContact(HANDLE hItem, HWND hwndList, const wchar_t *contacts);
void ChatPrepare(HANDLE hItem, HWND hwndList, const wchar_t *contacts);
- void GetInviteContacts(HANDLE hItem, HWND hwndList, SEStringList &invitedContacts);
+ void GetInviteContacts(HANDLE hItem, HWND hwndList, StringList &invitedContacts);
void InitChat();
- wchar_t *StartChat(const wchar_t *cid, const SEStringList &invitedContacts);
+ //wchar_t *StartChat(const wchar_t *cid, const SEStringList &invitedContacts);
void LeaveChat(const wchar_t *cid);
void CreateChatWindow(CConversation::Ref conversation, bool showWindow = true);
void JoinToChat(CConversation::Ref conversation, bool showWindow = true);
+ void AddConactsToChat(CConversation::Ref conversation, const StringList &invitedContacts);
void RaiseChatEvent(const wchar_t *cid, const wchar_t *sid, int evt, DWORD flags = 0x0001, DWORD itemData = 0, const wchar_t *status = NULL, const wchar_t *message = NULL);
void SendChatMessage(const wchar_t *cid, const wchar_t *sid, const wchar_t *message);
|