1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/comms-infras/ss_common.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,119 @@
1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +/**
1.20 + @file
1.21 + @internalTechnology
1.22 +*/
1.23 +
1.24 +#if !defined(__SS_COMMON_H__)
1.25 +#define __SS_COMMON_H__
1.26 +
1.27 +#include <elements/mm_node.h>
1.28 +#include <elements/mm_activities.h>
1.29 +#include <elements/sd_std.h>
1.30 +#include <elements/mm_context_internal.h>
1.31 +#include <cfshared.h>
1.32 +#include <comms-infras/ss_activities.h>
1.33 +
1.34 +/** Support for checking that the current thread is the "home thread" */
1.35 +#if defined(_DEBUG)
1.36 +#define ESOCK_HOME_THREAD_CHECK_ENABLED
1.37 +#endif
1.38 +
1.39 +// Some legacy oddities supported for a transition period have code guarded by this macro. Some day we'll be
1.40 +// breaking all of this behaviour and so able to drop this
1.41 +#define SYMBIAN_NETWORKING_LEGACY_COMPATIBILITY_SUPPORT
1.42 +
1.43 +/**
1.44 + Type identifier for the derived sub-session objects. Used e.g. in containers to identify
1.45 + what is stored.
1.46 +
1.47 + @see CSockSubSession::Type()
1.48 +*/
1.49 +class TCFSubSessInfo : public Den::TSubSessInfo
1.50 +/**
1.51 +@internalTechnology
1.52 +*/
1.53 + {
1.54 +public:
1.55 + enum TSubSessionType
1.56 + {
1.57 + EHostResolver = 2, //starting from TSubSessInfo::EAny
1.58 + EServiceResolver = 3,
1.59 + ENetDatabase = 4,
1.60 + EConnection = 5,
1.61 + ESubConnection = 6,
1.62 + ESocket = 7
1.63 + };
1.64 +
1.65 + TCFSubSessInfo(TUint8 aType)
1.66 + : TSubSessInfo(aType)
1.67 + {
1.68 + }
1.69 + };
1.70 +
1.71 +/**
1.72 +@class TCFPlayerRole
1.73 +
1.74 +TCFPlayerRole and TPlayerRole can be removed after Players are relieved from knowing their roles
1.75 +which should hopefully come as part of the "Global Object Broker" work.
1.76 +*/
1.77 +class TCFPlayerRole : public Den::TPlayerRole
1.78 +/**
1.79 +@internalTechnology
1.80 +*/
1.81 + {
1.82 +public:
1.83 + /** Parallel threads operate the same technologies in the same plane but with some interesting (probably private difference), eg two data threads both
1.84 + 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
1.85 + "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
1.86 + know about the parallel threads and specify the kindex when requesting a FC to talk to (eg a SCPR when creating a flow)
1.87 +
1.88 + 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
1.89 + threads, eg an authentication protocol being used by both BT & IP, and they're running separate control thread. This will require further thought once
1.90 + the use is clearer.
1.91 + */
1.92 + static const TInt KDefaultKindex = 0;
1.93 + enum TRole
1.94 + {
1.95 + EDataPlane = 0x000001,
1.96 + ESubConnPlane = 0x000010,
1.97 + EConnPlane = 0x000100,
1.98 + EMetaConnPlane = 0x001000,
1.99 + ETierMgrPlane = 0x010000,
1.100 + ETierResolver = 0x100000,
1.101 + EAllPlanes = EDataPlane | ESubConnPlane | EConnPlane | EMetaConnPlane | ETierMgrPlane,
1.102 + EPrePlanarArchitecture = 0x40000000, // never explicitly set; denotes a legacy CMI and so a worker whose plane FCs can be ignored
1.103 + };
1.104 +
1.105 +public:
1.106 + TCFPlayerRole()
1.107 + : Den::TPlayerRole(EUnknown, KDefaultKindex)
1.108 + {
1.109 + }
1.110 +
1.111 + TCFPlayerRole(TUint aRole, TUint16 aKindex = KDefaultKindex)
1.112 + : Den::TPlayerRole(aRole, aKindex)
1.113 + {
1.114 + }
1.115 + };
1.116 +
1.117 +#define mcfnode_cast Messages::mnode_cast
1.118 +
1.119 +
1.120 +#endif
1.121 +
1.122 +