CAccountManager
#include "AccountManager.h"
Description
Class to manage user accounts.
Private own types
| Type | Name | Description |
|---|---|---|
| typedef std::map< int, CAccount*>::iterator | Accounts_it | Type to iterate over map elements |
Private variables
| Type | Name | Description |
|---|---|---|
| std::map< int, CAccount*> | Accounts | Map of all added accounts |
| int | LastAddedAccount | Last added account ID |
Private static variables
| Type | Name | Description |
|---|---|---|
| static CAccountManager* | Instance | Instance of this object used to handle events from AQQ |
Private static methods
| Type | Name | Description |
|---|---|---|
| static INT_PTR __stdcall | AccountEvent(WPARAM wParam, LPARAM lParam) | Function handle account events from AQQ and calls the appropriate functions for appropriate account |
Public methods
| Type | Name | Description |
|---|---|---|
| CAccountManager() | Constructor | |
| ~CAccountManager() | Destructor | |
| void | AddAccount(CAccount *Account) | Function adds new account |
| void | RemoveAccount(int AccountID) | Function removes account specifed by ID |
| CAccount* | GetAccountByID(int AccountID) | Function returns account specifed by ID |
| CAccount* | GetAccountByJID(UnicodeString JID) | Function returns account specifed by JID |
| CAccount* | GetAccountByName(UnicodeString Name) | Function returns account specifed by name |
| CAccount* | GetLastAddedAccount() | Function returns last added account |
| void | DeleteAllAccounts() | Function removes all added accounts |
Example
Example plugin that using CAccountManager class you may find here.