|
1 |
|
2 // MmfDevSoundCustomInterfaceSupport.h |
|
3 |
|
4 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
5 // All rights reserved. |
|
6 // This component and the accompanying materials are made available |
|
7 // under the terms of "Eclipse Public License v1.0" |
|
8 // which accompanies this distribution, and is available |
|
9 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 // |
|
11 // Initial Contributors: |
|
12 // Nokia Corporation - initial contribution. |
|
13 // |
|
14 // Contributors: |
|
15 // |
|
16 // Description: |
|
17 // |
|
18 |
|
19 /** |
|
20 @publishedAll |
|
21 @released |
|
22 @file |
|
23 */ |
|
24 |
|
25 #ifndef MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H |
|
26 #define MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H |
|
27 |
|
28 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
29 #include <mmf/server/mmfdevsoundcustominterfaceobserver.h> |
|
30 #include <mmf/server/mmfdevsoundcustominterfacesupportclasses.h> |
|
31 #endif |
|
32 |
|
33 /** |
|
34 @publishedAll |
|
35 @released |
|
36 |
|
37 Custom Interface providing support for AutoPauseResume Register, Cancel, GetResourceNotificationData and WillResumePlay. |
|
38 */ |
|
39 |
|
40 class MAutoPauseResumeSupport |
|
41 { |
|
42 public: |
|
43 /** |
|
44 Registers the event for notification when resource is avaliable. |
|
45 |
|
46 @param aEventType |
|
47 The event which the client is notified of. |
|
48 |
|
49 @param aNotificationRegistrationData |
|
50 Notification registration specific data, which has been reserved for future use. |
|
51 |
|
52 @return An error code indicating if the function call was successful. KErrNone on success, otherwise |
|
53 another of the system-wide error codes. |
|
54 */ |
|
55 virtual TInt RegisterAsClient(TUid aEventType, const TDesC8& aNotificationRegistrationData = KNullDesC8)=0; |
|
56 |
|
57 /** |
|
58 Cancels the registered notification event. |
|
59 |
|
60 @param aEventType |
|
61 The event to notify the client. |
|
62 |
|
63 @return An error code indicating if the function call was successful. KErrNone on success, otherwise |
|
64 another of the system-wide error codes. |
|
65 */ |
|
66 virtual TInt CancelRegisterAsClient(TUid aEventType)=0; |
|
67 /** |
|
68 Gets the notification data for the event. |
|
69 |
|
70 @param aEventType |
|
71 The event which the client is notified of. |
|
72 |
|
73 @param aNotificationData |
|
74 The notification data for the client to resume playing. The actual data depends on the event type. |
|
75 Note that for the event type 'KMMFEventCategoryAudioResourceAvailable' the package buffer returned |
|
76 is TMMFTimeIntervalMicroSecondsPckg, but the contents should be converted to an integer and |
|
77 interpreted as the data returned is samples played, but not as a microsecond value. |
|
78 |
|
79 @return An error code indicating if the function call was successful. KErrNone on success, otherwise |
|
80 another of the system-wide error codes. |
|
81 */ |
|
82 virtual TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData)=0; |
|
83 /** |
|
84 Waits for the client to resume the play even after the default timer expires. |
|
85 |
|
86 @return An error code indicating if the function call was successful. KErrNone on success, otherwise |
|
87 another of the system-wide error codes. |
|
88 */ |
|
89 virtual TInt WillResumePlay()=0; |
|
90 }; |
|
91 |
|
92 #endif // MMFDEVSOUNDCUSTOMINTERFACESUPPORT_H |