williamr@4: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@4: // All rights reserved. williamr@4: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@4: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@4: // williamr@4: // Initial Contributors: williamr@4: // Nokia Corporation - initial contribution. williamr@4: // williamr@4: // Contributors: williamr@4: // williamr@4: // Description: williamr@4: // williamr@4: williamr@4: /** williamr@4: @file williamr@4: @internalTechnology williamr@4: */ williamr@4: williamr@4: #if !defined(__SS_COMMON_H__) williamr@4: #define __SS_COMMON_H__ williamr@4: williamr@4: #include williamr@4: #include williamr@4: #include williamr@4: #include williamr@4: #include williamr@4: #include williamr@4: williamr@4: /** Support for checking that the current thread is the "home thread" */ williamr@4: #if defined(_DEBUG) williamr@4: #define ESOCK_HOME_THREAD_CHECK_ENABLED williamr@4: #endif williamr@4: williamr@4: // Some legacy oddities supported for a transition period have code guarded by this macro. Some day we'll be williamr@4: // breaking all of this behaviour and so able to drop this williamr@4: #define SYMBIAN_NETWORKING_LEGACY_COMPATIBILITY_SUPPORT williamr@4: williamr@4: /** williamr@4: Type identifier for the derived sub-session objects. Used e.g. in containers to identify williamr@4: what is stored. williamr@4: williamr@4: @see CSockSubSession::Type() williamr@4: */ williamr@4: class TCFSubSessInfo : public Den::TSubSessInfo williamr@4: /** williamr@4: @internalTechnology williamr@4: */ williamr@4: { williamr@4: public: williamr@4: enum TSubSessionType williamr@4: { williamr@4: EHostResolver = 2, //starting from TSubSessInfo::EAny williamr@4: EServiceResolver = 3, williamr@4: ENetDatabase = 4, williamr@4: EConnection = 5, williamr@4: ESubConnection = 6, williamr@4: ESocket = 7 williamr@4: }; williamr@4: williamr@4: TCFSubSessInfo(TUint8 aType) williamr@4: : TSubSessInfo(aType) williamr@4: { williamr@4: } williamr@4: }; williamr@4: williamr@4: /** williamr@4: @class TCFPlayerRole williamr@4: williamr@4: TCFPlayerRole and TPlayerRole can be removed after Players are relieved from knowing their roles williamr@4: which should hopefully come as part of the "Global Object Broker" work. williamr@4: */ williamr@4: class TCFPlayerRole : public Den::TPlayerRole williamr@4: /** williamr@4: @internalTechnology williamr@4: */ williamr@4: { williamr@4: public: williamr@4: /** Parallel threads operate the same technologies in the same plane but with some interesting (probably private difference), eg two data threads both williamr@4: bound to a control thread, one default and one devoted to realtime. We describe them as "kin" of one another, and they are distinguished by their williamr@4: "kindex" ie kin index, which is simply a whole number zero upwards, zero being the default and generally only value. It's up to a control provider to williamr@4: know about the parallel threads and specify the kindex when requesting a FC to talk to (eg a SCPR when creating a flow) williamr@4: williamr@4: At present there are no parallel threads for CPRs as they have 1:1 with MCPR. It may be that in the future we have to worry about the same TierMgr in two williamr@4: threads, eg an authentication protocol being used by both BT & IP, and they're running separate control thread. This will require further thought once williamr@4: the use is clearer. williamr@4: */ williamr@4: static const TInt KDefaultKindex = 0; williamr@4: enum TRole williamr@4: { williamr@4: EDataPlane = 0x000001, williamr@4: ESubConnPlane = 0x000010, williamr@4: EConnPlane = 0x000100, williamr@4: EMetaConnPlane = 0x001000, williamr@4: ETierMgrPlane = 0x010000, williamr@4: ETierResolver = 0x100000, williamr@4: EAllPlanes = EDataPlane | ESubConnPlane | EConnPlane | EMetaConnPlane | ETierMgrPlane, williamr@4: EPrePlanarArchitecture = 0x40000000, // never explicitly set; denotes a legacy CMI and so a worker whose plane FCs can be ignored williamr@4: }; williamr@4: williamr@4: public: williamr@4: TCFPlayerRole() williamr@4: : Den::TPlayerRole(EUnknown, KDefaultKindex) williamr@4: { williamr@4: } williamr@4: williamr@4: TCFPlayerRole(TUint aRole, TUint16 aKindex = KDefaultKindex) williamr@4: : Den::TPlayerRole(aRole, aKindex) williamr@4: { williamr@4: } williamr@4: }; williamr@4: williamr@4: #define mcfnode_cast Messages::mnode_cast williamr@4: williamr@4: williamr@4: #endif williamr@4: williamr@4: