diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
commit | 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch) | |
tree | fcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/SecureIM/src | |
parent | 7193759b046338c6f47ff2edb34743a1465791cd (diff) |
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src')
-rw-r--r-- | plugins/SecureIM/src/commonheaders.cpp | 4 | ||||
-rw-r--r-- | plugins/SecureIM/src/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt.h | 88 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_check.cpp | 28 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_dll.cpp | 2 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_icons.cpp | 10 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_lists.cpp | 20 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_metacontacts.cpp | 20 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_misc.cpp | 2 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_popups.cpp | 18 | ||||
-rw-r--r-- | plugins/SecureIM/src/dbevent.cpp | 2 | ||||
-rw-r--r-- | plugins/SecureIM/src/dbevent.h | 2 | ||||
-rw-r--r-- | plugins/SecureIM/src/options.cpp | 8 | ||||
-rw-r--r-- | plugins/SecureIM/src/svcs_clist.cpp | 12 | ||||
-rw-r--r-- | plugins/SecureIM/src/svcs_menu.cpp | 58 | ||||
-rw-r--r-- | plugins/SecureIM/src/svcs_proto.cpp | 4 | ||||
-rw-r--r-- | plugins/SecureIM/src/svcs_srmm.cpp | 2 |
17 files changed, 141 insertions, 141 deletions
diff --git a/plugins/SecureIM/src/commonheaders.cpp b/plugins/SecureIM/src/commonheaders.cpp index 6dccfe53bc..db6ee76cd3 100644 --- a/plugins/SecureIM/src/commonheaders.cpp +++ b/plugins/SecureIM/src/commonheaders.cpp @@ -37,7 +37,7 @@ PLUGININFOEX pluginInfoEx = { {0x1B2A39E5, 0xE2F6, 0x494D, {0x95, 0x8D, 0x18, 0x08, 0xFD, 0x11, 0x0D, 0xD5}}
};
-LPSTR myDBGetStringDecode(HCONTACT hContact,const char *szModule,const char *szSetting)
+LPSTR myDBGetStringDecode(MCONTACT hContact,const char *szModule,const char *szSetting)
{
char *val = db_get_sa(hContact,szModule,szSetting);
if (!val) return NULL;
@@ -47,7 +47,7 @@ LPSTR myDBGetStringDecode(HCONTACT hContact,const char *szModule,const char *szS return buf;
}
-int myDBWriteStringEncode(HCONTACT hContact,const char *szModule,const char *szSetting,const char *val)
+int myDBWriteStringEncode(MCONTACT hContact,const char *szModule,const char *szSetting,const char *val)
{
int len = (int)strlen(val)+64;
char *buf = (LPSTR)alloca(len);
diff --git a/plugins/SecureIM/src/commonheaders.h b/plugins/SecureIM/src/commonheaders.h index 69305e6d4d..6fe89b1c81 100644 --- a/plugins/SecureIM/src/commonheaders.h +++ b/plugins/SecureIM/src/commonheaders.h @@ -102,7 +102,7 @@ int onModulesLoaded(WPARAM, LPARAM); int onShutdown(WPARAM, LPARAM);
int ModuleLoad(WPARAM wParam, LPARAM lParam);
-__forceinline int SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+__forceinline int SendBroadcast(MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
return ProtoBroadcastAck( GetContactProto(hContact), hContact, type, result, hProcess, lParam);
}
diff --git a/plugins/SecureIM/src/crypt.h b/plugins/SecureIM/src/crypt.h index 9da46e8be9..e7e9398f69 100644 --- a/plugins/SecureIM/src/crypt.h +++ b/plugins/SecureIM/src/crypt.h @@ -39,7 +39,7 @@ typedef partitionMessage* pPM; // memory struct for keys
struct UinKey
{
- HCONTACT hContact; // handle of contact
+ MCONTACT hContact; // handle of contact
u_int header; // HEADER
pSupPro proto; // proto struct
BYTE mode,tmode; // mode: Native,PGP,GPG,RSA/AES,RSA [0..4]
@@ -70,13 +70,13 @@ typedef UinKey* pUinKey; struct TFakeAckParams
{
- __forceinline TFakeAckParams(HCONTACT p1, LONG p2, LPCSTR p3) :
+ __forceinline TFakeAckParams(MCONTACT p1, LONG p2, LPCSTR p3) :
hContact(p1),
id(p2),
msg(p3)
{}
- HCONTACT hContact;
+ MCONTACT hContact;
LONG id;
LPCSTR msg;
};
@@ -90,71 +90,71 @@ extern LIST<UinKey> arClist; // crypt_lists.cpp
void loadContactList();
void freeContactList();
-pUinKey addContact(HCONTACT hContact);
-void delContact(HCONTACT hContact);
-pSupPro getSupPro(HCONTACT);
-pUinKey findUinKey(HCONTACT hContact);
-pUinKey getUinKey(HCONTACT hContact);
+pUinKey addContact(MCONTACT hContact);
+void delContact(MCONTACT hContact);
+pSupPro getSupPro(MCONTACT);
+pUinKey findUinKey(MCONTACT hContact);
+pUinKey getUinKey(MCONTACT hContact);
pUinKey getUinCtx(HANDLE);
void addMsg2Queue(pUinKey,WPARAM,LPSTR);
-void getContactName(HCONTACT hContact, LPSTR szName);
-void getContactNameA(HCONTACT hContact, LPSTR szName);
-void getContactUin(HCONTACT hContact, LPSTR szUIN);
-void getContactUinA(HCONTACT hContact, LPSTR szUIN);
+void getContactName(MCONTACT hContact, LPSTR szName);
+void getContactNameA(MCONTACT hContact, LPSTR szName);
+void getContactUin(MCONTACT hContact, LPSTR szUIN);
+void getContactUinA(MCONTACT hContact, LPSTR szUIN);
// crypt_check.cpp
-int getContactStatus(HCONTACT);
+int getContactStatus(MCONTACT);
-bool isSecureProtocol(HCONTACT hContact);
-BYTE isContactSecured(HCONTACT hContact);
+bool isSecureProtocol(MCONTACT hContact);
+BYTE isContactSecured(MCONTACT hContact);
bool isClientMiranda(pUinKey ptr, BOOL emptyMirverAsMiranda=FALSE);
-bool isClientMiranda(HCONTACT hContact, BOOL emptyMirverAsMiranda=FALSE);
-bool isProtoSmallPackets(HCONTACT);
-bool isContactInvisible(HCONTACT);
-bool isNotOnList(HCONTACT);
-bool isContactNewPG(HCONTACT);
-bool isContactPGP(HCONTACT);
-bool isContactGPG(HCONTACT);
-bool isContactRSAAES(HCONTACT);
-bool isContactRSA(HCONTACT);
-bool isChatRoom(HCONTACT);
+bool isClientMiranda(MCONTACT hContact, BOOL emptyMirverAsMiranda=FALSE);
+bool isProtoSmallPackets(MCONTACT);
+bool isContactInvisible(MCONTACT);
+bool isNotOnList(MCONTACT);
+bool isContactNewPG(MCONTACT);
+bool isContactPGP(MCONTACT);
+bool isContactGPG(MCONTACT);
+bool isContactRSAAES(MCONTACT);
+bool isContactRSA(MCONTACT);
+bool isChatRoom(MCONTACT);
bool isFileExist(LPCSTR);
bool isSecureIM(pUinKey ptr, BOOL emptyMirverAsSecureIM=FALSE);
-bool isSecureIM(HCONTACT hContact, BOOL emptyMirverAsSecureIM=FALSE);
+bool isSecureIM(MCONTACT hContact, BOOL emptyMirverAsSecureIM=FALSE);
// crypt_icons.cpp
HICON mode2icon(int,int);
HANDLE mode2clicon(int mode, int type);
void RefreshContactListIcons(void);
-void ShowStatusIcon(HCONTACT, UINT);
-void ShowStatusIcon(HCONTACT);
-void ShowStatusIconNotify(HCONTACT);
+void ShowStatusIcon(MCONTACT, UINT);
+void ShowStatusIcon(MCONTACT);
+void ShowStatusIconNotify(MCONTACT);
// crypt_popups.cpp
//static int CALLBACK PopupDlgProc(HWND,UINT,WPARAM,LPARAM);
-void showPopup(LPCSTR, HCONTACT, HICON, UINT);
-void showPopupEC(HCONTACT);
-void showPopupDCmsg(HCONTACT, LPCSTR);
-void showPopupDC(HCONTACT);
-void showPopupKS(HCONTACT);
-void showPopupKRmsg(HCONTACT, LPCSTR);
-void showPopupKR(HCONTACT);
-void showPopupSM(HCONTACT);
-void showPopupRM(HCONTACT);
+void showPopup(LPCSTR, MCONTACT, HICON, UINT);
+void showPopupEC(MCONTACT);
+void showPopupDCmsg(MCONTACT, LPCSTR);
+void showPopupDC(MCONTACT);
+void showPopupKS(MCONTACT);
+void showPopupKRmsg(MCONTACT, LPCSTR);
+void showPopupKR(MCONTACT);
+void showPopupSM(MCONTACT);
+void showPopupRM(MCONTACT);
// crypt_meta.cpp
-BOOL isProtoMetaContacts(HCONTACT);
-BOOL isDefaultSubContact(HCONTACT);
-HCONTACT getMetaContact(HCONTACT);
-HCONTACT getMostOnline(HCONTACT);
-void DeinitMetaContact(HCONTACT);
+BOOL isProtoMetaContacts(MCONTACT);
+BOOL isDefaultSubContact(MCONTACT);
+MCONTACT getMetaContact(MCONTACT);
+MCONTACT getMostOnline(MCONTACT);
+void DeinitMetaContact(MCONTACT);
// crypt_dll.cpp
LPSTR InitKeyA(pUinKey, int);
int InitKeyB(pUinKey, LPCSTR);
void InitKeyX(pUinKey, BYTE*);
-BOOL CalculateKeyX(pUinKey, HCONTACT);
+BOOL CalculateKeyX(pUinKey, MCONTACT);
LPSTR encodeMsg(pUinKey, LPARAM);
LPSTR decodeMsg(pUinKey, LPARAM, LPSTR);
BOOL LoadKeyPGP(pUinKey);
diff --git a/plugins/SecureIM/src/crypt_check.cpp b/plugins/SecureIM/src/crypt_check.cpp index 44c6c8183a..2359af5240 100644 --- a/plugins/SecureIM/src/crypt_check.cpp +++ b/plugins/SecureIM/src/crypt_check.cpp @@ -1,6 +1,6 @@ #include "commonheaders.h"
-int getContactStatus(HCONTACT hContact)
+int getContactStatus(MCONTACT hContact)
{
pSupPro ptr = getSupPro(hContact);
if (ptr)
@@ -9,7 +9,7 @@ int getContactStatus(HCONTACT hContact) return -1;
}
-bool isSecureProtocol(HCONTACT hContact)
+bool isSecureProtocol(MCONTACT hContact)
{
pSupPro ptr = getSupPro(hContact);
if (!ptr)
@@ -18,7 +18,7 @@ bool isSecureProtocol(HCONTACT hContact) return ptr->inspecting != 0;
}
-BYTE isContactSecured(HCONTACT hContact)
+BYTE isContactSecured(MCONTACT hContact)
{
// нужна проверка на Offline и в этом случае другие статусы
if (!arClist.getCount()) return 0;
@@ -76,7 +76,7 @@ bool isClientMiranda(pUinKey ptr, BOOL emptyMirverAsMiranda) return isMiranda;
}
-bool isClientMiranda(HCONTACT hContact, BOOL emptyMirverAsMiranda)
+bool isClientMiranda(MCONTACT hContact, BOOL emptyMirverAsMiranda)
{
if (!bMCD) return true;
if (!arClist.getCount()) return false;
@@ -85,7 +85,7 @@ bool isClientMiranda(HCONTACT hContact, BOOL emptyMirverAsMiranda) return (p) ? isClientMiranda(p, emptyMirverAsMiranda) : false;
}
-bool isProtoSmallPackets(HCONTACT hContact)
+bool isProtoSmallPackets(MCONTACT hContact)
{
pUinKey p = findUinKey(hContact);
if (!p || !p->proto || !p->proto->inspecting)
@@ -94,7 +94,7 @@ bool isProtoSmallPackets(HCONTACT hContact) return strstr(p->proto->name,"IRC") != NULL || strstr(p->proto->name,"WinPopup") != NULL || strstr(p->proto->name,"VyChat") != NULL;
}
-bool isContactInvisible(HCONTACT hContact)
+bool isContactInvisible(MCONTACT hContact)
{
if (db_get_b(hContact, "CList", "Hidden", 0))
return true;
@@ -114,12 +114,12 @@ bool isContactInvisible(HCONTACT hContact) return false;
}
-bool isNotOnList(HCONTACT hContact)
+bool isNotOnList(MCONTACT hContact)
{
return db_get_b(hContact, "CList", "NotOnList", 0) != 0;
}
-bool isContactNewPG(HCONTACT hContact)
+bool isContactNewPG(MCONTACT hContact)
{
pUinKey p = findUinKey(hContact);
if (!p || !p->proto || !p->proto->inspecting || !p->cntx)
@@ -128,7 +128,7 @@ bool isContactNewPG(HCONTACT hContact) return (p->features & CPP_FEATURES_NEWPG) != 0;
}
-bool isContactPGP(HCONTACT hContact)
+bool isContactPGP(MCONTACT hContact)
{
if (!bPGPloaded || (!bPGPkeyrings && !bPGPprivkey)) return false;
@@ -142,7 +142,7 @@ bool isContactPGP(HCONTACT hContact) return true;
}
-bool isContactGPG(HCONTACT hContact)
+bool isContactGPG(MCONTACT hContact)
{
if (!bGPGloaded || !bGPGkeyrings) return false;
@@ -156,7 +156,7 @@ bool isContactGPG(HCONTACT hContact) return true;
}
-bool isContactRSAAES(HCONTACT hContact)
+bool isContactRSAAES(MCONTACT hContact)
{
pUinKey p = findUinKey(hContact);
if (!p || !p->proto || !p->proto->inspecting)
@@ -165,7 +165,7 @@ bool isContactRSAAES(HCONTACT hContact) return p->mode == MODE_RSAAES;
}
-bool isContactRSA(HCONTACT hContact)
+bool isContactRSA(MCONTACT hContact)
{
pUinKey p = findUinKey(hContact);
if (!p || !p->proto || !p->proto->inspecting)
@@ -174,7 +174,7 @@ bool isContactRSA(HCONTACT hContact) return p->mode == MODE_RSA;
}
-bool isChatRoom(HCONTACT hContact)
+bool isChatRoom(MCONTACT hContact)
{
pUinKey p = findUinKey(hContact);
if (!p || !p->proto || !p->proto->inspecting)
@@ -205,7 +205,7 @@ bool isSecureIM(pUinKey ptr, BOOL emptyMirverAsSecureIM) return isSecureIM;
}
-bool isSecureIM(HCONTACT hContact, BOOL emptyMirverAsSecureIM)
+bool isSecureIM(MCONTACT hContact, BOOL emptyMirverAsSecureIM)
{
if (!bAIP) return false;
diff --git a/plugins/SecureIM/src/crypt_dll.cpp b/plugins/SecureIM/src/crypt_dll.cpp index 59c5698384..67a03a609c 100644 --- a/plugins/SecureIM/src/crypt_dll.cpp +++ b/plugins/SecureIM/src/crypt_dll.cpp @@ -73,7 +73,7 @@ void InitKeyX(pUinKey ptr,BYTE *key) // calculate secret key
-BOOL CalculateKeyX(pUinKey ptr,HCONTACT hContact)
+BOOL CalculateKeyX(pUinKey ptr,MCONTACT hContact)
{
int agr = cpp_calc_keyx(ptr->cntx);
if (agr) {
diff --git a/plugins/SecureIM/src/crypt_icons.cpp b/plugins/SecureIM/src/crypt_icons.cpp index dfb0d0771d..f4eb6b75c2 100644 --- a/plugins/SecureIM/src/crypt_icons.cpp +++ b/plugins/SecureIM/src/crypt_icons.cpp @@ -62,9 +62,9 @@ HANDLE mode2clicon(int mode, int type) }
// обновляет иконки в clist и в messagew
-void ShowStatusIcon(HCONTACT hContact, int mode)
+void ShowStatusIcon(MCONTACT hContact, int mode)
{
- HCONTACT hMC = getMetaContact(hContact);
+ MCONTACT hMC = getMetaContact(hContact);
// обновить иконки в clist
if (mode != -1) {
@@ -92,12 +92,12 @@ void ShowStatusIcon(HCONTACT hContact, int mode) }
}
-void ShowStatusIcon(HCONTACT hContact)
+void ShowStatusIcon(MCONTACT hContact)
{
ShowStatusIcon(hContact, isContactSecured(hContact));
}
-void ShowStatusIconNotify(HCONTACT hContact)
+void ShowStatusIconNotify(MCONTACT hContact)
{
BYTE mode = isContactSecured(hContact);
NotifyEventHooks(g_hEvent[(mode&SECURED) != 0], (WPARAM)hContact, 0);
@@ -109,7 +109,7 @@ void RefreshContactListIcons(void) for (int i=0; i < arIcoList.getCount(); i++)
arIcoList[i].hCLIcon = 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))
if (isSecureProtocol(hContact))
ShowStatusIcon(hContact);
}
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp index 9ec49d9705..3c3a5808e9 100644 --- a/plugins/SecureIM/src/crypt_lists.cpp +++ b/plugins/SecureIM/src/crypt_lists.cpp @@ -62,7 +62,7 @@ void freeSupportedProtocols() arProto.destroy();
}
-pSupPro getSupPro(HCONTACT hContact)
+pSupPro getSupPro(MCONTACT hContact)
{
for (int j=0; j < arProto.getCount(); j++)
if (CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)arProto[j]->name))
@@ -72,7 +72,7 @@ pSupPro getSupPro(HCONTACT hContact) }
// add contact in the list of secureIM users
-pUinKey addContact(HCONTACT hContact)
+pUinKey addContact(MCONTACT hContact)
{
if (hContact == NULL) return NULL;
@@ -99,7 +99,7 @@ pUinKey addContact(HCONTACT hContact) }
// delete contact from the list of secureIM users
-void delContact(HCONTACT hContact)
+void delContact(MCONTACT hContact)
{
pUinKey p = arClist.find((pUinKey)&hContact);
if (p) {
@@ -118,7 +118,7 @@ void loadContactList() freeContactList();
loadSupportedProtocols();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
addContact(hContact);
}
@@ -138,12 +138,12 @@ void freeContactList() }
// find user in the list of secureIM users and add him, if unknow
-pUinKey findUinKey(HCONTACT hContact)
+pUinKey findUinKey(MCONTACT hContact)
{
return arClist.find((pUinKey)&hContact);
}
-pUinKey getUinKey(HCONTACT hContact)
+pUinKey getUinKey(MCONTACT hContact)
{
pUinKey p = arClist.find((pUinKey)&hContact);
return (p) ? p : addContact(hContact);
@@ -198,16 +198,16 @@ void addMsg2Queue(pUinKey ptr,WPARAM wParam,LPSTR szMsg) LeaveCriticalSection(&localQueueMutex);
}
-void getContactNameA(HCONTACT hContact, LPSTR szName) {
+void getContactNameA(MCONTACT hContact, LPSTR szName) {
strcpy(szName,(LPCSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0));
}
-void getContactName(HCONTACT hContact, LPSTR szName)
+void getContactName(MCONTACT hContact, LPSTR szName)
{
wcscpy((LPWSTR)szName, (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GSMDF_UNICODE));
}
-void getContactUinA(HCONTACT hContact, LPSTR szUIN)
+void getContactUinA(MCONTACT hContact, LPSTR szUIN)
{
*szUIN = 0;
@@ -233,7 +233,7 @@ void getContactUinA(HCONTACT hContact, LPSTR szUIN) db_free(&dbv_uniqueid);
}
-void getContactUin(HCONTACT hContact, LPSTR szUIN)
+void getContactUin(MCONTACT hContact, LPSTR szUIN)
{
getContactUinA(hContact, szUIN);
if (*szUIN) {
diff --git a/plugins/SecureIM/src/crypt_metacontacts.cpp b/plugins/SecureIM/src/crypt_metacontacts.cpp index 113bf22abc..16304cffac 100644 --- a/plugins/SecureIM/src/crypt_metacontacts.cpp +++ b/plugins/SecureIM/src/crypt_metacontacts.cpp @@ -1,6 +1,6 @@ #include "commonheaders.h"
-BOOL isProtoMetaContacts(HCONTACT hContact)
+BOOL isProtoMetaContacts(MCONTACT hContact)
{
if (bMetaContacts) {
LPSTR proto = GetContactProto(hContact);
@@ -10,37 +10,37 @@ BOOL isProtoMetaContacts(HCONTACT hContact) return false;
}
-BOOL isDefaultSubContact(HCONTACT hContact)
+BOOL isDefaultSubContact(MCONTACT hContact)
{
if (bMetaContacts)
- return (HCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0) == hContact;
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0) == hContact;
return false;
}
-HCONTACT getMetaContact(HCONTACT hContact)
+MCONTACT getMetaContact(MCONTACT hContact)
{
if (bMetaContacts)
- return (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ return (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
return 0;
}
-HCONTACT getMostOnline(HCONTACT hContact)
+MCONTACT getMostOnline(MCONTACT hContact)
{
if (bMetaContacts)
- return (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
return 0;
}
// remove all secureim connections on subcontacts
-void DeinitMetaContact(HCONTACT hContact)
+void DeinitMetaContact(MCONTACT hContact)
{
- HCONTACT hMetaContact = isProtoMetaContacts(hContact) ? hContact : getMetaContact(hContact);
+ MCONTACT hMetaContact = isProtoMetaContacts(hContact) ? hContact : getMetaContact(hContact);
if (hMetaContact) {
for (int i=0; i < CallService(MS_MC_GETNUMCONTACTS,(WPARAM)hMetaContact,0); i++) {
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hMetaContact, i);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hMetaContact, i);
if (hSubContact && (isContactSecured(hSubContact)&SECURED))
CallContactService(hSubContact,PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
}
diff --git a/plugins/SecureIM/src/crypt_misc.cpp b/plugins/SecureIM/src/crypt_misc.cpp index ec7d6d1088..4a6b774adb 100644 --- a/plugins/SecureIM/src/crypt_misc.cpp +++ b/plugins/SecureIM/src/crypt_misc.cpp @@ -2,7 +2,7 @@ static void sttWaitForExchange(LPVOID param)
{
- HCONTACT hContact = (HCONTACT)param;
+ MCONTACT hContact = (MCONTACT)param;
pUinKey ptr = getUinKey(hContact);
if (!ptr)
return;
diff --git a/plugins/SecureIM/src/crypt_popups.cpp b/plugins/SecureIM/src/crypt_popups.cpp index 9b085bdb3e..39bca4ac55 100644 --- a/plugins/SecureIM/src/crypt_popups.cpp +++ b/plugins/SecureIM/src/crypt_popups.cpp @@ -1,6 +1,6 @@ #include "commonheaders.h"
-void showPopup(LPCSTR lpzText,HCONTACT hContact,HICON hIcon, UINT type)
+void showPopup(LPCSTR lpzText,MCONTACT hContact,HICON hIcon, UINT type)
{
//type=0 key colors
//type=1 session colors
@@ -52,50 +52,50 @@ void showPopup(LPCSTR lpzText,HCONTACT hContact,HICON hIcon, UINT type) PUAddPopupW(&ppd);
}
-void showPopupDCmsg(HCONTACT hContact,LPCSTR msg)
+void showPopupDCmsg(MCONTACT hContact,LPCSTR msg)
{
if (db_get_b(0, MODULENAME, "dc", 1))
showPopup(msg, hContact, g_hPOP[POP_PU_DIS], 1);
}
-void showPopupDC(HCONTACT hContact)
+void showPopupDC(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "dc", 1))
showPopup(sim006, hContact, g_hPOP[POP_PU_DIS], 1);
}
-void showPopupEC(HCONTACT hContact)
+void showPopupEC(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "ec", 1))
showPopup(sim001, hContact, g_hPOP[POP_PU_EST], 1);
}
-void showPopupKS(HCONTACT hContact)
+void showPopupKS(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "ks",1))
showPopup(sim007, hContact, g_hPOP[POP_PU_PRC], 0);
}
-void showPopupKRmsg(HCONTACT hContact,LPCSTR msg)
+void showPopupKRmsg(MCONTACT hContact,LPCSTR msg)
{
if (db_get_b(0, MODULENAME, "kr", 1))
showPopup(msg, hContact, g_hPOP[POP_PU_PRC], 0);
}
-void showPopupKR(HCONTACT hContact)
+void showPopupKR(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "kr", 1))
showPopup(sim008, hContact, g_hPOP[POP_PU_PRC], 0);
}
-void showPopupSM(HCONTACT hContact)
+void showPopupSM(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "ss", 0))
showPopup(sim009, hContact, g_hPOP[POP_PU_MSS], 2);
SkinPlaySound("OutgoingSecureMessage");
}
-void showPopupRM(HCONTACT hContact)
+void showPopupRM(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "sr", 0))
showPopup(sim010, hContact, g_hPOP[POP_PU_MSR], 2);
diff --git a/plugins/SecureIM/src/dbevent.cpp b/plugins/SecureIM/src/dbevent.cpp index 7d3d0afaf7..5e38811d98 100644 --- a/plugins/SecureIM/src/dbevent.cpp +++ b/plugins/SecureIM/src/dbevent.cpp @@ -1,7 +1,7 @@ #include "commonheaders.h"
-void HistoryLog(HCONTACT hContact, LPCSTR szText)
+void HistoryLog(MCONTACT hContact, LPCSTR szText)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = GetContactProto(hContact);
diff --git a/plugins/SecureIM/src/dbevent.h b/plugins/SecureIM/src/dbevent.h index 4eb5251eb1..e03ef9abbc 100644 --- a/plugins/SecureIM/src/dbevent.h +++ b/plugins/SecureIM/src/dbevent.h @@ -1,6 +1,6 @@ #ifndef __DBEVENT_H__
#define __DBEVENT_H__
-void HistoryLog(HCONTACT, LPCSTR);
+void HistoryLog(MCONTACT, LPCSTR);
#endif
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 31d5159a9b..732b3466a3 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -977,7 +977,7 @@ void RefreshGeneralDlg(HWND hDlg, BOOL iInit) char tmp[NAMSIZE];
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
pUinKey ptr = getUinKey(hContact);
if (ptr && isSecureProtocol(hContact) && !isChatRoom(hContact)) {
if (iInit) {
@@ -1063,7 +1063,7 @@ void RefreshPGPDlg(HWND hDlg, BOOL iInit) char tmp[NAMSIZE];
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
pUinKey ptr = getUinKey(hContact);
if (ptr && ptr->mode == MODE_PGP && isSecureProtocol(hContact) /*&& !getMetaContact(hContact)*/ && !isChatRoom(hContact)) {
LPSTR szKeyID = db_get_sa(hContact,MODULENAME,"pgp_abbr");
@@ -1123,7 +1123,7 @@ void RefreshGPGDlg(HWND hDlg, BOOL iInit) char tmp[NAMSIZE];
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
pUinKey ptr = getUinKey(hContact);
if (ptr && ptr->mode == MODE_GPG && isSecureProtocol(hContact) /*&& !getMetaContact(hContact)*/ && !isChatRoom(hContact)) {
if (iInit )
@@ -1176,7 +1176,7 @@ void ResetGeneralDlg(HWND hDlg) lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;
char tmp[NAMSIZE];
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (!isSecureProtocol(hContact) || isChatRoom(hContact))
continue;
diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp index 24efb7785b..e7640d2477 100644 --- a/plugins/SecureIM/src/svcs_clist.cpp +++ b/plugins/SecureIM/src/svcs_clist.cpp @@ -3,7 +3,7 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
if (!hContact || strcmp(cws->szSetting,"Status")) return 0;
@@ -37,7 +37,7 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) { // lParam=0
int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam)
{
- addContact((HCONTACT)wParam);
+ addContact((MCONTACT)wParam);
return 0;
}
@@ -46,7 +46,7 @@ int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam) // lParam=0
int __cdecl onContactDeleted(WPARAM wParam,LPARAM lParam)
{
- delContact((HCONTACT)wParam);
+ delContact((MCONTACT)wParam);
return 0;
}
@@ -59,15 +59,15 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) int __cdecl onExtraImageApplying(WPARAM wParam, LPARAM)
{
- if (isSecureProtocol((HCONTACT)wParam))
- ExtraIcon_SetIcon(g_hCLIcon, (HCONTACT)wParam, mode2clicon(isContactSecured((HCONTACT)wParam), 1));
+ if (isSecureProtocol((MCONTACT)wParam))
+ ExtraIcon_SetIcon(g_hCLIcon, (MCONTACT)wParam, mode2clicon(isContactSecured((MCONTACT)wParam), 1));
return 0;
}
int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
BOOL bMC = isProtoMetaContacts(hContact);
if (bMC ) hContact = getMostOnline(hContact); // возьмем тот, через который пойдет сообщение
pUinKey ptr = getUinKey(hContact);
diff --git a/plugins/SecureIM/src/svcs_menu.cpp b/plugins/SecureIM/src/svcs_menu.cpp index f099757b0d..c50c7c7f09 100644 --- a/plugins/SecureIM/src/svcs_menu.cpp +++ b/plugins/SecureIM/src/svcs_menu.cpp @@ -3,19 +3,19 @@ INT_PTR __cdecl Service_IsContactSecured(WPARAM wParam, LPARAM lParam)
{
- return (isContactSecured((HCONTACT)wParam)&SECURED) || isContactPGP((HCONTACT)wParam) || isContactGPG((HCONTACT)wParam);
+ return (isContactSecured((MCONTACT)wParam)&SECURED) || isContactPGP((MCONTACT)wParam) || isContactGPG((MCONTACT)wParam);
}
INT_PTR __cdecl Service_CreateIM(WPARAM wParam,LPARAM lParam)
{
- CallContactService((HCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT);
+ CallContactService((MCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT);
return 1;
}
INT_PTR __cdecl Service_DisableIM(WPARAM wParam,LPARAM lParam)
{
- CallContactService((HCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
+ CallContactService((MCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
return 1;
}
@@ -25,7 +25,7 @@ INT_PTR __cdecl Service_Status(WPARAM wParam, LPARAM lParam) case STATUS_DISABLED:
case STATUS_ENABLED:
case STATUS_ALWAYSTRY:
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
if (ptr) {
ptr->status=ptr->tstatus=(BYTE)lParam;
if (ptr->status == STATUS_ENABLED) db_unset(ptr->hContact, MODULENAME, "StatusID");
@@ -55,15 +55,15 @@ INT_PTR __cdecl Service_StatusTry(WPARAM wParam, LPARAM lParam) INT_PTR __cdecl Service_PGPdelKey(WPARAM wParam, LPARAM lParam)
{
if (bPGPloaded) {
- db_unset((HCONTACT)wParam, MODULENAME, "pgp");
- db_unset((HCONTACT)wParam, MODULENAME, "pgp_mode");
- db_unset((HCONTACT)wParam, MODULENAME, "pgp_abbr");
+ db_unset((MCONTACT)wParam, MODULENAME, "pgp");
+ db_unset((MCONTACT)wParam, MODULENAME, "pgp_mode");
+ db_unset((MCONTACT)wParam, MODULENAME, "pgp_abbr");
}
{
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((HCONTACT)wParam);
+ ShowStatusIconNotify((MCONTACT)wParam);
return 1;
}
@@ -75,10 +75,10 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) char szKeyID[128]; szKeyID[0]='\0';
PVOID KeyID = pgp_select_keyid(GetForegroundWindow(),szKeyID);
if (szKeyID[0]) {
- db_unset((HCONTACT)wParam, MODULENAME, "pgp");
- db_set_blob((HCONTACT)wParam, MODULENAME, "pgp", KeyID, pgp_size_keyid());
- db_set_b((HCONTACT)wParam, MODULENAME, "pgp_mode", 0);
- db_set_s((HCONTACT)wParam, MODULENAME, "pgp_abbr", szKeyID);
+ db_unset((MCONTACT)wParam, MODULENAME, "pgp");
+ db_set_blob((MCONTACT)wParam, MODULENAME, "pgp", KeyID, pgp_size_keyid());
+ db_set_b((MCONTACT)wParam, MODULENAME, "pgp_mode", 0);
+ db_set_s((MCONTACT)wParam, MODULENAME, "pgp_abbr", szKeyID);
del = false;
}
}
@@ -87,10 +87,10 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) if (ShowSelectKeyDlg(0,KeyPath)) {
char *publ = LoadKeys(KeyPath,false);
if (publ) {
- db_unset((HCONTACT)wParam, MODULENAME, "pgp");
- db_set_s((HCONTACT)wParam, MODULENAME, "pgp", publ);
- db_set_b((HCONTACT)wParam, MODULENAME, "pgp_mode", 1);
- db_set_s((HCONTACT)wParam, MODULENAME, "pgp_abbr", "(binary)");
+ db_unset((MCONTACT)wParam, MODULENAME, "pgp");
+ db_set_s((MCONTACT)wParam, MODULENAME, "pgp", publ);
+ db_set_b((MCONTACT)wParam, MODULENAME, "pgp_mode", 1);
+ db_set_s((MCONTACT)wParam, MODULENAME, "pgp_abbr", "(binary)");
mir_free(publ);
del = false;
}
@@ -101,22 +101,22 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) if (del)
Service_PGPdelKey(wParam,lParam);
else {
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((HCONTACT)wParam);
+ ShowStatusIconNotify((MCONTACT)wParam);
return 1;
}
INT_PTR __cdecl Service_GPGdelKey(WPARAM wParam, LPARAM lParam)
{
if (bGPGloaded)
- db_unset((HCONTACT)wParam, MODULENAME, "gpg");
+ db_unset((MCONTACT)wParam, MODULENAME, "gpg");
{
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((HCONTACT)wParam);
+ ShowStatusIconNotify((MCONTACT)wParam);
return 1;
}
@@ -127,28 +127,28 @@ INT_PTR __cdecl Service_GPGsetKey(WPARAM wParam, LPARAM lParam) char szKeyID[128]; szKeyID[0]='\0';
gpg_select_keyid(GetForegroundWindow(),szKeyID);
if (szKeyID[0]) {
- db_set_s((HCONTACT)wParam, MODULENAME, "gpg", szKeyID);
+ db_set_s((MCONTACT)wParam, MODULENAME, "gpg", szKeyID);
del = false;
}
}
if (del) Service_GPGdelKey(wParam,lParam);
else {
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((HCONTACT)wParam);
+ ShowStatusIconNotify((MCONTACT)wParam);
return 1;
}
INT_PTR __cdecl Service_Mode(WPARAM wParam, LPARAM lParam)
{
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
switch(--lParam) {
case MODE_NATIVE:
case MODE_RSAAES:
- if (isContactSecured((HCONTACT)wParam)&SECURED) {
+ if (isContactSecured((MCONTACT)wParam)&SECURED) {
msgbox(NULL, sim111, MODULENAME, MB_OK);
return 0;
}
@@ -165,9 +165,9 @@ INT_PTR __cdecl Service_Mode(WPARAM wParam, LPARAM lParam) ptr->keyLoaded = 0;
}
ptr->mode=(BYTE)lParam;
- db_set_b((HCONTACT)wParam, MODULENAME, "mode", (BYTE)lParam);
+ db_set_b((MCONTACT)wParam, MODULENAME, "mode", (BYTE)lParam);
}
- ShowStatusIcon((HCONTACT)wParam);
+ ShowStatusIcon((MCONTACT)wParam);
break;
}
diff --git a/plugins/SecureIM/src/svcs_proto.cpp b/plugins/SecureIM/src/svcs_proto.cpp index 7a0c20fe3c..a9ec7f2f92 100644 --- a/plugins/SecureIM/src/svcs_proto.cpp +++ b/plugins/SecureIM/src/svcs_proto.cpp @@ -31,13 +31,13 @@ static void sttFakeAck(LPVOID param) delete tParam;
}
-int returnNoError(HCONTACT hContact)
+int returnNoError(MCONTACT hContact)
{
mir_forkthread(sttFakeAck, new TFakeAckParams(hContact, 777, 0));
return 777;
}
-int returnError(HCONTACT hContact, LPCSTR err)
+int returnError(MCONTACT hContact, LPCSTR err)
{
mir_forkthread(sttFakeAck, new TFakeAckParams(hContact, 666, err));
return 666;
diff --git a/plugins/SecureIM/src/svcs_srmm.cpp b/plugins/SecureIM/src/svcs_srmm.cpp index 59791ee43c..9c2aa2c7f5 100644 --- a/plugins/SecureIM/src/svcs_srmm.cpp +++ b/plugins/SecureIM/src/svcs_srmm.cpp @@ -11,7 +11,7 @@ int __cdecl onWindowEvent(WPARAM, LPARAM lParam) int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (isProtoMetaContacts(hContact))
hContact = getMostOnline(hContact); // возьмем тот, через который пойдет сообщение
|