summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_proto.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-02-22 21:14:05 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-02-22 21:14:05 +0000
commit4ffd0909f7990643a0253849d46a750bd9f3233b (patch)
treea0a004674fcd9ad0600f7c1ae5728bea499f9db0 /protocols/Tox/src/tox_proto.h
parent0e8ffa6f388f28411decbcc6fe6c834029830714 (diff)
Tox: some code for group chats
git-svn-id: http://svn.miranda-ng.org/main/trunk@12241 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_proto.h')
-rw-r--r--protocols/Tox/src/tox_proto.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h
index 0b53d7ba86..0ff5060f14 100644
--- a/protocols/Tox/src/tox_proto.h
+++ b/protocols/Tox/src/tox_proto.h
@@ -107,17 +107,25 @@ private:
int __cdecl OnAccountLoaded(WPARAM, LPARAM);
int __cdecl OnAccountRenamed(WPARAM, LPARAM);
+ INT_PTR __cdecl OnAccountManagerInit(WPARAM, LPARAM);
+
// netlib
void InitNetlib();
void UninitNetlib();
+ // menus
+ int OnInitStatusMenu();
+ static void InitMenus();
+ static void UninitMenus();
+
// options
static INT_PTR CALLBACK MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
static INT_PTR CALLBACK NodesOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
int __cdecl OnOptionsInit(WPARAM wParam, LPARAM lParam);
- INT_PTR __cdecl OnAccountManagerInit(WPARAM, LPARAM);
+ // events
+ int __cdecl OnContactDeleted(MCONTACT, LPARAM);
// userinfo
static INT_PTR CALLBACK UserInfoProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
@@ -137,8 +145,6 @@ private:
void __cdecl LoadFriendList(void*);
- int __cdecl OnContactDeleted(MCONTACT, LPARAM);
-
static void OnFriendRequest(Tox *tox, const uint8_t *pubKey, const uint8_t *message, const uint16_t messageSize, void *arg);
static void OnFriendNameChange(Tox *tox, const int friendNumber, const uint8_t *name, const uint16_t nameSize, void *arg);
static void OnStatusMessageChanged(Tox *tox, const int friendNumber, const uint8_t* message, const uint16_t messageSize, void *arg);
@@ -151,6 +157,32 @@ private:
static INT_PTR CALLBACK SearchDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ // chat rooms
+ //MCONTACT GetChatRoom(const char *pubKey);
+ MCONTACT GetChatRoom(int groupNumber);
+
+ //MCONTACT GetChatRoom(const char *pubKey);
+ MCONTACT AddChatRoom(int groupNumber);
+
+ void __cdecl LoadChatRoomList(void*);
+
+ int __cdecl OnGroupChatEventHook(WPARAM, LPARAM lParam);
+ int __cdecl OnGroupChatMenuHook(WPARAM, LPARAM lParam);
+
+ INT_PTR __cdecl OnJoinChatRoom(WPARAM hContact, LPARAM);
+ INT_PTR __cdecl OnLeaveChatRoom(WPARAM hContact, LPARAM);
+ INT_PTR __cdecl OnCreateChatRoom(WPARAM, LPARAM);
+
+ void InitGroupChatModule();
+ void CloseAllChatChatSessions();
+
+ static void OnGroupChatInvite(Tox *tox, int32_t friendNumber, uint8_t type, const uint8_t *data, const uint16_t length, void *arg);
+
+ static void ChatValidateContact(HWND hwndList, const std::vector<MCONTACT> &contacts, MCONTACT hContact = NULL);
+ static void ChatPrepare(HWND hwndList, const std::vector<MCONTACT> &contacts, MCONTACT hContact = NULL);
+ static std::vector<MCONTACT> GetInvitedContacts(HWND hwndList, MCONTACT hContact = NULL);
+ static INT_PTR CALLBACK ChatRoomInviteProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+
// messages
static void OnFriendMessage(Tox *tox, const int number, const uint8_t *message, const uint16_t messageSize, void *arg);
static void OnFriendAction(Tox *tox, const int number, const uint8_t *action, const uint16_t actionSize, void *arg);