|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef A3FDEVSOUNDAUDIOPAUSERESUME_H |
|
17 #define A3FDEVSOUNDAUDIOPAUSERESUME_H |
|
18 |
|
19 /** |
|
20 * @publishedPartner |
|
21 * @released |
|
22 * @file |
|
23 */ |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 /** |
|
28 * KUIdAudioResourceNotification – To get the interface of MAutoPauseResume from context. |
|
29 */ |
|
30 const TInt KUIdAudioResourceNotificationValue = 0x10285D3B; |
|
31 const TUid KUIdAudioResourceNotification = {KUIdAudioResourceNotificationValue}; |
|
32 |
|
33 |
|
34 /** |
|
35 Defines the interface for observing auto pause and resume events |
|
36 */ |
|
37 class MA3FDevSoundAutoPauseResumeObserver |
|
38 { |
|
39 public: |
|
40 /* |
|
41 Notifies the DevSound Adaptor that the resource is available. |
|
42 */ |
|
43 virtual void NotifyResume() = 0; |
|
44 }; |
|
45 |
|
46 /** |
|
47 Interface providing support for AutoPauseResume Register, Cancel and WillResumePlay. |
|
48 */ |
|
49 class MA3FDevSoundAutoPauseResume |
|
50 { |
|
51 public: |
|
52 /* |
|
53 Registers the Event for Notification when resource is avaliable. |
|
54 @param TUid aEventType The event which the client is notified of. |
|
55 @param TDesC8 &aNotificationRegistrationData Notification registration specific data. |
|
56 @param MA3FDevSoundAutoPauseResumeObserver* aObserverPtr An Observer to receive the notification. |
|
57 @return An error code indicating if the registration was successful. KErrNone on success, otherwise another of the system-wide error codes. |
|
58 */ |
|
59 virtual TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData, MA3FDevSoundAutoPauseResumeObserver* aObserverPtr) = 0; |
|
60 |
|
61 /* |
|
62 Cancels the registered notification event. |
|
63 @param TUid aEventType The Event to notify the client. |
|
64 @return An error code indicating if the cancel registration was successful. KErrNone on success, otherwise another of the system-wide error codes. |
|
65 */ |
|
66 virtual TInt CancelRegisterAsClient(TUid aEventType) = 0; |
|
67 |
|
68 /* |
|
69 Waits for the client to resume the play even after the default timer expires. |
|
70 @return An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes. |
|
71 */ |
|
72 virtual TInt WillResumePlay() = 0; |
|
73 }; |
|
74 |
|
75 #endif //A3FDEVSOUNDAUDIOPAUSERESUME_H |