summaryrefslogtreecommitdiff
path: root/plugins/MirFox
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/MirFox
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (diff)
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirFox')
-rw-r--r--plugins/MirFox/src/MirandaOptions.cpp4
-rw-r--r--plugins/MirFox/src/MirandaUtils.cpp14
-rw-r--r--plugins/MirFox/src/MirandaUtils.h6
-rw-r--r--plugins/MirFox/src/MirfoxData.cpp23
-rw-r--r--plugins/MirFox/src/MirfoxData.h4
5 files changed, 21 insertions, 30 deletions
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp
index ea79b85297..ec6f20e952 100644
--- a/plugins/MirFox/src/MirandaOptions.cpp
+++ b/plugins/MirFox/src/MirandaOptions.cpp
@@ -169,7 +169,7 @@ static void setListContactIcons(HWND hwndList){
boost::ptr_list<MirandaContact>::iterator mirandaContactsIter;
for (mirandaContactsIter = mirandaContactsPtr->begin(); mirandaContactsIter != mirandaContactsPtr->end(); mirandaContactsIter++){
- HANDLE hContact = mirandaContactsIter->contactHandle;
+ HCONTACT hContact = mirandaContactsIter->contactHandle;
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if(hItem) {
//if icon on 0th extracolumn is not set
@@ -484,7 +484,7 @@ INT_PTR CALLBACK DlgProcOpts_Tab2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case PSN_APPLY:
{
- 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 hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC2_CONTACTS_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if(hItem) {
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp
index c2374ab166..2fefc5b8ec 100644
--- a/plugins/MirFox/src/MirandaUtils.cpp
+++ b/plugins/MirFox/src/MirandaUtils.cpp
@@ -181,7 +181,7 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_
}
logger->log_p(L"SMTC: mirandaSendModeFlag = [%d] bufSize = [%d]", mirandaSendModeFlag, bufSize);
- HANDLE hProcess = sendMessageMiranda(args->targetHandle, mirandaSendModeFlag, msgBuffer);
+ HANDLE hProcess = sendMessageMiranda((HCONTACT)args->targetHandle, mirandaSendModeFlag, msgBuffer);
logger->log_p(L"SMTC: hProcess = [" SCNuPTR L"]", hProcess);
MIRFOXACKDATA* myMfAck = NULL;
@@ -227,7 +227,7 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_
if(myMfAck != NULL && myMfAck->result == ACKRESULT_SUCCESS){
- addMessageToDB(args->targetHandle, mirandaSendModeFlag, msgBuffer, bufSize, targetHandleSzProto);
+ addMessageToDB((HCONTACT)args->targetHandle, mirandaSendModeFlag, msgBuffer, bufSize, targetHandleSzProto);
if (mode == MFENUM_SMM_ONLY_SEND){
@@ -347,12 +347,12 @@ int MirandaUtils::getMirandaSendModeFlag(char* targetHandleSzProto)
}
-HANDLE MirandaUtils::sendMessageMiranda(HANDLE hContact, int mirandaSendModeFlag, char* msgBuffer)
+HANDLE MirandaUtils::sendMessageMiranda(HCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer)
{
return (HANDLE)CallContactService(hContact, PSS_MESSAGE, (WPARAM)mirandaSendModeFlag, (LPARAM)msgBuffer);
}
-void MirandaUtils::addMessageToDB(HANDLE hContact, int mirandaSendModeFlag, char* msgBuffer, std::size_t bufSize, char* targetHandleSzProto)
+void MirandaUtils::addMessageToDB(HCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer, std::size_t bufSize, char* targetHandleSzProto)
{
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
@@ -406,12 +406,12 @@ int MirandaUtils::on_hook_OpenMW(WPARAM wParam, LPARAM lParam)
MessageWindowData mwd;
mwd.cbSize = sizeof(MessageWindowData);
- mwd.hContact = param->targetHandle;
+ mwd.hContact = (HCONTACT)param->targetHandle;
mwd.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
MessageWindowInputData mwid;
mwid.cbSize = sizeof(MessageWindowInputData);
- mwid.hContact = param->targetHandle;
+ mwid.hContact = (HCONTACT)param->targetHandle;
mwid.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
delete param;
@@ -581,7 +581,7 @@ void MirandaUtils::translateOldDBNames() {
}
//contacts "state"
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
logger->log_p(L"TranslateOldDBNames: found CONTACT: [" SCNuPTR L"]", hContact);
diff --git a/plugins/MirFox/src/MirandaUtils.h b/plugins/MirFox/src/MirandaUtils.h
index b0a05fce6f..2c6e04afcc 100644
--- a/plugins/MirFox/src/MirandaUtils.h
+++ b/plugins/MirFox/src/MirandaUtils.h
@@ -80,9 +80,9 @@ private:
int getMirandaSendModeFlag(char* targetHandleSzProto);
- HANDLE sendMessageMiranda(HANDLE hContact, int mirandaSendModeFlag, char* msgBuffer);
+ HANDLE sendMessageMiranda(HCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer);
- void addMessageToDB(HANDLE hContact, int mirandaSendModeFlag, char* msgBuffer, std::size_t bufSize, char* targetHandleSzProto);
+ void addMessageToDB(HCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer, std::size_t bufSize, char* targetHandleSzProto);
void setStatusOnAccount(ActionThreadArgStruct* args);
@@ -100,7 +100,7 @@ private:
typedef struct {
const char* szModule;
- HANDLE hContact;
+ HCONTACT hContact;
int result;
const char* errorDesc;
} MIRFOXACKDATA;
diff --git a/plugins/MirFox/src/MirfoxData.cpp b/plugins/MirFox/src/MirfoxData.cpp
index bef57abf04..ddb6ebdc8e 100644
--- a/plugins/MirFox/src/MirfoxData.cpp
+++ b/plugins/MirFox/src/MirfoxData.cpp
@@ -257,35 +257,26 @@ MirfoxData::getAccountDefaultState(MirandaAccount* account)
int
MirfoxData::getContactDefaultState(MirandaContact* contact)
{
-
MFLogger* logger = MFLogger::getInstance();
- if (contact == NULL){
+ if (contact == NULL)
return 2;
- }
- if (contact->mirandaAccountPtr == NULL){
+ if (contact->mirandaAccountPtr == NULL)
return 2;
- }
- if (contact->mirandaAccountPtr->szProtoName == NULL){
+ if (contact->mirandaAccountPtr->szProtoName == NULL)
return 2;
- }
- if (!shouldProtoBeActiveByName(contact->mirandaAccountPtr->szProtoName)){
+ if (!shouldProtoBeActiveByName(contact->mirandaAccountPtr->szProtoName))
return 2;
- }
- if (db_get_b(contact->contactHandle, "CList", "Hidden", 0) == 1 ||
- db_get_b(contact->contactHandle, "CList", "NotOnList", 0) == 1 ){
+ if (db_get_b(contact->contactHandle, "CList", "Hidden", 0) == 1 || db_get_b(contact->contactHandle, "CList", "NotOnList", 0) == 1 )
return 2;
- }
return 1;
-
}
-
void
MirfoxData::initializeMirandaAccounts()
{
@@ -364,7 +355,7 @@ void MirfoxData::initializeMirandaContacts()
//get contects from miranda
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
//add to list
MirandaContact* mirandaContactItemPtr = new MirandaContact(
hContact //handle to contact in miranda
@@ -583,7 +574,7 @@ MirandaAccount::getObjectPtr()
* class functions implementation
*/
-MirandaContact::MirandaContact(HANDLE contactHandleL)
+MirandaContact::MirandaContact(HCONTACT contactHandleL)
{
contactState = MFENUM_MIRANDACONTACT_STATE_UNKNOWN;
contactHandle = contactHandleL;
diff --git a/plugins/MirFox/src/MirfoxData.h b/plugins/MirFox/src/MirfoxData.h
index 3623fd2d1d..fe98ff31b4 100644
--- a/plugins/MirFox/src/MirfoxData.h
+++ b/plugins/MirFox/src/MirfoxData.h
@@ -256,11 +256,11 @@ class MirandaContact
{
public:
- MirandaContact(HANDLE contactHandleL);
+ MirandaContact(HCONTACT contactHandleL);
~MirandaContact(void);
MirandaContact* getObjectPtr();
- HANDLE contactHandle; //HANDLE to contact in miranda (unikalne)
+ HCONTACT contactHandle; //HANDLE to contact in miranda (unikalne)
std::wstring contactNameW; //presented name
MFENUM_MIRANDACONTACT_STATE contactState; //state in options
MirandaAccount* mirandaAccountPtr; //account of hContact