2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Client side application interface.
19 #ifndef __ATAUDIOEVENTAPI_H__
20 #define __ATAUDIOEVENTAPI_H__
25 #include "ataudioeventconstants.hrh" // TAudioThemeEvent, TATError
27 class RATSoundServerSession;
28 class MATEventCompleteObserver;
29 class CATMessageHelper;
32 * Implements client side API for Audio Theme sound server.
34 * @lib ATSoundServerClient.lib
35 * @since Series 60 release 3.0
37 class CATAudioEventAPI : public CBase
42 * Two-phased constructor.
44 * @param aClient reference to client object
45 * @return A pointer to the created object
47 IMPORT_C static CATAudioEventAPI* NewL(MATEventCompleteObserver& aClient);
50 * Two-phased constructor. Leaves pointer to object to cleanup stack.
52 * @param aClient reference to client object
53 * @return A pointer to the created object
55 IMPORT_C static CATAudioEventAPI* NewLC(MATEventCompleteObserver& aClient);
63 * Send event to the server. UI Settings uses demoplay as true, so
64 * that server will play "profile" events as well.
66 * @param aEvent event number
67 * aDemoPlay ETrue if called from UI settings application, EFalse from observer
70 virtual void SendAudioEventL(TAudioThemeEvent aEvent, TBool aDemoPlay);
73 * Stop playing of earlier sent playing request.
75 * @param aEvent event number
77 virtual void StopAudio(TAudioThemeEvent aEvent);
80 * This methods is called by message helper when sent messages completes.
81 * Client will be called for completion in this method as well.
83 * @param aError error code
84 * @param aHelper messagehelper that received completion from the server.
86 void MessageComplete(TInt aError, CATMessageHelper* aHelper);
91 * C++ default constructor.
93 * @param aClient reference to client object
95 CATAudioEventAPI(MATEventCompleteObserver& aClient);
98 * Symbian 2nd phase constructor.
104 // Session to AT sound server
105 RATSoundServerSession* iSession; // Owned
107 // Reference to client
108 MATEventCompleteObserver& iClient;
110 // Array for message helpers
111 RPointerArray<CATMessageHelper> iMessageHelperArray;
116 #endif // __ATAUDIOEVENTAPI_H__