|
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 __CPNPSERVICEDISCOVERYBASE_H__ |
|
17 #define __CPNPSERVICEDISCOVERYBASE_H__ |
|
18 |
|
19 #include <pnp/pnp.h> |
|
20 |
|
21 class RPnPParameterBundle; |
|
22 class CControlChannelBase; |
|
23 |
|
24 /** This class acts as an abstract base class which technology specific information need to implement |
|
25 @publishedPartner |
|
26 @prototype |
|
27 */ |
|
28 class CPnPServiceDiscoveryBase : public CBase |
|
29 { |
|
30 public: |
|
31 /** Static factory method */ |
|
32 static CPnPServiceDiscoveryBase* NewL( TUint aTierId ); |
|
33 /** |
|
34 Default Destructor |
|
35 */ |
|
36 IMPORT_C virtual ~CPnPServiceDiscoveryBase(); |
|
37 /** Second phase constructor */ |
|
38 virtual TInt Construct( TUint aTierId) = 0; |
|
39 /** |
|
40 Issues a discovery request. The technology specific discovery information is packed |
|
41 in aServiceInfo parameter. |
|
42 @param aServiceInfo Parameter bundle contains the discovery information. |
|
43 */ |
|
44 virtual void Discover ( const RPnPParameterBundle& aServiceInfo ) = 0; |
|
45 /** |
|
46 Retrieves the description of the service. The technology specific description information is packed |
|
47 in aServiceInfo parameter. |
|
48 @param Parameter bundle contains the information about the service. |
|
49 */ |
|
50 virtual void Describe ( const RPnPParameterBundle& aServiceInfo ) = 0; |
|
51 /** |
|
52 Subscribes for event notifications to the service . |
|
53 The technology specific description information is packed in aServiceInfo parameter. |
|
54 @param Parameter bundle contains the information about the service. |
|
55 */ |
|
56 virtual void Subscribe ( const RPnPParameterBundle& aServiceInfo ) = 0; |
|
57 /** |
|
58 Registers for events of service. The technology specific registration information |
|
59 is packed in aServiceInfo. |
|
60 @param Parameter bundle contains the register information. |
|
61 */ |
|
62 virtual void RegisterNotify ( const RPnPParameterBundle& aServiceInfo ) = 0; |
|
63 /** |
|
64 Issues a cancel request. |
|
65 @param Parameter bundle contains the cancel request. |
|
66 */ |
|
67 virtual void Cancel ( const RPnPParameterBundle& aServiceInfo ) = 0; |
|
68 /** |
|
69 It enables to send and receive messages. |
|
70 */ |
|
71 virtual CControlChannelBase* InitiateControlL ( const TDesC8& aUri ) = 0; |
|
72 |
|
73 protected: |
|
74 /** |
|
75 Default constructor |
|
76 */ |
|
77 IMPORT_C CPnPServiceDiscoveryBase(); |
|
78 |
|
79 private: |
|
80 TUid iEcomDtorID; |
|
81 }; |
|
82 |
|
83 #endif //__CPNPSERVICEDISCOVERYBASE_H__ |