epoc32/include/ataudioeventapi.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  Client side application interface.
    15 *
    16 */
    17 
    18 
    19 #ifndef __ATAUDIOEVENTAPI_H__
    20 #define __ATAUDIOEVENTAPI_H__
    21 
    22 //  INCLUDES
    23 #include <e32base.h>
    24 #include <avkon.hrh>
    25 #include "ataudioeventconstants.hrh" // TAudioThemeEvent, TATError
    26 
    27 class RATSoundServerSession;
    28 class MATEventCompleteObserver;
    29 class CATMessageHelper;
    30 
    31 /**
    32 *  Implements client side API for Audio Theme sound server.
    33 *
    34 *  @lib ATSoundServerClient.lib
    35 *  @since Series 60 release 3.0
    36 */
    37 class CATAudioEventAPI : public CBase
    38 	{
    39 public:
    40 
    41 	/**
    42     * Two-phased constructor.
    43     * @since 3.0
    44     * @param aClient reference to client object
    45     * @return A pointer to the created object
    46     */
    47 	IMPORT_C static CATAudioEventAPI* NewL(MATEventCompleteObserver& aClient);
    48 
    49 	/**
    50     * Two-phased constructor. Leaves pointer to object to cleanup stack.
    51     * @since 3.0
    52     * @param aClient reference to client object
    53     * @return A pointer to the created object
    54     */
    55 	IMPORT_C static CATAudioEventAPI* NewLC(MATEventCompleteObserver& aClient);
    56 
    57 	/**
    58 	* Destructor
    59 	*/
    60 	~CATAudioEventAPI();
    61 
    62 	/**
    63     * Send event to the server. UI Settings uses demoplay as true, so
    64     * that server will play "profile" events as well.
    65     * @since 3.0
    66     * @param aEvent event number
    67     *        aDemoPlay ETrue if called from UI settings application, EFalse from observer
    68     *                  and keysoundserver
    69     */
    70     virtual void SendAudioEventL(TAudioThemeEvent aEvent, TBool aDemoPlay);
    71 
    72 	/**
    73     * Stop playing of earlier sent playing request.
    74     * @since 3.0
    75     * @param aEvent event number
    76     */
    77 	virtual void StopAudio(TAudioThemeEvent aEvent);
    78 
    79 	/**
    80     * This methods is called by message helper when sent messages completes.
    81     * Client will be called for completion in this method as well.
    82     * @since 3.0
    83     * @param aError error code
    84     * @param aHelper messagehelper that received completion from the server.
    85     */
    86 	void MessageComplete(TInt aError, CATMessageHelper* aHelper);
    87 
    88 private:
    89 
    90 	/**
    91     * C++ default constructor.
    92     * @since 3.0
    93     * @param aClient reference to client object
    94 	*/
    95 	CATAudioEventAPI(MATEventCompleteObserver& aClient);
    96 
    97 	/**
    98     * Symbian 2nd phase constructor.
    99     */
   100 	void ConstructL();
   101 
   102 private: // Data
   103 
   104 	// Session to AT sound server
   105   	RATSoundServerSession* iSession; // Owned
   106 
   107 	// Reference to client
   108   	MATEventCompleteObserver& iClient;
   109 
   110   	// Array for message helpers
   111   	RPointerArray<CATMessageHelper> iMessageHelperArray;
   112 
   113 	};
   114 
   115 
   116 #endif // __ATAUDIOEVENTAPI_H__
   117 
   118 // End of File