williamr@2: /** williamr@2: * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: williamr@2: * Declaration of Types and Constants for Secure Backup and Restore williamr@2: * williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: */ williamr@2: #ifndef __SBDEFS_H__ williamr@2: #define __SBDEFS_H__ williamr@2: williamr@2: #include williamr@2: #include williamr@2: williamr@2: namespace conn williamr@2: { williamr@2: /** Secure Backup and Restore publish and subscribe key williamr@2: williamr@2: Secure Backup and Restore uses a Publish and Subscribe key to publish williamr@2: the current backup / restore state. williamr@2: williamr@2: The key is a system key so the category to be used when subscribing is KUidSystemCategoryValue williamr@2: The key to be used is KUidBackupRestoreKey. williamr@2: The value is a bit-wise OR of a TBURPartType value and a TBackupIncType value williamr@2: This means that a normal state (i.e. non-backup or restore) is EBURNormal | ENoBackup but williamr@2: If the key has not been set (i.e. == 0) then no backup or restore is in progress either williamr@2: williamr@2: @released williamr@2: @publishedAll williamr@2: */ williamr@2: const TUint KUidBackupRestoreKey = 0x10202792 ; williamr@2: williamr@2: williamr@2: /** TBURPartType Bitmask williamr@2: @released williamr@2: @publishedAll williamr@2: */ williamr@2: const TUint KBURPartTypeMask = 0xff; williamr@2: williamr@2: enum TBURPartType williamr@2: /** williamr@2: The backup / restore state of a device. williamr@2: williamr@2: @released williamr@2: @publishedAll williamr@2: */ williamr@2: { williamr@2: EBURUnset = 0x00000000, /*!< 0x00000000: The backup / restore mode has not been set */ williamr@2: EBURNormal = 0x00000001, /*!< 0x00000001: The device as a whole is not engaged in a backup or restore */ williamr@2: EBURBackupFull = 0x00000002, /*!< 0x00000002: The device as a whole is engaged in a backup of all components data */ williamr@2: EBURBackupPartial = 0x00000004, /*!< 0x00000004: The device as a whole is engaged in a backup of selected components data */ williamr@2: EBURRestoreFull = 0x00000008, /*!< 0x00000008: The device as a whole is engaged in a restore of all components data */ williamr@2: EBURRestorePartial = 0x00000010 /*!< 0x00000010: The device as a whole is engaged in a restore of all components data */ williamr@2: }; williamr@2: williamr@2: /** TBackupIncType Bitmask williamr@2: @released williamr@2: @publishedAll williamr@2: */ williamr@2: const TUint KBackupIncTypeMask = 0xffffff00; williamr@2: williamr@2: enum TBackupIncType williamr@2: /** williamr@2: The type of a backup. williamr@2: williamr@2: @released williamr@2: @publishedAll williamr@2: */ williamr@2: { williamr@2: ENoBackup = 0x00000000, /*!< 0x00000000: No backup is in progress */ williamr@2: EBackupBase = 0x00000100, /*!< 0x00000100: The backup is a base backup, i.e. it includes all files / data */ williamr@2: EBackupIncrement = 0x00000200 /*!< 0x00000200: The backup is an incremental backup, i.e. it includes only files / data that have changed since a previous backup */ williamr@2: }; williamr@2: williamr@2: } // end namespace williamr@2: #endif