diff options
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/Dropbox/Dropbox_12.vcxproj | 8 | ||||
| -rw-r--r-- | plugins/Dropbox/src/dropbox.h | 6 | ||||
| -rw-r--r-- | plugins/Dropbox/src/dropbox_dialogs.cpp | 4 | ||||
| -rw-r--r-- | plugins/Dropbox/src/dropbox_events.cpp | 24 | ||||
| -rw-r--r-- | plugins/Dropbox/src/dropbox_icons.cpp | 2 | ||||
| -rw-r--r-- | plugins/Dropbox/src/dropbox_menus.cpp | 2 | ||||
| -rw-r--r-- | plugins/Dropbox/src/dropbox_services.cpp | 8 | ||||
| -rw-r--r-- | plugins/Dropbox/src/dropbox_transfers.cpp | 6 | ||||
| -rw-r--r-- | plugins/Dropbox/src/http_request.h | 24 | ||||
| -rw-r--r-- | plugins/Dropbox/src/stdafx.cpp | 2 | 
10 files changed, 42 insertions, 44 deletions
| diff --git a/plugins/Dropbox/Dropbox_12.vcxproj b/plugins/Dropbox/Dropbox_12.vcxproj index c84ae46564..d55a10959a 100644 --- a/plugins/Dropbox/Dropbox_12.vcxproj +++ b/plugins/Dropbox/Dropbox_12.vcxproj @@ -79,7 +79,7 @@    </PropertyGroup>
    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
      <ClCompile>
 -      <WarningLevel>Level3</WarningLevel>
 +      <WarningLevel>Level4</WarningLevel>
        <Optimization>Disabled</Optimization>
        <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
        <AdditionalIncludeDirectories>..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 @@ -105,7 +105,7 @@    </ItemDefinitionGroup>
    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
      <ClCompile>
 -      <WarningLevel>Level3</WarningLevel>
 +      <WarningLevel>Level4</WarningLevel>
        <Optimization>Disabled</Optimization>
        <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
        <AdditionalIncludeDirectories>..\..\include;..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 @@ -131,7 +131,7 @@    </ItemDefinitionGroup>
    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
      <ClCompile>
 -      <WarningLevel>Level3</WarningLevel>
 +      <WarningLevel>Level4</WarningLevel>
        <Optimization>Full</Optimization>
        <FunctionLevelLinking>true</FunctionLevelLinking>
        <IntrinsicFunctions>true</IntrinsicFunctions>
 @@ -159,7 +159,7 @@    </ItemDefinitionGroup>
    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
      <ClCompile>
 -      <WarningLevel>Level3</WarningLevel>
 +      <WarningLevel>Level4</WarningLevel>
        <Optimization>Full</Optimization>
        <FunctionLevelLinking>true</FunctionLevelLinking>
        <IntrinsicFunctions>true</IntrinsicFunctions>
 diff --git a/plugins/Dropbox/src/dropbox.h b/plugins/Dropbox/src/dropbox.h index 543b492d7c..65fc092e70 100644 --- a/plugins/Dropbox/src/dropbox.h +++ b/plugins/Dropbox/src/dropbox.h @@ -45,7 +45,7 @@ private:  	ULONG  hMessageProcess;
  	HANDLE hFileSentEventHook;
 -	
 +
  	MCONTACT hDefaultContact;
  	MCONTACT hTransferContact;
 @@ -95,8 +95,8 @@ private:  	// transrers
  	int SendFile(const char *fileName, const char *data, int length);
 -	int SendFileChunkedFirst(const char *data, int length, char *uploadId, int &offset);
 -	int SendFileChunkedNext(const char *data, int length, const char *uploadId, int &offset);
 +	int SendFileChunkedFirst(const char *data, int length, char *uploadId, size_t &offset);
 +	int SendFileChunkedNext(const char *data, int length, const char *uploadId, size_t &offset);
  	int SendFileChunkedLast(const char *fileName, const char *uploadId);
  	int CreateFolder(const char *folderName);
 diff --git a/plugins/Dropbox/src/dropbox_dialogs.cpp b/plugins/Dropbox/src/dropbox_dialogs.cpp index d06483d0d6..6cb5d9bbf3 100644 --- a/plugins/Dropbox/src/dropbox_dialogs.cpp +++ b/plugins/Dropbox/src/dropbox_dialogs.cpp @@ -33,7 +33,7 @@ INT_PTR CALLBACK CDropbox::MainOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam  			CheckDlgButton(hwndDlg, IDC_URL_COPYTOMIA, BST_CHECKED);
  		CheckDlgButton(hwndDlg, IDC_URL_COPYTOCB, db_get_b(NULL, MODULE, "UrlCopyToClipboard", 0) ? BST_CHECKED : BST_UNCHECKED);
  	}
 -		return TRUE;
 +	return TRUE;
  	case WM_COMMAND:
  		switch (LOWORD(wParam))
 @@ -51,7 +51,7 @@ INT_PTR CALLBACK CDropbox::MainOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam  			GetDlgItemTextA(hwndDlg, IDC_REQUEST_CODE, requestToken, SIZEOF(requestToken));
  			EnableWindow(GetDlgItem(hwndDlg, IDC_AUTHORIZE), strlen(requestToken) != 0);
  		}
 -			break;
 +		break;
  		case IDC_AUTHORIZE:
  			mir_forkthreadowner(CDropbox::RequestAcceessTokenAsync, instance, hwndDlg, 0);
 diff --git a/plugins/Dropbox/src/dropbox_events.cpp b/plugins/Dropbox/src/dropbox_events.cpp index 4203984e61..cd96ff99ed 100644 --- a/plugins/Dropbox/src/dropbox_events.cpp +++ b/plugins/Dropbox/src/dropbox_events.cpp @@ -1,6 +1,6 @@  #include "common.h"
 -int CDropbox::OnModulesLoaded(void *obj, WPARAM wParam, LPARAM lParam)
 +int CDropbox::OnModulesLoaded(void *obj, WPARAM, LPARAM)
  {
  	HookEventObj(ME_DB_CONTACT_DELETED, OnContactDeleted, obj);
  	HookEventObj(ME_OPT_INITIALISE, OnOptionsInitialized, obj);
 @@ -40,7 +40,7 @@ int CDropbox::OnModulesLoaded(void *obj, WPARAM wParam, LPARAM lParam)  	return 0;
  }
 -int CDropbox::OnPreShutdown(void *obj, WPARAM wParam, LPARAM lParam)
 +int CDropbox::OnPreShutdown(void *, WPARAM, LPARAM)
  {
  	if (ServiceExists(MS_BB_ADDBUTTON))
  	{
 @@ -54,7 +54,7 @@ int CDropbox::OnPreShutdown(void *obj, WPARAM wParam, LPARAM lParam)  	return 0;
  }
 -int CDropbox::OnContactDeleted(void *obj, WPARAM hContact, LPARAM lParam)
 +int CDropbox::OnContactDeleted(void *obj, WPARAM hContact, LPARAM)
  {
  	CDropbox *instance = (CDropbox*)obj;
 @@ -67,7 +67,7 @@ int CDropbox::OnContactDeleted(void *obj, WPARAM hContact, LPARAM lParam)  	return 0;
  }
 -int CDropbox::OnOptionsInitialized(void *obj, WPARAM wParam, LPARAM lParam)
 +int CDropbox::OnOptionsInitialized(void *obj, WPARAM wParam, LPARAM)
  {
  	OPTIONSDIALOGPAGE odp = { sizeof(odp) };
  	odp.position = 100000000;
 @@ -84,7 +84,7 @@ int CDropbox::OnOptionsInitialized(void *obj, WPARAM wParam, LPARAM lParam)  	return 0;
  }
 -int CDropbox::OnSrmmWindowOpened(void *obj, WPARAM wParam, LPARAM lParam)
 +int CDropbox::OnSrmmWindowOpened(void *obj, WPARAM, LPARAM lParam)
  {
  	CDropbox *instance = (CDropbox*)obj;
 @@ -111,7 +111,7 @@ int CDropbox::OnSrmmWindowOpened(void *obj, WPARAM wParam, LPARAM lParam)  	return 0;
  }
 -int CDropbox::OnTabSrmmButtonPressed(void *obj, WPARAM wParam, LPARAM lParam)
 +int CDropbox::OnTabSrmmButtonPressed(void *obj, WPARAM, LPARAM lParam)
  {
  	CDropbox *instance = (CDropbox*)obj;
 @@ -132,7 +132,7 @@ int CDropbox::OnTabSrmmButtonPressed(void *obj, WPARAM wParam, LPARAM lParam)  		CallService(MS_BB_SETBUTTONSTATE, cbc->hContact, (LPARAM)&bbd);
  	}
 -	return 0; 
 +	return 0;
  }
  void __stdcall EnableTabSrmmButtonAsync(void *arg)
 @@ -146,7 +146,7 @@ void __stdcall EnableTabSrmmButtonAsync(void *arg)  	CallService(MS_BB_SETBUTTONSTATE, hContact, (LPARAM)&bbd);
  }
 -int CDropbox::OnFileDialogCancelled(void *obj, WPARAM hContact, LPARAM lParam)
 +int CDropbox::OnFileDialogCancelled(void *obj, WPARAM, LPARAM lParam)
  {
  	CDropbox *instance = (CDropbox*)obj;
 @@ -162,7 +162,7 @@ int CDropbox::OnFileDialogCancelled(void *obj, WPARAM hContact, LPARAM lParam)  	return 0;
  }
 -int CDropbox::OnFileDialogSuccessed(void *obj, WPARAM hContact, LPARAM lParam)
 +int CDropbox::OnFileDialogSuccessed(void *obj, WPARAM, LPARAM lParam)
  {
  	CDropbox *instance = (CDropbox*)obj;
 @@ -177,9 +177,9 @@ int CDropbox::OnFileDialogSuccessed(void *obj, WPARAM hContact, LPARAM lParam)  	return 0;
  }
 -int CDropbox::OnProtoAck(void *obj, WPARAM wParam, LPARAM lParam)
 +int CDropbox::OnProtoAck(void *, WPARAM, LPARAM lParam)
  {
 -	ACKDATA *ack = (ACKDATA*) lParam;
 +	ACKDATA *ack = (ACKDATA*)lParam;
  	if (!strcmp(ack->szModule, MODULE))
  		return 0; // don't rebroadcast our own acks
 @@ -205,7 +205,7 @@ int CDropbox::OnProtoAck(void *obj, WPARAM wParam, LPARAM lParam)  				bbd.pszModuleName = MODULE;
  				bbd.dwButtonID = BBB_ID_FILE_SEND;
  				bbd.bbbFlags = BBSF_RELEASED;
 -			
 +
  				if (status == ID_STATUS_OFFLINE && !canSendOffline)
  					bbd.bbbFlags = BBSF_DISABLED;
 diff --git a/plugins/Dropbox/src/dropbox_icons.cpp b/plugins/Dropbox/src/dropbox_icons.cpp index 114643240c..5684fc9ed4 100644 --- a/plugins/Dropbox/src/dropbox_icons.cpp +++ b/plugins/Dropbox/src/dropbox_icons.cpp @@ -21,7 +21,7 @@ void CDropbox::InitializeIcons()  		MODULE,
  		"main");
 -	SKINICONDESC sid = {0};
 +	SKINICONDESC sid = { 0 };
  	sid.cbSize = sizeof(SKINICONDESC);
  	sid.flags = SIDF_ALL_TCHAR;
  	sid.ptszDefaultFile = filePath;
 diff --git a/plugins/Dropbox/src/dropbox_menus.cpp b/plugins/Dropbox/src/dropbox_menus.cpp index 05efbb8947..fe1200fc29 100644 --- a/plugins/Dropbox/src/dropbox_menus.cpp +++ b/plugins/Dropbox/src/dropbox_menus.cpp @@ -37,7 +37,7 @@ void CDropbox::InitializeMenus()  	CreateServiceFunctionObj(mi.pszService, SendFilesToDropboxCommand, this);
  }
 -int CDropbox::OnPrebuildContactMenu(void *obj, WPARAM hContact, LPARAM lParam)
 +int CDropbox::OnPrebuildContactMenu(void *obj, WPARAM hContact, LPARAM)
  {
  	CDropbox *instance = (CDropbox*)obj;
 diff --git a/plugins/Dropbox/src/dropbox_services.cpp b/plugins/Dropbox/src/dropbox_services.cpp index d3577920e8..6842e76989 100644 --- a/plugins/Dropbox/src/dropbox_services.cpp +++ b/plugins/Dropbox/src/dropbox_services.cpp @@ -10,7 +10,7 @@ HANDLE CDropbox::CreateProtoServiceFunctionObj(const char *szService, MIRANDASER  INT_PTR CDropbox::ProtoGetCaps(WPARAM wParam, LPARAM)
  {
 -	switch(wParam)
 +	switch (wParam)
  	{
  	case PFLAGNUM_1:
  		return PF1_IM | PF1_FILESEND;
 @@ -78,7 +78,7 @@ INT_PTR CDropbox::ProtoSendFile(void *obj, WPARAM, LPARAM lParam)  				ftp->pfts.wszWorkingDir = (wchar_t*)mir_alloc(sizeof(wchar_t) * (length + 1));
  				mir_tstrncpy(ftp->pfts.wszWorkingDir, paths[j], length + 1);
  				ftp->pfts.wszWorkingDir[length] = '\0';
 -				
 +
  			}
  			ftp->pfts.pwszFiles[k] = mir_wstrdup(paths[i]);
 @@ -172,10 +172,8 @@ INT_PTR CDropbox::ProtoSendMessage(void *obj, WPARAM, LPARAM lParam)  	return 0;
  }
 -INT_PTR CDropbox::ProtoReceiveMessage(void *obj, WPARAM, LPARAM lParam)
 +INT_PTR CDropbox::ProtoReceiveMessage(void *, WPARAM, LPARAM lParam)
  {
 -	CDropbox *instance = (CDropbox*)obj;
 -
  	CCSDATA *pccsd = (CCSDATA*)lParam;
  	char *message = (char*)pccsd->lParam;
 diff --git a/plugins/Dropbox/src/dropbox_transfers.cpp b/plugins/Dropbox/src/dropbox_transfers.cpp index e1a538c664..52ce2aed57 100644 --- a/plugins/Dropbox/src/dropbox_transfers.cpp +++ b/plugins/Dropbox/src/dropbox_transfers.cpp @@ -25,7 +25,7 @@ int CDropbox::SendFile(const char *fileName, const char *data, int length)  	return HandleHttpResponseError(hNetlibUser, response);
  }
 -int CDropbox::SendFileChunkedFirst(const char *data, int length, char *uploadId, int &offset)
 +int CDropbox::SendFileChunkedFirst(const char *data, int length, char *uploadId, size_t &offset)
  {
  	HttpRequest *request = new HttpRequest(hNetlibUser, REQUEST_PUT, DROPBOX_APICONTENT_URL "/chunked_upload");
  	request->AddBearerAuthHeader(db_get_sa(NULL, MODULE, "TokenSecret"));
 @@ -54,7 +54,7 @@ int CDropbox::SendFileChunkedFirst(const char *data, int length, char *uploadId,  	return HandleHttpResponseError(hNetlibUser, response);
  }
 -int CDropbox::SendFileChunkedNext(const char *data, int length, const char *uploadId, int &offset)
 +int CDropbox::SendFileChunkedNext(const char *data, int length, const char *uploadId, size_t &offset)
  {
  	CMStringA url = DROPBOX_APICONTENT_URL "/chunked_upload";
  	url.AppendFormat("?upload_id=%s&offset=%i", uploadId, offset);
 @@ -226,7 +226,7 @@ UINT CDropbox::SendFilesAsync(void *owner, void *arg)  				ProtoBroadcastAck(MODULE, ftp->pfts.hContact, ACKTYPE_FILE, ACKRESULT_DATA, ftp->hProcess, (LPARAM)&ftp->pfts);
  				//
 -				int offset = 0;
 +				size_t offset = 0;
  				char *uploadId = new char[32];
  				int chunkSize = DROPBOX_FILE_CHUNK_SIZE / 4;
 diff --git a/plugins/Dropbox/src/http_request.h b/plugins/Dropbox/src/http_request.h index 30fce9d7b6..162af8c838 100644 --- a/plugins/Dropbox/src/http_request.h +++ b/plugins/Dropbox/src/http_request.h @@ -31,7 +31,7 @@ public:  	~HttpRequest()
  	{
 -		for (int i=0; i < headersCount; i++)
 +		for (int i = 0; i < headersCount; i++)
  		{
  			mir_free(headers[i].szName);
  			mir_free(headers[i].szValue);
 @@ -43,7 +43,7 @@ public:  	void AddHeader(LPCSTR szName, LPCSTR szValue)
  	{
 -		headers = (NETLIBHTTPHEADER*)mir_realloc(headers, sizeof(NETLIBHTTPHEADER)*(headersCount+1));
 +		headers = (NETLIBHTTPHEADER*)mir_realloc(headers, sizeof(NETLIBHTTPHEADER)*(headersCount + 1));
  		headers[headersCount].szName = mir_strdup(szName);
  		headers[headersCount].szValue = mir_strdup(szValue);
  		headersCount++;
 @@ -70,7 +70,7 @@ public:  		mir_free(ePair);
 -		headers = (NETLIBHTTPHEADER*)mir_realloc(headers, sizeof(NETLIBHTTPHEADER)*(headersCount+1));
 +		headers = (NETLIBHTTPHEADER*)mir_realloc(headers, sizeof(NETLIBHTTPHEADER)*(headersCount + 1));
  		headers[headersCount].szName = mir_strdup("Authorization");
  		headers[headersCount].szValue = mir_strdup(value);
  		headersCount++;
 @@ -85,7 +85,7 @@ public:  			"Bearer %s",
  			szValue);
 -		headers = (NETLIBHTTPHEADER*)mir_realloc(headers, sizeof(NETLIBHTTPHEADER)*(headersCount+1));
 +		headers = (NETLIBHTTPHEADER*)mir_realloc(headers, sizeof(NETLIBHTTPHEADER)*(headersCount + 1));
  		headers[headersCount].szName = mir_strdup("Authorization");
  		headers[headersCount].szValue = mir_strdup(value);
  		headersCount++;
 @@ -93,18 +93,18 @@ public:  	/*void AddParameter(LPCSTR szName, LPCSTR szValue)
  	{
 -		if (m_szUrl.Find('?') == -1)
 -			m_szUrl.AppendFormat("?%s=%s", szName, szValue);
 -		else
 -			m_szUrl.AppendFormat("&%s=%s", szName, szValue);
 +	if (m_szUrl.Find('?') == -1)
 +	m_szUrl.AppendFormat("?%s=%s", szName, szValue);
 +	else
 +	m_szUrl.AppendFormat("&%s=%s", szName, szValue);
  	}
  	void AddParameter(LPCSTR szName, int value)
  	{
 -		if (m_szUrl.Find('?') == -1)
 -			m_szUrl.AppendFormat("?%s=%i", szName, value);
 -		else
 -			m_szUrl.AppendFormat("&%s=%i", szName, value);
 +	if (m_szUrl.Find('?') == -1)
 +	m_szUrl.AppendFormat("?%s=%i", szName, value);
 +	else
 +	m_szUrl.AppendFormat("&%s=%i", szName, value);
  	}*/
  	NETLIBHTTPREQUEST *Send()
 diff --git a/plugins/Dropbox/src/stdafx.cpp b/plugins/Dropbox/src/stdafx.cpp index 1c648a0dbd..4f582768a9 100644 --- a/plugins/Dropbox/src/stdafx.cpp +++ b/plugins/Dropbox/src/stdafx.cpp @@ -27,7 +27,7 @@ DWORD WINAPI DllMain(HINSTANCE hInstance, DWORD, LPVOID)  	return TRUE;
  }
 -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
 +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
  {
  	return &pluginInfo;
  }
 | 
