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