|
1 /* |
|
2 * Component Name: Headset Simulator |
|
3 * Author: Comarch S.A. |
|
4 * Version: 1.0 |
|
5 * Copyright (c) 2010 Comarch S.A. |
|
6 * |
|
7 * This Software is submitted by Comarch S.A. to Symbian Foundation Limited on |
|
8 * the basis of the Member Contribution Agreement entered between Comarch S.A. |
|
9 * and Symbian Foundation Limited on 5th June 2009 (“Agreement”) and may be |
|
10 * used only in accordance with the terms and conditions of the Agreement. |
|
11 * Any other usage, duplication or redistribution of this Software is not |
|
12 * allowed without written permission of Comarch S.A. |
|
13 * |
|
14 */ |
|
15 |
|
16 #ifndef HSSDPPLUGINBASE_H_ |
|
17 #define HSSDPPLUGINBASE_H_ |
|
18 |
|
19 #include <ecom.h> |
|
20 #include <hsecompluginbase.h> |
|
21 |
|
22 /** |
|
23 * SDP plugin's UID |
|
24 */ |
|
25 const TUid KHsSdpBaseInterfaceDefinitionUid = |
|
26 { |
|
27 0xE0009DC3 |
|
28 }; |
|
29 |
|
30 /** |
|
31 * @brief Abstract methods for SDP plugin |
|
32 */ |
|
33 class MHsSdpBase |
|
34 { |
|
35 public: |
|
36 /** |
|
37 * Destructor |
|
38 */ |
|
39 virtual ~MHsSdpBase() {}; |
|
40 |
|
41 /** |
|
42 * Setter for service's port |
|
43 * |
|
44 * @param aPort port number |
|
45 */ |
|
46 virtual void SetServicePort( TInt aPort ) = 0; |
|
47 |
|
48 /** |
|
49 * Creates SDP plugin's implementation |
|
50 */ |
|
51 virtual void CreateSdpRecordL() = 0; |
|
52 |
|
53 /** |
|
54 * Deletes SDP plugin's implementation |
|
55 */ |
|
56 virtual void DeleteSdpRecordL() = 0; |
|
57 }; |
|
58 |
|
59 /** |
|
60 * @brief Base class for SDP plugins |
|
61 */ |
|
62 class CHsSdpBase : public CHsEComPluginBase, public MHsSdpBase |
|
63 |
|
64 { |
|
65 public: |
|
66 /** |
|
67 * Two-phase constructor |
|
68 * @param aUid plugin's UID |
|
69 * @return instance of class |
|
70 */ |
|
71 static CHsSdpBase* NewL( const TUid aUid ); |
|
72 |
|
73 /** |
|
74 * Two-phase constructor |
|
75 * @param aData plugin's name |
|
76 * @return instance of class |
|
77 */ |
|
78 static CHsSdpBase* NewL( const TDesC8 &aData ); |
|
79 |
|
80 public: |
|
81 /** |
|
82 * Destructor |
|
83 */ |
|
84 virtual ~CHsSdpBase(); |
|
85 |
|
86 public: |
|
87 //Methods inherited from MHsSdpBase |
|
88 |
|
89 virtual void SetServicePort( TInt aPort ); |
|
90 |
|
91 virtual void CreateSdpRecordL() = 0; |
|
92 |
|
93 virtual void DeleteSdpRecordL() = 0; |
|
94 |
|
95 protected: |
|
96 |
|
97 /** Port of service */ |
|
98 TInt iServicePort; |
|
99 |
|
100 }; |
|
101 |
|
102 #include "hssdppluginbase.inl" |
|
103 |
|
104 #endif /* HSSDPPLUGINBASE_H_ */ |