sysstatemgmt/systemstatemgr/inc/ssmcommandlistresourcereader.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SSMCOMMANDLISTRESOURCEREADER_H__
       
    17 #define __SSMCOMMANDLISTRESOURCEREADER_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <f32file.h>
       
    21 
       
    22 #include <ssm/ssmstate.h>
       
    23 #include <ssm/ssmswp.h>
       
    24 
       
    25 class CSsmCommandList;
       
    26 class MSsmConditionalCallback;
       
    27 class CSsmCommandListResourceReaderImpl;
       
    28 
       
    29 /** Constructs command lists from resource files.
       
    30 
       
    31 A resource reader must be initialised before it can be used to
       
    32 construct a command list.
       
    33 
       
    34 Once initialised, a command list may be constructed by first calling
       
    35 one of the overloads of PrepareCommandList, followed by GetCommandList
       
    36 to return the command list.
       
    37 
       
    38 Command lists may only be constructed one at a time.
       
    39 
       
    40 @publishedPartner
       
    41 @released
       
    42 */
       
    43 NONSHARABLE_CLASS(CSsmCommandListResourceReader) : public CBase
       
    44 	{
       
    45 public:
       
    46 	IMPORT_C static CSsmCommandListResourceReader* NewL(RFs& aFs, const TDesC& aCommandListPath, MSsmConditionalCallback& aConditionalCallback);
       
    47 	IMPORT_C ~CSsmCommandListResourceReader();
       
    48 
       
    49 	IMPORT_C void Initialise(TRequestStatus& aStatus);
       
    50 	IMPORT_C void InitialiseCancel();
       
    51 	IMPORT_C void PrepareCommandList(TInt aCommandListId, const TSsmState& aState, TRequestStatus& aStatus);
       
    52 	IMPORT_C void PrepareCommandList(TInt aCommandListId, const TSsmSwp& aSwp, TRequestStatus& aStatus);
       
    53 	IMPORT_C void PrepareCommandListCancel();
       
    54 	IMPORT_C CSsmCommandList* GetCommandList();
       
    55 	IMPORT_C void GetCommandListIdsL(RArray<TInt>& aArray) const;
       
    56 
       
    57 private:
       
    58 	CSsmCommandListResourceReader();
       
    59 	void ConstructL(RFs& aFs, const TDesC& aCommandListPath, MSsmConditionalCallback& aConditionalCallback);
       
    60 
       
    61 private:
       
    62 	CSsmCommandListResourceReaderImpl* iImpl;
       
    63 	CSsmCommandList* iCommandList;
       
    64 	};
       
    65 
       
    66 #endif // __SSMCOMMANDLISTRESOURCEREADER_H__