datacommsserver/esockserver/inc/ss_nodemessages_internal_esock.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2005-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 // THIS API IS INTERNAL TO NETWORKING AND IS SUBJECT TO CHANGE AND NOT FOR EXTERNAL USE
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef SYMBIAN_NODEMESSAGES_INTERNAL_ESOCK_H
       
    24 #define SYMBIAN_NODEMESSAGES_INTERNAL_ESOCK_H
       
    25 
       
    26 #include <comms-infras/ss_nodemessages_internal.h>
       
    27 #include <comms-infras/ss_nodemessages.h>
       
    28 
       
    29 namespace ESock
       
    30 {
       
    31 
       
    32 //any new enum added here needs to go into one of the utracedecoder definition files
       
    33 //NEVER INSERT ANYTHING IN HERE ONLY ADD THE PENALTY IS SUDDEN DEATH!
       
    34 class TCFInternalEsock
       
    35 	{
       
    36 private:
       
    37 	enum
       
    38 	{
       
    39 	ECFCreateCSR                    = 1,
       
    40 	ECFCSRCreated                   = 2,
       
    41 	ECFFlowRequest                  = 3,
       
    42 	ECFSubSess                      = 4,
       
    43 	ECFSubConnectionOpenedEvent		= 5,
       
    44 	ECFSubConnectionClosedEvent		= 6,
       
    45 	ECFLegacyConnectionEnumResponse	= 7,
       
    46 	ECFBuildStackRequest            = 8,
       
    47 	ECFBuildStackResponse           = 9,
       
    48  	ECFFlowProvision                = 10
       
    49 	};
       
    50 protected:
       
    51 
       
    52 public:
       
    53     enum { ERealmId = 0x10285F46 }; //UID allocated on 4/6/08 from KUidNodeMessageRealms
       
    54     /*==========================================================================
       
    55     <<Keys:>>
       
    56     [Name]:      <messagename>
       
    57     [Semantics]: Message semantics
       
    58 
       
    59     [Type]:      Request for <responsemsg>|Response to <requestmsg>|Notification/[Peerless]
       
    60                  Where:
       
    61                  Request      - request to perform an action. Sender should expect <responsemsg>
       
    62                                 to ackowledge the completion of the action.
       
    63                  Response     - acknowledgement that the previous request is now completed.
       
    64                  Notification - a one-off message flagging an event.
       
    65                  Peerless     - the message is peerless, i.e.: the sender doesn't have to
       
    66                                 be the recipient's client.
       
    67     [Fallible]:  Yes|No
       
    68                  Only applicable to requests and denotes whether the request can fail or not,
       
    69                  or, in other words, whether the request can be completed to with TError.
       
    70 
       
    71     [Structure]:
       
    72     Every message defined in this realm has at least:
       
    73     param        iSender      - the message sender
       
    74     param        iActivityId  - depending on the message type:
       
    75                  Request      - the activity id the response should be addressed to.
       
    76                                 Request senders fill up this param to match the response
       
    77                                 with the local activity. Activity id on the sender side
       
    78                                 should uniquelly identify the activity expecting the response.
       
    79                  Response     - the activity on the recipient side expecting this response.
       
    80                                 the activityid to put here has been previously conveyed
       
    81                                 with the request.
       
    82                  Notification - ignored.
       
    83     ===========================================================================*/
       
    84 
       
    85     /*==========================================================================
       
    86     [Name]:      TCreateCSR
       
    87     [Semantics]: Sent to a factory container to request a CSR object.
       
    88 
       
    89     [Type]:      Request
       
    90     [Fallible]:  Yes
       
    91 
       
    92     [Structure]:
       
    93     param        iUid - UID of the top-most tier (used to initialise the new CSR)
       
    94     ===========================================================================*/
       
    95 	typedef Messages::TMessageSigUid<ECFCreateCSR, TCFInternalEsock::ERealmId> TCreateCSR;
       
    96 
       
    97     /*==========================================================================
       
    98     [Name]:      TCSRCreated
       
    99     [Semantics]: Response to TCreateCSR.
       
   100                  Carries the actual object's address.
       
   101 
       
   102     [Type]:      Response
       
   103     [Fallible]:  No
       
   104 
       
   105     [Structure]: [399TODO]
       
   106     ===========================================================================*/
       
   107 	typedef Messages::TMessageSigNodeId<ECFCSRCreated, TCFInternalEsock::ERealmId> TCSRCreated;
       
   108 
       
   109     /*==========================================================================
       
   110     [Name]:      TFlowRequest
       
   111     [Semantics]: Request sent from a data plane subsession to a factory container
       
   112                  (in the relevant plane - could be the SubConnection FC, the Connection
       
   113                  FC or the TierManager FC for the implicit flow requests).
       
   114                  Sent always indirectly, wrapped in (carried by) a self-dispatching message
       
   115                  such as TImplicitFlowRequest/TConnFlowRequest/TSubConnFlowRequest which,
       
   116                  upon arrival to the relevant destination node, creates a suitable FlowRequest
       
   117                  worker node on which activities run to perform the flow creation processes.
       
   118 
       
   119     [Type]:      Request
       
   120     [Fallible]:  Yes (at many stages)
       
   121 
       
   122     [Structure]:
       
   123     param        iValue - id of the IPC function such as ESoCreate etc
       
   124     ===========================================================================*/
       
   125  	typedef TMessageSigFlowParams<ECFFlowRequest, TCFInternalEsock::ERealmId> TFlowRequest;
       
   126 
       
   127     /*==========================================================================
       
   128     [Name]:      TSubSess
       
   129     [Semantics]: Reserved and private to EsockSvr
       
   130 
       
   131     [Type]:      N/A
       
   132 
       
   133     [Structure]:
       
   134                  N/A
       
   135     ===========================================================================*/
       
   136 	typedef Messages::TMessageExtensionRMessage2<ECFSubSess, TCFInternalEsock::ERealmId> TSubSess;
       
   137 
       
   138     /*==========================================================================
       
   139     [Name]:      TSubConnectionOpenedEvent
       
   140     [Semantics]: [399TODO] RZ: Simon please finish.
       
   141 
       
   142     [Type]:
       
   143     [Fallible]:
       
   144 
       
   145     [Structure]:
       
   146     ===========================================================================*/
       
   147 	typedef TMessageSigSubConnOpenedEvent<ECFSubConnectionOpenedEvent, TCFInternalEsock::ERealmId> TSubConnectionOpenedEvent;
       
   148 
       
   149     /*==========================================================================
       
   150     [Name]:      TSubConnectionClosedEvent
       
   151     [Semantics]: [399TODO] RZ: Simon please finish.
       
   152 
       
   153     [Type]:
       
   154     [Fallible]:
       
   155 
       
   156     [Structure]:
       
   157     ===========================================================================*/
       
   158 	typedef TMessageSigSubConnClosedEvent<ECFSubConnectionClosedEvent, TCFInternalEsock::ERealmId> TSubConnectionClosedEvent;
       
   159 
       
   160 //--Legacy Connection queries; to deprecate and ultimately remove
       
   161 	/*==========================================================================
       
   162 	[Name]:      TLegacyConnEnumResponse
       
   163 	[Semantics]: Sent as a response to TLegacyConnSocketsRequest.
       
   164 
       
   165 	[Type]:      Response from data thread to TLegacyConnSocketsResponse
       
   166 	[Fallible]:  No.
       
   167 	[Structure]:
       
   168 	param: iValue1 - the number of sockets described in the buffer
       
   169 		   iValue2 - pointer to HBufC8 containing the C-array TConnectionSocketInfo. Created
       
   170 					 by data thread and destroyed by control thread
       
   171 		   iValue3 - error code
       
   172 	===========================================================================*/
       
   173 	typedef Messages::TMessageSigNumberNumberNumber<ECFLegacyConnectionEnumResponse, TCFInternalEsock::ERealmId> TLegacyConnectionEnumResponse;
       
   174 
       
   175 	/*==========================================================================
       
   176     [Name]:      TBuildStackRequest
       
   177     [Semantics]: Sent by a subconnection to itself to prompt the building of the stack beneath it.
       
   178 
       
   179     [Type]:      Request from subconnection to itself
       
   180     [Fallible]:  No.
       
   181     [Structure]:
       
   182     ===========================================================================*/
       
   183 	typedef TMessageSigFamilyBundle<ECFBuildStackRequest, TCFInternalEsock::ERealmId> TBuildStackRequest;
       
   184 
       
   185     /*==========================================================================
       
   186     [Name]:      TBuildStackResponse
       
   187     [Semantics]: Sent as a response to TBuildStackRequest upon completion.
       
   188 
       
   189     [Type]:      Response to TBuildStackRequest
       
   190     [Fallible]:  No.
       
   191     [Structure]:
       
   192     ===========================================================================*/
       
   193 	typedef Messages::TMessageSigVoid<ECFBuildStackResponse, TCFInternalEsock::ERealmId> TBuildStackResponse;
       
   194 
       
   195     /*==========================================================================
       
   196     [Name]:      TFlowProvision
       
   197     [Semantics]: This message carries a TFlowParams payload that provisions the CTransportFlowShim with
       
   198                  the protocol argument triple (addressfamily, protocol, socket type) that would previously
       
   199                  have been applied with ConstructL from the CSocket above. So the introduction of this message
       
   200                  effectively shifts responsiblity for initialising the flow to the SCPR and away from the socket
       
   201                  in fitting with three plane comms expected practice. In addition flows can then be stacked
       
   202                  upon CTransportFlowShim without the difficulty of the synchronous ConstructL during binding.
       
   203 
       
   204                  This message should follow TProvisionConfig and must be sent before the flow is bound to from above.
       
   205                  That is before the binder request is completed.
       
   206 
       
   207     [Type]:      Notification
       
   208                  IMPORTANT: There is no response to TFlowProvision. As with TProvisionConfig if the
       
   209                  recipient finds out that the configuration received is in any way inadequate, it cannot flag this
       
   210                  fact until it is requested to do something (e.g.: TCFDataClient::TStart) it can't
       
   211                  (due to inadequate configuration).
       
   212 
       
   213     [Fallible]:  N/A - Notification
       
   214 
       
   215     [Structure]:
       
   216     param        iFlowParams - TFlowParams struct with the given flow params for the flow.
       
   217 
       
   218     ===========================================================================*/
       
   219 	typedef TMessageSigFlowParams<ECFFlowProvision, TCFInternalEsock::ERealmId> TFlowProvision;
       
   220 	};
       
   221 
       
   222 } //namespace esock
       
   223 
       
   224 #endif
       
   225 //SYMBIAN_NODEMESSAGES_CONTROLPROVIDER_H
       
   226