This page was last modified 13:29, 5 June 2008.
Getting Contact Database Change Event
From Forum Nokia Wiki
We can receive events about contact database changes in our application, the MContactDbObserver base class must be inherited and the virtual function HandleDatabaseEventL() must be implemented. This function is called when a contact database event occurs.
If you are not familiar with Observer Pattern, please refer to [Observer Section] on Wiki.
class CContactDatabaseObserver : public CBase, public MContactDbObserver { public: CContactDatabaseObserver(); // we need to override the virtual function from the base class // virtual void HandleDatabaseEventL( TContactDbObserverEvent aEvent ); }; // Handle contact database events // void CContactDatabaseObserver::HandleDatabaseEventL(TContactDbObserverEvent aEvent) { // Do Something } //We must also create the CContactChangeNotifier object to register itself to //receive events. CContactDatabase* ContactDatabase = CContactDatabase::OpenL(); // Here iContactDatabaseObserver is a CContactDatabaseObserver pointer // CContactChangeNotifier* DatabaseNotifier = CContactChangeNotifier::NewL(*ContactDatabase , this);// Changes by aamitgupta on date 5/06/2008
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| contact group | rapolurakesh | General Symbian C++ | 13 | 2007-11-01 13:33 |
| Replace PhoneNumber using given digit | symprogrammer | General Symbian C++ | 8 | 2007-05-29 07:56 |
| fail to open contacts when use thread to visit contacts | dznlong | General Symbian C++ | 16 | 2007-09-11 10:05 |
| Как закрыть стандартную переключалку задач? | JBAK | Russian Developer Forum - Форум Российских разработчиков | 5 | 2008-01-21 15:59 |
| assigning image in contact | vivek_mics | General Symbian C++ | 4 | 2008-03-16 18:29 |
