Creating a Custom Command

This section describes the how to create custom command.

Custom commands are plug-in DLLs implementing the MSsmCustomCommand interface.


  1. Define the MSsmCustomCommand class as illustrated in the code sinppet.
    
    class CreateCustomCommand : public MSsmCustomCommand
    {
        public:
           CreateCustomCommand();
           ~CreateCustomCommand();
           TInt Initialize( CSsmCustomCommandEnv* aCmdEnv );
           void Execute( const TDesC8& aParams, TRequestStatus& aRequest );
           void Close();
           void ExecuteCancel();
    };
    

  2. Create the custom command as shown in the code sinppet.
    CreateCustomCommand::CreateCustomCommand()
    Note: A device deadlock occurs when User::WaitForRequest(...) is called within the implementation of a custom command. Therefore, this function call must not be used within a custom command as this deadlock can prevent the SSM from functioning.
Related concepts
Running a Custom Command