simpledatamodeladapter/inc/presenceplugincontactstatehandler.h
branchRCL_3
changeset 35 fbd2e7cec7ef
parent 0 c8caa15ef882
equal deleted inserted replaced
34:2669f8761a99 35:fbd2e7cec7ef
       
     1 /*
       
     2 * Copyright (c) 2010 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:  IETF SIMPLE Protocol implementation for XIMP Framework
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CPRESENCEPLUGINCONTACTSTATEHANDLER_H
       
    20 #define C_CPRESENCEPLUGINCONTACTSTATEHANDLER_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 class CPresencepluginContactState;
       
    26 
       
    27 /**
       
    28  * States handler
       
    29  *
       
    30  * @lib presenceplugin.dll
       
    31  * @since S60 v5.0
       
    32  */
       
    33 class CPresencePluginContactStateHandler : public CBase
       
    34     {
       
    35 
       
    36 public:
       
    37 
       
    38     static CPresencePluginContactStateHandler* NewL();
       
    39 
       
    40     /**
       
    41      * Destructor.
       
    42      */
       
    43     virtual ~CPresencePluginContactStateHandler();
       
    44     
       
    45     /**
       
    46      * Add states to queue
       
    47      *
       
    48      * @since S60 v5.0
       
    49      * @param aState State to add, ownership is transferred.
       
    50      */
       
    51     void AddStateL( CPresencepluginContactState* aState );
       
    52     
       
    53     /**
       
    54      * Start State machine.
       
    55      * States must be added before
       
    56      *
       
    57      * @since S60 v5.0
       
    58      * @param aStatus Client status
       
    59      */
       
    60     void Start( TRequestStatus* aStatus );
       
    61 
       
    62     /**
       
    63      * States are progressed to end
       
    64      * or error occured
       
    65      *
       
    66      * @since S60 v5.0
       
    67      * @param aError Possible error
       
    68      */
       
    69     void Complete( TInt aError );
       
    70     
       
    71     /**
       
    72      * State getter
       
    73      *
       
    74      * @since S60 v5.0
       
    75      * @return State
       
    76      */
       
    77     CPresencepluginContactState* State();
       
    78     
       
    79     /**
       
    80      * Order statehandler to move next state
       
    81      *
       
    82      * @since S60 v5.0
       
    83      */
       
    84     void ProgressToNextState();
       
    85     
       
    86 private:
       
    87 
       
    88     CPresencePluginContactStateHandler();
       
    89 
       
    90     void HandleNextState();
       
    91 
       
    92 private: // data
       
    93     
       
    94     /**
       
    95      * Current state index
       
    96      * own.
       
    97      */
       
    98     TInt iCurrentStateIndex;
       
    99     
       
   100     /**
       
   101      * States to process
       
   102      * own.
       
   103      */
       
   104     RPointerArray< CPresencepluginContactState > iStateArray;
       
   105     
       
   106     /**
       
   107      * Client status
       
   108      * Not own.
       
   109      */
       
   110     TRequestStatus* iClientStatus;
       
   111 
       
   112     };
       
   113 
       
   114 
       
   115 #endif // C_CPRESENCEPLUGINCONTACTSTATEHANDLER_H