summaryrefslogtreecommitdiff
path: root/plugins/Exchange/src/emails.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
commit53fe3e46177d17b4941610de19f5cc6210700cb4 (patch)
treeb67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/Exchange/src/emails.cpp
parent488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff)
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/Exchange/src/emails.cpp')
-rw-r--r--plugins/Exchange/src/emails.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Exchange/src/emails.cpp b/plugins/Exchange/src/emails.cpp
index b15f7a8932..dbf2e30884 100644
--- a/plugins/Exchange/src/emails.cpp
+++ b/plugins/Exchange/src/emails.cpp
@@ -36,7 +36,7 @@ CExchangeServer::~CExchangeServer()
int CExchangeServer::Connect(int bForceConnect)
{
- int maxRetries = db_get_b(NULL, MODULENAME, "MaxRetries", MAX_EXCHANGE_CONNECT_RETRIES);
+ int maxRetries = g_plugin.getByte("MaxRetries", MAX_EXCHANGE_CONNECT_RETRIES);
if (bForceConnect) {
bTryConnect = 1;
cConnections = 0;
@@ -67,7 +67,7 @@ int CExchangeServer::Connect(int bForceConnect)
GetStringFromDatabase("Password", L"", password, _countof(password));
GetStringFromDatabase("Server", L"", server, _countof(server));
- int port = db_get_dw(NULL, MODULENAME, "Port", EXCHANGE_PORT);
+ int port = g_plugin.getDword("Port", EXCHANGE_PORT);
if (mir_wstrlen(server) > 0) //only connect if there's a server to connect to
return DoConnect(user, password, server, port);
@@ -139,13 +139,13 @@ void InitSocketAddr(sockaddr_in *addrServer, char *szServer)
else
memcpy(&(addrServer->sin_addr), hp->h_addr, hp->h_length);
- int port = db_get_dw(NULL, MODULENAME, "Port", EXCHANGE_PORT);
+ int port = g_plugin.getDword("Port", EXCHANGE_PORT);
addrServer->sin_port = htons(port);
}
int CExchangeServer::IsServerAvailable()
{
- if (!db_get_b(NULL, MODULENAME, "UsePortCheck", 1))
+ if (!g_plugin.getByte("UsePortCheck", 1))
return 1;
SOCKET sServer = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
@@ -294,7 +294,7 @@ int CExchangeServer::Check(int bNoEmailsNotify)
int ShowMessage(wchar_t *message, int cUnreadEmails)
{
- int usePopups = ServiceExists(MS_POPUP_ADDPOPUPT) ? db_get_b(NULL, MODULENAME, "UsePopups", 0) : 0;
+ int usePopups = ServiceExists(MS_POPUP_ADDPOPUPT) ? g_plugin.getByte("UsePopups", 0) : 0;
if (usePopups)
return ShowPopupMessage(TranslateT("Exchange email"), message, cUnreadEmails);