|
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 #include "upnp_cf_msgs.h" |
|
20 #include "upnpcpr.h" |
|
21 #include "upnpmcpr.h" |
|
22 |
|
23 using namespace ESock; |
|
24 using namespace MeshMachine; |
|
25 |
|
26 CUPnPConnectionProvider::CUPnPConnectionProvider ( CConnectionProviderFactoryBase& aFactory, const MeshMachine::TNodeActivityMap& aActivityMap ) |
|
27 : CCoreConnectionProvider ( aFactory, aActivityMap ), |
|
28 TIfStaticFetcherNearestInHierarchy ( this ) |
|
29 { |
|
30 |
|
31 } |
|
32 |
|
33 CUPnPConnectionProvider::~CUPnPConnectionProvider() |
|
34 { |
|
35 |
|
36 } |
|
37 |
|
38 CChunkManager* CUPnPConnectionProvider::MemoryManager ( ) |
|
39 { |
|
40 #if !defined(__GCCXML__) |
|
41 CMetaConnectionProviderBase& mcprBase = mnode_cast<CMetaConnectionProviderBase>(ControlProvider()->RecipientId().Node()); |
|
42 #else |
|
43 CMetaConnectionProviderBase& mcprBase = |
|
44 reinterpret_cast<CMetaConnectionProviderBase&> ( ControlProvider()->RecipientId().Node() ); |
|
45 #endif |
|
46 |
|
47 CUPnPMetaConnectionProvider& mcpr = static_cast<CUPnPMetaConnectionProvider&> ( mcprBase ); |
|
48 return mcpr.ChunkManager(); |
|
49 } |
|
50 |
|
51 RMemoryAllocator& CUPnPConnectionProvider::MemoryAllocator() |
|
52 { |
|
53 iAllocator.SetChunkManager(MemoryManager()); |
|
54 return iAllocator; |
|
55 } |
|
56 |
|
57 TInt CUPnPConnectionProvider::CheckPolicy ( const TSecurityPolicy& aPolicy ) const |
|
58 { |
|
59 ASSERT ( iPlatsecApiExt ); |
|
60 return iPlatsecApiExt->CheckPolicy ( aPolicy ); |
|
61 } |
|
62 |
|
63 const TDesC8& CUPnPConnectionProvider::RootDeviceLocation ( ) |
|
64 { |
|
65 #if !defined(__GCCXML__) |
|
66 CMetaConnectionProviderBase& mcprBase = mnode_cast<CMetaConnectionProviderBase>(ControlProvider()->RecipientId().Node()); |
|
67 #else |
|
68 CMetaConnectionProviderBase& mcprBase = |
|
69 reinterpret_cast<CMetaConnectionProviderBase&> ( ControlProvider()->RecipientId().Node() ); |
|
70 #endif |
|
71 |
|
72 CUPnPMetaConnectionProvider& mcpr = static_cast<CUPnPMetaConnectionProvider&> ( mcprBase ); |
|
73 return mcpr.DeviceLocationUrl (); |
|
74 } |
|
75 |
|
76 void CUPnPConnectionProvider::ReturnInterfacePtrL ( MPlatsecApiExt*& aInterface ) |
|
77 { |
|
78 aInterface = this; |
|
79 } |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |