java_stubs/javaregistry/clientserver/client/inc/javaregistrybackupsupport.h
branchRCL_3
changeset 8 014f8c42e1d4
parent 0 3fd91c96c86c
equal deleted inserted replaced
7:9d598f7f02da 8:014f8c42e1d4
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  javaregistrybackupsupport definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef JAVAREGISTRYBACKUPSUPPORT_H
       
    20 #define JAVAREGISTRYBACKUPSUPPORT_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <f32file.h>
       
    25 #include "javaregburstates.h"
       
    26 
       
    27 namespace Java
       
    28 {
       
    29 namespace Manager
       
    30 {
       
    31 namespace Registry
       
    32 {
       
    33 
       
    34 // FORWARD DECLARATION
       
    35 class RJavaRegSession;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 /**
       
    39  * This class is used to indicate the registry the phases of backup and
       
    40  * restore. Mainly used by the Java Backup component.
       
    41  *
       
    42  * @lib javaregistryclient.lib
       
    43  * @since S60 v3.2
       
    44  */
       
    45 class CJavaRegistryBackupSupport :
       
    46         public CBase
       
    47 {
       
    48 public:
       
    49 
       
    50     // constructors
       
    51 
       
    52     /**
       
    53      * CJavaRegistryBackupSupport::NewL method creates a
       
    54      * CJavaRegistryBackupSupport object.
       
    55      * The function may leave with one of the system-wide error codes.
       
    56      *
       
    57      * @since S60 v3.2
       
    58      * @return A pointer to a CJavaRegistryBackupSupport object.
       
    59      *         Caller takes over the ownership of the object being
       
    60      *         transferred.
       
    61      */
       
    62     IMPORT_C static CJavaRegistryBackupSupport* NewL();
       
    63 
       
    64     /**
       
    65      * CJavaRegistryBackupSupport::NewLC method creates a
       
    66      * CJavaRegistryBackupSupport object, and puts it on the
       
    67      * CleanupStack.
       
    68      * The function may leave with one of the system-wide error codes.
       
    69      *
       
    70      * @since S60 v3.2
       
    71      * @return A pointer to a CJavaRegistryBackupSupport object.
       
    72      *         Caller takes over the ownership of the object being
       
    73      *         transferred.
       
    74      */
       
    75     IMPORT_C static CJavaRegistryBackupSupport* NewLC();
       
    76 
       
    77     // destructor
       
    78 
       
    79     /**
       
    80      * ~CJavaRegistryBackupSupport::~CJavaRegistryBackupSupport
       
    81      * Destructor
       
    82      */
       
    83     IMPORT_C ~CJavaRegistryBackupSupport();
       
    84 
       
    85     // general methods
       
    86 
       
    87     /**
       
    88      * CJavaRegistryBackupSupport::EntriesExistForDriveL
       
    89      * Returns whether registry entries on the specified drive exist.
       
    90      * The function may leave with one of the system-wide error codes.
       
    91      *
       
    92      * @since S60 v3.2
       
    93      * @param aDrive The entries are searched for this drive.
       
    94      * @return ETrue if registry entries on the specified drive exist,
       
    95      *         EFalse otherwise.
       
    96      */
       
    97     IMPORT_C TBool EntriesExistForDriveL
       
    98     (const TDriveNumber& aDrive) const;
       
    99 
       
   100     /**
       
   101      * CJavaRegistryBackupSupport::ChangeBURState method changes the
       
   102      * registry BackUp and Restore state, according to the given
       
   103      * TBackupState type param.
       
   104      *
       
   105      * @since S60 v3.2
       
   106      * @param aState The state to be changed.
       
   107      * @return KErrNone if successful, otherwise one of the
       
   108      *         system-wide error codes.
       
   109      */
       
   110     IMPORT_C TInt ChangeBURState(const TBackupState& aState) const;
       
   111 
       
   112 private:
       
   113 
       
   114     // 2nd phase constructor
       
   115     /**
       
   116      * CJavaRegistryBackupSupport::ConstructL method
       
   117      * The function may leave with one of the system-wide error codes.
       
   118      *
       
   119      * @since S60 v3.2
       
   120      */
       
   121     void ConstructL();
       
   122 
       
   123 private: // Data
       
   124 
       
   125     /**
       
   126      * CJavaRegistryBackupSupport::iJavaRegSession member, the client class
       
   127      * to the JavaRegistry Server.
       
   128      *
       
   129      * @since S60 v3.2
       
   130      */
       
   131     Java::Manager::Registry::RJavaRegSession* iJavaRegSession;
       
   132 
       
   133 };
       
   134 
       
   135 }// namespace Registry
       
   136 }// namespace Manager
       
   137 }// namespace Java
       
   138 
       
   139 #endif // JAVAREGISTRYBACKUPSUPPORT_H
       
   140 
       
   141 // End of File