diff options
Diffstat (limited to 'protocols/MSN/src/msn_global.h')
-rw-r--r-- | protocols/MSN/src/msn_global.h | 92 |
1 files changed, 69 insertions, 23 deletions
diff --git a/protocols/MSN/src/msn_global.h b/protocols/MSN/src/msn_global.h index 8756e2bd23..578de7ba52 100644 --- a/protocols/MSN/src/msn_global.h +++ b/protocols/MSN/src/msn_global.h @@ -124,10 +124,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MSN_GUID_LEN 40
#define MSN_PACKETS_COMBINE 7
-#define MSN_DEFAULT_PORT 1863
-#define MSN_DEFAULT_GATEWAY_PORT 80
-const char MSN_DEFAULT_LOGIN_SERVER[] = "messenger.hotmail.com";
-const char MSN_DEFAULT_GATEWAY[] = "gateway.messenger.hotmail.com";
+#define MSN_DEFAULT_PORT 443
+#define MSN_DEFAULT_GATEWAY_PORT 443
+const char MSN_DEFAULT_LOGIN_SERVER[] = "s.gateway.messenger.live.com";
+const char MSN_DEFAULT_GATEWAY[] = "geo.gateway.messenger.live.com";
const char MSN_USER_AGENT[] = NETLIB_USER_AGENT;
#define MSN_BLOCK "/BlockCommand"
@@ -158,6 +158,7 @@ char* HtmlEncode(const char* str); bool txtParseParam (const char* szData, const char* presearch, const char* start, const char* finish, char* param, const int size);
void stripBBCode(char* src);
void stripColorCode(char* src);
+void stripHTML(char* str);
void parseWLID(char* wlid, char** net, char** email, char** inst);
char* GetGlobalIp(void);
@@ -185,6 +186,8 @@ void MsnInitIcons(void); int sttDivideWords(char* parBuffer, int parMinItems, char** parDest);
void MSN_MakeDigest(const char* chl, char* dgst);
char* getNewUuid(void);
+time_t IsoToUnixTime(const char *stamp);
+time_t MsnTSToUnixtime(const char *pszTS);
TCHAR* EscapeChatTags(const TCHAR* pszText);
TCHAR* UnEscapeChatTags(TCHAR* str_in);
@@ -476,6 +479,31 @@ bool p2p_IsDlFileOk(filetransfer* ft); struct CMsnProto;
typedef void (__cdecl CMsnProto::*MsnThreadFunc)(void*);
+/* Groupchat threadlist entry. As there is no more SB in MSNP21+,
+ * this is no longer in ThreadData and there are no more new
+ * Threads, but for code compatibility, we still have ThreadData
+ * as a "main connection"
+ */
+struct GCUserItem
+{
+ char WLID[MSN_MAX_EMAIL_LEN];
+ TCHAR role[8];
+ BYTE btag;
+};
+
+struct GCThreadData
+{
+ GCThreadData();
+ ~GCThreadData();
+
+ LIST<GCUserItem> mJoinedContacts;
+ GCUserItem* mCreator;
+ GCUserItem* mMe;
+ TCHAR mChatID[MSN_MAX_EMAIL_LEN];
+ int netId; // from mChatID
+ char szEmail[MSN_MAX_EMAIL_LEN]; // frim mChatID
+};
+
struct ThreadData
{
ThreadData();
@@ -488,6 +516,7 @@ struct ThreadData TInfoType mType; // thread type
MsnThreadFunc mFunc; // thread entry point
char mServer[80]; // server name
+ char mState[128]; // state on XFR
HANDLE s; // NetLib connection for the thread
HANDLE mIncomingBoundPort; // Netlib listen for the thread
@@ -520,7 +549,8 @@ struct ThreadData //----| internal data buffer |--------------------------------------------------------
int mBytesInData; // bytes available in data buffer
- char mData[8192]; // data buffer for connection
+ char *mData; // data buffer for connection
+ size_t mDataSize;
//----| methods |---------------------------------------------------------------------
void applyGatewayData(HANDLE hConn, bool isPoll);
@@ -539,6 +569,7 @@ struct ThreadData int sendMessage(int msgType, const char* email, int netId, const char* msg, int parFlags);
int sendRawMessage(int msgType, const char* data, int datLen);
int sendPacket(const char* cmd, const char* fmt, ...);
+ int sendPacketPayload(const char* cmd, const char *param, const char* fmt, ...);
int contactJoined(const char* email);
int contactLeft(const char* email);
@@ -710,18 +741,32 @@ struct MsnContact #define capex_SupportsP4Activity 0x40000000
#define capex_SupportsChats 0x80000000
-#define NETID_UNKNOWN 0x0000
-#define NETID_MSN 0x0001
-#define NETID_LCS 0x0002
-#define NETID_MOB 0x0004
-#define NETID_MOBNET 0x0008
-#define NETID_CIRCLE 0x0009
-#define NETID_TMPCIRCLE 0x000A
-#define NETID_CID 0x000B
-#define NETID_CONNECT 0x000D
-#define NETID_REMOTE 0x000E
-#define NETID_SMTP 0x0010
-#define NETID_YAHOO 0x0020
+#define NETID_UNKNOWN 0
+#define NETID_MSN 1
+#define NETID_LCS 2
+#define NETID_ALIAS 3
+#define NETID_MOB 4
+#define NETID_DOMAIN 5
+#define NETID_SINK 6
+#define NETID_CONTACT 7
+#define NETID_SKYPE 8
+#define NETID_CIRCLE 9
+#define NETID_TMPCIRCLE 10
+#define NETID_CID 11
+#define NETID_APPID 12
+#define NETID_CONNECT 13
+#define NETID_REMOTE 14
+#define NETID_SMTP 16
+#define NETID_LVIDSINK 17
+#define NETID_MULTICAST 18
+#define NETID_THREAD 19
+#define NETID_1TO1TEXT 21
+#define NETID_GROUPTEXT 22
+#define NETID_BOT 28
+#define NETID_YAHOO 32
+#define NETID_PUBSUBTPC 33
+#define NETID_PUBSUBSUB 34
+#define NETID_WNSSID 35
#define LIST_FL 0x0001
#define LIST_AL 0x0002
@@ -769,12 +814,13 @@ struct TWinErrorCode #define MSN_NUM_MODES 9
-const char msnProtChallenge[] = "C1BX{V4W}Q3*10SM";
-const char msnProductID[] = "PROD0120PW!CCV9@";
-const char msnAppID[] = "484AAC02-7F59-41B7-9601-772045DCC569";
-const char msnStoreAppId[] = "Windows Live Messenger 2012";
-const char msnProductVer[] = "16.4.3528";
-const char msnProtID[] = "MSNP18";
+const char msnProtChallenge[] = "YMM8C_H7KCQ2S_KL";
+const char msnProductID[] = "PROD0090YUAUV{2B";
+const char msnAppID[] = "F6D2794D-501F-443A-ADBE-8F1490FF30FD";
+const int msnP24Ver = 2;
+const char msnStoreAppId[] = "Skype";
+const char msnProductVer[] = "0/6.16.0.105/259/";
+const char msnProtID[] = "MSNP24";
extern HINSTANCE hInst;
|