commsfwsupport/commselements/testing/dummystatelibrary/inc/dummymessages.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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalTechnology
       
    19 */
       
    20 
       
    21 #ifndef DUMMYMESSAGES_H
       
    22 #define DUMMYMESSAGES_H
       
    23 
       
    24 #include <elements/nm_signatures.h>
       
    25 
       
    26 namespace Dummy
       
    27 {
       
    28 
       
    29 class TBindProtocol
       
    30 	{
       
    31   private:
       
    32   	enum
       
    33  	{
       
    34  	EFindOrCreateFactoryObject = 1,
       
    35  	EFactoryObjectCreated      = 2,
       
    36  	EJoiningRequest            = 3,
       
    37  	EJoinComplete              = 4
       
    38 	};
       
    39 
       
    40 public:
       
    41     enum { ERealmId = 0x10285A57 };
       
    42 
       
    43     /*==========================================================================
       
    44     [Name]:       TFindOrCreateFactoryObject
       
    45     [Semantics]:  Sent to a factory (container) to request a factory object.
       
    46                   The factory object is to be preexisting or newly created
       
    47                   depending on the request argument and factory logic.
       
    48 
       
    49     [Type]:       Request for TFactoryObjectCreated.
       
    50     [Fallible]:   Yes
       
    51     [Cancellable] Yes
       
    52 
       
    53     [Structure]:
       
    54     param  iUid - Uid of the object being asked for.
       
    55     ===========================================================================*/
       
    56 	typedef Messages::TMessageSigUid<EFindOrCreateFactoryObject, ERealmId> TFindOrCreateFactoryObject;
       
    57 
       
    58     /*==========================================================================
       
    59     [Name]:      TFactoryObjectCreated
       
    60     [Semantics]: Response to TFindOrCreateFactoryObject / etc.
       
    61                  Carries the actual object's address + sometimes pointer.
       
    62 
       
    63     [Type]:      Response
       
    64 
       
    65     [Structure]:
       
    66     param        iCommsId - address of the new node
       
    67     param        iAny - pointer, if any
       
    68     ===========================================================================*/
       
    69 	typedef Messages::TMessageSigNodeIdAny<EFactoryObjectCreated, ERealmId> TFactoryObjectCreated;
       
    70 
       
    71     /*==========================================================================
       
    72     [Name]:      TClientJoiningRequest
       
    73     [Semantics]: A request to add a new client to the recipient's clients' list.
       
    74 
       
    75     [Type]:      Request for TJoinComplete/Peerless
       
    76     [Fallible]:  Yes.
       
    77     [Cancellable] Yes
       
    78     ===========================================================================*/
       
    79     typedef Messages::TMessageSigVoid<EJoiningRequest, ERealmId> TClientJoiningRequest;
       
    80 
       
    81     /*==========================================================================
       
    82     [Name]:      TJoinComplete
       
    83     [Semantics]: Adding new client to the recipient's clients' list succeeded.
       
    84 
       
    85     [Type]:      Response to TClientJoiningRequest.
       
    86     ===========================================================================*/
       
    87     typedef Messages::TMessageSigVoid<EJoinComplete, ERealmId> TJoinComplete;
       
    88 	};
       
    89 
       
    90 class TStartProtocol
       
    91 	{
       
    92   private:
       
    93   	enum
       
    94  	{
       
    95 	EStart   = 1,
       
    96 	EStarted = 2,
       
    97 	};
       
    98 
       
    99 public:
       
   100     enum { ERealmId = 0x10285A58 };
       
   101 
       
   102     /*==========================================================================
       
   103     [Name]:      TStart
       
   104     [Semantics]: Request to start the recipient. The recipient should create and start
       
   105                  whatever it needs to start itself.
       
   106 
       
   107     [Type]:      Request for TStarted.
       
   108     [Fallible]:  Yes.
       
   109     [Cancellable] Yes.
       
   110 
       
   111     [Structure]:
       
   112     param: iValue - dummy start parameter
       
   113     ===========================================================================*/
       
   114     typedef Messages::TMessageSigNumber<EStart, ERealmId> TStart;
       
   115 
       
   116     /*==========================================================================
       
   117     [Name]:      TStarted
       
   118     [Semantics]: The recipient has now started.
       
   119 
       
   120     [Type]:      Response to TStart.
       
   121 
       
   122     [Structure]:
       
   123     ===========================================================================*/
       
   124     typedef Messages::TMessageSigVoid<EStarted, ERealmId> TStarted;
       
   125 	};
       
   126 
       
   127 class TStopProtocol
       
   128 	{
       
   129   private:
       
   130   	enum
       
   131  	{
       
   132 	EStop    = 1,
       
   133 	EStopped = 2,
       
   134 	};
       
   135 
       
   136 public:
       
   137     enum { ERealmId = 0x10285A59 };
       
   138 
       
   139     /*==========================================================================
       
   140     [Name]:      TStop
       
   141     [Semantics]: Request to stop the recipient.
       
   142                  The recipient should stop and leave whatever it does no longer
       
   143                  require.
       
   144 
       
   145     [Type]:      Request for TStopped.
       
   146     [Fallible]:  No.
       
   147     [Cancellable] No.
       
   148 
       
   149     [Structure]:
       
   150     ===========================================================================*/
       
   151     typedef Messages::TMessageSigVoid<EStop, ERealmId> TStop;
       
   152 
       
   153     /*==========================================================================
       
   154     [Name]:      TStopped
       
   155     [Semantics]: The recipient has stopped.
       
   156 
       
   157     [Type]:      Response to TStop.
       
   158 
       
   159     [Structure]:
       
   160     ===========================================================================*/
       
   161     typedef Messages::TMessageSigVoid<EStopped, ERealmId> TStopped;
       
   162 	};
       
   163 
       
   164 } //namespace Dummy
       
   165 
       
   166 #endif
       
   167 //DUMMYMESSAGES_H
       
   168