epoc32/include/ataudioeventapi.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/ataudioeventapi.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,118 @@
     1.4 +/*
     1.5 +* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:  Client side application interface.
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#ifndef __ATAUDIOEVENTAPI_H__
    1.23 +#define __ATAUDIOEVENTAPI_H__
    1.24 +
    1.25 +//  INCLUDES
    1.26 +#include <e32base.h>
    1.27 +#include <avkon.hrh>
    1.28 +#include "ataudioeventconstants.hrh" // TAudioThemeEvent, TATError
    1.29 +
    1.30 +class RATSoundServerSession;
    1.31 +class MATEventCompleteObserver;
    1.32 +class CATMessageHelper;
    1.33 +
    1.34 +/**
    1.35 +*  Implements client side API for Audio Theme sound server.
    1.36 +*
    1.37 +*  @lib ATSoundServerClient.lib
    1.38 +*  @since Series 60 release 3.0
    1.39 +*/
    1.40 +class CATAudioEventAPI : public CBase
    1.41 +	{
    1.42 +public:
    1.43 +
    1.44 +	/**
    1.45 +    * Two-phased constructor.
    1.46 +    * @since 3.0
    1.47 +    * @param aClient reference to client object
    1.48 +    * @return A pointer to the created object
    1.49 +    */
    1.50 +	IMPORT_C static CATAudioEventAPI* NewL(MATEventCompleteObserver& aClient);
    1.51 +
    1.52 +	/**
    1.53 +    * Two-phased constructor. Leaves pointer to object to cleanup stack.
    1.54 +    * @since 3.0
    1.55 +    * @param aClient reference to client object
    1.56 +    * @return A pointer to the created object
    1.57 +    */
    1.58 +	IMPORT_C static CATAudioEventAPI* NewLC(MATEventCompleteObserver& aClient);
    1.59 +
    1.60 +	/**
    1.61 +	* Destructor
    1.62 +	*/
    1.63 +	~CATAudioEventAPI();
    1.64 +
    1.65 +	/**
    1.66 +    * Send event to the server. UI Settings uses demoplay as true, so
    1.67 +    * that server will play "profile" events as well.
    1.68 +    * @since 3.0
    1.69 +    * @param aEvent event number
    1.70 +    *        aDemoPlay ETrue if called from UI settings application, EFalse from observer
    1.71 +    *                  and keysoundserver
    1.72 +    */
    1.73 +    virtual void SendAudioEventL(TAudioThemeEvent aEvent, TBool aDemoPlay);
    1.74 +
    1.75 +	/**
    1.76 +    * Stop playing of earlier sent playing request.
    1.77 +    * @since 3.0
    1.78 +    * @param aEvent event number
    1.79 +    */
    1.80 +	virtual void StopAudio(TAudioThemeEvent aEvent);
    1.81 +
    1.82 +	/**
    1.83 +    * This methods is called by message helper when sent messages completes.
    1.84 +    * Client will be called for completion in this method as well.
    1.85 +    * @since 3.0
    1.86 +    * @param aError error code
    1.87 +    * @param aHelper messagehelper that received completion from the server.
    1.88 +    */
    1.89 +	void MessageComplete(TInt aError, CATMessageHelper* aHelper);
    1.90 +
    1.91 +private:
    1.92 +
    1.93 +	/**
    1.94 +    * C++ default constructor.
    1.95 +    * @since 3.0
    1.96 +    * @param aClient reference to client object
    1.97 +	*/
    1.98 +	CATAudioEventAPI(MATEventCompleteObserver& aClient);
    1.99 +
   1.100 +	/**
   1.101 +    * Symbian 2nd phase constructor.
   1.102 +    */
   1.103 +	void ConstructL();
   1.104 +
   1.105 +private: // Data
   1.106 +
   1.107 +	// Session to AT sound server
   1.108 +  	RATSoundServerSession* iSession; // Owned
   1.109 +
   1.110 +	// Reference to client
   1.111 +  	MATEventCompleteObserver& iClient;
   1.112 +
   1.113 +  	// Array for message helpers
   1.114 +  	RPointerArray<CATMessageHelper> iMessageHelperArray;
   1.115 +
   1.116 +	};
   1.117 +
   1.118 +
   1.119 +#endif // __ATAUDIOEVENTAPI_H__
   1.120 +
   1.121 +// End of File