2
|
1 |
// Copyright (c) 2006-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 the License "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 |
/**
|
|
17 |
@file
|
|
18 |
@internalTechnology
|
|
19 |
@prototype
|
|
20 |
*/
|
|
21 |
|
|
22 |
|
|
23 |
#ifndef WINSOCK_AGENTMCPR_H
|
|
24 |
#define WINSOCK_AGENTMCPR_H
|
|
25 |
|
|
26 |
#include <comms-infras/coremcpr.h>
|
|
27 |
#include <comms-infras/nifagt.h>
|
|
28 |
#include <comms-infras/agentmessages.h>
|
|
29 |
#include <metadatabase.h> // for TMDBElementId
|
|
30 |
//#include "agentmcpr.h"
|
|
31 |
#include <comms-infras/agentmcpr.h>
|
|
32 |
#include <comms-infras/ss_commsdataobject.h>
|
|
33 |
#include <comms-infras/ss_nodemessages_legacy.h>
|
|
34 |
#include <comms-infras/ss_nodemessages_legacy_internal.h>
|
|
35 |
#include <comms-infras/ss_legacyinterfaces.h>
|
|
36 |
|
|
37 |
class TIp6Addr;
|
|
38 |
class CAgentNotificationHandler;
|
|
39 |
class CAvailabilitySubscriber;
|
|
40 |
class CAgentQueryConnSettingsImpl;
|
|
41 |
class CAgentProvisionInfo;
|
|
42 |
|
|
43 |
namespace ESock
|
|
44 |
{
|
|
45 |
class CCommsDatIapView;
|
|
46 |
}
|
|
47 |
|
|
48 |
|
|
49 |
/*class CWinsockMetaConnectionProvider : public CCoreMetaConnectionProvider, private ESock::MLinkMCprLegacyDataAccessApiExt,
|
|
50 |
public ITFHIERARCHY_LINK_2(CWinsockMetaConnectionProvider, CCoreMetaConnectionProvider,
|
|
51 |
ESock::MQueryConnSettingsApiExt,
|
|
52 |
ESock::MLinkMCprLegacyDataAccessApiExt)*/
|
|
53 |
class CWinsockMetaConnectionProvider : public CAgentMetaConnectionProvider
|
|
54 |
{
|
|
55 |
//public:
|
|
56 |
/*typedef ITFHIERARCHY_LINK_2(CWinsockMetaConnectionProvider, CCoreMetaConnectionProvider,
|
|
57 |
ESock::MQueryConnSettingsApiExt,
|
|
58 |
ESock::MLinkMCprLegacyDataAccessApiExt) TIfStaticFetcherNearestInHierarchy;*/
|
|
59 |
//typedef CWinsockMetaConnectionProviderFactory FactoryType;
|
|
60 |
public:
|
|
61 |
static CWinsockMetaConnectionProvider* NewL(ESock::CMetaConnectionProviderFactoryBase& aFactory, const ESock::TProviderInfo& aProviderInfo);
|
|
62 |
IMPORT_C ~CWinsockMetaConnectionProvider();
|
|
63 |
|
|
64 |
void ReturnInterfacePtrL(ESock::MLinkMCprLegacyDataAccessApiExt*& aInterface);
|
|
65 |
void ReturnInterfacePtrL(ESock::MQueryConnSettingsApiExt*& aInterface);
|
|
66 |
|
|
67 |
// Methods for retrieving and decoding CommsDat fields containing IPv4/v6 addresses.
|
|
68 |
//
|
|
69 |
// These methods could have been in CCommsDatIapView, but that would have meant ESockSvr
|
|
70 |
// linking against insock.lib (IP specific and takes up RAM, even if ESockSvr isn't used
|
|
71 |
// for IP at all). If CCommsDatIapView is moved out of ESockSvr, then these
|
|
72 |
// methods should be moved into CCommsDatIapView.
|
|
73 |
IMPORT_C static void GetIp4AddrL(ESock::CCommsDatIapView* aIapView, CommsDat::TMDBElementId aElementId, TUint32& aAddr);
|
|
74 |
IMPORT_C static TInt GetIp4Addr(ESock::CCommsDatIapView* aIapView, CommsDat::TMDBElementId aElementId, TUint32& aAddr);
|
|
75 |
IMPORT_C static void GetIp6AddrL(ESock::CCommsDatIapView* aIapView, CommsDat::TMDBElementId aElementId, TIp6Addr& aAddr);
|
|
76 |
IMPORT_C static TInt GetIp6Addr(ESock::CCommsDatIapView* aIapView, CommsDat::TMDBElementId aElementId, TIp6Addr& aAddr);
|
|
77 |
|
|
78 |
|
|
79 |
// From MLinkCprLegacyDataAccessExtApi Interface
|
|
80 |
|
|
81 |
#if 0
|
|
82 |
IMPORT_C virtual void GetIntSettingL(const TDesC& aSettingName, TUint32& aValue, ESock::MPlatsecApiExt* aPlatsecItf);
|
|
83 |
IMPORT_C virtual void GetBoolSettingL(const TDesC& aSettingName, TBool& aValue, ESock::MPlatsecApiExt* aPlatsecItf);
|
|
84 |
IMPORT_C virtual void GetDes8SettingL(const TDesC& aSettingName, TDes8& aValue, ESock::MPlatsecApiExt* aPlatsecItf);
|
|
85 |
IMPORT_C virtual void GetDes16SettingL(const TDesC& aSettingName, TDes16& aValue, ESock::MPlatsecApiExt* aPlatsecItf);
|
|
86 |
IMPORT_C virtual void GetLongDesSettingL(const TDesC& aSettingName, HBufC*& aValue, ESock::MPlatsecApiExt* aPlatsecItf);
|
|
87 |
#endif
|
|
88 |
// Utility method
|
|
89 |
TMDBElementId MapFieldNameL(const TDesC& aSettingName, ESock::MPlatsecApiExt* aPlatsecItf);
|
|
90 |
TMDBElementId SecondChanceModemBearerLegacyMapFieldNameL(const TDesC& aSettingName, ESock::MPlatsecApiExt* aPlatsecItf);
|
|
91 |
|
|
92 |
protected:
|
|
93 |
const CAgentProvisionInfo* AgentProvisionInfo();
|
|
94 |
|
|
95 |
IMPORT_C static void CleanupCloseIapView(TAny* aThis);
|
|
96 |
|
|
97 |
CWinsockMetaConnectionProvider(ESock::CMetaConnectionProviderFactoryBase& aFactory, const ESock::TProviderInfo& aProviderInfo);
|
|
98 |
|
|
99 |
IMPORT_C ESock::CCommsDatIapView* OpenIapViewL();
|
|
100 |
IMPORT_C ESock::CCommsDatIapView* OpenIapViewLC();
|
|
101 |
IMPORT_C void CloseIapView();
|
|
102 |
IMPORT_C ESock::CCommsDatIapView* IapView();
|
|
103 |
void DestroyIapView();
|
|
104 |
|
|
105 |
IMPORT_C void SetAgentNotificationHandlerL(CAgentNotificationHandler* aNotificationHandler);
|
|
106 |
IMPORT_C void ConstructL();
|
|
107 |
|
|
108 |
// Messages::ANode Interface - To be implemented by the deriving MCPr
|
|
109 |
// virtual TInt ReceivedL(Messages::TSignatureBase& aCFMessage);
|
|
110 |
|
|
111 |
IMPORT_C void StartAvailabilityMonitoringL(const Messages::TNodeCtxId& aAvailabilityActivity);
|
|
112 |
IMPORT_C void CancelAvailabilityMonitoring();
|
|
113 |
virtual void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
|
|
114 |
|
|
115 |
private:
|
|
116 |
void ProvisionAgentInfoL ();
|
|
117 |
CCredentialsConfig* CreateCredentialsInfoL();
|
|
118 |
|
|
119 |
private:
|
|
120 |
ESock::CCommsDatIapView* iIapView;
|
|
121 |
TBool iAgentMCPrDoneWithIapView:1;
|
|
122 |
TInt32 iIapViewRefCount;
|
|
123 |
|
|
124 |
public:
|
|
125 |
#ifdef _DEBUG
|
|
126 |
CAvailabilitySubscriber* iAvailabilitySubscriber;
|
|
127 |
#else
|
|
128 |
TAny* iReserved; //Place holder to avoid BC between udeb/urel
|
|
129 |
#endif
|
|
130 |
|
|
131 |
|
|
132 |
protected:
|
|
133 |
CAgentQueryConnSettingsImpl* iQueryConnSettingsImpl;
|
|
134 |
};
|
|
135 |
|
|
136 |
|
|
137 |
#endif
|
|
138 |
// SYMBIAN_AGENTMCPR_H
|
|
139 |
|