From 6f585711fa09225acea8dd58f72c24535c10cb00 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 28 Sep 2013 18:51:21 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@6262 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/GTalkExt/src/inbox.cpp | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) (limited to 'protocols/GTalkExt/src/inbox.cpp') diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 2271972fbb..8e6a6c5625 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -25,39 +25,26 @@ #include "db.h" #include "options.h" -const LPTSTR COMMON_GMAIL_HOST1 = _T("gmail.com"); -const LPTSTR COMMON_GMAIL_HOST2 = _T("googlemail.com"); +#define COMMON_GMAIL_HOST1 _T("gmail.com") +#define COMMON_GMAIL_HOST2 _T("googlemail.com") -const LPSTR AUTH_REQUEST_URL = "https://www.google.com/accounts/ClientAuth"; -const LPSTR AUTH_REQUEST_PARAMS = "Email=%s&Passwd=%s&" - "accountType=HOSTED_OR_GOOGLE&" - "skipvpage=true&" - "PersistentCookie=false"; +#define AUTH_REQUEST_URL "https://www.google.com/accounts/ClientAuth" +#define AUTH_REQUEST_PARAMS "Email=%s&Passwd=%s&accountType=HOSTED_OR_GOOGLE&skipvpage=true&PersistentCookie=false" -const LPSTR ISSUE_TOKEN_REQUEST_URL = "https://www.google.com/accounts/IssueAuthToken"; -const LPSTR ISSUE_TOKEN_REQUEST_PARAMS = "SID=%s&LSID=%s&" - "Session=true&" - "skipvpage=true&" - "service=gaia"; - -const LPSTR TOKEN_AUTH_URL = "https://www.google.com/accounts/TokenAuth?"\ - "auth=%s&" - "service=mail&" - "continue=%s&" - "source=googletalk"; +#define ISSUE_TOKEN_REQUEST_URL "https://www.google.com/accounts/IssueAuthToken" +#define ISSUE_TOKEN_REQUEST_PARAMS "SID=%s&LSID=%s&Session=true&skipvpage=true&service=gaia" +#define TOKEN_AUTH_URL "https://www.google.com/accounts/TokenAuth?auth=%s&service=mail&continue=%s&source=googletalk" const NETLIBHTTPHEADER HEADER_URL_ENCODED = {"Content-Type", "application/x-www-form-urlencoded"}; -const int HTTP_OK = 200; - -const LPSTR SID_KEY_NAME = "SID="; -const LPSTR LSID_KEY_NAME = "LSID="; +#define HTTP_OK 200 -const LPSTR LOGIN_PASS_SETTING_NAME = "LoginPassword"; +#define SID_KEY_NAME "SID=" +#define LSID_KEY_NAME "LSID=" -const LPTSTR INBOX_URL_FORMAT = _T("https://mail.google.com/%s%s/#inbox"); +#define LOGIN_PASS_SETTING_NAME "LoginPassword" -const DWORD SIZE_OF_JABBER_OPTIONS = 243 * sizeof(DWORD); +#define INBOX_URL_FORMAT _T("https://mail.google.com/%s%s/#inbox") // 3 lines from netlib.h #define GetNetlibHandleType(h) (h?*(int*)h:NLH_INVALID) -- cgit v1.2.3