startup/stem_shutdowncmdlists.rss
changeset 13 4f959124999b
equal deleted inserted replaced
12:ab7598bdae30 13:4f959124999b
       
     1 /*
       
     2 * Copyright (c) 2009-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:
       
    15 * Command list for the Selftest OK startup state.
       
    16 *
       
    17 */
       
    18 
       
    19 #include <ssm/conditionresourcetypes.rh>
       
    20 #include <ssm/ssmcmd.rh>
       
    21 
       
    22 #include "ssmsubstateext.hrh"
       
    23 #include "ssmdlldatadefs.rh"
       
    24 
       
    25 // Identify command list type
       
    26 UID2 KUidSsmCommandListResourceFile
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 // r_entry_point
       
    30 // This must be the first resource
       
    31 // ---------------------------------------------------------------------------
       
    32 //
       
    33 RESOURCE SSM_COMMAND_LIST_ROOT r_entry_point
       
    34     {
       
    35     command_list_mapping = r_map;
       
    36     }
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // r_map
       
    40 // Mapping of command list ids to resource ids.
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 RESOURCE SSM_COMMAND_LIST_MAPPING r_map
       
    44     {
       
    45     mappings =
       
    46         {
       
    47         SSM_COMMANDLISTID_TO_RESOURCEID
       
    48             {
       
    49             command_list_id = ESsmErrorShutdown;
       
    50             resource_id = r_initialcmds;
       
    51             },
       
    52         SSM_COMMANDLISTID_TO_RESOURCEID
       
    53             {
       
    54             command_list_id = ESsmNormalShutdown;
       
    55             resource_id = r_initialcmds;
       
    56             },
       
    57         SSM_COMMANDLISTID_TO_RESOURCEID
       
    58             {
       
    59             command_list_id = ESsmShutdownSubStateCritical;
       
    60             resource_id = r_criticalcmds;
       
    61             },
       
    62         SSM_COMMANDLISTID_TO_RESOURCEID
       
    63             {
       
    64             command_list_id = ESsmShutdownSubStateNonCritical;
       
    65             resource_id = r_noncriticalcmds;
       
    66             },
       
    67         SSM_COMMANDLISTID_TO_RESOURCEID
       
    68             {
       
    69             command_list_id = ESsmShutdownSubStatePowerOff;
       
    70             resource_id = r_poweroffcmds;
       
    71             }
       
    72         };
       
    73     }
       
    74 
       
    75 // ===========================================================================
       
    76 // Command lists in alphabetical order
       
    77 // ===========================================================================
       
    78 //
       
    79 
       
    80 // ---------------------------------------------------------------------------
       
    81 // r_criticalcmds
       
    82 // ---------------------------------------------------------------------------
       
    83 //
       
    84 RESOURCE SSM_COMMAND_LIST r_criticalcmds
       
    85     {
       
    86     commands =
       
    87         {
       
    88         r_cmd_sastate,          // This needs to be the first command in state, prio 0xFFF2
       
    89         r_cmd_publishstate,     // prio 0xFFF1
       
    90         r_cmd_psstate,          // prio 0xFFF0
       
    91         r_cmd_cancelmonitoring, // prio 0xFFE8
       
    92 	r_cmd_shutdownapps      // prio 0xFFE7
       
    93         };
       
    94     }
       
    95 
       
    96 // ---------------------------------------------------------------------------
       
    97 // r_initialcmds
       
    98 // ---------------------------------------------------------------------------
       
    99 //
       
   100 RESOURCE SSM_COMMAND_LIST r_initialcmds
       
   101     {
       
   102     commands =
       
   103         {
       
   104         r_cmd_publishstate	// prio 0xFFF1
       
   105         };
       
   106     }
       
   107 
       
   108 // ---------------------------------------------------------------------------
       
   109 // r_noncriticalcmds
       
   110 // ---------------------------------------------------------------------------
       
   111 //
       
   112 RESOURCE SSM_COMMAND_LIST r_noncriticalcmds
       
   113     {
       
   114     commands =
       
   115         {
       
   116         r_cmd_publishstate,     // prio 0xFFF1
       
   117         // prio 0xFFE7
       
   118         r_cmd_killsplash,
       
   119         r_cmd_finalisedrives,
       
   120         r_cmd_sashutdown
       
   121         };
       
   122     }
       
   123 
       
   124 // ---------------------------------------------------------------------------
       
   125 // r_poweroffcmds
       
   126 // ---------------------------------------------------------------------------
       
   127 //
       
   128 RESOURCE SSM_COMMAND_LIST r_poweroffcmds
       
   129     {
       
   130     commands =
       
   131         {
       
   132         r_cmd_publishstate,     // prio 0xFFF1
       
   133         r_cmd_poweroff          // This is always the last command
       
   134         };
       
   135     }
       
   136 
       
   137 // ===========================================================================
       
   138 // Command items in alphabetical order
       
   139 // ===========================================================================
       
   140 //
       
   141 // ---------------------------------------------------------------------------
       
   142 // r_cmd_cancelmonitoring
       
   143 // This command should be executed before shutdown apps
       
   144 // ---------------------------------------------------------------------------
       
   145 //
       
   146 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_cancelmonitoring
       
   147 	{
       
   148 	priority = 0xFFE8;
       
   149 	severity = ECmdCriticalSeverity;
       
   150 	dllname = "cmncustomcmds.dll";
       
   151 	ordinal = 3; // Request to the sysmon server to cancel all the outstanding monitors
       
   152 	retries = 2;
       
   153 	}
       
   154 
       
   155 // ---------------------------------------------------------------------------
       
   156 // r_cmd_shutdownapps
       
   157 // ---------------------------------------------------------------------------
       
   158 //
       
   159 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_shutdownapps
       
   160     {
       
   161     priority = 0xFFE7;
       
   162     dllname = "akncustcmds.dll";
       
   163     ordinal = 3; // AknShutdownApps
       
   164     }
       
   165 
       
   166 // ---------------------------------------------------------------------------
       
   167 // r_cmd_finalisedrives
       
   168 // ---------------------------------------------------------------------------
       
   169 //
       
   170 RESOURCE SSM_FINALISE_DRIVES r_cmd_finalisedrives
       
   171     {
       
   172 //    priority = 0xFFE7;
       
   173     }
       
   174 
       
   175 // ---------------------------------------------------------------------------
       
   176 // r_cmd_killsplash
       
   177 // ---------------------------------------------------------------------------
       
   178 //
       
   179 RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_cmd_killsplash
       
   180     {
       
   181     priority = 0xFFE7;
       
   182     category = 0x101F8766; // KPSUidStartup
       
   183     key      = 0x00000301; // KPSSplashShutdown
       
   184     value    = 101;        // ESplashShutdown
       
   185     }
       
   186 
       
   187 // ---------------------------------------------------------------------------
       
   188 // r_cmd_poweroff
       
   189 // ---------------------------------------------------------------------------
       
   190 //
       
   191 RESOURCE SSM_POWER_OFF r_cmd_poweroff
       
   192     {
       
   193     power_state = 1; // EPwStandby
       
   194     }
       
   195 
       
   196 // ---------------------------------------------------------------------------
       
   197 // r_cmd_psstate
       
   198 // ---------------------------------------------------------------------------
       
   199 //
       
   200 RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_cmd_psstate
       
   201     {
       
   202     priority = 0xFFF0;
       
   203     severity = ECmdCriticalSeverity;
       
   204     category = 0x101F8766; // KPSUidStartup
       
   205     key      = 0x00000041; // KPSGlobalSystemState
       
   206     value    = 117;        // ESwStateShuttingDown
       
   207     }
       
   208 
       
   209 // ---------------------------------------------------------------------------
       
   210 // r_cmd_publishstate
       
   211 // ---------------------------------------------------------------------------
       
   212 //
       
   213 RESOURCE SSM_PUBLISH_SYSTEM_STATE r_cmd_publishstate
       
   214     {
       
   215     priority = 0xFFF1;
       
   216     severity = ECmdCriticalSeverity;
       
   217     direction = 1;  // ETraverseChildrenFirst, Transition children first for graceful shutdown.
       
   218     retries = 2;
       
   219     }
       
   220 
       
   221 // ---------------------------------------------------------------------------
       
   222 // r_cmd_sashutdown
       
   223 // ---------------------------------------------------------------------------
       
   224 //
       
   225 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_sashutdown
       
   226     {
       
   227     priority = 0xFFE7;
       
   228     dllname = "ssmsystemcmds.dll";
       
   229     ordinal = 7; // SaShutdown
       
   230     retries = 2;
       
   231     }
       
   232 
       
   233 // ---------------------------------------------------------------------------
       
   234 // r_cmd_sastate
       
   235 // ---------------------------------------------------------------------------
       
   236 //
       
   237 RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_sastate
       
   238     {
       
   239     priority = 0xFFF2;
       
   240     severity = ECmdCriticalSeverity;
       
   241     dllname = "customcmds.dll";
       
   242     ordinal = 8;
       
   243     unload_on_finish = ENeverUnload;
       
   244     retries = 2;
       
   245     dll_data = r_dlldata_sastate;
       
   246     }
       
   247 
       
   248 // ===========================================================================
       
   249 // DLL data items in alphabetical order
       
   250 // ===========================================================================
       
   251 //
       
   252 
       
   253 // ---------------------------------------------------------------------------
       
   254 // r_dlldata_sastate
       
   255 // ---------------------------------------------------------------------------
       
   256 //
       
   257 RESOURCE CMD_PARAM_STATE_CHANGE r_dlldata_sastate
       
   258     {
       
   259     mainstate = 2; // ESsmShutdown
       
   260     substate = 0xFFFF; // KSsmAnySubState, saastateadapataion expects this
       
   261     }