datacommsserver/esockserver/inc/ss_common.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2004-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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalTechnology
       
    19 */
       
    20 
       
    21 #if !defined(__SS_COMMON_H__)
       
    22 #define __SS_COMMON_H__
       
    23 
       
    24 #include <elements/mm_node.h>
       
    25 #include <elements/mm_activities.h>
       
    26 #include <elements/sd_std.h>
       
    27 #include <elements/mm_context_internal.h>
       
    28 #include <cfshared.h>
       
    29 #include <comms-infras/ss_activities.h>
       
    30 
       
    31 /** Support for checking that the current thread is the "home thread" */
       
    32 #if defined(_DEBUG)
       
    33 #define ESOCK_HOME_THREAD_CHECK_ENABLED
       
    34 #endif
       
    35 
       
    36 // Some legacy oddities supported for a transition period have code guarded by this macro. Some day we'll be
       
    37 // breaking all of this behaviour and so able to drop this
       
    38 #define SYMBIAN_NETWORKING_LEGACY_COMPATIBILITY_SUPPORT
       
    39 
       
    40 /**
       
    41 	Type identifier for the derived sub-session objects. Used e.g. in containers to identify
       
    42 	what is stored.
       
    43 
       
    44 	@see CSockSubSession::Type()
       
    45 */
       
    46 class TCFSubSessInfo : public Den::TSubSessInfo
       
    47 /**
       
    48 @internalTechnology
       
    49 */
       
    50 	{
       
    51 public:
       
    52 	enum TSubSessionType
       
    53 		{
       
    54 		EHostResolver = 2, //starting from TSubSessInfo::EAny
       
    55 		EServiceResolver = 3,
       
    56 		ENetDatabase = 4,
       
    57 		EConnection = 5,
       
    58 		ESubConnection = 6,
       
    59 		ESocket = 7
       
    60 		};
       
    61 
       
    62 	TCFSubSessInfo(TUint8 aType)
       
    63 	:	TSubSessInfo(aType)
       
    64 		{
       
    65 		}
       
    66 	};
       
    67 
       
    68 /**
       
    69 @class TCFPlayerRole
       
    70 
       
    71 TCFPlayerRole and TPlayerRole can be removed after Players are relieved from knowing their roles
       
    72 which should hopefully come as part of the "Global Object Broker" work.
       
    73 */
       
    74 class TCFPlayerRole : public Den::TPlayerRole
       
    75 /**
       
    76 @internalTechnology
       
    77 */
       
    78 	{
       
    79 public:
       
    80 	/** Parallel threads operate the same technologies in the same plane but with some interesting (probably private difference), eg two data threads both
       
    81 	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
       
    82 	"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
       
    83 	know about the parallel threads and specify the kindex when requesting a FC to talk to (eg a SCPR when creating a flow)
       
    84 
       
    85 	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
       
    86 	threads, eg an authentication protocol being used by both BT & IP, and they're running separate control thread. This will require further thought once
       
    87 	the use is clearer.
       
    88 	*/
       
    89 	static const TInt KDefaultKindex = 0;
       
    90     enum TRole
       
    91         {
       
    92         EDataPlane     = 0x000001,
       
    93         ESubConnPlane  = 0x000010,
       
    94         EConnPlane     = 0x000100,
       
    95         EMetaConnPlane = 0x001000,
       
    96         ETierMgrPlane  = 0x010000,
       
    97         ETierResolver  = 0x100000,
       
    98         EAllPlanes     = EDataPlane | ESubConnPlane | EConnPlane | EMetaConnPlane | ETierMgrPlane,
       
    99         EPrePlanarArchitecture = 0x40000000,	// never explicitly set; denotes a legacy CMI and so a worker whose plane FCs can be ignored
       
   100 		};
       
   101 
       
   102 public:
       
   103 	TCFPlayerRole()
       
   104 	:	Den::TPlayerRole(EUnknown, KDefaultKindex)
       
   105 		{
       
   106 		}
       
   107 
       
   108 	TCFPlayerRole(TUint aRole, TUint16 aKindex = KDefaultKindex)
       
   109 	:	Den::TPlayerRole(aRole, aKindex)
       
   110 		{
       
   111 		}
       
   112 	};
       
   113 
       
   114 #define mcfnode_cast Messages::mnode_cast
       
   115 
       
   116 
       
   117 #endif
       
   118 
       
   119