datacommsserver/esockserver/UpsCoreProviders/inc/upscpractivities.h
changeset 0 dfb7c4ff071f
child 24 00c6709d25aa
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2006-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 // Core CPR Activities related to User Prompt Service (UPS)
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21 */
       
    22 
       
    23 #ifndef SYMBIAN_UPSCPRACTIVITIES_H
       
    24 #define SYMBIAN_UPSCPRACTIVITIES_H
       
    25 
       
    26 #include <comms-infras/ss_corepractivities.h>
       
    27 #include <comms-infras/corecpr.h>
       
    28 
       
    29 namespace UpsCprActivities
       
    30 {
       
    31 	
       
    32 class CDeferredCtrlClientJoinActivity : public MeshMachine::CNodeParallelActivityBase
       
    33 /**
       
    34 Class used to implement a control client join activity that needs to be deferred until
       
    35 after some authorisation has taken place.
       
    36 
       
    37 Main purpose is to temporarily store the client id whilst a derived class performs
       
    38 the authorisation.  Then, if all goes well, the control client is added and a
       
    39 a join complete message sent to the originator(s).  Note that this class is not UPS
       
    40 specific.
       
    41 */
       
    42 	{
       
    43 public:
       
    44 	typedef MeshMachine::TNodeContext<ESock::CMMCommsProviderBase, PRStates::TContext, CDeferredCtrlClientJoinActivity> TContext;
       
    45 
       
    46     IMPORT_C static MeshMachine::CNodeActivityBase* NewL(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode);
       
    47 
       
    48 	void SetClient(const Messages::TNodeId& aCommsId);
       
    49 	const Messages::TNodeId& Client();
       
    50 
       
    51 	void SetFlags(TInt aFlags);
       
    52 //	TInt Flags();
       
    53 
       
    54 	EXPORT_DECLARE_SMELEMENT_HEADER( TStoreControlClient, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
       
    55 		IMPORT_C virtual void DoL();
       
    56 	DECLARE_SMELEMENT_FOOTER( TStoreControlClient )
       
    57 
       
    58 	EXPORT_DECLARE_SMELEMENT_HEADER( TAddControlClientAndSendJoinComplete, MeshMachine::TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext )
       
    59 		IMPORT_C virtual void DoL();
       
    60 	DECLARE_SMELEMENT_FOOTER( TAddControlClientAndSendJoinComplete )
       
    61 
       
    62 protected:
       
    63     IMPORT_C CDeferredCtrlClientJoinActivity(const MeshMachine::TNodeActivity& aActivitySig, MeshMachine::AMMNodeBase& aNode, TUint aNextActivityCount);
       
    64 	IMPORT_C virtual ~CDeferredCtrlClientJoinActivity();
       
    65 
       
    66 private:
       
    67 	Messages::TNodeId iClient;		// control client to be joined
       
    68 	TInt iFlags;					// join flags
       
    69 	};
       
    70 
       
    71 } // namespace UpsActivities
       
    72 
       
    73 #endif //SYMBIAN_UPSCPRACTIVITIES_H
       
    74