From 2d15eafc63a1384cec02df68708d6df09aace5ca Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 30 Apr 2015 20:17:36 +0000 Subject: removed not used files git-svn-id: http://svn.miranda-ng.org/main/trunk@13319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/clist_modern_12.vcxproj | 1 - .../Clist_modern/clist_modern_12.vcxproj.filters | 3 - .../Clist_modern/src/hdr/modern_skinned_profile.h | 196 --------------------- plugins/Clist_modern/src/modern_callproc.cpp | 20 --- .../Clist_modern/src/modern_skinned_profile.cpp | 115 ------------ 5 files changed, 335 deletions(-) delete mode 100644 plugins/Clist_modern/src/hdr/modern_skinned_profile.h delete mode 100644 plugins/Clist_modern/src/modern_callproc.cpp delete mode 100644 plugins/Clist_modern/src/modern_skinned_profile.cpp (limited to 'plugins/Clist_modern') diff --git a/plugins/Clist_modern/clist_modern_12.vcxproj b/plugins/Clist_modern/clist_modern_12.vcxproj index 4b988c6a95..2287663a9f 100644 --- a/plugins/Clist_modern/clist_modern_12.vcxproj +++ b/plugins/Clist_modern/clist_modern_12.vcxproj @@ -267,7 +267,6 @@ - diff --git a/plugins/Clist_modern/clist_modern_12.vcxproj.filters b/plugins/Clist_modern/clist_modern_12.vcxproj.filters index 9663ce1a02..48059af8bf 100644 --- a/plugins/Clist_modern/clist_modern_12.vcxproj.filters +++ b/plugins/Clist_modern/clist_modern_12.vcxproj.filters @@ -218,9 +218,6 @@ Header Files - - Header Files - Header Files diff --git a/plugins/Clist_modern/src/hdr/modern_skinned_profile.h b/plugins/Clist_modern/src/hdr/modern_skinned_profile.h deleted file mode 100644 index 87b4498313..0000000000 --- a/plugins/Clist_modern/src/hdr/modern_skinned_profile.h +++ /dev/null @@ -1,196 +0,0 @@ -#ifndef modern_skinned_profile_h__ -#define modern_skinned_profile_h__ - -//#include "modern_commonheaders.h" -//#include "modern_commonprototypes.h" - -#include -#include -//#include - -class MString -{ -private: - TCHAR * _buffer; -public: - MString() : _buffer(NULL) {}; - MString(const TCHAR * str) { _buffer = str ? _tcsdup(str) : NULL; } - MString(const MString& str) { _buffer = str._buffer ? _tcsdup(str._buffer) : NULL; } - MString& operator=(const MString& str) - { - if (_buffer) free(_buffer); - _buffer = str._buffer ? _tcsdup(str._buffer) : NULL; - } - TCHAR* operator()(const MString& str) { return _buffer; } - ~MString() - { - if (_buffer) - free(_buffer); - _buffer = NULL; - } - -#ifdef _UNICODE - MString(const char * str) - { - if (!str) - _buffer = NULL; - else - { - int cbLen = MultiByteToWideChar(0, 0, str, -1, NULL, 0); - wchar_t* _buffer = (wchar_t*)malloc(sizeof(wchar_t)*(cbLen + 1)); - if (_buffer == NULL) return; - MultiByteToWideChar(0, 0, str, -1, _buffer, cbLen); - _buffer[cbLen] = 0; - } - } -#endif - -}; - -class ValueVariant -{ -public: - ValueVariant() : _type(VVT_EMPTY) {}; - ValueVariant(BYTE bValue) : _type(VVT_BYTE), _bValue(bValue) {}; - ValueVariant(WORD wValue) : _type(VVT_WORD), _wValue(wValue) {}; - ValueVariant(DWORD dwValue) : _type(VVT_DWORD), _dwValue(dwValue) {}; - ValueVariant(const MString& strValue) : _type(VVT_STRING), _strValue(strValue) {}; - ValueVariant(const char * szValue) : _type(VVT_STRING), _strValue(szValue) {}; -#ifdef _UNICODE - ValueVariant(const wchar_t * szValue) : _type(VVT_STRING), _strValue(szValue) {}; -#endif - - BYTE GetByte() - { - switch (_type) - { - case VVT_BYTE: - return (BYTE)_bValue; - case VVT_WORD: - case VVT_DWORD: - DebugBreak(); - return (BYTE)_bValue; - default: - DebugBreak(); - } - return 0; - } - - WORD GetWord() - { - switch (_type) - { - case VVT_WORD: - return (WORD)_wValue; - - case VVT_BYTE: - case VVT_DWORD: - DebugBreak(); - return (WORD)_wValue; - default: - DebugBreak(); - } - return 0; - } - - DWORD GetDword() - { - switch (_type) - { - case VVT_DWORD: - return (DWORD)_dwValue; - - case VVT_BYTE: - case VVT_WORD: - DebugBreak(); - return (DWORD)_dwValue; - default: - DebugBreak(); - } - return 0; - } - MString GetString() - { - switch (_type) - { - case VVT_STRING: - return _strValue; - - default: - DebugBreak(); - } - return ""; - } - const MString& GetStringStatic() - { - switch (_type) - { - case VVT_STRING: - return _strValue; - - default: - DebugBreak(); - } - return _strValue; - } - bool IsEmpty() { return _type == VVT_EMPTY; } - -private: - enum - { - VVT_EMPTY = 0, - VVT_BYTE, - VVT_WORD, - VVT_DWORD, - VVT_STRING - }; - int _type; - union - { - BYTE _bValue; - WORD _wValue; - DWORD _dwValue; - }; - MString _strValue; - -}; - -// this is single tone class to represent some profile settings to be skinned -class CSkinnedProfile -{ -private: - static CSkinnedProfile _me; - CSkinnedProfile(); - ~CSkinnedProfile(); - -private: - // Skinned profile holded attributes - MString _strSkinFilename; - bool _bLoadedFonts; - bool _bLoadedOthers; - - typedef std::map ValueList_t; - typedef std::map KeyList_t; - - KeyList_t SkinnedProfile; - - ValueVariant* _GetValue(const char * szSection, const char * szKey); - - mir_cs _Lock; // critical section to matable skinned profile access - -public: - static CSkinnedProfile* SkinProfile() { return &_me; } - - HRESULT Init(); - HRESULT Clear(); - - static BYTE SpiGetSkinByte(MCONTACT hContact, const char * szSection, const char * szKey, const BYTE defValue); - static WORD SpiGetSkinWord(MCONTACT hContact, const char * szSection, const char * szKey, const WORD defValue); - static DWORD SpiGetSkinDword(MCONTACT hContact, const char * szSection, const char * szKey, const DWORD defValue); - static BOOL SpiCheckSkinned(MCONTACT hContact, const char * szSection, const char * szKey); - -}; - - - -#endif // modern_skinned_profile_h__ \ No newline at end of file diff --git a/plugins/Clist_modern/src/modern_callproc.cpp b/plugins/Clist_modern/src/modern_callproc.cpp deleted file mode 100644 index ab26eb03eb..0000000000 --- a/plugins/Clist_modern/src/modern_callproc.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "hdr/modern_commonheaders.h" -#include "hdr/modern_callproc.h" - -////////////////////////////////////////////////////////////////////////// -// standard callback proc -int CALLBACK __DoCallBack( LPARAM pvStorage) -{ - call::__baseCall * storage = (call::__baseCall *) pvStorage; - int res=storage->__DoCallStorageProc(); - delete storage; - return res; -} - -////////////////////////////////////////////////////////////////////////// -// To do: Replace __ProcessCall to switching threads etc -// and specify _DoCallback as callback -int call::__ProcessCall( __baseCall * pStorage, ASYNC_T async ) -{ - return __DoCallBack( (LPARAM)pStorage); -} diff --git a/plugins/Clist_modern/src/modern_skinned_profile.cpp b/plugins/Clist_modern/src/modern_skinned_profile.cpp deleted file mode 100644 index 8a14909d94..0000000000 --- a/plugins/Clist_modern/src/modern_skinned_profile.cpp +++ /dev/null @@ -1,115 +0,0 @@ - - -#include "hdr/modern_commonheaders.h" - -#ifdef _DEBUG // REMOVE ME, as soon as ghazan will implement msvcprt.lib msvcrt.lib analogs to vc6tovc7.lib -#include "hdr/modern_skinned_profile.h" - - -//need to be linked in: atls.lib msvcprt.lib msvcrt.lib - -CSkinnedProfile CSkinnedProfile::_me; - - -CSkinnedProfile::CSkinnedProfile() -{ - Init(); -} - -CSkinnedProfile::~CSkinnedProfile() -{ - -} - -HRESULT CSkinnedProfile::Init() -{ - mir_cslock lck(_Lock); - SkinnedProfile.clear(); - return S_OK; -} - -HRESULT CSkinnedProfile::Clear() -{ - mir_cslock lck(_Lock); - SkinnedProfile.clear(); - return S_OK; -} - - -ValueVariant* CSkinnedProfile::_GetValue(const char * szSection, const char * szKey) -{ - KeyList_t::iterator k_it = SkinnedProfile.find(szSection); - if (k_it == SkinnedProfile.end()) - return NULL; // Not skinned - - ValueList_t::iterator v_it = k_it->second.find(szKey); - if (v_it == k_it->second.end()) - return NULL; // Not skinned - - return &(v_it->second); -}; - -BYTE CSkinnedProfile::SpiGetSkinByte(HANDLE hContact, const char * szSection, const char * szKey, const BYTE defValue) -{ - if (hContact) - return db_get_b(hContact, szSection, szKey, defValue); //per-contact settings are not skinnablr at all - - mir_cslock lck(_Lock); - - ValueVariant* value = SkinProfile()->_GetValue(szSection, szKey); - - if (value == NULL) // not skinned => return DB - return db_get_w(hContact, szSection, szKey, defValue); - - else if (!value->IsEmpty()) - return value->GetByte(); - - return defValue; // skinned but empty => return default value -} - -WORD CSkinnedProfile::SpiGetSkinWord(HANDLE hContact, const char * szSection, const char * szKey, const WORD defValue) -{ - if (hContact) - return db_get_w(hContact, szSection, szKey, defValue); //per-contact settings are not skinnablr at all - - mir_cslock lck(_Lock); - - ValueVariant* value = SkinProfile()->_GetValue(szSection, szKey); - - if (value == NULL) // not skinned => return DB - return db_get_w(hContact, szSection, szKey, defValue); - - else if (!value->IsEmpty()) - return value->GetWord(); - - return defValue; // skinned but empty => return default value -} - -DWORD CSkinnedProfile::SpiGetSkinDword(HANDLE hContact, const char * szSection, const char * szKey, const DWORD defValue) -{ - if (hContact) - return db_get_dw(hContact, szSection, szKey, defValue); //per-contact settings are not skinnablr at all - - mir_cslock lck(_Lock); - - ValueVariant* value = SkinProfile()->_GetValue(szSection, szKey); - - if (value == NULL) // not skinned => return DB - return db_get_dw(hContact, szSection, szKey, defValue); - - else if (!value->IsEmpty()) - return value->GetDword(); - - return defValue; // skinned but empty => return default value -} - -BOOL CSkinnedProfile::SpiCheckSkinned(HANDLE hContact, const char * szSection, const char * szKey) -{ - if (hContact) - return FALSE; - - mir_cslock lck(_Lock); - - return (SkinProfile()->_GetValue(szSection, szKey) == NULL); -} -#endif // _DEBUG // REMOVE ME, as soon as ghazan will implement msvcprt.lib msvcrt.lib analogs to vc6tovc7.lib -- cgit v1.2.3