diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2012-09-27 05:44:38 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2012-09-27 05:44:38 +0000 |
commit | 4db6c5178cbd85e29e714a63ee5b1e8fc9881bae (patch) | |
tree | 7dfa309c4f1d2e3a0a4d251e3f9d4529403f1176 /protocols/Skype/src/skype_settings.cpp | |
parent | e2e27aabce83dc5ebf60a8456b7560ca104d6223 (diff) |
- added skype sublassing
- CSkupeProto funcs moved to spec files
- some minor changes
git-svn-id: http://svn.miranda-ng.org/main/trunk@1675 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src/skype_settings.cpp')
-rw-r--r-- | protocols/Skype/src/skype_settings.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_settings.cpp b/protocols/Skype/src/skype_settings.cpp new file mode 100644 index 0000000000..8a2d0c0bfa --- /dev/null +++ b/protocols/Skype/src/skype_settings.cpp @@ -0,0 +1,33 @@ +#include "skype_proto.h"
+
+TCHAR* CSkypeProto::GetSettingString(const char *szSetting, TCHAR* defVal)
+{
+ return this->GetSettingString(NULL, szSetting, defVal);
+}
+
+TCHAR* CSkypeProto::GetSettingString(HANDLE hContact, const char *szSetting, TCHAR* defVal)
+{
+ TCHAR* result = DBGetStringW(hContact, this->m_szModuleName, szSetting);
+ return result != NULL ? result : defVal;
+}
+
+TCHAR* CSkypeProto::GetDecodeSettingString(const char *szSetting, TCHAR* defVal)
+{
+ return this->GetSettingString(NULL, szSetting, defVal);
+}
+
+TCHAR* CSkypeProto::GetDecodeSettingString(HANDLE hContact, const char *szSetting, TCHAR* defVal)
+{
+ DBVARIANT dbv;
+ TCHAR* result = NULL;
+ if ( !DBGetContactSettingString(0, this->m_szModuleName, szSetting, &dbv))
+ {
+ CallService(
+ MS_DB_CRYPT_DECODESTRING,
+ wcslen(dbv.ptszVal) + 1,
+ reinterpret_cast<LPARAM>(dbv.ptszVal));
+ result = mir_wstrdup(dbv.pwszVal);
+ DBFreeVariant(&dbv);
+ }
+ return result;
+}
\ No newline at end of file |