contentstorage/casrv/casatmonitor/tsrc/t_satmonitor/inc/casatmonitortestutils.h
changeset 117 c63ee96dbe5f
equal deleted inserted replaced
115:3ab5c078b490 117:c63ee96dbe5f
       
     1 /*
       
     2 * Copyright (c) 2009 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 *
       
    16 */
       
    17 #ifndef CA_SAT_MONITOR_TEST_UTILS_H
       
    18 #define CA_SAT_MONITOR_TEST_UTILS_H
       
    19 
       
    20 #include "f32file.h"
       
    21 #include "casrvplugin.h"
       
    22 
       
    23 
       
    24 class CCaStorageProxy;
       
    25 class CCaInnerEntry;
       
    26 
       
    27 class CTestUtils: public CBase
       
    28 {
       
    29 public:
       
    30 
       
    31     /**/
       
    32     virtual ~CTestUtils();
       
    33 
       
    34     /**/
       
    35     static CTestUtils* NewL();
       
    36 
       
    37     /**/
       
    38     static CTestUtils* NewLC();
       
    39 
       
    40     /**/
       
    41     TUint FingAppUidL( const TDesC& aName, CCaStorageProxy* aStorage );
       
    42 
       
    43     /**/
       
    44     void WaitL(TInt aMicroSec);
       
    45 
       
    46     /**
       
    47      * Gets RProperty
       
    48      */
       
    49     TInt GetRProperty( TUid aCategory, TUint aKey, TDes& aValue );
       
    50 
       
    51     /**
       
    52      * Gets RProperty
       
    53      */
       
    54     TInt GetRProperty( TUid aCategory, TUint aKey, TInt& aValue );
       
    55 
       
    56     /**
       
    57      * Sets RProperty
       
    58      */
       
    59     TInt SetRProperty( TUid aCategory, TUint aKey, const TDesC& aValue );
       
    60 
       
    61     /**
       
    62      * Sets RProperty
       
    63      */
       
    64     TInt SetRProperty( TUid aCategory, TUint aKey, TInt aValue );
       
    65     
       
    66     /**
       
    67      * Sets RProperty
       
    68      */
       
    69     TInt DefineIntRProperty( TUid aCategory, TUint aKey );
       
    70     
       
    71     /**
       
    72      * Sets RProperty
       
    73      */
       
    74     TInt DefineTextRProperty( TUid aCategory, TUint aKey );
       
    75 
       
    76     /**
       
    77      * Copys test Db
       
    78      */
       
    79     TInt CopyDb();
       
    80 
       
    81     /**
       
    82      * Checks if app exists in Db
       
    83      */
       
    84     TBool AppExistsInStorageL( TInt aUid, CCaStorageProxy* aStorage);
       
    85 
       
    86     CCaInnerEntry* GetAppEntryL( TInt aUid, CCaStorageProxy* aStorage);
       
    87 
       
    88     TInt AppsWithFlagsOffL( TInt aFlags, CCaStorageProxy* aStorage);
       
    89 
       
    90     TInt GetAppFlagsL( TInt aUid, CCaStorageProxy* aStorage);
       
    91 
       
    92     void RemoveAppL( TInt aUid, CCaStorageProxy* aStorage);
       
    93 
       
    94     CCaSrvPlugin* LoadPluginL( TUid aImplUid, TPluginParams aPluginParams );
       
    95 
       
    96 private:
       
    97 
       
    98     /**
       
    99      * Copys files
       
   100      */
       
   101     TInt Copy( const TDesC& aSource, const TDesC& aDest );
       
   102 
       
   103     CTestUtils();
       
   104 
       
   105     void ConstructL();
       
   106 
       
   107     RFs iFs;
       
   108     CFileMan* iFileManager;
       
   109 
       
   110     /**
       
   111      * Local Active Sheduler.
       
   112      * Own.
       
   113      */
       
   114     CActiveSchedulerWait* iActiveWait;
       
   115 
       
   116 };
       
   117 
       
   118 #endif