mtpdataproviders/mtppictbridgedp/pictbridgeengine/inc/dpsstatemachine.inl
changeset 28 85e0c0339cc3
equal deleted inserted replaced
25:48a2e0d8a4ce 28:85e0c0339cc3
       
     1 /*
       
     2 * Copyright (c) 2006, 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  inline functions of CDpsStatemachine
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "dpsstate.h"
       
    20 
       
    21 // ---------------------------------------------------------------------------
       
    22 // 
       
    23 // ---------------------------------------------------------------------------
       
    24 //    
       
    25 void CDpsStateMachine::ScriptSentNotifyL(TBool aReply)
       
    26     {
       
    27     iCurState->ScriptSentNotifyL(aReply);
       
    28     }
       
    29     
       
    30 // ---------------------------------------------------------------------------
       
    31 // 
       
    32 // ---------------------------------------------------------------------------
       
    33 //
       
    34 void CDpsStateMachine::ScriptReceivedNotifyL(TBool aReply)
       
    35     {
       
    36     iCurState->ScriptReceivedNotifyL(aReply);
       
    37     }
       
    38         
       
    39 // ---------------------------------------------------------------------------
       
    40 // 
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 void CDpsStateMachine::Error(TInt err)
       
    44     {
       
    45     iCurError = err;
       
    46     iCurState->Error(err);
       
    47     }
       
    48         
       
    49 // ---------------------------------------------------------------------------
       
    50 // 
       
    51 // ---------------------------------------------------------------------------
       
    52 //    
       
    53 void CDpsStateMachine::SetState(MDpsState* aState)
       
    54     {
       
    55     iCurState = aState;
       
    56     }
       
    57 
       
    58 // ---------------------------------------------------------------------------
       
    59 // 
       
    60 // ---------------------------------------------------------------------------
       
    61 //
       
    62 MDpsState* CDpsStateMachine::IdleState() const
       
    63     {
       
    64     return iIdleState;
       
    65     }
       
    66 
       
    67 // ---------------------------------------------------------------------------
       
    68 // 
       
    69 // ---------------------------------------------------------------------------
       
    70 //
       
    71 MDpsState* CDpsStateMachine::SendingReqState() const
       
    72     {
       
    73     return iSendingReqState;
       
    74     }
       
    75 
       
    76 // ---------------------------------------------------------------------------
       
    77 // 
       
    78 // ---------------------------------------------------------------------------
       
    79 //
       
    80 MDpsState* CDpsStateMachine::WaitingRepState() const
       
    81     {
       
    82     return iWaitingRepState; 
       
    83     }
       
    84 
       
    85 // ---------------------------------------------------------------------------
       
    86 // 
       
    87 // ---------------------------------------------------------------------------
       
    88 //
       
    89 MDpsState* CDpsStateMachine::SendingRepState() const
       
    90     {
       
    91     return iSendingRepState;
       
    92     }
       
    93     
       
    94 // ---------------------------------------------------------------------------
       
    95 // 
       
    96 // ---------------------------------------------------------------------------
       
    97 //
       
    98 CDpsScriptReceiver* CDpsStateMachine::ScriptReceiver() const
       
    99     {
       
   100     return iScriptReceiver;
       
   101     }
       
   102     
       
   103 // ---------------------------------------------------------------------------
       
   104 // 
       
   105 // ---------------------------------------------------------------------------
       
   106 //                
       
   107 CDpsScriptSender* CDpsStateMachine::ScriptSender() const
       
   108     {
       
   109     return iScriptSender;
       
   110     }
       
   111     
       
   112 // ---------------------------------------------------------------------------
       
   113 // 
       
   114 // ---------------------------------------------------------------------------
       
   115 //
       
   116 CDpsTransaction* CDpsStateMachine::Trader() const
       
   117     {
       
   118     return iTrader;
       
   119     }
       
   120     
       
   121 // ---------------------------------------------------------------------------
       
   122 // 
       
   123 // ---------------------------------------------------------------------------
       
   124 //
       
   125 TDpsOperation CDpsStateMachine::Operation() const
       
   126     {
       
   127     return iOperation;
       
   128     }
       
   129     
       
   130 // ---------------------------------------------------------------------------
       
   131 // 
       
   132 // ---------------------------------------------------------------------------
       
   133 //
       
   134 void CDpsStateMachine::SetOperation(TDpsOperation aOp)
       
   135     {
       
   136     iOperation = aOp;
       
   137     }
       
   138     
       
   139 // ---------------------------------------------------------------------------
       
   140 // 
       
   141 // ---------------------------------------------------------------------------
       
   142 //
       
   143 TMDpsOperation* CDpsStateMachine::MOperation() const
       
   144     {
       
   145     return iMOperation;
       
   146     }
       
   147     
       
   148 // ---------------------------------------------------------------------------
       
   149 // 
       
   150 // ---------------------------------------------------------------------------
       
   151 //
       
   152 TDpsEvent CDpsStateMachine::Event() const
       
   153     {
       
   154     return iEvent;
       
   155     }
       
   156 
       
   157 // ---------------------------------------------------------------------------
       
   158 // 
       
   159 // ---------------------------------------------------------------------------
       
   160 //    
       
   161 void CDpsStateMachine::SetEvent(TDpsEvent aEvent)
       
   162     {
       
   163     iEvent = aEvent;
       
   164     }
       
   165 
       
   166 // ---------------------------------------------------------------------------
       
   167 // 
       
   168 // ---------------------------------------------------------------------------
       
   169 //    
       
   170 MDpsState* CDpsStateMachine::CurState() const
       
   171     {
       
   172     return iCurState;
       
   173     }
       
   174     
       
   175 // ---------------------------------------------------------------------------
       
   176 // 
       
   177 // ---------------------------------------------------------------------------
       
   178 //        
       
   179 CDpsEngine* CDpsStateMachine::DpsEngine() const
       
   180     {
       
   181     return iEngine;
       
   182     }
       
   183     
       
   184 // ---------------------------------------------------------------------------
       
   185 // 
       
   186 // ---------------------------------------------------------------------------
       
   187 //            
       
   188 TInt CDpsStateMachine::CurError() const
       
   189     {
       
   190     return iCurError;
       
   191     }