svgtopt/SVGTPlugin/inc/RepositoryVolumeListener.h
branchRCL_3
changeset 39 1902ade171ab
parent 0 d46562c3d99d
equal deleted inserted replaced
38:db5c883ad1c5 39:1902ade171ab
       
     1 /*
       
     2 * Copyright (c) 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:  AO that completes on a change in the volume property.  Used for 
       
    15 *                the new Central Repository Server.  Used in EKA2 builds only
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 //
       
    21 #ifndef REPOSITORYVOLUMELISTENER_H
       
    22 #define REPOSITORYVOLUMELISTENER_H
       
    23 
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 #include <e32property.h>
       
    27 
       
    28 //
       
    29 // for emulator max volume = 65535
       
    30 #define WINS_DEFAULT_VOLUME 43690
       
    31 
       
    32 //
       
    33 // For HW max volume = 9
       
    34 #define HW_DEFAULT_VOLUME 6
       
    35 
       
    36 #include <centralrepository.h>
       
    37 
       
    38 class MRepositoryVolumeObserver;
       
    39 
       
    40 NONSHARABLE_CLASS( CRepositoryVolumeListener ) : public CActive
       
    41 	{
       
    42 public:
       
    43 	enum TPropertyWatchState
       
    44     	{
       
    45     	EConnected = 1,
       
    46     	EUnableToConnect
       
    47     	};
       
    48 	
       
    49 	static CRepositoryVolumeListener* NewL(MRepositoryVolumeObserver* aObserver);
       
    50     virtual ~CRepositoryVolumeListener();
       
    51     TInt GetCurrentVolume();
       
    52                                    
       
    53 private:
       
    54 	CRepositoryVolumeListener();
       
    55 	void ConstructL(MRepositoryVolumeObserver* aObserver);
       
    56 	TInt GetDefaultVolume();
       
    57 
       
    58     //From CActive	
       
    59     void RunL();	
       
    60     void DoCancel();	
       
    61 	
       
    62 
       
    63 	CRepository* iCenRepos;
       
    64 
       
    65     TPropertyWatchState iState;
       
    66 	
       
    67     MRepositoryVolumeObserver* iObserver;
       
    68 	};
       
    69 
       
    70 #endif  //REPOSITORYVOLUMELISTENER_H