diff options
Diffstat (limited to 'plugins/IEView/src/Options.cpp')
-rw-r--r-- | plugins/IEView/src/Options.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index 278659d502..d8e34f7c87 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -1506,7 +1506,7 @@ void Options::init() { }
- generalFlags = DBGetContactSettingDword(NULL, ieviewModuleName, DBS_BASICFLAGS, 13);
+ generalFlags = db_get_dw(NULL, ieviewModuleName, DBS_BASICFLAGS, 13);
/* TODO: move to buildProtocolList method */
int protoCount;
@@ -1530,101 +1530,101 @@ void Options::init() { }
/* SRMM settings */
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_ENABLE);
- proto->setSRMMEnable(i==0 ? true : DBGetContactSettingByte(NULL, ieviewModuleName, dbsName, FALSE));
+ proto->setSRMMEnable(i==0 ? true : db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_MODE);
- proto->setSRMMMode(DBGetContactSettingByte(NULL, ieviewModuleName, dbsName, FALSE));
+ proto->setSRMMMode(db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_FLAGS);
- proto->setSRMMFlags(DBGetContactSettingDword(NULL, ieviewModuleName, dbsName, 16128));
+ proto->setSRMMFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
- if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
if ( strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setSRMMBackgroundFilename(tmpPath);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
- if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
if ( strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setSRMMCssFilename(tmpPath);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
- if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setSRMMTemplateFilename(tmpPath);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
/* Group chat settings */
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_ENABLE);
- proto->setChatEnable(i==0 ? true : DBGetContactSettingByte(NULL, ieviewModuleName, dbsName, FALSE));
+ proto->setChatEnable(i==0 ? true : db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_MODE);
- proto->setChatMode(DBGetContactSettingByte(NULL, ieviewModuleName, dbsName, FALSE));
+ proto->setChatMode(db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_FLAGS);
- proto->setChatFlags(DBGetContactSettingDword(NULL, ieviewModuleName, dbsName, 16128));
+ proto->setChatFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
- if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
if ( strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setChatBackgroundFilename(tmpPath);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
- if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
if ( strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setChatCssFilename(tmpPath);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
- if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setChatTemplateFilename(tmpPath);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
/* History settings */
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_ENABLE);
- proto->setHistoryEnable(i==0 ? true : DBGetContactSettingByte(NULL, ieviewModuleName, dbsName, FALSE));
+ proto->setHistoryEnable(i==0 ? true : db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_MODE);
- proto->setHistoryMode(DBGetContactSettingByte(NULL, ieviewModuleName, dbsName, FALSE));
+ proto->setHistoryMode(db_get_b(NULL, ieviewModuleName, dbsName, FALSE));
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_FLAGS);
- proto->setHistoryFlags(DBGetContactSettingDword(NULL, ieviewModuleName, dbsName, 16128));
+ proto->setHistoryFlags(db_get_dw(NULL, ieviewModuleName, dbsName, 16128));
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
- if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
if ( strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setHistoryBackgroundFilename(tmpPath);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
- if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
if ( strncmp(tmpPath, "http://", 7))
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setHistoryCssFilename(tmpPath);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
- if (!DBGetContactSetting(NULL, ieviewModuleName, dbsName, &dbv)) {
+ if (!db_get(NULL, ieviewModuleName, dbsName, &dbv)) {
strcpy(tmpPath, dbv.pszVal);
PathToAbsolute(dbv.pszVal, tmpPath);
proto->setHistoryTemplateFilename(tmpPath);
- DBFreeVariant(&dbv);
+ db_free(&dbv);
}
proto->copyToTemp();
if (lastProto != NULL) {
@@ -1662,7 +1662,7 @@ void Options::uninit() { void Options::setGeneralFlags(int flags) {
generalFlags = flags;
- DBWriteContactSettingDword(NULL, ieviewModuleName, DBS_BASICFLAGS, (DWORD) flags);
+ db_set_dw(NULL, ieviewModuleName, DBS_BASICFLAGS, (DWORD) flags);
}
int Options::getGeneralFlags() {
@@ -1670,11 +1670,11 @@ int Options::getGeneralFlags() { }
void Options::setEmbedsize(int size){
- DBWriteContactSettingDword(NULL, ieviewModuleName, "Embedsize", (DWORD) size);
+ db_set_dw(NULL, ieviewModuleName, "Embedsize", (DWORD) size);
}
int Options::getEmbedsize() {
- return DBGetContactSettingDword(NULL, ieviewModuleName, "Embedsize", 0);
+ return db_get_dw(NULL, ieviewModuleName, "Embedsize", 0);
}
bool Options::isMathModule() {
@@ -1717,68 +1717,68 @@ void Options::saveProtocolSettings() { proto->copyFromTemp();
/* SRMM settings */
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_ENABLE);
- DBWriteContactSettingByte(NULL, ieviewModuleName, dbsName, proto->isSRMMEnable());
+ db_set_b(NULL, ieviewModuleName, dbsName, proto->isSRMMEnable());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_MODE);
- DBWriteContactSettingByte(NULL, ieviewModuleName, dbsName, proto->getSRMMMode());
+ db_set_b(NULL, ieviewModuleName, dbsName, proto->getSRMMMode());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_FLAGS);
- DBWriteContactSettingDword(NULL, ieviewModuleName, dbsName, proto->getSRMMFlags());
+ db_set_dw(NULL, ieviewModuleName, dbsName, proto->getSRMMFlags());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
strcpy(tmpPath, proto->getSRMMBackgroundFilename());
PathToRelative(proto->getSRMMBackgroundFilename(), tmpPath);
- DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+ db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
strcpy (tmpPath, proto->getSRMMCssFilename());
PathToRelative(proto->getSRMMCssFilename(), tmpPath);
- DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+ db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
strcpy (tmpPath, proto->getSRMMTemplateFilename());
PathToRelative(proto->getSRMMTemplateFilename(), tmpPath);
- DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+ db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
/* Group Chat settings */
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_ENABLE);
- DBWriteContactSettingByte(NULL, ieviewModuleName, dbsName, proto->isChatEnable());
+ db_set_b(NULL, ieviewModuleName, dbsName, proto->isChatEnable());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_MODE);
- DBWriteContactSettingByte(NULL, ieviewModuleName, dbsName, proto->getChatMode());
+ db_set_b(NULL, ieviewModuleName, dbsName, proto->getChatMode());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_FLAGS);
- DBWriteContactSettingDword(NULL, ieviewModuleName, dbsName, proto->getChatFlags());
+ db_set_dw(NULL, ieviewModuleName, dbsName, proto->getChatFlags());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
strcpy (tmpPath, proto->getChatBackgroundFilename());
PathToRelative(proto->getChatBackgroundFilename(), tmpPath);
- DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+ db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
strcpy (tmpPath, proto->getChatCssFilename());
PathToRelative(proto->getChatCssFilename(), tmpPath);
- DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+ db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
strcpy (tmpPath, proto->getChatTemplateFilename());
PathToRelative(proto->getChatTemplateFilename(), tmpPath);
- DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+ db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
/* History settings */
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_ENABLE);
- DBWriteContactSettingByte(NULL, ieviewModuleName, dbsName, proto->isHistoryEnable());
+ db_set_b(NULL, ieviewModuleName, dbsName, proto->isHistoryEnable());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_MODE);
- DBWriteContactSettingByte(NULL, ieviewModuleName, dbsName, proto->getHistoryMode());
+ db_set_b(NULL, ieviewModuleName, dbsName, proto->getHistoryMode());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_FLAGS);
- DBWriteContactSettingDword(NULL, ieviewModuleName, dbsName, proto->getHistoryFlags());
+ db_set_dw(NULL, ieviewModuleName, dbsName, proto->getHistoryFlags());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
strcpy (tmpPath, proto->getHistoryBackgroundFilename());
PathToRelative(proto->getHistoryBackgroundFilename(), tmpPath);
- DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+ db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
strcpy (tmpPath, proto->getHistoryCssFilename());
PathToRelative(proto->getHistoryCssFilename(), tmpPath);
- DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+ db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
strcpy (tmpPath, proto->getHistoryTemplateFilename());
PathToRelative(proto->getHistoryTemplateFilename(), tmpPath);
- DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+ db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
}
}
|