|
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 __CUPNPPSERVICEPUBLISHERIMPL_H__ |
|
17 #define __CUPNPPSERVICEPUBLISHERIMPL_H__ |
|
18 #include <es_sock.h> |
|
19 #include <connpref.h> |
|
20 #include <upnp/upnpconstants.h> |
|
21 #include <cpnpservicepublisherbase.h> |
|
22 |
|
23 #include "cupnppublisher.h" |
|
24 #include "cupnpeventnotifier.h" |
|
25 #include "cupnpeventhandler.h" |
|
26 #include "mupnpeventnotification.h" |
|
27 |
|
28 //Connection Preference for RPnPPublisher |
|
29 const TUint KPublishConnPref = 52; |
|
30 const TInt KUPnPPublisherUid = 0x2001DC6A; |
|
31 class CPnPParameterBundle; |
|
32 |
|
33 /* Body of RPnPServicePublisher class and calls the SubmitRequest and NotifyResults |
|
34 of respective classes |
|
35 @internalComponent |
|
36 */ |
|
37 class CUPnPServicePublisherImpl :public CPnPServicePublisherBase , public MUPnPEventNotification |
|
38 { |
|
39 public: |
|
40 static CUPnPServicePublisherImpl* NewL(); |
|
41 ~CUPnPServicePublisherImpl ( ); |
|
42 |
|
43 private: |
|
44 TInt Construct ( TUint aTierId ); |
|
45 void Publish ( const RPnPParameterBundle& aServiceInfo ); |
|
46 void SendNotify ( const RPnPParameterBundle& aServiceInfo ); |
|
47 TInt InitiateControl ( RControlChannel& /*aControlChannel*/ ); |
|
48 |
|
49 |
|
50 private: |
|
51 CUPnPServicePublisherImpl ( ); |
|
52 void OnNotificationL(TUint32); |
|
53 |
|
54 void PublishL ( const RPnPParameterBundle& aServiceInfo ); |
|
55 void SendNotifyL ( const RPnPParameterBundle& aServiceInfo ); |
|
56 |
|
57 private: |
|
58 RConnection iConnection; |
|
59 RSubConnection iSubConnection; |
|
60 CUPnPEventNotifier* iEventNotifier; |
|
61 CUPnPPublisher* iUPnPPublisher; |
|
62 CUPnPEventHandler* iUPnPEventHandler; |
|
63 RSocketServ iSocketServer; |
|
64 TBool iAlreadyPublished; |
|
65 }; |
|
66 |
|
67 #endif // __CUPNPPSERVICEPUBLISHERIMPL_H__ |