sysstatemgmt/ssmcmdlists/data/shutdowncmdlists.rss
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 11 May 2010 17:23:24 +0300
branchRCL_3
changeset 10 66ecddbca914
parent 0 4e1aa6a622a0
permissions -rw-r--r--
Revision: 201017 Kit: 201019

/*
* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
* Command list for the Selftest OK startup state.
*
*/

#include <ssm/conditionresourcetypes.rh>
#include <ssm/ssmcmd.rh>

#include "ssmsubstateext.hrh"
#include "ssmdlldatadefs.rh"

// Identify command list type
UID2 KUidSsmCommandListResourceFile

// ---------------------------------------------------------------------------
// r_entry_point
// This must be the first resource
// ---------------------------------------------------------------------------
//
RESOURCE SSM_COMMAND_LIST_ROOT r_entry_point
    {
    command_list_mapping = r_map;
    }

// ---------------------------------------------------------------------------
// r_map
// Mapping of command list ids to resource ids.
// ---------------------------------------------------------------------------
//
RESOURCE SSM_COMMAND_LIST_MAPPING r_map
    {
    mappings =
        {
        SSM_COMMANDLISTID_TO_RESOURCEID
            {
            command_list_id = ESsmErrorShutdown;
            resource_id = r_initialcmds;
            },
        SSM_COMMANDLISTID_TO_RESOURCEID
            {
            command_list_id = ESsmNormalShutdown;
            resource_id = r_initialcmds;
            },
        SSM_COMMANDLISTID_TO_RESOURCEID
            {
            command_list_id = ESsmShutdownSubStateCritical;
            resource_id = r_criticalcmds;
            },
        SSM_COMMANDLISTID_TO_RESOURCEID
            {
            command_list_id = ESsmShutdownSubStateNonCritical;
            resource_id = r_noncriticalcmds;
            },
        SSM_COMMANDLISTID_TO_RESOURCEID
            {
            command_list_id = ESsmShutdownSubStatePowerOff;
            resource_id = r_poweroffcmds;
            }
        };
    }

// ===========================================================================
// Command lists in alphabetical order
// ===========================================================================
//

// ---------------------------------------------------------------------------
// r_criticalcmds
// ---------------------------------------------------------------------------
//
RESOURCE SSM_COMMAND_LIST r_criticalcmds
    {
    commands =
        {
        r_cmd_sastate,          // This needs to be the first command in state, prio 0xFFF2
        r_cmd_publishstate,     // prio 0xFFF1
        r_cmd_psstate,          // prio 0xFFF0
        r_cmd_cancelmonitoring, // prio 0xFFE8
	r_cmd_shutdownapps      // prio 0xFFE7
        };
    }

// ---------------------------------------------------------------------------
// r_initialcmds
// ---------------------------------------------------------------------------
//
RESOURCE SSM_COMMAND_LIST r_initialcmds
    {
    commands =
        {
        r_cmd_publishstate	// prio 0xFFF1
        };
    }

// ---------------------------------------------------------------------------
// r_noncriticalcmds
// ---------------------------------------------------------------------------
//
RESOURCE SSM_COMMAND_LIST r_noncriticalcmds
    {
    commands =
        {
        r_cmd_publishstate,     // prio 0xFFF1
        // prio 0xFFE7
        r_cmd_killsplash,
        r_cmd_finalisedrives,
        r_cmd_sashutdown
        };
    }

// ---------------------------------------------------------------------------
// r_poweroffcmds
// ---------------------------------------------------------------------------
//
RESOURCE SSM_COMMAND_LIST r_poweroffcmds
    {
    commands =
        {
        r_cmd_publishstate,     // prio 0xFFF1
        r_cmd_poweroff          // This is always the last command
        };
    }

// ===========================================================================
// Command items in alphabetical order
// ===========================================================================
//
// ---------------------------------------------------------------------------
// r_cmd_cancelmonitoring
// This command should be executed before shutdown apps
// ---------------------------------------------------------------------------
//
RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_cancelmonitoring
	{
	priority = 0xFFE8;
	severity = ECmdCriticalSeverity;
	dllname = "cmncustomcmds.dll";
	ordinal = 3; // Request to the sysmon server to cancel all the outstanding monitors
	retries = 2;
	}

// ---------------------------------------------------------------------------
// r_cmd_shutdownapps
// ---------------------------------------------------------------------------
//
RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_shutdownapps
    {
    priority = 0xFFE7;
    dllname = "akncustcmds.dll";
    ordinal = 3; // AknShutdownApps
    }

// ---------------------------------------------------------------------------
// r_cmd_finalisedrives
// ---------------------------------------------------------------------------
//
RESOURCE SSM_FINALISE_DRIVES r_cmd_finalisedrives
    {
//    priority = 0xFFE7;
    }

// ---------------------------------------------------------------------------
// r_cmd_killsplash
// ---------------------------------------------------------------------------
//
RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_cmd_killsplash
    {
    priority = 0xFFE7;
    category = 0x101F8766; // KPSUidStartup
    key      = 0x00000301; // KPSSplashShutdown
    value    = 101;        // ESplashShutdown
    }

// ---------------------------------------------------------------------------
// r_cmd_poweroff
// ---------------------------------------------------------------------------
//
RESOURCE SSM_POWER_OFF r_cmd_poweroff
    {
    power_state = 1; // EPwStandby
    }

// ---------------------------------------------------------------------------
// r_cmd_psstate
// ---------------------------------------------------------------------------
//
RESOURCE SSM_SET_PUBLISH_AND_SUBSCRIBE r_cmd_psstate
    {
    priority = 0xFFF0;
    severity = ECmdCriticalSeverity;
    category = 0x101F8766; // KPSUidStartup
    key      = 0x00000041; // KPSGlobalSystemState
    value    = 117;        // ESwStateShuttingDown
    }

// ---------------------------------------------------------------------------
// r_cmd_publishstate
// ---------------------------------------------------------------------------
//
RESOURCE SSM_PUBLISH_SYSTEM_STATE r_cmd_publishstate
    {
    priority = 0xFFF1;
    severity = ECmdCriticalSeverity;
    direction = 1;  // ETraverseChildrenFirst, Transition children first for graceful shutdown.
    retries = 2;
    }

// ---------------------------------------------------------------------------
// r_cmd_sashutdown
// ---------------------------------------------------------------------------
//
RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_sashutdown
    {
    priority = 0xFFE7;
    dllname = "ssmsystemcmds.dll";
    ordinal = 7; // SaShutdown
    retries = 2;
    }

// ---------------------------------------------------------------------------
// r_cmd_sastate
// ---------------------------------------------------------------------------
//
RESOURCE SSM_START_CUSTOM_COMMAND r_cmd_sastate
    {
    priority = 0xFFF2;
    severity = ECmdCriticalSeverity;
    dllname = "customcmds.dll";
    ordinal = 8;
    unload_on_finish = ENeverUnload;
    retries = 2;
    dll_data = r_dlldata_sastate;
    }

// ===========================================================================
// DLL data items in alphabetical order
// ===========================================================================
//

// ---------------------------------------------------------------------------
// r_dlldata_sastate
// ---------------------------------------------------------------------------
//
RESOURCE CMD_PARAM_STATE_CHANGE r_dlldata_sastate
    {
    mainstate = 2; // ESsmShutdown
    substate = 0xFFFF; // KSsmAnySubState, saastateadapataion expects this
    }