adaptationlayer/devicemodecontroller/dmc_ext/inc/dmc_event_handler_ape_cent.h
author <dalarub>
Fri, 06 Nov 2009 17:28:23 +0000
changeset 0 63b37f68c1ce
child 9 8486d82aef45
permissions -rw-r--r--
First Contribution. Vanilla as it came from Nokia
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
     1
/*
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
     3
* All rights reserved.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
     8
*
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
     9
* Initial Contributors:
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    11
*
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    12
* Contributors:
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    13
* 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    14
* Description: 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    15
*     DMC APE centric event handler class declaration.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    16
*
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    17
*/
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    18
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    19
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    20
#ifndef DMC_EVENT_HANDLER_APE_CENT_H
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    21
#define DMC_EVENT_HANDLER_APE_CENT_H
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    22
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    23
#ifndef DMC_INTERNAL_INCLUDE
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    24
#error Illegal usage of dmc_event_handler_ape_cent.h, It is only for DMC internal use !
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    25
#endif // DMC_INTERNAL_INCLUDE
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    26
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    27
//  INCLUDES
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    28
#include <e32def.h>                            // Data types, TUint8 etc.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    29
#include <boot_reason_api/boot_reason_api.h>   // TBootReason and TStartupMode handling
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    30
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    31
//  CONSTANTS
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    32
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    33
/**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    34
* INPUT EVENTS:
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    35
*   This constanst defines event types / inputs to this event handler.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    36
*   
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    37
*
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    38
*   Kernel events (KERNEL_*) can be one of the following:
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    39
*      - ISI messages
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    40
*      - Power Handler(Power Up / Power Down)
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    41
*      - Isa Access Channel lost and open notification
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    42
*
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    43
*   User events (USER_*) are:
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    44
*      - Commands through DMC user interface.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    45
*/
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    46
// An ISI-message. Can be a PN_MODEM_MCE or PN_DMC owned messages.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    47
#define KERNEL_EVENT_ISI                      0x00
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    48
// Power Handler Power Down
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    49
#define KERNEL_EVENT_PWR_HANDLER              0x01
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    50
// IAD Modem connection lost
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    51
#define KERNEL_EVENT_MODEM_CONNECTION_NOT_OK  0x02
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    52
// Used for detecting the event type
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    53
#define KERNEL_LAST_KERNEL_EVENT              KERNEL_EVENT_MODEM_CONNECTION_NOT_OK
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    54
// Get target startup mode
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    55
#define USER_GET_TARGET_STARTUP_MODE          0x03
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    56
// Get target startup mode
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    57
#define USER_GENERATE_RESET                   0x04
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    58
// Get target startup mode
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    59
#define USER_POWER_OFF                        0x05
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    60
// Get target startup mode
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    61
#define USER_GET_HIDDEN_RESET_STATUS          0x07
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    62
// Get the type of the event to be sent to user side client
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    63
#define USER_GET_EVENT_TYPE                   0x08
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    64
#define LAST_EVENT                            (USER_GET_EVENT_TYPE + 1)
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    65
#define NO_EVENTS_DEFINED                     0x00
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    66
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    67
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    68
/**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    69
* OUTPUT EVENTS:
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    70
*   This constanst defines type of user side client events
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    71
*   generated by this event handler.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    72
*
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    73
*   Event types are needed in case of Modem or PC SW
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    74
*   orginated controlled or uncontrolled power off / reset.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    75
*/
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    76
// Modem or PC SW orginated power off.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    77
#define USER_CLIENT_POWER_OFF_EVENT           0x01
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    78
// Modem or PC SW orginated resest.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    79
#define USER_CLIENT_RESET_EVENT               0x02
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    80
// No event requested
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    81
#define USER_CLIENT_NO_EVENT                  0x00
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    82
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    83
//  MACROS  
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    84
//  DATA TYPES 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    85
//  EXTERNAL DATA STRUCTURES
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    86
//  FUNCTION PROTOTYPES  
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    87
//  FORWARD DECLARATIONS
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    88
class DDmcExtension;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    89
class DMutex;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    90
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    91
NONSHARABLE_CLASS(DmcEvHandApeCent)
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    92
    {
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    93
    public: // Event handler new public functions
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    94
    
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    95
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    96
        * Init the event handler
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    97
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    98
        * @param   *aDmcExt     A pointer to the DMC kernel extension.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
    99
        * @return  None 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   100
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   101
        static void Init(DDmcExtension* const aDmcExt);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   102
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   103
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   104
        * Subscribe events.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   105
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   106
        * @param   *aUserEventDfcPtr     A pointer to DMC logical device TDfc queue.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   107
        * @return  None
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   108
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   109
        static void SubscribeEvents(TDfc* const aUserEventDfcPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   110
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   111
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   112
        * Unsubscribe events.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   113
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   114
        * @param   *aUserEventDfcPtr     A pointer to DMC logical device TDfc queue.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   115
        * @return  None
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   116
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   117
        static void UnsubscribeEvents(TDfc* const aUserEventDfcPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   118
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   119
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   120
        * A function that handles all incoming events.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   121
        * This is the entry point for all events.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   122
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   123
        * @param   aEventType       Type of the message. A table "EVENTS" in the
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   124
        *                           dmc_event_handler_ape_cent.cpp-file defines allowed values.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   125
        * @param   *aKernMsgPtr     A pointer to a incoming kernel message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   126
        * @param   *aUsrMsgPtr      A pointer to a incoming user message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   127
        * @return  KErrNone or one of the system wide error 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   128
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   129
        static TInt HandleEvent(const TUint8  aType,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   130
                                const TUint8* const aKernMsgPtr,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   131
                                TUint* const  aUsrMsgPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   132
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   133
    private:  // Event handler new private functions
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   134
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   135
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   136
        * Locks a section of code for an execution more
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   137
        * than one thread concurrently.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   138
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   139
        * Use Unlock to free this lock.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   140
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   141
        * @param   None
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   142
        * @return  None
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   143
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   144
        inline static void Lock();
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   145
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   146
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   147
        * Frees the Lock.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   148
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   149
        * @param   None
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   150
        * @return  None
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   151
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   152
        inline static void Unlock();
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   153
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   154
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   155
        * This function process an ANY-state. 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   156
        * There are events, which always must be handled regardless of
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   157
        * an ongoing transaction. These type of events are handled in the state ANY.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   158
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   159
        * @param   aEventType       Type of the message. A table "EVENTS" in the
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   160
        *                           dmc_event_handler_ape_cent.cpp-file defines allowed values.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   161
        * @param   *aKernMsgPtr     A pointer to a incoming kernel message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   162
        * @param   *aUsrMsgPtr      A pointer to a incoming user message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   163
        * @return  KErrNone or one of the system wide error 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   164
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   165
        static TInt StateAny(const TUint8  aEventType,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   166
                             const TUint8* const aKernMsgPtr,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   167
                             TUint* const  aUsrMsgPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   168
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   169
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   170
        * This function process an IDLE-state.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   171
        * IDLE-state is the only state in which a new transaction is started.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   172
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   173
        * @param   aEventType       Type of the message. A table "EVENTS" in the
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   174
        *                           dmc_event_handler_ape_cent.cpp-file defines allowed values.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   175
        * @param   *aKernMsgPtr     A pointer to a incoming kernel message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   176
        * @param   *aUsrMsgPtr      A pointer to a incoming user message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   177
        * @return  KErrNone or one of the system wide error 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   178
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   179
        static TInt StateIdle(const TUint8  aEventType,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   180
                              const TUint8* const aKernMsgPtr,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   181
                              TUint* const  aUsrMsgPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   182
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   183
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   184
        * This function processes an APE_PWR_OFF-state (PC or SSM Adaptation).
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   185
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   186
        * @param   aEventType       Type of the message. A table "EVENTS" in the
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   187
        *                           dmc_event_handler_ape_cent.cpp-file defines allowed values.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   188
        * @param   *aKernMsgPtr     A pointer to a incoming kernel message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   189
        * @param   *aUsrMsgPtr      A pointer to a incoming user message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   190
        * @return  KErrNone or one of the system wide error 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   191
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   192
        static TInt StateApePwrOff(const TUint8  aEventType,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   193
                                   const TUint8* const aKernMsgPtr,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   194
                                   TUint* const  aUsrMsgPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   195
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   196
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   197
        * This function process an APE_RESET-state (APE orginated reset).
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   198
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   199
        * @param   aEventType       Type of the message. A table "EVENTS" in the
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   200
        *                           dmc_event_handler_ape_cent.cpp-file defines allowed values.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   201
        * @param   *aKernMsgPtr     A pointer to a incoming kernel message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   202
        * @param   *aUsrMsgPtr      A pointer to a incoming user message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   203
        * @return  KErrNone or one of the system wide error 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   204
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   205
        static TInt StateApeReset(const TUint8  aEventType,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   206
                                  const TUint8* const aKernMsgPtr,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   207
                                  TUint* const  aUsrMsgPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   208
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   209
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   210
        * This function process a MODEM_PWR_OFF-state.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   211
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   212
        * @param   aEventType       Type of the message. A table "EVENTS" in the
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   213
        *                           dmc_event_handler_ape_cent.cpp-file defines allowed values.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   214
        * @param   *aKernMsgPtr     A pointer to a incoming kernel message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   215
        * @param   *aUsrMsgPtr      A pointer to a incoming user message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   216
        * @return  KErrNone or one of the system wide error 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   217
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   218
        static TInt StateModemPwrOff(const TUint8  aEventType,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   219
                                     const TUint8* const aKernMsgPtr,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   220
                                     TUint* const  aUsrMsgPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   221
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   222
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   223
        * This function process a MODEM_CONTROLLED_RESET-state.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   224
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   225
        * @param   aEventType       Type of the message. A table "EVENTS" in the
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   226
        *                           dmc_event_handler_ape_cent.cpp-file defines allowed values.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   227
        * @param   *aKernMsgPtr     A pointer to a incoming kernel message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   228
        * @param   *aUsrMsgPtr      A pointer to a incoming user message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   229
        * @return  KErrNone or one of the system wide error 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   230
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   231
        static TInt StateModemControlledReset(const TUint8  aEventType,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   232
                                              const TUint8* const aKernMsgPtr,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   233
                                              TUint* const  aUsrMsgPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   234
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   235
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   236
        * This function process a MODEM_UNCONTROLLED_RESET-state.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   237
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   238
        * @param   aEventType       Type of the message. A table "EVENTS" in the
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   239
        *                           dmc_event_handler_ape_cent.cpp-file defines allowed values.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   240
        * @param   *aKernMsgPtr     A pointer to a incoming kernel message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   241
        * @param   *aUsrMsgPtr      A pointer to a incoming user message.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   242
        * @return  KErrNone or one of the system wide error 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   243
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   244
        static TInt StateModemUncontrolledReset(const TUint8  aEventType,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   245
                                                const TUint8* const aKernMsgPtr,
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   246
                                                TUint* const  aUsrMsgPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   247
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   248
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   249
        * A function to handle a MCE_MODEM_STATE_QUERY_RESP
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   250
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   251
        * @param   *msgPtr     A pointer to a response.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   252
        * @return  None
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   253
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   254
        static void HandleMceModemStateQueryResp(const TUint8* const aMsgPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   255
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   256
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   257
        * Handles a state transition of the DMC Event Handler.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   258
        * This function also checks if the a required state transition is allowed.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   259
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   260
        * @param   aNextState    Next state to be transferred.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   261
        *                        A table "STATES" on top of this file defines
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   262
        *                        allowed values.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   263
        * @return  None
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   264
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   265
        static void SetNextState(const TUint8 aNextState);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   266
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   267
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   268
        * This function checks if the incomming event is part of the any state.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   269
        * Requests that are part of the any state are processed regardless
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   270
        * about the ongoing transaction. Requests are processed as long
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   271
        * as possible.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   272
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   273
        * @param   aEventType       Type of the message. A table "EVENTS" in the
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   274
        *                           dmc_event_handler_ape_cent.cpp-file.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   275
        * @param   aKernMsgPtr      Pointer to Kernel event
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   276
        * @return  1: Bit set to indicate that a requested event is part of the any state. 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   277
        *          0: Bit not set to indicate that a requested event is not part of the any state.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   278
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   279
        static TUint8 IsAnyStateEvent(const TUint8 aEventType, const TUint8* const aKernMsgPtr);
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   280
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   281
    private: // data types
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   282
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   283
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   284
        * A pointer to DMC extension.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   285
        * DMC extension owns this pointer.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   286
        * 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   287
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   288
        static DDmcExtension* iDmcExtPtr;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   289
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   290
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   291
        * A pointer to mutex.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   292
        * This class owns this pointer.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   293
        * 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   294
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   295
        static DMutex* iMutexPtr;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   296
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   297
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   298
        * A pointer to DMC user / kernel Dfc-queue.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   299
        * This class does not own this pointer.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   300
        * 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   301
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   302
        static TDfc* iUserEventDfcPtr;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   303
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   304
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   305
        * A target start-up mode. 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   306
        * Values in the boot_reason_api.h-file.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   307
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   308
        static TBootReason::TStartupMode iTargetStartupMode;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   309
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   310
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   311
        * A  hidden reset status. 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   312
        * Values in the boot_reason_api.h-file.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   313
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   314
        * ETrue if the reset is hidden, otherwise EFalse.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   315
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   316
        static TBool iHiddenStatus;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   317
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   318
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   319
        * This bitmap a defines requests that are part
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   320
        * of the any state.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   321
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   322
        static const TUint32 iAnyStateMap;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   323
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   324
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   325
        * This variable is needed to detect whether the Power Handler
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   326
        * PowerDown() has been called.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   327
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   328
        * DMC needs this information to know if the Power Handler 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   329
        * PowerDownDone must be called in case the modem connection
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   330
        * is lost and there is an ongoing transaction. 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   331
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   332
        * If there is no ongoing transaction, the modem connection
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   333
        * lost is handled as a "MODEM_UNCONTROLLED_RESET".
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   334
        * 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   335
        * Only one transaction is allowed, thus if there is already
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   336
        * ongoing transaction, the modem connection is handled as
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   337
        * below.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   338
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   339
        * ModemConnection lost AND "transaction ongoing":
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   340
        *     IF "Power Handler PowerDown called"
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   341
        *         -> Acknowlege to Power Handler by
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   342
        *            PowerDownDone()
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   343
        *     ELSE
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   344
        *        -> Standby and wait until Power Handler
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   345
        *           PowerDown() is called and then
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   346
        *           acknowledge back immediately by
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   347
        *           calling PowerDownDone().
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   348
        * 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   349
        * Allowed values: TRUE / FALSE
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   350
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   351
        static TUint8 iPowerDownCalled;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   352
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   353
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   354
        * Modem action bit map. 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   355
        * 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   356
        * This bit map defines actions that have
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   357
        * been happend in the Modem state transition
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   358
        * and a modem connection.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   359
        * 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   360
        * Action information is needed to find a correct
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   361
        * slot to acknowledge the Power Handler PowerDownDone.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   362
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   363
        static TUint8 iModemActionBitMap;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   364
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   365
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   366
        * A current modem state. 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   367
        * 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   368
        * Values from mceisi.h-file.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   369
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   370
        static TUint8 iModemCurrentState;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   371
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   372
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   373
        * Event type.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   374
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   375
        * Defines the type of the event to be sent
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   376
        * user side client. The event type is used in case
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   377
        * PC SW or Modem orginated power off or reset or
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   378
        * in case of uncontrolled Modem reset..
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   379
        * 
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   380
        * Values from OUTPUT EVENTS: defined beginning of this file.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   381
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   382
        static TUint8 iEventType;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   383
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   384
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   385
        * Current state
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   386
        * Allowed values defined in dmc_event_handler_ape_cent.cpp-file.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   387
        *
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   388
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   389
        static TUint8 iCurrentState;
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   390
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   391
        /**
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   392
        * This table defines allowed state transitions.
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   393
        */
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   394
        static const TUint8 iStateTransitionMap[];
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   395
    };
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   396
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   397
#endif // DMC_EVENT_HANDLER_APE_CENT_H
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   398
63b37f68c1ce First Contribution. Vanilla as it came from Nokia
<dalarub>
parents:
diff changeset
   399
// End of File