|
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 __CUPNPPSERVICEDISCOVERYIMPL_H__ |
|
17 #define __CUPNPPSERVICEDISCOVERYIMPL_H__ |
|
18 #include <es_sock.h> |
|
19 #include <cpnpservicediscoverybase.h> |
|
20 |
|
21 #include "mupnpeventnotification.h" |
|
22 #include "cupnpeventnotifier.h" |
|
23 #include "cupnpsearch.h" |
|
24 #include "cupnpdescribe.h" |
|
25 #include "cupnpsubscribe.h" |
|
26 #include "cupnpregisternotify.h" |
|
27 |
|
28 |
|
29 //Connection Preference for RPnPDiscovery |
|
30 const TUint KDiscoveryConnPref = 51; |
|
31 const TInt KUPnPDiscoveryUid = 0x2001DC69; |
|
32 |
|
33 /* Body of RPnPServiceDiscovery class and calls the SubmitRequest and NotifyResults |
|
34 of respective classes |
|
35 @internalComponent |
|
36 */ |
|
37 class CUPnPServiceDiscoveryImpl : public CPnPServiceDiscoveryBase, public MUPnPEventNotification |
|
38 { |
|
39 public: |
|
40 static CUPnPServiceDiscoveryImpl* NewL(); |
|
41 ~CUPnPServiceDiscoveryImpl (); |
|
42 |
|
43 private: |
|
44 // From CPnPServiceDiscoveryBase |
|
45 TInt Construct( TUint aTierId); |
|
46 void Discover ( const RPnPParameterBundle& aServiceInfo ); |
|
47 void Describe ( const RPnPParameterBundle& aServiceInfo ); |
|
48 void Subscribe ( const RPnPParameterBundle& aServiceInfo ); |
|
49 void RegisterNotify ( const RPnPParameterBundle& aServiceInfo ); |
|
50 void Cancel ( const RPnPParameterBundle& aServiceInfo ); |
|
51 TInt InitiateControl ( RControlChannel& /*aControlChannel*/, const TDesC8& aUri ); |
|
52 |
|
53 private: |
|
54 CUPnPServiceDiscoveryImpl (); |
|
55 |
|
56 // From MUPnPEventNotification |
|
57 void OnNotificationL (TUint32); |
|
58 |
|
59 void DiscoverL ( const RPnPParameterBundle& aServiceInfo ); |
|
60 void ProcessCancelL( const RPnPParameterBundle& aServiceInfo); |
|
61 void RegisterNotifyL ( const RPnPParameterBundle& aServiceInfo ); |
|
62 void SubscribeL ( const RPnPParameterBundle& aServiceInfo ); |
|
63 void DescribeL ( const RPnPParameterBundle& aServiceInfo ); |
|
64 |
|
65 private: |
|
66 RConnection iConnection; |
|
67 RSubConnection iSubConnection; |
|
68 RSocketServ iSocketServer; |
|
69 RHostResolver iHostResolver; |
|
70 |
|
71 CUPnPEventNotifier* iEventNotifier; |
|
72 CUPnPSearch* iUPnPSearch; |
|
73 CUPnPDescribe* iUPnPDescribe; |
|
74 CUPnPSubscribe* iUPnPSubscribe; |
|
75 CUPnPRegisterNotify* iUPnPRegister; |
|
76 }; |
|
77 |
|
78 #endif // __CUPNPPSERVICEDISCOVERYIMPL_H__ |