|
1 // Copyright (c) 2008-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 #ifndef __UPNPSERVICECPRSTATES_H |
|
17 #define __UPNPSERVICECPRSTATES_H |
|
18 |
|
19 //System Includes |
|
20 #include <comms-infras/ss_coreprstates.h> |
|
21 #include <comms-infras/corecprstates.h> |
|
22 |
|
23 //Local Includes |
|
24 #include "upnpservicecpr.h" |
|
25 #include "upnp_cf_msgs.h" |
|
26 |
|
27 using namespace MeshMachine; |
|
28 |
|
29 namespace UPnPServiceCprStates |
|
30 { |
|
31 typedef TNodeContext<CUPnPServiceConnectionProvider, CprStates::TContext> TContext; |
|
32 |
|
33 // States |
|
34 typedef TAwaiting2MessagesState<TUpnpMessage::TServiceJoinRequest, TUpnpMessage::TDeviceJoinRequest> TAwaitingServiceOrDeviceJoin; |
|
35 typedef TAwaiting2MessagesState<TUpnpMessage::TRegisterService, TUpnpMessage::TRegisterDevice> TAwaitingServiceOrDeviceRegister; |
|
36 typedef TAwaiting2MessagesState<TUpnpMessage::TUnregisterService, TUpnpMessage::TUnregisterDevice> TAwaitingServiceOrDeviceUnregister; |
|
37 |
|
38 // State Forks |
|
39 DECLARE_SMELEMENT_HEADER ( TServiceOrDeviceTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext ) |
|
40 virtual TInt TransitionTag ( ); |
|
41 DECLARE_SMELEMENT_FOOTER ( TServiceOrDeviceTag ) |
|
42 |
|
43 |
|
44 DECLARE_SMELEMENT_HEADER ( TRootRegisteredOrNoTag, TStateFork<TContext>, NetStateMachine::MStateFork, TContext ) |
|
45 virtual TInt TransitionTag ( ); |
|
46 DECLARE_SMELEMENT_FOOTER ( TRootRegisteredOrNoTag ) |
|
47 |
|
48 |
|
49 // Transitions |
|
50 DECLARE_SMELEMENT_HEADER ( TPerformServiceOrDeviceValidationAndSendResponse, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
51 virtual void DoL ( ); |
|
52 DECLARE_SMELEMENT_FOOTER ( TPerformServiceOrDeviceValidationAndSendResponse ) |
|
53 |
|
54 |
|
55 DECLARE_SMELEMENT_HEADER ( TAppendServiceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
56 virtual void DoL ( ); |
|
57 DECLARE_SMELEMENT_FOOTER ( TAppendServiceInfo ) |
|
58 |
|
59 |
|
60 DECLARE_SMELEMENT_HEADER ( TAppendDeviceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
61 virtual void DoL ( ); |
|
62 DECLARE_SMELEMENT_FOOTER ( TAppendDeviceInfo ) |
|
63 |
|
64 |
|
65 DECLARE_SMELEMENT_HEADER ( TDeleteServiceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
66 virtual void DoL ( ); |
|
67 DECLARE_SMELEMENT_FOOTER ( TDeleteServiceInfo ) |
|
68 |
|
69 |
|
70 DECLARE_SMELEMENT_HEADER ( TDeleteDeviceInfo, TStateTransition<TContext>, NetStateMachine::MStateTransition, TContext ) |
|
71 virtual void DoL ( ); |
|
72 DECLARE_SMELEMENT_FOOTER ( TDeleteDeviceInfo ) |
|
73 |
|
74 } |
|
75 |
|
76 |
|
77 #endif // UPNPSERVICECPRSTATES_H |
|
78 |
|
79 |