|
1 // Copyright (c) 2006-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 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef HCTLINTERFACE_H |
|
23 #define HCTLINTERFACE_H |
|
24 |
|
25 #include <e32def.h> |
|
26 |
|
27 class MHCTLChannelObserver; |
|
28 class MHCTLDataObserver; |
|
29 class MHCTLEventObserver; |
|
30 class MControllerStateObserver; |
|
31 class MQdpPluginInterfaceFinder; |
|
32 |
|
33 class TDesC8; |
|
34 |
|
35 /** |
|
36 The UID of the hctl API. If the API ever has to change, a new UID and |
|
37 associated M class will be created. New implementations of CHCTLBase |
|
38 may implement the new API. Old (non-updated) implementations will still |
|
39 work as long as the old API is supported. |
|
40 */ |
|
41 const TInt KHCTLInterfaceUid = 0x102736E9; |
|
42 |
|
43 /** |
|
44 Mixin for the HCTL API. |
|
45 This interface is to be used via the HCTL Plugin. |
|
46 @see CHCTLBase::GetInterface(TUid) |
|
47 */ |
|
48 class MHCTLInterface |
|
49 { |
|
50 public: |
|
51 /** |
|
52 Writes data out as a command frame. |
|
53 The data should represent a single complete command frame. |
|
54 |
|
55 @param aData Byte representation of a command frame. |
|
56 @return KErrNone if success, otherwise one of the Symbian global error codes. |
|
57 */ |
|
58 virtual TInt MhiWriteCommand(const TDesC8& aData) = 0; |
|
59 |
|
60 /** |
|
61 Writes data out as an ACL data frame. |
|
62 The data should represent a single complete ACL data frame. |
|
63 |
|
64 @param aData Byte representation of an ACL data frame. |
|
65 @return KErrNone if success, otherwise one of the Symbian global error codes. |
|
66 */ |
|
67 virtual TInt MhiWriteAclData(const TDesC8& aData) = 0; |
|
68 |
|
69 /** |
|
70 Writes data out as a Synchronous data frame. |
|
71 The data should represent a single complete Synchronous data frame. |
|
72 |
|
73 @param aData Byte representation of a Synchronous data frame. |
|
74 @return KErrNone if success, otherwise one of the Symbian global error codes. |
|
75 */ |
|
76 virtual TInt MhiWriteSynchronousData(const TDesC8& aData) = 0; |
|
77 |
|
78 /** |
|
79 Get the HCTL layer ACL data header and trailer size |
|
80 @param aHeaderSize Outgoing parameter for retrieving ACL data header |
|
81 size |
|
82 @param aTrailerSize Outgoing parameter for retrieving ACL data trailer |
|
83 size |
|
84 */ |
|
85 virtual void MhiGetAclDataTransportOverhead(TUint& aHeaderSize, TUint& aTrailerSize) const = 0; |
|
86 |
|
87 /** |
|
88 Get the HCTL layer Synchronous data header and trailer size |
|
89 @param aHeaderSize Outgoing parameter for retrieving Synchronous data header |
|
90 size |
|
91 @param aTrailerSize Outgoing parameter for retrieving Synchronous data trailer |
|
92 size |
|
93 */ |
|
94 virtual void MhiGetSynchronousDataTransportOverhead(TUint& aHeaderSize, TUint& aTrailerSize) const = 0; |
|
95 |
|
96 /** |
|
97 Get the HCTL layer command header and trailer size |
|
98 @param aHeaderSize Outgoing parameter for retrieving command header |
|
99 size |
|
100 @param aTrailerSize Outgoing parameter for retrieving command trailer |
|
101 size |
|
102 */ |
|
103 virtual void MhiGetCommandTransportOverhead(TUint& aHeaderSize, TUint& aTrailerSize) const = 0; |
|
104 |
|
105 /** |
|
106 Setter for Data Observer |
|
107 @param aDataObserver The data observer gets notification of incoming data from HCTL |
|
108 */ |
|
109 virtual void MhiSetDataObserver(MHCTLDataObserver& aDataObserver) = 0; |
|
110 |
|
111 /** |
|
112 Setter for Event Observer |
|
113 @param aEventObserver The event observer gets notification of incoming events from HCTL |
|
114 */ |
|
115 virtual void MhiSetEventObserver(MHCTLEventObserver& aEventObserver) = 0; |
|
116 |
|
117 /** |
|
118 Setter for the channel observer |
|
119 @param aChannelObserver The channel observer gets notification of channel open and close from HCTL |
|
120 */ |
|
121 virtual void MhiSetChannelObserver(MHCTLChannelObserver& aChannelObserver) = 0; |
|
122 |
|
123 /** |
|
124 Setter for the controller state observer |
|
125 @param aControllerStateObserver The controller state observer gets notification of changes in the controller state such as power on and off |
|
126 */ |
|
127 virtual void MhiSetControllerStateObserver(MControllerStateObserver& aControllerStateObserver) = 0; |
|
128 |
|
129 /** |
|
130 Setter for the qdp plugin interface finder |
|
131 @param aControllerStateObserver The qdp plugin interface finder may be used to access extended qdp functionality. |
|
132 */ |
|
133 virtual void MhiSetQdpPluginInterfaceFinder(MQdpPluginInterfaceFinder& aQDPPluginInterfaceFinder) = 0; |
|
134 }; |
|
135 |
|
136 #endif // HCTLINTERFACE_H |
|
137 |