williamr@2
|
1 |
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
|
williamr@2
|
17 |
|
williamr@2
|
18 |
/**
|
williamr@2
|
19 |
@file
|
williamr@2
|
20 |
@publishedAll
|
williamr@2
|
21 |
@released
|
williamr@2
|
22 |
*/
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#ifndef REMCONTRACKINFOTARGET_H
|
williamr@2
|
25 |
#define REMCONTRACKINFOTARGET_H
|
williamr@2
|
26 |
|
williamr@2
|
27 |
#include <e32base.h>
|
williamr@2
|
28 |
#include <remcon/remconinterfacebase.h>
|
williamr@2
|
29 |
#include <remcon/remconinterfaceif.h>
|
williamr@2
|
30 |
|
williamr@2
|
31 |
class MRemConTrackInfoTargetObserver;
|
williamr@2
|
32 |
class CRemConInterfaceSelector;
|
williamr@2
|
33 |
|
williamr@2
|
34 |
/**
|
williamr@2
|
35 |
Client-instantiable type supporting sending TrackInfo API responses.
|
williamr@2
|
36 |
*/
|
williamr@2
|
37 |
NONSHARABLE_CLASS(CRemConTrackInfoTarget) : public CRemConInterfaceBase,
|
williamr@2
|
38 |
public MRemConInterfaceIf
|
williamr@2
|
39 |
{
|
williamr@2
|
40 |
public:
|
williamr@2
|
41 |
/**
|
williamr@2
|
42 |
Factory function.
|
williamr@2
|
43 |
@param aInterfaceSelector The interface selector. The client must have
|
williamr@2
|
44 |
created one of these first.
|
williamr@2
|
45 |
@param aObserver The observer of this interface.
|
williamr@2
|
46 |
@return A new CRemConTrackInfoTarget, owned by the interface selector.
|
williamr@2
|
47 |
*/
|
williamr@2
|
48 |
IMPORT_C static CRemConTrackInfoTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
|
williamr@2
|
49 |
MRemConTrackInfoTargetObserver& aObserver);
|
williamr@2
|
50 |
|
williamr@2
|
51 |
/** Destructor. */
|
williamr@2
|
52 |
IMPORT_C ~CRemConTrackInfoTarget();
|
williamr@2
|
53 |
|
williamr@2
|
54 |
public:
|
williamr@2
|
55 |
/**
|
williamr@2
|
56 |
Sends a response to a 'get track name' command.
|
williamr@2
|
57 |
Only one response per target session can be outstanding at any one time.
|
williamr@2
|
58 |
@param aStatus Used by RemCon to indicate completion of the send request.
|
williamr@2
|
59 |
@param aTrackName The track name.
|
williamr@2
|
60 |
@param aError The response error.
|
williamr@2
|
61 |
@panic USER 23, if the length of aTrackName is greater than 58 Characters.
|
williamr@2
|
62 |
*/
|
williamr@2
|
63 |
IMPORT_C void GetTrackNameResponse(TRequestStatus& aStatus,
|
williamr@2
|
64 |
const TDesC& aTrackName,
|
williamr@2
|
65 |
TInt aError);
|
williamr@2
|
66 |
|
williamr@2
|
67 |
/**
|
williamr@2
|
68 |
Sends a response to a 'get artist' command.
|
williamr@2
|
69 |
Only one response per target session can be outstanding at any one time.
|
williamr@2
|
70 |
@param aStatus Used by RemCon to indicate completion of the send request.
|
williamr@2
|
71 |
@param aArtist The artist.
|
williamr@2
|
72 |
@param aError The response error.
|
williamr@2
|
73 |
@panic USER 23, if the length of aArtist is greater than 58 Characters.
|
williamr@2
|
74 |
*/
|
williamr@2
|
75 |
IMPORT_C void GetArtistResponse(TRequestStatus& aStatus,
|
williamr@2
|
76 |
const TDesC& aArtist,
|
williamr@2
|
77 |
TInt aError);
|
williamr@2
|
78 |
|
williamr@2
|
79 |
/**
|
williamr@2
|
80 |
Sends a response to a 'get track duration' command.
|
williamr@2
|
81 |
Only one response per target session can be outstanding at any one time.
|
williamr@2
|
82 |
@param aStatus Used by RemCon to indicate completion of the send request.
|
williamr@2
|
83 |
@param aDuration The duration.
|
williamr@2
|
84 |
@param aError The response error.
|
williamr@2
|
85 |
*/
|
williamr@2
|
86 |
IMPORT_C void GetTrackDurationResponse(TRequestStatus& aStatus,
|
williamr@2
|
87 |
const TTime& aDuration,
|
williamr@2
|
88 |
TInt aError);
|
williamr@2
|
89 |
|
williamr@2
|
90 |
/**
|
williamr@2
|
91 |
The following section of code is included to allow internal back to back
|
williamr@2
|
92 |
testing of this component within Symbian Software Ltd. It will only be
|
williamr@2
|
93 |
compiled in specially configured test builds. It will never be available
|
williamr@2
|
94 |
in any release and so should never be used outside of Symbian owned test
|
williamr@2
|
95 |
code.
|
williamr@2
|
96 |
*/
|
williamr@2
|
97 |
#ifdef SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
|
williamr@2
|
98 |
/**
|
williamr@2
|
99 |
This method is only available in specially configured test builds and will
|
williamr@2
|
100 |
not be found in any released code.
|
williamr@2
|
101 |
@internalTechnology
|
williamr@2
|
102 |
*/
|
williamr@2
|
103 |
IMPORT_C void SetTrackNameResponse(TRequestStatus& aStatus,
|
williamr@2
|
104 |
TInt aError);
|
williamr@2
|
105 |
|
williamr@2
|
106 |
private:
|
williamr@2
|
107 |
/**
|
williamr@2
|
108 |
This method is only available in specially configured test builds and will
|
williamr@2
|
109 |
not be found in any released code.
|
williamr@2
|
110 |
*/
|
williamr@2
|
111 |
void HandleSetTrackName(const TDesC8& aData);
|
williamr@2
|
112 |
#endif //SYMBIAN_ENABLE_TRACKINFO_BACKTOBACK_TEST_FUNCT
|
williamr@2
|
113 |
|
williamr@2
|
114 |
private:
|
williamr@2
|
115 |
/**
|
williamr@2
|
116 |
Constructor.
|
williamr@2
|
117 |
@param aInterfaceSelector The interface selector.
|
williamr@2
|
118 |
@param aObserver The observer of this interface.
|
williamr@2
|
119 |
*/
|
williamr@2
|
120 |
CRemConTrackInfoTarget(CRemConInterfaceSelector& aInterfaceSelector,
|
williamr@2
|
121 |
MRemConTrackInfoTargetObserver& aObserver);
|
williamr@2
|
122 |
|
williamr@2
|
123 |
private: // from CRemConInterfaceBase
|
williamr@2
|
124 |
TAny* GetInterfaceIf(TUid aUid);
|
williamr@2
|
125 |
|
williamr@2
|
126 |
private: // from MRemConInterfaceIf
|
williamr@2
|
127 |
void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
|
williamr@2
|
128 |
|
williamr@2
|
129 |
private: // unowned
|
williamr@2
|
130 |
MRemConTrackInfoTargetObserver& iObserver;
|
williamr@2
|
131 |
|
williamr@2
|
132 |
private: // owned
|
williamr@2
|
133 |
// For operation-specific data.
|
williamr@2
|
134 |
TBuf8<KMaxName> iOutData;
|
williamr@2
|
135 |
|
williamr@2
|
136 |
// not used by this class, but required for calling RRemCon::Send ...
|
williamr@2
|
137 |
TUint iNumRemotes;
|
williamr@2
|
138 |
|
williamr@2
|
139 |
};
|
williamr@2
|
140 |
|
williamr@2
|
141 |
#endif // REMCONTRACKINFOTARGET_H
|