diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-14 15:57:47 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-14 15:57:47 +0300 |
commit | a6b9f6570b4cb4a425f91d4694e6b027f12cc8b7 (patch) | |
tree | 86960597fbdc0025b12c4e87b8b536dd3d9910fb /plugins/SecureIM/src | |
parent | 28b81bbed5d8db354349fd787c3db4123e55d423 (diff) |
hContact, MODULENAME -> g_plugin
Diffstat (limited to 'plugins/SecureIM/src')
-rw-r--r-- | plugins/SecureIM/src/crypt_check.cpp | 8 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_dll.cpp | 2 | ||||
-rw-r--r-- | plugins/SecureIM/src/crypt_lists.cpp | 8 | ||||
-rw-r--r-- | plugins/SecureIM/src/options.cpp | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/plugins/SecureIM/src/crypt_check.cpp b/plugins/SecureIM/src/crypt_check.cpp index d85f9e0e2b..0b9242d9e2 100644 --- a/plugins/SecureIM/src/crypt_check.cpp +++ b/plugins/SecureIM/src/crypt_check.cpp @@ -38,14 +38,14 @@ BYTE isContactSecured(MCONTACT hContact) break;
case MODE_PGP:
- if (!db_get_s(hContact, MODULENAME, "pgp", &dbv)) {
+ if (!g_plugin.getString(hContact, "pgp", &dbv)) {
res |= SECURED;
db_free(&dbv);
}
break;
case MODE_GPG:
- if (!db_get_s(hContact, MODULENAME, "gpg", &dbv)) {
+ if (!g_plugin.getString(hContact, "gpg", &dbv)) {
res |= SECURED;
db_free(&dbv);
}
@@ -137,7 +137,7 @@ bool isContactPGP(MCONTACT hContact) return false;
DBVARIANT dbv;
- if (db_get_s(hContact, MODULENAME, "pgp", &dbv)) return false;
+ if (g_plugin.getString(hContact, "pgp", &dbv)) return false;
db_free(&dbv);
return true;
}
@@ -151,7 +151,7 @@ bool isContactGPG(MCONTACT hContact) return false;
DBVARIANT dbv;
- if (db_get_s(hContact, MODULENAME, "gpg", &dbv)) return false;
+ if (g_plugin.getString(hContact, "gpg", &dbv)) return false;
db_free(&dbv);
return true;
}
diff --git a/plugins/SecureIM/src/crypt_dll.cpp b/plugins/SecureIM/src/crypt_dll.cpp index 822f479059..b4a9f03614 100644 --- a/plugins/SecureIM/src/crypt_dll.cpp +++ b/plugins/SecureIM/src/crypt_dll.cpp @@ -89,7 +89,7 @@ BOOL CalculateKeyX(pUinKey ptr, MCONTACT hContact) db_set_blob(hContact, MODULENAME, "offlineKey", buffer, keysize);
// store timeout of key in database (2 days)
- db_set_dw(hContact, MODULENAME, "offlineKeyTimeout", gettime() + (60 * 60 * 24 * g_plugin.getWord("okt", 2)));
+ g_plugin.setDword(hContact, "offlineKeyTimeout", gettime() + (60 * 60 * 24 * g_plugin.getWord("okt", 2)));
// key exchange is finished
showPopupEC(ptr->hContact);
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp index 22d2ec4964..d94b25875b 100644 --- a/plugins/SecureIM/src/crypt_lists.cpp +++ b/plugins/SecureIM/src/crypt_lists.cpp @@ -82,16 +82,16 @@ pUinKey addContact(MCONTACT hContact) p->footer = FOOTER;
p->hContact = hContact;
p->proto = proto;
- p->mode = db_get_b(hContact, MODULENAME, "mode", 99);
+ p->mode = g_plugin.getByte(hContact, "mode", 99);
if (p->mode == 99) {
if (isContactPGP(hContact))
p->mode = MODE_PGP;
else
p->mode = isContactGPG(hContact) ? MODE_GPG : MODE_RSAAES;
- db_set_b(hContact, MODULENAME, "mode", p->mode);
+ g_plugin.setByte(hContact, "mode", p->mode);
}
- p->status = db_get_b(hContact, MODULENAME, "StatusID", STATUS_ENABLED);
- p->gpgMode = db_get_b(hContact, MODULENAME, "gpgANSI", 0);
+ p->status = g_plugin.getByte(hContact, "StatusID", STATUS_ENABLED);
+ p->gpgMode = g_plugin.getByte(hContact, "gpgANSI", 0);
arClist.insert(p);
return p;
}
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index e1ba269df9..1104b30e18 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -1064,7 +1064,7 @@ void RefreshPGPDlg(HWND hDlg, BOOL iInit) for (auto &hContact : Contacts()) {
pUinKey ptr = getUinKey(hContact);
if (ptr && ptr->mode == MODE_PGP && isSecureProtocol(hContact) && !isChatRoom(hContact)) {
- LPSTR szKeyID = db_get_sa(hContact, MODULENAME, "pgp_abbr");
+ LPSTR szKeyID = g_plugin.getStringA(hContact, "pgp_abbr");
lvi.iItem++;
lvi.iImage = (szKeyID != nullptr);
@@ -1127,7 +1127,7 @@ void RefreshGPGDlg(HWND hDlg, BOOL iInit) if (iInit)
ptr->tgpgMode = ptr->gpgMode;
- LPSTR szKeyID = db_get_sa(hContact, MODULENAME, "gpg");
+ LPSTR szKeyID = g_plugin.getStringA(hContact, "gpg");
lvi.iItem++;
lvi.iImage = (szKeyID != nullptr);
|