sdkcreationmw/sdkruntimes/new_wsock_3pc/inc/winsockmcpr.h
author rajpuroh
Wed, 21 Apr 2010 10:32:25 +0530
changeset 2 82fb8aa91b2c
permissions -rw-r--r--
Winsock 3 PC Arch Contribution
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
     2
// All rights reserved.
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
     3
// This component and the accompanying materials are made available
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
     4
// under the terms of the License "Eclipse Public License v1.0"
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
     5
// which accompanies this distribution, and is available
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
     7
//
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
     8
// Initial Contributors:
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    10
//
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    11
// Contributors:
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    12
//
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    13
// Description:
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    14
//
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    15
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    16
/**
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    17
 @file
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    18
 @internalTechnology
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    19
 @prototype
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    20
*/
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    21
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    22
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    23
#ifndef WINSOCK_AGENTMCPR_H
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    24
#define WINSOCK_AGENTMCPR_H
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    25
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    26
#include <comms-infras/coremcpr.h>
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    27
#include <comms-infras/nifagt.h>
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    28
#include <comms-infras/agentmessages.h>
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    29
#include <metadatabase.h>		// for TMDBElementId
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    30
//#include "agentmcpr.h"
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    31
#include <comms-infras/agentmcpr.h>
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    32
#include <comms-infras/ss_commsdataobject.h>
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    33
#include <comms-infras/ss_nodemessages_legacy.h>
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    34
#include <comms-infras/ss_nodemessages_legacy_internal.h>
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    35
#include <comms-infras/ss_legacyinterfaces.h>
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    36
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    37
class TIp6Addr;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    38
class CAgentNotificationHandler;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    39
class CAvailabilitySubscriber;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    40
class CAgentQueryConnSettingsImpl;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    41
class CAgentProvisionInfo;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    42
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    43
namespace ESock
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    44
	{
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    45
	class CCommsDatIapView;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    46
	}
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    47
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    48
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    49
/*class CWinsockMetaConnectionProvider : public CCoreMetaConnectionProvider, private ESock::MLinkMCprLegacyDataAccessApiExt,
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    50
    public ITFHIERARCHY_LINK_2(CWinsockMetaConnectionProvider, CCoreMetaConnectionProvider,
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    51
		ESock::MQueryConnSettingsApiExt,
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    52
    	ESock::MLinkMCprLegacyDataAccessApiExt)*/
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    53
class CWinsockMetaConnectionProvider : public CAgentMetaConnectionProvider
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    54
	{
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    55
//public:
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    56
	/*typedef ITFHIERARCHY_LINK_2(CWinsockMetaConnectionProvider, CCoreMetaConnectionProvider,
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    57
		ESock::MQueryConnSettingsApiExt,
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    58
    	ESock::MLinkMCprLegacyDataAccessApiExt) TIfStaticFetcherNearestInHierarchy;*/
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    59
    //typedef CWinsockMetaConnectionProviderFactory FactoryType;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    60
public:
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    61
    static CWinsockMetaConnectionProvider* NewL(ESock::CMetaConnectionProviderFactoryBase& aFactory, const ESock::TProviderInfo& aProviderInfo);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    62
	IMPORT_C ~CWinsockMetaConnectionProvider();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    63
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    64
	void ReturnInterfacePtrL(ESock::MLinkMCprLegacyDataAccessApiExt*& aInterface);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    65
	void ReturnInterfacePtrL(ESock::MQueryConnSettingsApiExt*& aInterface);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    66
	
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    67
	// Methods for retrieving and decoding CommsDat fields containing IPv4/v6 addresses.
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    68
	//
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    69
	// These methods could have been in CCommsDatIapView, but that would have meant ESockSvr
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    70
	// linking against insock.lib (IP specific and takes up RAM, even if ESockSvr isn't used
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    71
	// for IP at all).  If CCommsDatIapView is moved out of ESockSvr, then these
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    72
	// methods should be moved into CCommsDatIapView.
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    73
	IMPORT_C static void GetIp4AddrL(ESock::CCommsDatIapView* aIapView, CommsDat::TMDBElementId aElementId, TUint32& aAddr);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    74
	IMPORT_C static TInt GetIp4Addr(ESock::CCommsDatIapView* aIapView, CommsDat::TMDBElementId aElementId, TUint32& aAddr);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    75
	IMPORT_C static void GetIp6AddrL(ESock::CCommsDatIapView* aIapView, CommsDat::TMDBElementId aElementId, TIp6Addr& aAddr);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    76
	IMPORT_C static TInt GetIp6Addr(ESock::CCommsDatIapView* aIapView, CommsDat::TMDBElementId aElementId, TIp6Addr& aAddr);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    77
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    78
	
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    79
	// From MLinkCprLegacyDataAccessExtApi Interface
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    80
	
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    81
#if 0
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    82
	IMPORT_C virtual void GetIntSettingL(const TDesC& aSettingName, TUint32& aValue, ESock::MPlatsecApiExt* aPlatsecItf);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    83
	IMPORT_C virtual void GetBoolSettingL(const TDesC& aSettingName, TBool& aValue, ESock::MPlatsecApiExt* aPlatsecItf);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    84
	IMPORT_C virtual void GetDes8SettingL(const TDesC& aSettingName, TDes8& aValue, ESock::MPlatsecApiExt* aPlatsecItf);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    85
	IMPORT_C virtual void GetDes16SettingL(const TDesC& aSettingName, TDes16& aValue, ESock::MPlatsecApiExt* aPlatsecItf);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    86
	IMPORT_C virtual void GetLongDesSettingL(const TDesC& aSettingName, HBufC*& aValue, ESock::MPlatsecApiExt* aPlatsecItf);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    87
#endif 
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    88
	// Utility method
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    89
	TMDBElementId MapFieldNameL(const TDesC& aSettingName, ESock::MPlatsecApiExt* aPlatsecItf);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    90
    TMDBElementId SecondChanceModemBearerLegacyMapFieldNameL(const TDesC& aSettingName, ESock::MPlatsecApiExt* aPlatsecItf);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    91
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    92
protected:
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    93
	const CAgentProvisionInfo* AgentProvisionInfo();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    94
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    95
	IMPORT_C static void CleanupCloseIapView(TAny* aThis);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    96
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    97
	 CWinsockMetaConnectionProvider(ESock::CMetaConnectionProviderFactoryBase& aFactory, const ESock::TProviderInfo& aProviderInfo);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    98
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
    99
	IMPORT_C ESock::CCommsDatIapView* OpenIapViewL();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   100
	IMPORT_C ESock::CCommsDatIapView* OpenIapViewLC();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   101
	IMPORT_C void CloseIapView();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   102
	IMPORT_C ESock::CCommsDatIapView* IapView();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   103
	void DestroyIapView();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   104
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   105
	IMPORT_C void SetAgentNotificationHandlerL(CAgentNotificationHandler* aNotificationHandler);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   106
    IMPORT_C void ConstructL();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   107
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   108
    // Messages::ANode Interface - To be implemented by the deriving MCPr
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   109
    // virtual TInt ReceivedL(Messages::TSignatureBase& aCFMessage);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   110
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   111
	IMPORT_C void StartAvailabilityMonitoringL(const Messages::TNodeCtxId& aAvailabilityActivity);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   112
	IMPORT_C void CancelAvailabilityMonitoring();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   113
	virtual void ReceivedL(const Messages::TRuntimeCtxId& aSender, const Messages::TNodeId& aRecipient, Messages::TSignatureBase& aMessage);
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   114
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   115
private:
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   116
    void ProvisionAgentInfoL ();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   117
    CCredentialsConfig* CreateCredentialsInfoL();
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   118
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   119
private:
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   120
    ESock::CCommsDatIapView* iIapView;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   121
    TBool iAgentMCPrDoneWithIapView:1;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   122
    TInt32 iIapViewRefCount;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   123
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   124
public:
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   125
#ifdef _DEBUG
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   126
	CAvailabilitySubscriber* iAvailabilitySubscriber;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   127
#else
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   128
	TAny* iReserved; //Place holder to avoid BC between udeb/urel
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   129
#endif
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   130
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   131
	
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   132
protected:
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   133
    CAgentQueryConnSettingsImpl* iQueryConnSettingsImpl;
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   134
	};
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   135
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   136
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   137
#endif
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   138
// SYMBIAN_AGENTMCPR_H
82fb8aa91b2c Winsock 3 PC Arch Contribution
rajpuroh
parents:
diff changeset
   139