appfw/apparchitecture/inc/apgnotif.h
author William Roberts <williamr@symbian.org>
Fri, 23 Apr 2010 14:37:17 +0100
branchRCL_3
changeset 22 c82a39b81a38
parent 0 2e3d3ce01487
permissions -rw-r--r--
Rework addition of Symbian splash screen to reduce the source impact (uses SVG from Bug 2414) Notes: by using the OPTION SOURCEDIR parameter in the mifconv extension instructions, I can arrange to use the same source file name in sfimage, without having to export over the original Nokia file. This means that the name inside splashscreen.mbg is the same, which removes the need for the conditional compilation in SplashScreen.cpp, and gets rid of sf_splashscreen.mmp.

// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

#ifndef __APGNOTIF_H__
#define __APGNOTIF_H__

#include <apgcli.h>


class MApaAppListServObserver
/**
MApaAppListServObserver is interface to get application list change notifications.

@publishedPartner
@released
*/
	{
public:
	enum TApaAppListEvent
		{
		EAppListChanged=1
		};
	virtual void HandleAppListEvent(TInt aEvent)=0;
protected:
	IMPORT_C MApaAppListServObserver();
private:
	IMPORT_C virtual void MApaAppListServObserver_Reserved1();
	IMPORT_C virtual void MApaAppListServObserver_Reserved2();
private:
	TInt iMApaAppListServObserver_Reserved1;
	};


class CApaAppListNotifier : public CActive
/** 
 * CApaAppListNotifier is an active object which notifies the client when an application list is changed.
 * Provides notification when applications are added, deleted or if the localisable data of an application
 * is modified.
 * 
 * Clients can create instance of this class using NewL function which takes MApaAppListServObserver
 * observer as one of the parameters. When application list is changed, CApaAppListNotifier will call 
 * HandleAppListEvent function of the provided observer. 
 * 
 * 
 * Example:
 * 
 * //Implementation of observer interface
 * class CAppListChangeObserver:public CBase, public MApaAppListServObserver
 * {
 * public:
 *     void HandleAppListEvent(TInt aEvent);    
 *     CApaAppListNotifier* iNotifier;    
 * };
 * 
 * //This function is called by CApaAppListNotifier when an application list is changed 
 * void CAppListChangeObserver::HandleAppListEvent(TInt aEvent)
 * {
 *     //Handle application list change event
 *     ...
 * }
 * 
 * 
 * TInt E32Main()
 * {
 * ....
 * 
 * CAppListChangeObserver* obs=new(ELeave) CAppListChangeObserver();
 * CApaAppListNotifier *notif=CApaAppListNotifier::NewL(obs, CActive::EPriorityStandard);
 * 
 * ....
 * }
 * 
 * 

@publishedPartner
@released */
	{
public:
	IMPORT_C ~CApaAppListNotifier();
	IMPORT_C static CApaAppListNotifier* NewL(MApaAppListServObserver* aObserver, TPriority aPriority);
private: // from CActive
	void DoCancel();
	void RunL();
    TInt RunError(TInt aError);	
private:
	CApaAppListNotifier(MApaAppListServObserver& aObserver, TPriority aPriority);
	void ConstructL();
private:
	MApaAppListServObserver& iObserver;
	RApaLsSession iLsSession;
	};

#endif