|
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 // @file |
|
15 // @internalComponent |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef __UPNPSERVICECPR_H |
|
20 #define __UPNPSERVICECPR_H |
|
21 |
|
22 #include <comms-infras/corecpr.h> |
|
23 #include <comms-infras/ss_linkcprnodemessages.h> |
|
24 #include <comms-infras/ss_api_ext.h> |
|
25 #include <comms-infras/ss_platsec_apiext.h> |
|
26 |
|
27 #include "upnpcpr.h" |
|
28 |
|
29 #include "upnpsppublishinfocontainer.h" |
|
30 |
|
31 |
|
32 using namespace ESock; |
|
33 |
|
34 //Forward Declarations |
|
35 |
|
36 class CUPnPServiceConnectionProvider : public CUPnPConnectionProvider |
|
37 { |
|
38 public: |
|
39 static CUPnPServiceConnectionProvider* NewL ( CConnectionProviderFactoryBase& aFactory ); |
|
40 virtual ~CUPnPServiceConnectionProvider ( ); |
|
41 |
|
42 static TInt RootDeviceRepublishTimerCallbackL ( TAny* aPtr ); |
|
43 inline TInt IsRootDeviceRegistered ( ); |
|
44 inline void SetRootDeviceRegistered ( TBool aValue ); |
|
45 void ProcessRootDeviceRegisteredL ( ); |
|
46 CUPnPRootDeviceInfoContainer& GetRootDeviceInfoContainer ( ); |
|
47 CStringPoolManager& StringPoolManager ( ); |
|
48 inline const CUPnPDevice& RootDevice (); |
|
49 |
|
50 private: |
|
51 CUPnPServiceConnectionProvider ( CConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap ); |
|
52 void ConstructL ( ); |
|
53 virtual void ReceivedL ( const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage ); |
|
54 #ifdef SYMBIAN_NETWORKING_UPS |
|
55 TInt GetProcessAndThreadId ( TProcessId& aProcessId, TThreadId& aThreadId ) const; |
|
56 #endif |
|
57 |
|
58 private: |
|
59 CUPnPRootDeviceInfoContainer* iRootDeviceInfoContainer; |
|
60 CPeriodic* iRepublishTimer; |
|
61 TBool iRootDeviceRegistered; |
|
62 }; |
|
63 |
|
64 TBool CUPnPServiceConnectionProvider::IsRootDeviceRegistered ( ) |
|
65 { |
|
66 return iRootDeviceRegistered; |
|
67 } |
|
68 |
|
69 void CUPnPServiceConnectionProvider::SetRootDeviceRegistered ( TBool aValue ) |
|
70 { |
|
71 iRootDeviceRegistered = aValue; |
|
72 } |
|
73 |
|
74 const CUPnPDevice& CUPnPServiceConnectionProvider::RootDevice () |
|
75 { |
|
76 CUPnPDeviceDescription& deviceDesc = iRootDeviceInfoContainer->GetRootDeviceDesciption (); |
|
77 return *deviceDesc.DeviceObject (); |
|
78 } |
|
79 |
|
80 |
|
81 |
|
82 #endif // UPNPSERVICECPR_H |