skins/AknSkins/srvinc/aknssrvactivedataowner.h
changeset 0 05e9090e2422
equal deleted inserted replaced
-1:000000000000 0:05e9090e2422
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Skin server's active data owner in backup/restore.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AKNSSRVACTIVEDATAOWNER_H
       
    20 #define C_AKNSSRVACTIVEDATAOWNER_H
       
    21 
       
    22 #include <e32property.h>
       
    23 #include <e32std.h>
       
    24 #include <connect/abclient.h>
       
    25 
       
    26 class CAknsSrvActiveBackupDataClient;
       
    27 class CActiveBackupClient;
       
    28 
       
    29 /**
       
    30  *  Skin server's active data owner in backup/restore.
       
    31  *
       
    32  *  Listens for PS key to know when to order active data owner to 
       
    33  *  backup/restore data.
       
    34  *
       
    35  *  @lib AknsSkinSrv.lib
       
    36  *  @since S60 v3.1
       
    37  */
       
    38 NONSHARABLE_CLASS( CAknsSrvActiveDataOwner ) : public CActive
       
    39     {
       
    40 public:
       
    41 
       
    42     static CAknsSrvActiveDataOwner* NewL( RFs& aFsSession );
       
    43 
       
    44     virtual ~CAknsSrvActiveDataOwner();
       
    45 
       
    46 // from base class CActive
       
    47     void RunL();
       
    48     TInt RunError( TInt aError );
       
    49     void DoCancel();
       
    50 
       
    51 private:
       
    52 
       
    53     // Handles changes in backup state.
       
    54     void HandleBackupStateL( const TInt aValue );
       
    55 
       
    56     // Subsribes notifications of backup/restore p&s key.
       
    57     void SubscribePSKey();
       
    58 
       
    59     CAknsSrvActiveDataOwner( RFs& aFsSession );
       
    60 
       
    61 private: // data
       
    62 
       
    63     /**
       
    64      * Callback interface for skinserver's active data owner.
       
    65      * Own.
       
    66      */
       
    67     CAknsSrvActiveBackupDataClient* iCallBack;
       
    68     
       
    69     /**
       
    70      * Active backup client.
       
    71      * Own.
       
    72      */
       
    73     conn::CActiveBackupClient* iActiveBackupClient;
       
    74     
       
    75     /**
       
    76      * Property to listen to.
       
    77      */
       
    78     RProperty iBackupProperty;
       
    79 
       
    80     /**
       
    81      * File system session (shared by AknSrv).
       
    82      */
       
    83     RFs& iFsSession;
       
    84 
       
    85     };
       
    86 
       
    87 #endif // C_AKNSSRVACTIVEDATAOWNER_H
       
    88