diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-03 13:37:13 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-03 13:37:13 +0300 |
commit | 66b61f42871089f3962920924f9030cd6dff2ad8 (patch) | |
tree | bfa19d1db1c84a841dd1e6ea258ae1d9212d2ada /include/m_protocols.h | |
parent | dfe4c13573386072b6fcf177e8f52fafc81891f1 (diff) |
CLIST_INTERFACE:
- unused members removed (requires new History++ for people who compile Miranda themselves);
- useless helpers Proto_IsAccountEnabled & Proto_IsProtocolLocked replaced with direct calls of PROTOACCOUNT members IsEnabled & IsLocked respectively;
- static interface member pfnGetProtocolVisibility replaced with static function Clist_GetProtocolVisibility or PROTOACCOUNT::IsVisible when possible
Diffstat (limited to 'include/m_protocols.h')
-rw-r--r-- | include/m_protocols.h | 49 |
1 files changed, 18 insertions, 31 deletions
diff --git a/include/m_protocols.h b/include/m_protocols.h index cee4513363..537cb5308d 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -276,27 +276,30 @@ EXTERN_C MIR_APP_DLL(int) Proto_IsProtoOnContact(MCONTACT hContact, const char * // -------------- accounts support --------------------- 0.8.0+
-typedef struct tagACCOUNT
+struct MIR_APP_EXPORT PROTOACCOUNT
{
- int cbSize; // sizeof this structure
- char* szModuleName; // unique physical account name (matches database module name)
+ int cbSize; // sizeof this structure
+ char* szModuleName; // unique physical account name (matches database module name)
wchar_t* tszAccountName; // user-defined account name
- char* szProtoName; // physical protocol name
- bool bIsEnabled; // is account enabled?
- bool bIsVisible; // is account visible?
- bool bIsVirtual; // is account virtual?
- bool bOldProto; // old-styled account (one instance per dll)
- bool bDynDisabled; // dynamic disable flag, is never written to db
+ char* szProtoName; // physical protocol name
+ bool bIsEnabled; // is account enabled?
+ bool bIsVisible; // is account visible?
+ bool bIsVirtual; // is account virtual?
+ bool bOldProto; // old-styled account (one instance per dll)
+ bool bDynDisabled; // dynamic disable flag, is never written to db
- bool bAccMgrUIChanged;
- HWND hwndAccMgrUI;
+ bool bAccMgrUIChanged;
+ HWND hwndAccMgrUI;
- int iOrder; // account order in various menus & lists
+ int iOrder; // account order in various menus & lists
PROTO_INTERFACE *ppro; // pointer to the underlying object
- char* szUniqueId; // setting's unique id for any contact in the account
-}
- PROTOACCOUNT;
+ char* szUniqueId; // setting's unique id for any contact in the account
+
+ bool IsEnabled(void) const;
+ bool IsLocked(void) const;
+ bool IsVisible(void) const;
+};
/////////////////////////////////////////////////////////////////////////////////////////
// account enumeration service
@@ -344,22 +347,6 @@ EXTERN_C MIR_APP_DLL(PROTOACCOUNT*) Proto_GetAccount(const char *pszModuleName); #define MS_PROTO_SHOWACCMGR "Protos/ShowAccountManager"
/////////////////////////////////////////////////////////////////////////////////////////
-// determines if an account is enabled or not
-// wParam = 0
-// lParam = (LPARAM)(PROTOACCOUNT*)
-// Returns 1 if an account is valid and enabled, 0 otherwise
-
-EXTERN_C MIR_APP_DLL(bool) Proto_IsAccountEnabled(const PROTOACCOUNT *pa);
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// determines if an account is locked or not
-// wParam = 0
-// lParam = (LPARAM)(char*)szAccountName
-// Returns 1 if an account is locked and not supposed to change status, 0 otherwise
-
-EXTERN_C MIR_APP_DLL(bool) Proto_IsAccountLocked(const PROTOACCOUNT *pa);
-
-/////////////////////////////////////////////////////////////////////////////////////////
// gets the account associated with a contact
// Returns a char* pointing to the asciiz name of the protocol or NULL if the
// contact has no protocol. There is no need to mir_free() it or anything.
|