CContactManager
#include "ContactManager.h"
Description
Class to manage contacts.
Private own types
| Type | Name | Description |
|---|---|---|
| typedef std::map< UnicodeString,CContact*>::iterator | Contacts_it | Type to iterate over map elements |
Private variables
| Type | Name | Description |
|---|---|---|
| std::map< UnicodeString,CContact*> | Contacts | Map of all added contacts |
| UnicodeString | LastAddedContact | Last added contact JID |
Public methods
| Type | Name | Description |
|---|---|---|
| CContactManager() | Constructor | |
| ~CContactManager() | Destructor | |
| void | AddContact(CContact* Contact) | Function adds new account, but it does not create contact on contact list. After adding a contact call GetLastAddedContact() function, fill in the required fields and call Create() function for contact |
| void | RemoveContact(UnicodeString JID) | Function removes contact from map and contact list |
| CContact* | GetContactByJID(UnicodeString JID) | Function returns the contact with the specified JID |
| CContact* | GetLastAddedContact() | Function returns last added contact |
| void | DeleteAllContacts() | Function removes all added contacts |
Example
Example plugin that using CContactManager class you may find here.