summaryrefslogtreecommitdiff
path: root/src/core/stdfile
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stdfile')
-rw-r--r--src/core/stdfile/file.cpp22
-rw-r--r--src/core/stdfile/file.h8
-rw-r--r--src/core/stdfile/filerecvdlg.cpp2
3 files changed, 16 insertions, 16 deletions
diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp
index 217605b18f..7cf600a641 100644
--- a/src/core/stdfile/file.cpp
+++ b/src/core/stdfile/file.cpp
@@ -30,7 +30,7 @@ int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS* ft, const PROTOCHAR* s, TCHAR
static HGENMENU hSRFileMenuItem;
-TCHAR *GetContactID(HANDLE hContact)
+TCHAR *GetContactID(HCONTACT hContact)
{
TCHAR *theValue = {0};
char *szProto = GetContactProto(hContact);
@@ -62,7 +62,7 @@ TCHAR *GetContactID(HANDLE hContact)
static INT_PTR SendFileCommand(WPARAM wParam, LPARAM)
{
struct FileSendData fsd;
- fsd.hContact = (HANDLE)wParam;
+ fsd.hContact = (HCONTACT)wParam;
fsd.ppFiles = NULL;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
return 0;
@@ -71,7 +71,7 @@ static INT_PTR SendFileCommand(WPARAM wParam, LPARAM)
static INT_PTR SendSpecificFiles(WPARAM wParam, LPARAM lParam)
{
FileSendData fsd;
- fsd.hContact = (HANDLE)wParam;
+ fsd.hContact = (HCONTACT)wParam;
char** ppFiles = (char**)lParam;
int count = 0;
@@ -92,7 +92,7 @@ static INT_PTR SendSpecificFiles(WPARAM wParam, LPARAM lParam)
static INT_PTR SendSpecificFilesT(WPARAM wParam, LPARAM lParam)
{
FileSendData fsd;
- fsd.hContact = (HANDLE)wParam;
+ fsd.hContact = (HCONTACT)wParam;
fsd.ppFiles = (const TCHAR**)lParam;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
return 0;
@@ -101,7 +101,7 @@ static INT_PTR SendSpecificFilesT(WPARAM wParam, LPARAM lParam)
static INT_PTR GetReceivedFilesFolder(WPARAM wParam, LPARAM lParam)
{
TCHAR buf[MAX_PATH];
- GetContactReceivedFilesDir((HANDLE)wParam, buf, MAX_PATH, TRUE);
+ GetContactReceivedFilesDir((HCONTACT)wParam, buf, MAX_PATH, TRUE);
char* dir = mir_t2a(buf);
lstrcpynA((char*)lParam, dir, MAX_PATH);
mir_free(dir);
@@ -114,7 +114,7 @@ static INT_PTR RecvFileCommand(WPARAM, LPARAM lParam)
return 0;
}
-void PushFileEvent(HANDLE hContact, HANDLE hdbe, LPARAM lParam)
+void PushFileEvent(HCONTACT hContact, HANDLE hdbe, LPARAM lParam)
{
CLISTEVENT cle = {0};
cle.cbSize = sizeof(cle);
@@ -148,7 +148,7 @@ static int FileEventAdded(WPARAM wParam, LPARAM lParam)
if (dbei.flags & (DBEF_SENT|DBEF_READ) || dbei.eventType != EVENTTYPE_FILE || dwSignature == 0)
return 0;
- PushFileEvent((HANDLE)wParam, (HANDLE)lParam, 0);
+ PushFileEvent((HCONTACT)wParam, (HANDLE)lParam, 0);
return 0;
}
@@ -288,7 +288,7 @@ void UpdateProtoFileTransferStatus(PROTOFILETRANSFERSTATUS *dest, PROTOFILETRANS
static void RemoveUnreadFileEvents(void)
{
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
DBEVENTINFO dbei = { sizeof(dbei) };
@@ -303,12 +303,12 @@ static void RemoveUnreadFileEvents(void)
static int SRFilePreBuildMenu(WPARAM wParam, LPARAM)
{
bool bEnabled = false;
- char *szProto = GetContactProto((HANDLE)wParam);
+ char *szProto = GetContactProto((HCONTACT)wParam);
if (szProto != NULL) {
if ( CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_FILESEND) {
if ( CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES)
bEnabled = true;
- else if (db_get_w((HANDLE)wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
+ else if (db_get_w((HCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
bEnabled = true;
}
}
@@ -339,7 +339,7 @@ INT_PTR FtMgrShowCommand(WPARAM, LPARAM)
INT_PTR openContRecDir(WPARAM wparam, LPARAM)
{
TCHAR szContRecDir[MAX_PATH];
- HANDLE hContact = (HANDLE)wparam;
+ HCONTACT hContact = (HCONTACT)wparam;
GetContactReceivedFilesDir(hContact, szContRecDir, SIZEOF(szContRecDir), TRUE);
ShellExecute(0, _T("open"), szContRecDir, 0, 0, SW_SHOW);
return 0;
diff --git a/src/core/stdfile/file.h b/src/core/stdfile/file.h
index 80f8b26d2b..aa390a774a 100644
--- a/src/core/stdfile/file.h
+++ b/src/core/stdfile/file.h
@@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define M_PRESHUTDOWN (WM_USER+201)
struct FileSendData {
- HANDLE hContact;
+ HCONTACT hContact;
const TCHAR **ppFiles;
};
@@ -46,7 +46,7 @@ struct FileSendData {
struct FileDlgData {
HWND hwndTransfer;
HANDLE fs;
- HANDLE hContact;
+ HCONTACT hContact;
HANDLE hDbEvent;
HANDLE hNotifyEvent;
TCHAR **files;
@@ -85,7 +85,7 @@ INT_PTR CALLBACK DlgProcSendFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void RemoveInvalidFilenameChars(TCHAR *tszString);
void RemoveInvalidPathChars(TCHAR *tszString);
-void GetContactReceivedFilesDir(HANDLE hContact, TCHAR *szDir, int cchDir, BOOL substVars);
+void GetContactReceivedFilesDir(HCONTACT hContact, TCHAR *szDir, int cchDir, BOOL substVars);
void GetReceivedFilesDir(TCHAR *szDir, int cchDir);
int BrowseForFolder(HWND hwnd, TCHAR *szPath);
//fileexistsdlg.c
@@ -113,4 +113,4 @@ HWND FtMgr_AddTransfer(struct FileDlgData *dat);
void FreeFileDlgData(FileDlgData* dat);
-TCHAR *GetContactID(HANDLE hContact);
+TCHAR *GetContactID(HCONTACT hContact);
diff --git a/src/core/stdfile/filerecvdlg.cpp b/src/core/stdfile/filerecvdlg.cpp
index a5c230cbb2..ca00c0f642 100644
--- a/src/core/stdfile/filerecvdlg.cpp
+++ b/src/core/stdfile/filerecvdlg.cpp
@@ -131,7 +131,7 @@ static void patchDir(TCHAR *str, size_t strSize)
lstrcpy(str+len, _T("\\"));
}
-void GetContactReceivedFilesDir(HANDLE hContact, TCHAR *szDir, int cchDir, BOOL patchVars)
+void GetContactReceivedFilesDir(HCONTACT hContact, TCHAR *szDir, int cchDir, BOOL patchVars)
{
DBVARIANT dbv;
TCHAR szTemp[MAX_PATH];