summaryrefslogtreecommitdiff
path: root/protocols/Yahoo/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-21 16:58:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-21 16:58:18 +0000
commit2072201029bdd799396b37de23410bab71cc653e (patch)
tree2a54c58861c12287fd74d655930cd0fc9cbfec4f /protocols/Yahoo/src
parent0c633e766422e0bb45cf8b89755acf2a10acc153 (diff)
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@5083 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo/src')
-rw-r--r--protocols/Yahoo/src/http_gateway.cpp2
-rw-r--r--protocols/Yahoo/src/main.cpp4
-rw-r--r--protocols/Yahoo/src/options.cpp6
-rw-r--r--protocols/Yahoo/src/proto.cpp4
-rw-r--r--protocols/Yahoo/src/services.cpp46
-rw-r--r--protocols/Yahoo/src/yahoo.cpp10
6 files changed, 35 insertions, 37 deletions
diff --git a/protocols/Yahoo/src/http_gateway.cpp b/protocols/Yahoo/src/http_gateway.cpp
index 188d0a36ad..ab096a3261 100644
--- a/protocols/Yahoo/src/http_gateway.cpp
+++ b/protocols/Yahoo/src/http_gateway.cpp
@@ -25,8 +25,6 @@ int YAHOO_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION *nloc, NETLIBHTTPRE
nlhpi.cbSize = sizeof(nlhpi);
nlhpi.szHttpPostUrl = "http://shttp.msg.yahoo.com/notify/";
- //CallService( MS_NETLIB_SETPOLLINGTIMEOUT, (WPARAM) hConn, 15 );
-
return CallService(MS_NETLIB_SETHTTPPROXYINFO, (WPARAM)hConn, (LPARAM)&nlhpi);
}
diff --git a/protocols/Yahoo/src/main.cpp b/protocols/Yahoo/src/main.cpp
index 4b5f3e2e22..758c018bce 100644
--- a/protocols/Yahoo/src/main.cpp
+++ b/protocols/Yahoo/src/main.cpp
@@ -102,14 +102,14 @@ extern "C" int __declspec(dllexport)Load(void)
pd.type = PROTOTYPE_PROTOCOL;
pd.fnInit = ( pfnInitProto )yahooProtoInit;
pd.fnUninit = ( pfnUninitProto )yahooProtoUninit;
- CallService( MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd );
+ CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
NETLIBUSER nlu = {0};
nlu.cbSize = sizeof(nlu);
nlu.flags = NUF_TCHAR | NUF_OUTGOING | NUF_HTTPCONNS;
nlu.szSettingsModule = "YAHOO/libyahoo2";
nlu.ptszDescriptiveName = TranslateT("YAHOO plugin HTTP connections");
- g_hNetlibUser = ( HANDLE )CallService( MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu );
+ g_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
YmsgrLinksInit();
/**
diff --git a/protocols/Yahoo/src/options.cpp b/protocols/Yahoo/src/options.cpp
index cc3e96913e..1cc64865da 100644
--- a/protocols/Yahoo/src/options.cpp
+++ b/protocols/Yahoo/src/options.cpp
@@ -48,7 +48,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
if ( !ppro->GetString( YAHOO_PASSWORD, &dbv )) {
//bit of a security hole here, since it's easy to extract a password from an edit box
- CallService( MS_DB_CRYPT_DECODESTRING, strlen( dbv.pszVal )+1, (LPARAM)dbv.pszVal );
+ CallService(MS_DB_CRYPT_DECODESTRING, strlen( dbv.pszVal )+1, (LPARAM)dbv.pszVal);
SetDlgItemTextA( hwndDlg, IDC_PASSWORD, dbv.pszVal );
db_free( &dbv );
}
@@ -66,7 +66,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
switch ( LOWORD( wParam )) {
case IDC_NEWYAHOOACCOUNTLINK:
- CallService( MS_UTILS_OPENURL, 1,
+ CallService(MS_UTILS_OPENURL, 1,
ppro->GetByte("YahooJapan", 0) ?
(LPARAM)"http://edit.yahoo.co.jp/config/eval_register" :
(LPARAM)"http://edit.yahoo.com/config/eval_register");
@@ -110,7 +110,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
ppro->SetString( YAHOO_LOGINID, str );
GetDlgItemTextA( hwndDlg, IDC_PASSWORD, str, sizeof( str ));
- CallService( MS_DB_CRYPT_ENCODESTRING, sizeof( str ),(LPARAM)str );
+ CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(str), (LPARAM)str);
dbv.pszVal = NULL;
if ( ppro->GetString( YAHOO_PASSWORD, &dbv ) || lstrcmpA( str, dbv.pszVal ))
reconnectRequired = TRUE;
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp
index 9971a8a0f6..4ab4dfe26d 100644
--- a/protocols/Yahoo/src/proto.cpp
+++ b/protocols/Yahoo/src/proto.cpp
@@ -98,7 +98,7 @@ int CYahooProto::OnModulesLoadedEx( WPARAM, LPARAM )
nlu.pfnHttpGatewayUnwrapRecv = YAHOO_httpGatewayUnwrapRecv;
#endif
- m_hNetlibUser = ( HANDLE )CallService( MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu );
+ m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
MenuContactInit();
return 0;
@@ -763,7 +763,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case WM_COMMAND:
if ( LOWORD( wParam ) == IDC_NEWYAHOOACCOUNTLINK ) {
- CallService( MS_UTILS_OPENURL,
+ CallService(MS_UTILS_OPENURL,
1,
(( BYTE )IsDlgButtonChecked( hwndDlg, IDC_YAHOO_JAPAN ) == 1) ?
(LPARAM) "http://edit.yahoo.co.jp/config/eval_register" :
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp
index 1e5b7648f5..64756331db 100644
--- a/protocols/Yahoo/src/services.cpp
+++ b/protocols/Yahoo/src/services.cpp
@@ -239,7 +239,7 @@ void CYahooProto::OpenURL(const char *url, int autoLogin)
DebugLog("[YahooOpenURL] url: %s Final URL: %s", url, tUrl);
- CallService( MS_UTILS_OPENURL, TRUE, (LPARAM)tUrl );
+ CallService(MS_UTILS_OPENURL, TRUE, (LPARAM)tUrl);
}
//=======================================================
@@ -367,13 +367,13 @@ INT_PTR __cdecl CYahooProto::GetUnreadEmailCount(WPARAM wParam, LPARAM lParam)
void CYahooProto::MenuMainInit( void )
{
char servicefunction[ 100 ];
- lstrcpyA( servicefunction, m_szModuleName );
+ lstrcpyA( servicefunction, m_szModuleName);
char* tDest = servicefunction + lstrlenA( servicefunction );
CLISTMENUITEM mi = { sizeof(mi) };
mi.pszService = servicefunction;
- HGENMENU hRoot = MO_GetProtoRootMenu( m_szModuleName );
+ HGENMENU hRoot = MO_GetProtoRootMenu( m_szModuleName);
if ( hRoot == NULL) {
mi.position = 500015000;
mi.hParentMenu = HGENMENU_ROOT;
@@ -468,7 +468,7 @@ void CYahooProto::MenuMainInit( void )
void CYahooProto::MenuContactInit( void )
{
char servicefunction[ 100 ];
- lstrcpyA( servicefunction, m_szModuleName );
+ lstrcpyA( servicefunction, m_szModuleName);
char* tDest = servicefunction + lstrlenA( servicefunction );
CLISTMENUITEM mi = { sizeof(mi) };
@@ -489,9 +489,9 @@ void CYahooProto::MenuContactInit( void )
void CYahooProto::MenuUninit( void )
{
if ( mainMenuRoot )
- CallService( MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)mainMenuRoot, 0);
+ CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)mainMenuRoot, 0);
- CallService( MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hShowProfileMenuItem, 0);
+ CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hShowProfileMenuItem, 0);
}
int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
@@ -518,7 +518,7 @@ void CYahooProto::LoadYahooServices( void )
YHookEvent( ME_OPT_INITIALISE, &CYahooProto::OnOptionsInit );
//----| Create nudge event |----------------------------------------------------------
- mir_snprintf( path, SIZEOF(path), "%s/Nudge", m_szModuleName);
+ mir_snprintf(path, SIZEOF(path), "%s/Nudge", m_szModuleName);
hYahooNudge = CreateHookableEvent( path );
//----| Service creation |------------------------------------------------------------
@@ -536,27 +536,27 @@ void CYahooProto::LoadYahooServices( void )
//----| Set resident variables |------------------------------------------------------
- mir_snprintf( path, SIZEOF(path), "%s/Status", m_szModuleName );
- CallService( MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path );
+ mir_snprintf(path, SIZEOF(path), "%s/Status", m_szModuleName);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
- mir_snprintf( path, SIZEOF(path), "%s/YStatus", m_szModuleName );
- CallService( MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path );
+ mir_snprintf(path, SIZEOF(path), "%s/YStatus", m_szModuleName);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
- mir_snprintf( path, SIZEOF(path), "%s/YAway", m_szModuleName );
- CallService( MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path );
+ mir_snprintf(path, SIZEOF(path), "%s/YAway", m_szModuleName);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
- mir_snprintf( path, SIZEOF(path), "%s/Mobile", m_szModuleName );
- CallService( MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path );
+ mir_snprintf(path, SIZEOF(path), "%s/Mobile", m_szModuleName);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
- mir_snprintf( path, SIZEOF(path), "%s/YGMsg", m_szModuleName );
- CallService( MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path );
+ mir_snprintf(path, SIZEOF(path), "%s/YGMsg", m_szModuleName);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
- mir_snprintf( path, SIZEOF(path), "%s/IdleTS", m_szModuleName );
- CallService( MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path );
+ mir_snprintf(path, SIZEOF(path), "%s/IdleTS", m_szModuleName);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
- mir_snprintf( path, SIZEOF(path), "%s/PictLastCheck", m_szModuleName );
- CallService( MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path );
+ mir_snprintf(path, SIZEOF(path), "%s/PictLastCheck", m_szModuleName);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
- mir_snprintf( path, SIZEOF(path), "%s/PictLoading", m_szModuleName );
- CallService( MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path );
+ mir_snprintf(path, SIZEOF(path), "%s/PictLoading", m_szModuleName);
+ CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)path);
}
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp
index 2f474c8c37..1b6fafa066 100644
--- a/protocols/Yahoo/src/yahoo.cpp
+++ b/protocols/Yahoo/src/yahoo.cpp
@@ -319,7 +319,7 @@ HANDLE CYahooProto::add_buddy( const char *yahoo_id, const char *yahoo_name, int
//not already there: add
LOG(("[add_buddy] Adding buddy id: %s (Nick: %s), flags: %lu", yid, yahoo_name, flags));
- hContact = (HANDLE)CallService( MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact,(LPARAM)m_szModuleName);
SetString( hContact, YAHOO_LOGINID, yid );
Set_Protocol( hContact, protocol );
@@ -727,7 +727,7 @@ void CYahooProto::ext_rejected(const char *who, const char *msg)
* Make sure the contact is temporary so we could delete it w/o extra traffic
*/
db_set_b( hContact, "CList", "NotOnList", 1 );
- CallService( MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
}
else LOG(("[ext_rejected] Buddy not on our buddy list"));
@@ -759,7 +759,7 @@ void CYahooProto::ext_buddy_added(char *myid, char *who, char *group, int status
ShowPopup( TranslateT("Invalid Contact"), TranslateT("The id you tried to add is invalid."), NULL);
/* Make it TEMP first, we don't want to send any extra packets for FALSE ids */
db_set_b( hContact, "CList", "NotOnList", 1 );
- CallService( MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
}
break;
@@ -769,7 +769,7 @@ void CYahooProto::ext_buddy_added(char *myid, char *who, char *group, int status
ShowPopup( TranslateT("Invalid Contact"), TranslateT("Unknown Error??."), NULL);
/* Make it TEMP first, we don't want to send any extra packets for FALSE ids */
db_set_b( hContact, "CList", "NotOnList", 1 );
- CallService( MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
}
break;
@@ -1371,7 +1371,7 @@ static void connect_complete(void *data, int source, yahoo_input_condition condi
//tSelect.dwTimeout = T->mGatewayTimeout * 1000;
tSelect.dwTimeout = 1;
tSelect.hReadConns[ 0 ] = ( HANDLE )source;
- error = CallService( MS_NETLIB_SELECT, 0, (LPARAM)&tSelect );
+ error = CallService(MS_NETLIB_SELECT, 0, (LPARAM)&tSelect );
if (error) {
//close(source);