epoc32/include/comms-infras/ss_common.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     2
// All rights reserved.
williamr@4
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@4
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     7
//
williamr@4
     8
// Initial Contributors:
williamr@4
     9
// Nokia Corporation - initial contribution.
williamr@4
    10
//
williamr@4
    11
// Contributors:
williamr@4
    12
//
williamr@4
    13
// Description:
williamr@4
    14
//
williamr@4
    15
williamr@4
    16
/**
williamr@4
    17
 @file
williamr@4
    18
 @internalTechnology
williamr@4
    19
*/
williamr@4
    20
williamr@4
    21
#if !defined(__SS_COMMON_H__)
williamr@4
    22
#define __SS_COMMON_H__
williamr@4
    23
williamr@4
    24
#include <elements/mm_node.h>
williamr@4
    25
#include <elements/mm_activities.h>
williamr@4
    26
#include <elements/sd_std.h>
williamr@4
    27
#include <elements/mm_context_internal.h>
williamr@4
    28
#include <cfshared.h>
williamr@4
    29
#include <comms-infras/ss_activities.h>
williamr@4
    30
williamr@4
    31
/** Support for checking that the current thread is the "home thread" */
williamr@4
    32
#if defined(_DEBUG)
williamr@4
    33
#define ESOCK_HOME_THREAD_CHECK_ENABLED
williamr@4
    34
#endif
williamr@4
    35
williamr@4
    36
// Some legacy oddities supported for a transition period have code guarded by this macro. Some day we'll be
williamr@4
    37
// breaking all of this behaviour and so able to drop this
williamr@4
    38
#define SYMBIAN_NETWORKING_LEGACY_COMPATIBILITY_SUPPORT
williamr@4
    39
williamr@4
    40
/**
williamr@4
    41
	Type identifier for the derived sub-session objects. Used e.g. in containers to identify
williamr@4
    42
	what is stored.
williamr@4
    43
williamr@4
    44
	@see CSockSubSession::Type()
williamr@4
    45
*/
williamr@4
    46
class TCFSubSessInfo : public Den::TSubSessInfo
williamr@4
    47
/**
williamr@4
    48
@internalTechnology
williamr@4
    49
*/
williamr@4
    50
	{
williamr@4
    51
public:
williamr@4
    52
	enum TSubSessionType
williamr@4
    53
		{
williamr@4
    54
		EHostResolver = 2, //starting from TSubSessInfo::EAny
williamr@4
    55
		EServiceResolver = 3,
williamr@4
    56
		ENetDatabase = 4,
williamr@4
    57
		EConnection = 5,
williamr@4
    58
		ESubConnection = 6,
williamr@4
    59
		ESocket = 7
williamr@4
    60
		};
williamr@4
    61
williamr@4
    62
	TCFSubSessInfo(TUint8 aType)
williamr@4
    63
	:	TSubSessInfo(aType)
williamr@4
    64
		{
williamr@4
    65
		}
williamr@4
    66
	};
williamr@4
    67
williamr@4
    68
/**
williamr@4
    69
@class TCFPlayerRole
williamr@4
    70
williamr@4
    71
TCFPlayerRole and TPlayerRole can be removed after Players are relieved from knowing their roles
williamr@4
    72
which should hopefully come as part of the "Global Object Broker" work.
williamr@4
    73
*/
williamr@4
    74
class TCFPlayerRole : public Den::TPlayerRole
williamr@4
    75
/**
williamr@4
    76
@internalTechnology
williamr@4
    77
*/
williamr@4
    78
	{
williamr@4
    79
public:
williamr@4
    80
	/** Parallel threads operate the same technologies in the same plane but with some interesting (probably private difference), eg two data threads both
williamr@4
    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
williamr@4
    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
williamr@4
    83
	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
    84
williamr@4
    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
williamr@4
    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
williamr@4
    87
	the use is clearer.
williamr@4
    88
	*/
williamr@4
    89
	static const TInt KDefaultKindex = 0;
williamr@4
    90
    enum TRole
williamr@4
    91
        {
williamr@4
    92
        EDataPlane     = 0x000001,
williamr@4
    93
        ESubConnPlane  = 0x000010,
williamr@4
    94
        EConnPlane     = 0x000100,
williamr@4
    95
        EMetaConnPlane = 0x001000,
williamr@4
    96
        ETierMgrPlane  = 0x010000,
williamr@4
    97
        ETierResolver  = 0x100000,
williamr@4
    98
        EAllPlanes     = EDataPlane | ESubConnPlane | EConnPlane | EMetaConnPlane | ETierMgrPlane,
williamr@4
    99
        EPrePlanarArchitecture = 0x40000000,	// never explicitly set; denotes a legacy CMI and so a worker whose plane FCs can be ignored
williamr@4
   100
		};
williamr@4
   101
williamr@4
   102
public:
williamr@4
   103
	TCFPlayerRole()
williamr@4
   104
	:	Den::TPlayerRole(EUnknown, KDefaultKindex)
williamr@4
   105
		{
williamr@4
   106
		}
williamr@4
   107
williamr@4
   108
	TCFPlayerRole(TUint aRole, TUint16 aKindex = KDefaultKindex)
williamr@4
   109
	:	Den::TPlayerRole(aRole, aKindex)
williamr@4
   110
		{
williamr@4
   111
		}
williamr@4
   112
	};
williamr@4
   113
williamr@4
   114
#define mcfnode_cast Messages::mnode_cast
williamr@4
   115
williamr@4
   116
williamr@4
   117
#endif
williamr@4
   118
williamr@4
   119