Added ENotifyKeypresses and ECaptureCtrlC flags to CCommandBase.
Commands can now get keypresses and handle ctrl-C via callbacks instead of having to implement custom active objects. As part of this extended the CCommandBase extension interface to MCommandExtensionsV2 for the new virtual functions KeyPressed(TUint aKeyCode, TUint aModifiers) and CtrlCPressed(). sudo now cleans up correctly by using ECaptureCtrlC.
// QResources3.hrh
//
// Copyright (c) 2010 Accenture. All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the "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:
// Accenture - Initial contribution
//
#ifndef QResources3_HRH
#define QResources3_HRH
#include <fshell/QR3ProductPlugin.h>
/**
Identifies the value for the commands in the application.
Commands shall first start on 0x1000.
Values before 0x1000 is reserved for commands in the framework.
*/
enum TQResources3Command
{
EQResources3NewCmd = 0x1000,
EQResources3SaveCmd,
EQResources3DeleteCmd,
EQResources3DeleteHardwareCmd,
ECmdRefresh,
ECmdPoll,
// These must be the same order as TKernelObjectType
ECmdProcesses,
ECmdThreads,
ECmdChunks,
ECmdServers,
ECmdCodeSegs,
ECmdHal,
ECmdWindowGroups,
ECmdMimeTypes,
ECmdOpenFiles,
ECmdFeatureReg,
ECmdMessageQueue,
ECmdMutex,
ECmdSemaphore,
ECmdTimer,
ECmdKill,
ECmdHandleInfo,
ECmdPing,
ECmdClogger,
//ECmdCloggerApply,
//ECmdCloggerSave,
ECmdCloggerReset,
ECmdCloseHandles,
ECmdCloggerDetails,
ECmdCloggerConfigBuffers,
ECmdCancel,
ECmdDumpHeap,
ECmdSetPriority,
ECmdSetCritical,
ECmdInstallFlogger,
ECmdUninstallFlogger,
ECmdGoToTab,
ECmdSortBy,
ECmdSortByName,
ECmdSortById,
ECmdMiscUsefulEcomUids,
ECmdMiscNukeApparc,
ELastCmd
};
/**
Define groups for commands which is seperated with dividers in menu
*/
enum TQResources3CommandGroupId
{
EQResources3DefaultCmdGroupId,
//EQResources3EditCmdGroupId,
//EQResources3DeleteCmdGroupId,
EGroupKernLists,
EGroupTabs,
EGroupSortBy,
EGroupCloggerCheckboxes
};
/**
Unique controls in list and detail view.
*/
enum TQResources3Control
{
EQResources3ListViewListCtrl,
EQResources3ListViewPage,
EChunkLbx,
EChunkLabel,
//ECloggerContainer,
EKTraceContainer,
//EMemoryContainer,
//EDiskContainer,
//EMiscContainer,
ECloggerRotate,
ECloggerRotateAndSend,
ECloggerSaveSettings,
ECloggerBufferLog,
ECloggerRDebug,
ECloggerAutoRotate,
ECloggerCopyLogsToD,
ECloggerEditTags,
ECloggerResetSettings,
ECloggerCompressRotate,
ECloggerOverlay,
ECloggerRedirectRDebug,
ECloggerBluetooth,
ECloggerWriteToFile,
ECloggerSetNumBuffers,
ECloggerSetBufferSize,
ECloggerSetNumRotates,
EKTraceBitsStart,
EKTraceBitsEnd = 400, // FFS resource files don't support calculation in enums?? //EKTraceBitsStart + 288, //9*32,
EDlgProcessInfoName,
ECloggerTagsLbx,
EMemoryFree,
EMemoryConsuming,
EMemoryUseAllocator,
EMemoryConsume,
EMemoryInfoPrint,
EMemoryIgnoreQmm,
EMemoryReallyIgnore,
EMemoryFreeUp,
EDiskFree,
EDiskConsuming,
EDiskConsume,
EDiskInfoPrint,
EDiskFreeUp,
EDiskExtFree,
EDiskExtConsuming,
EDiskExtConsume,
EDiskExtInfoPrint,
ECloggerTagView,
ETopLbx,
EMiscDebugPort,
EMiscPSCategory,
EMiscPSKey,
EMiscPSValue,
EMiscPSInfoPrint,
EMiscPSLog,
EMiscTimedScreenshot,
EMiscTriggeredScreenshot,
EMiscScreenMode,
EMiscPartialRedraw,
EMiscEcomListing,
EMiscUseNotifierProxy,
EConfigureKeyCaptures,
EKeyCapturesPageId,
EKeyCapturesStart,
EKeyCaptureScreenshot = EKeyCapturesStart,
EKeyForceCrash,
EKeyEatMeUp,
EKeyEatMeDown,
EKeyLogMe,
//EKeyShowCloggerOverlay,
EKeyToggleProfiler,
EKeyRotateClogger,
EKeyCapturesEnd,
EKeyCaptureDialogText,
ECriticalDlgList,
EPrioritySetAbsolute,
EPrioritySetRelative,
// These double as command ids for the commands that indicate "go to this tab"
// Thus they have slightly strange IDs
ETabsStart = 0x2000,
ETabChunks = ETabsStart,
ETabClogger,
ETabKTrace,
ETabMemory,
ETabDisk,
ETabTop,
ETabMisc,
ETabPS,
ETabsEnd,
ECtPlaceholderEditor, // control type
ECtSettingsDialogContents, // control type
ECtForTheLoveOfGodAllIWantIsAnEdwin,
// Remember everything between 0x3000 and 0x10000 is reserved for product plugins
ELastItem = 0x10000
};
#define KTRACE_BIT_ID(word, bit) (EKTraceBitsStart + 9 + word*32 + bit)
#define KTRACE_WORD_ID(word) (EKTraceBitsStart + word)
#define KTRACE_WORD_FROM_ID(id) ((id - KTRACE_BIT_ID(0, 0)) / 32)
#define KTRACE_BIT_FROM_ID(id) (id - KTRACE_BIT_ID(KTRACE_WORD_FROM_ID(id), 0))
#endif // QResources3_HRH