diff -r a6539d1e8e43 -r 34879f5cfc63 phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/inc/ccappstatuscontrol.h --- a/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/inc/ccappstatuscontrol.h Wed Jun 09 09:26:27 2010 +0300 +++ b/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/inc/ccappstatuscontrol.h Mon Jun 21 15:24:27 2010 +0300 @@ -22,6 +22,8 @@ // INCLUDES #include #include +#include + // FORWARD DECLARATIONS class CEikImage; @@ -55,20 +57,29 @@ */ NONSHARABLE_CLASS( CCCAppStatusControl ) : public CCoeControl, - public MSpbContentProviderObserver + public MSpbContentProviderObserver, + public MCCAStatusProviderObserver { public: // Construction & destruction + + enum TContactType + { + ENormalContact = 0x01, + EMyCardContact = 0x02 + }; + /** * Two-phased constructor. */ IMPORT_C static CCCAppStatusControl* NewL( CSpbContentProvider& aContentProvider, - MCCAStatusControlObserver& aObserver ); + MCCAStatusControlObserver& aObserver, + CCCAppStatusControl::TContactType aContactType ); /** * Destructor. */ - ~CCCAppStatusControl(); + ~CCCAppStatusControl(); public: // New implementation @@ -100,7 +111,14 @@ * @aDefaultStatusText Default status text */ IMPORT_C void SetDefaultStatusTextL( HBufC* aDefaultStatusText ); - + + /** + * Set the CCA statusprovider + * + * @aCCAStatusProvider ECom status provider + */ + IMPORT_C void SetStatusProvider( MCCAStatusProvider* aCCAStatusProvider ); + public: // From CCoeControl /** @@ -142,6 +160,15 @@ MVPbkContactLink& aLink, MSpbContentProviderObserver::TSpbContentEvent aEvent ); +public: // From MCCAStatusProviderObserver + + /* + * From MCCAStatusProviderObserver + */ + void StatusEvent( + MCCAStatusProviderObserver::TCCAStatusProviderObserverEvent aEvent, + const MVPbkContactLink* aLink = NULL ); + private: // New functions /** @@ -164,6 +191,12 @@ MVPbkContactLink& aLink, MSpbContentProviderObserver::TSpbContentEvent aEvent ); + /* + * Update contact status from ECom plugin + * @param aLink contact which has the status updated + */ + void UpdateCCAStatusL( MVPbkContactLink* aLink ); + void SetVariableLayouts( TInt aOption ); inline void RewrapStatusTextToArrayL( @@ -177,7 +210,8 @@ */ CCCAppStatusControl( CSpbContentProvider& aContentProvider, - MCCAStatusControlObserver& aObserver ); + MCCAStatusControlObserver& aObserver, + CCCAppStatusControl::TContactType aContactType ); /** * Constructor for performing 2nd stage construction @@ -267,6 +301,12 @@ * Current control state. */ TStatusControlState iState; + + // Own. ECOM plugin tatus provider + MCCAStatusProvider* iCCAStatusProvider; + + // Current contact type. + CCCAppStatusControl::TContactType iContactType; }; #endif // CCAPPSTATUSCONTROL_H_