diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-23 12:32:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-23 12:32:12 +0000 |
commit | 8788bb35e10ef5403a08388d33ed4ab2ff7d67df (patch) | |
tree | b79e5efbfb02418b1276442a59e7722252cf39c8 /plugins | |
parent | 05ccb4dcd0b507fb000426667ed3f25c0b93db2b (diff) |
new helper applied instead of MS_DB_SETSETTINGRESIDENT
git-svn-id: http://svn.miranda-ng.org/main/trunk@5094 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/MetaContacts/src/meta_main.cpp | 10 | ||||
-rw-r--r-- | plugins/MirOTR/MirOTR/src/dllmain.cpp | 2 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/StopSpamPlus/src/settings.h | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/mir_db.cpp | 13 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/mir_db.h | 1 |
6 files changed, 9 insertions, 23 deletions
diff --git a/plugins/MetaContacts/src/meta_main.cpp b/plugins/MetaContacts/src/meta_main.cpp index 023bca8a82..b712144bae 100644 --- a/plugins/MetaContacts/src/meta_main.cpp +++ b/plugins/MetaContacts/src/meta_main.cpp @@ -144,11 +144,11 @@ extern "C" __declspec(dllexport) int Load(void) mir_getLP(&pluginInfo);
mir_getCLI();
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)(META_PROTO "/Status"));
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)(META_PROTO "/IdleTS"));
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)(META_PROTO "/ContactCountCheck"));
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)(META_PROTO "/Handle"));
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)(META_PROTO "/WindowOpen"));
+ db_set_resident(META_PROTO, "Status");
+ db_set_resident(META_PROTO, "IdleTS");
+ db_set_resident(META_PROTO, "ContactCountCheck");
+ db_set_resident(META_PROTO, "Handle");
+ db_set_resident(META_PROTO, "WindowOpen");
//set all contacts to 'offline', and initialize subcontact counter for db consistency check
for (HANDLE hContact = db_find_first(META_PROTO); hContact; hContact = db_find_next(hContact, META_PROTO)) {
diff --git a/plugins/MirOTR/MirOTR/src/dllmain.cpp b/plugins/MirOTR/MirOTR/src/dllmain.cpp index c17b1b6b76..e38f2ff076 100644 --- a/plugins/MirOTR/MirOTR/src/dllmain.cpp +++ b/plugins/MirOTR/MirOTR/src/dllmain.cpp @@ -77,7 +77,7 @@ extern "C" __declspec(dllexport) int Load(void) icce.dwICC = ICC_LISTVIEW_CLASSES|ICC_PROGRESS_CLASS;
InitCommonControlsEx(&icce);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)(MODULENAME "/TrustLevel"));
+ db_set_resident(MODULENAME, "TrustLevel");
/////////////
////// init plugin
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index bff802174e..2c59b6c9c2 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -1179,8 +1179,8 @@ extern "C" int __declspec(dllexport) Load(void) InitIcolib();
InitSound();
- CallService(MS_DB_SETSETTINGRESIDENT, (WPARAM)TRUE, (LPARAM)"MetaContacts/LastOnline");
- CallService(MS_DB_SETSETTINGRESIDENT, (WPARAM)TRUE, (LPARAM)"NewStatusNotify/LastPopupText");
+ db_set_resident("MetaContacts", "LastOnline");
+ db_set_resident("NewStatusNotify", "LastPopupText");
return 0;
}
diff --git a/plugins/StopSpamPlus/src/settings.h b/plugins/StopSpamPlus/src/settings.h index 9544fcadd4..404be7d75d 100644 --- a/plugins/StopSpamPlus/src/settings.h +++ b/plugins/StopSpamPlus/src/settings.h @@ -40,7 +40,7 @@ public: }
operator T(){return m_value;}
void SetResident(BOOL bResident){
- CallService(MS_DB_SETSETTINGRESIDENT, bResident, (LPARAM)(pluginName m_name.c_str()));
+ db_set_resident( bResident, (LPARAM)(pluginName m_name.c_str()));
}
};
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index c41df9076b..4dd9298a0b 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -809,19 +809,6 @@ void DeleteArray(HANDLE hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart while (!DB::Setting::Delete(hContact, pszModule, pszSetting));
}
-/**
- * This function can prevent a setting from being stored to database permanently.
- * @param pszSetting - the setting to read
- * @param enabled - if set to 'true' the setting will not be stored in database
- *
- * @retval 0 - success
- * @retval 1 - failure
- **/
-BYTE Resident(LPCSTR pszSetting, const bool enabled)
-{
- return CallService(MS_DB_SETSETTINGRESIDENT, (WPARAM) enabled, (LPARAM) pszSetting) != 0;
-}
-
} /* namespace Setting */
namespace Variant {
diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h index 5bc5504374..0eaa774687 100644 --- a/plugins/UserInfoEx/src/mir_db.h +++ b/plugins/UserInfoEx/src/mir_db.h @@ -171,7 +171,6 @@ namespace Setting { BYTE Exists (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting);
BYTE Delete (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting);
void DeleteArray (HANDLE hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart);
- BYTE Resident (LPCSTR pszSetting, const bool enabled);
} /* namespace Setting */
|