diff options
Diffstat (limited to 'plugins/CmdLine')
-rw-r--r-- | plugins/CmdLine/src/mimcmd_handlers.cpp | 24 | ||||
-rw-r--r-- | plugins/CmdLine/src/utils.cpp | 18 | ||||
-rw-r--r-- | plugins/CmdLine/src/utils.h | 16 |
3 files changed, 29 insertions, 29 deletions
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index 5c2b9388a3..2cc5b4400f 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -1066,13 +1066,13 @@ void HandleCallServiceCommand(PCommand command, TArgument *argv, int argc, PRepl }
-HCONTACT ParseContactParam(char *contact)
+MCONTACT ParseContactParam(char *contact)
{
char name[512];
char account[128];
char protocol[128];
char *p = strrchr(contact, ':');
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
if (p)
{
*p = 0;
@@ -1099,7 +1099,7 @@ void HandleMessageCommand(PCommand command, TArgument *argv, int argc, PReply re int i;
char *contact;
char buffer[1024];
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hProcess = NULL;
ACKDATA *ack = NULL;
for (i = 2; i < argc - 1; i++)
@@ -1675,7 +1675,7 @@ void HandleProxyCommand(PCommand command, TArgument *argv, int argc, PReply repl }
}
-int ContactMatchSearch(HCONTACT hContact, char *contact, char *id, char *account, TArgument *argv, int argc)
+int ContactMatchSearch(MCONTACT hContact, char *contact, char *id, char *account, TArgument *argv, int argc)
{
int matches = 1;
int i;
@@ -1757,7 +1757,7 @@ int ContactMatchSearch(HCONTACT hContact, char *contact, char *id, char *account DWORD WINAPI OpenMessageWindowThread(void *data)
{
- HCONTACT hContact = (HCONTACT) data;
+ MCONTACT hContact = (MCONTACT) data;
if (hContact)
{
CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM) hContact, 0);
@@ -1780,7 +1780,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r int count = 0;
reply->code = MIMRES_SUCCESS;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
GetContactProto(hContact, protocol, sizeof(protocol));
char *contact = GetContactName(hContact, protocol);
@@ -1821,7 +1821,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r reply->code = MIMRES_SUCCESS;
*reply->message = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
GetContactProto(hContact, protocol, sizeof(protocol));
char *contact = GetContactName(hContact, protocol);
@@ -1840,7 +1840,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r reply->code = MIMRES_SUCCESS;
*reply->message = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hUnreadEvent = db_event_firstUnread(hContact);
if (hUnreadEvent != NULL) {
DWORD threadID;
@@ -1916,7 +1916,7 @@ void HandleHistoryCommand(PCommand command, TArgument *argv, int argc, PReply re reply->code = MIMRES_SUCCESS;
mir_snprintf(reply->message, reply->cMessage, Translate("No unread messages found."));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hEvent = db_event_firstUnread(hContact);
if (hEvent != NULL) {
count = 0;
@@ -1958,7 +1958,7 @@ void HandleHistoryCommand(PCommand command, TArgument *argv, int argc, PReply re case 4:
{
char *contact = argv[3];
- HCONTACT hContact = ParseContactParam(contact);
+ MCONTACT hContact = ParseContactParam(contact);
if (hContact)
{
if (_stricmp(cmd, "unread") == 0)
@@ -1993,7 +1993,7 @@ void HandleHistoryCommand(PCommand command, TArgument *argv, int argc, PReply re case 6:
{
char *contact = argv[3];
- HCONTACT hContact = ParseContactParam(contact);
+ MCONTACT hContact = ParseContactParam(contact);
if (hContact)
{
@@ -2139,7 +2139,7 @@ void HandleIgnoreCommand(PCommand command, TArgument *argv, int argc, PReply rep return;
}
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
char *contact;
for (int i = 3; i < argc; i++)
diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp index 5376dfed3d..a4d8a43251 100644 --- a/plugins/CmdLine/src/utils.cpp +++ b/plugins/CmdLine/src/utils.cpp @@ -123,7 +123,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData) i = size;
}
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size)
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size)
{
DBVARIANT dbv = {0};
int res = 1;
@@ -154,7 +154,7 @@ int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName return res;
}
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count)
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count)
{
DBVARIANT dbv = {0};
int res = 1;
@@ -202,7 +202,7 @@ int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, }
#pragma warning (disable: 4312)
-TCHAR *GetContactName(HCONTACT hContact, char *szProto)
+TCHAR *GetContactName(MCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo;
INT_PTR ret;
@@ -244,14 +244,14 @@ TCHAR *GetContactName(HCONTACT hContact, char *szProto) #pragma warning (default: 4312)
#pragma warning (disable: 4312)
-void GetContactProto(HCONTACT hContact, char *szProto, size_t size)
+void GetContactProto(MCONTACT hContact, char *szProto, size_t size)
{
GetStringFromDatabase(hContact, "Protocol", "p", NULL, szProto, size);
}
#pragma warning (default: 4312)
#pragma warning (disable: 4312)
-TCHAR *GetContactID(HCONTACT hContact)
+TCHAR *GetContactID(MCONTACT hContact)
{
char protocol[256];
GetContactProto(hContact, protocol, sizeof(protocol));
@@ -259,7 +259,7 @@ TCHAR *GetContactID(HCONTACT hContact) return GetContactID(hContact, protocol);
}
-TCHAR *GetContactID(HCONTACT hContact, char *szProto)
+TCHAR *GetContactID(MCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo;
INT_PTR ret;
@@ -326,14 +326,14 @@ TCHAR *GetContactID(HCONTACT hContact, char *szProto) #pragma warning (default: 4312)
#pragma warning (disable: 4312)
-HCONTACT GetContactFromID(TCHAR *szID, char *szProto)
+MCONTACT GetContactFromID(TCHAR *szID, char *szProto)
{
TCHAR dispName[1024];
char cProtocol[256];
char *tmp;
int found = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
GetContactProto(hContact, cProtocol, sizeof(cProtocol));
TCHAR *szHandle = GetContactID(hContact, cProtocol);
@@ -353,7 +353,7 @@ HCONTACT GetContactFromID(TCHAR *szID, char *szProto) #pragma warning (default: 4312)
#pragma warning (disable: 4312)
-HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto)
+MCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto)
{
char protocol[1024];
WideCharToMultiByte(CP_ACP, 0, szProto, -1, protocol, sizeof(protocol), NULL, NULL);
diff --git a/plugins/CmdLine/src/utils.h b/plugins/CmdLine/src/utils.h index 73d92eff93..a3fb389d33 100644 --- a/plugins/CmdLine/src/utils.h +++ b/plugins/CmdLine/src/utils.h @@ -43,17 +43,17 @@ void ScreenToClient(HWND hWnd, LPRECT rect); void AnchorMoveWindow(HWND window, const WINDOWPOS *parentPos, int anchors);
RECT AnchorCalcPos(HWND window, const RECT *rParent, const WINDOWPOS *parentPos, int anchors);
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size);
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count);
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size);
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count);
int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, size_t size);
int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count);
-TCHAR *GetContactName(HCONTACT hContact, char *szProto);
-TCHAR *GetContactID(HCONTACT hContact);
-TCHAR *GetContactID(HCONTACT hContact, char *szProto);
-HCONTACT GetContactFromID(TCHAR *szID, char *szProto);
-HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto);
-void GetContactProto(HCONTACT hContact, char *szProto, size_t size);
+TCHAR *GetContactName(MCONTACT hContact, char *szProto);
+TCHAR *GetContactID(MCONTACT hContact);
+TCHAR *GetContactID(MCONTACT hContact, char *szProto);
+MCONTACT GetContactFromID(TCHAR *szID, char *szProto);
+MCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto);
+void GetContactProto(MCONTACT hContact, char *szProto, size_t size);
int MyPUShowMessage(char *lpzText, BYTE kind);
|