summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_proto.h
diff options
context:
space:
mode:
authorPiotr Piastucki <leech.miranda@gmail.com>2015-05-14 15:24:53 +0000
committerPiotr Piastucki <leech.miranda@gmail.com>2015-05-14 15:24:53 +0000
commitb7a1174511c3b7fad5b81a54bb4647662d94031c (patch)
tree91b3f36fd78ae9b481cb11d8602e61a79c388d04 /protocols/MSN/src/msn_proto.h
parent01b66588ca510b49be5a06d2bfb5bd28b4416030 (diff)
Updated for partial MSNP24 protocol support, for detailed changes see MSNP24 branch.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13589 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_proto.h')
-rw-r--r--protocols/MSN/src/msn_proto.h43
1 files changed, 34 insertions, 9 deletions
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h
index d8d26d3344..89791e86de 100644
--- a/protocols/MSN/src/msn_proto.h
+++ b/protocols/MSN/src/msn_proto.h
@@ -110,6 +110,10 @@ struct CMsnProto : public PROTO<CMsnProto>
char *authContactToken;
char *authStorageToken;
char *hotSecretToken, *hotAuthToken;
+ char *authUser, *authUIC, *authCookies, *authSSLToken, *authAccessToken;
+ int authMethod;
+ time_t authTokenExpiretime;
+ bool bSentBND;
char *abCacheKey, *sharingCacheKey, *storageCacheKey;
@@ -120,6 +124,7 @@ struct CMsnProto : public PROTO<CMsnProto>
mir_cs m_csThreads;
OBJLIST<ThreadData> m_arThreads;
+ LIST<GCThreadData> m_arGCThreads;
mir_cs m_csSessions;
OBJLIST<filetransfer> m_arSessions;
@@ -149,6 +154,7 @@ struct CMsnProto : public PROTO<CMsnProto>
bool usingGateway;
char* msnExternalIP;
+ char* msnRegistration;
char* msnPreviousUUX;
char* msnLastStatusMsg;
@@ -191,15 +197,17 @@ struct CMsnProto : public PROTO<CMsnProto>
void MSN_SendStatusMessage(const char* msg);
void MSN_SetServerStatus(int newStatus);
- void MSN_StartStopTyping(ThreadData* info, bool start);
- void MSN_SendTyping(ThreadData* info, const char* email, int netId );
+ void MSN_FetchRecentMessages(time_t since = 0);
+ void MSN_StartStopTyping(GCThreadData* info, bool start);
+ void MSN_SendTyping(ThreadData* info, const char* email, int netId, bool bTyping );
void MSN_InitSB(ThreadData* info, const char* szEmail);
void MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* params);
int MSN_HandleCommands(ThreadData* info, char* cmdString);
int MSN_HandleErrors(ThreadData* info, char* cmdString);
void MSN_ProcessNotificationMessage(char* buf, unsigned len);
- void MSN_ProcessStatusMessage(char* buf, unsigned len, const char* wlid);
+ void MSN_ProcessStatusMessage(ezxml_t xmli, const char* wlid);
+ void MSN_ProcessNLN(const char *userStatus, const char *wlid, char *userNick, const char *objid, char *cmdstring);
void MSN_ProcessPage(char* buf, unsigned len);
void MSN_ProcessRemove(char* buf, size_t len);
void MSN_ProcessAdd(char* buf, size_t len);
@@ -280,14 +288,13 @@ struct CMsnProto : public PROTO<CMsnProto>
int MSN_GetActiveThreads(ThreadData**);
ThreadData* MSN_GetThreadByConnection(HANDLE hConn);
ThreadData* MSN_GetThreadByContact(const char* wlid, TInfoType type = SERVER_SWITCHBOARD);
- ThreadData* MSN_GetThreadByChatId(const TCHAR* chatId);
+ GCThreadData*MSN_GetThreadByChatId(const TCHAR* chatId);
ThreadData* MSN_GetP2PThreadByContact(const char *wlid);
void MSN_StartP2PTransferByContact(const char* wlid);
ThreadData* MSN_GetThreadByPort(WORD wPort);
ThreadData* MSN_GetUnconnectedThread(const char* wlid, TInfoType type = SERVER_SWITCHBOARD);
ThreadData* MSN_GetOtherContactThread(ThreadData* thread);
- ThreadData* MSN_GetThreadByTimer(UINT timerId);
-
+
ThreadData* MSN_StartSB(const char* uid, bool& isOffline);
void __cdecl ThreadStub(void* arg);
@@ -395,9 +402,15 @@ struct CMsnProto : public PROTO<CMsnProto>
/////////////////////////////////////////////////////////////////////////////////////////
// MSN Chat support
- int MSN_ChatInit(ThreadData* info);
- void MSN_ChatStart(ThreadData* info);
+ int MSN_ChatInit(GCThreadData *info, const char *pszID, const char *pszTopic);
+ void MSN_ChatStart(ezxml_t xmli);
void MSN_KillChatSession(const TCHAR* id);
+ void MSN_Kickuser(GCHOOK *gch);
+ void MSN_Promoteuser(GCHOOK *gch, const char *pszRole);
+ const TCHAR *MSN_GCGetRole(GCThreadData* thread, const char *pszWLID);
+ void MSN_GCProcessThreadActivity(ezxml_t xmli, const TCHAR *mChatID);
+ void MSN_GCAddMessage(TCHAR *mChatID, MCONTACT hContact, char *email, time_t ts, bool sentMsg, char *msgBody);
+ void MSN_GCRefreshThreadsInfo(void);
MCONTACT MSN_GetChatInernalHandle(MCONTACT hContact);
@@ -437,6 +450,7 @@ struct CMsnProto : public PROTO<CMsnProto>
void MSN_AddAuthRequest(const char *email, const char *nick, const char *reason);
void MSN_SetContactDb(MCONTACT hContact, const char *szEmail);
MCONTACT MSN_HContactFromEmail(const char* msnEmail, const char* msnNick = NULL, bool addIfNeeded = false, bool temporary = false);
+ MCONTACT MSN_HContactFromChatID(const char* wlid);
MCONTACT AddToListByEmail(const char *email, const char *nick, DWORD flags);
/////////////////////////////////////////////////////////////////////////////////////////
@@ -460,9 +474,18 @@ struct CMsnProto : public PROTO<CMsnProto>
// MSN Authentication
int MSN_GetPassportAuth(void);
- char* GenerateLoginBlob(char* challenge);
+ int MSN_SkypeAuth(const char *pszNonce, char *pszUIC);
+ int MSN_DoOAuth(void);
+ char* GenerateLoginBlob(char* challenge);
+ void LoadAuthTokensDB(void);
+ void SaveAuthTokensDB(void);
+ int LoginSkypeOAuth(const char *pRefreshToken);
+ bool RefreshOAuth(const char *pszRefreshToken, const char *pszService, char *pszAccessToken, char *pszOutRefreshToken=NULL, time_t *ptExpires=NULL);
+ int MSN_AuthOAuth(void);
CMStringA HotmailLogin(const char* url);
void FreeAuthTokens(void);
+ int GetMyNetID(void);
+ const char *GetMyUsername(int netId);
/////////////////////////////////////////////////////////////////////////////////////////
// MSN avatars support
@@ -508,6 +531,7 @@ struct CMsnProto : public PROTO<CMsnProto>
bool MSN_ABAddRemoveContact(const char* szCntId, int netId, bool add, bool allowRecurse = true);
unsigned MSN_ABContactAdd(const char* szEmail, const char* szNick, int netId, const char* szInvite, bool search, bool retry = false, bool allowRecurse = true);
void MSN_ABUpdateDynamicItem(bool allowRecurse = true);
+ bool MSN_ABRefreshClist(void);
ezxml_t abSoapHdr(const char* service, const char* scenario, ezxml_t& tbdy, char*& httphdr);
char* GetABHost(const char* service, bool isSharing);
@@ -545,6 +569,7 @@ struct CMsnProto : public PROTO<CMsnProto>
//////////////////////////////////////////////////////////////////////////////////////
+ TCHAR *m_DisplayNameCache;
TCHAR* GetContactNameT(MCONTACT hContact);
int getStringUtf(MCONTACT hContact, const char* name, DBVARIANT* result);