wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_power_save_test.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     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 the License "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:  Statemachine for running an echo test in power save.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CORE_OPERATION_POWER_SAVE_TEST_H
       
    20 #define CORE_OPERATION_POWER_SAVE_TEST_H
       
    21 
       
    22 #include "core_operation_base.h"
       
    23 #include "abs_core_frame_handler.h"
       
    24 #include "core_ap_data.h"
       
    25 
       
    26 /**
       
    27  * Statemachine for running an echo test in power save.
       
    28  *
       
    29  * @lib wlmserversrv.lib
       
    30  * @since S60 v3.1
       
    31  */
       
    32 NONSHARABLE_CLASS( core_operation_power_save_test_c ) : public core_operation_base_c
       
    33     {
       
    34 
       
    35 public:
       
    36 
       
    37     /** The possible states of the operation. */
       
    38     enum core_state_e
       
    39         {
       
    40         core_state_init = core_base_state_next,
       
    41         core_state_set_power_mode_none, 
       
    42         core_state_set_power_mode_on, 
       
    43         core_state_reset_power_mode,
       
    44         core_state_echo_test,
       
    45         core_state_echo_test_complete,
       
    46         core_state_MAX
       
    47         };
       
    48 
       
    49     /**
       
    50      * Constructor.
       
    51      */
       
    52     core_operation_power_save_test_c(
       
    53         u32_t request_id,
       
    54         core_server_c* server,
       
    55         abs_core_driverif_c* drivers,
       
    56         abs_core_server_callback_c* adaptation );
       
    57 
       
    58     /**
       
    59      * Destructor.
       
    60      */
       
    61     virtual ~core_operation_power_save_test_c();
       
    62 
       
    63 protected:
       
    64 
       
    65     /**
       
    66      * This method is called when a pending request has been completed
       
    67      * and so sub-operations are pending.
       
    68      *
       
    69      * @since S60 v3.2
       
    70      * @return status of the operation:
       
    71      *     core_error_request_pending if the operation is not finished,
       
    72      *     otherwise the status code of the finished operation
       
    73      */
       
    74     core_error_e next_state();
       
    75 
       
    76     /**
       
    77      * This method is called when the operation needs to be canceled.     
       
    78      *
       
    79      * @since S60 v3.2
       
    80      * @return status of the operation:
       
    81      *     core_error_request_pending if the operation is not finished,
       
    82      *     otherwise the status code of the finished operation
       
    83      */
       
    84     core_error_e cancel();
       
    85 
       
    86 private: // data
       
    87 
       
    88     /**
       
    89      * The AP currently being tested. Not owned by this pointer.
       
    90      */
       
    91     const core_ap_data_c* current_ap_m;
       
    92 
       
    93     /** 
       
    94      * Status of the operation.
       
    95      *
       
    96      * core_error_timeout if no response was received from the AP.
       
    97      * core_error_ok if response was successfully received,
       
    98      * an error otherwise.
       
    99      */
       
   100     core_error_e return_status_m;
       
   101 
       
   102     /**
       
   103      * Whether power save enabled during the echo test.
       
   104      */
       
   105     bool_t is_power_save_m;
       
   106     
       
   107     /**
       
   108       * Whether the Unicast test enabled.
       
   109       */
       
   110     bool_t is_unicast_test_on_m;
       
   111 
       
   112     };
       
   113 
       
   114 #endif // CORE_OPERATION_POWER_SAVE_TEST_H