upnpharvester/common/cmlibrary/inc/cmdriveinfo.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     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:      Definition of drive info class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef C_CCMDRIVEINFO_H
       
    24 #define C_CCMDRIVEINFO_H
       
    25 
       
    26 // INCLUDES
       
    27 #include <e32base.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class RWriteStream;
       
    31 class RReadStream;
       
    32 
       
    33 /**
       
    34  *  Drive info class
       
    35  *
       
    36  *  Provides info about MCs drives
       
    37  *
       
    38  *  @lib cmcommon.lib
       
    39  *  @since S60 3.1
       
    40  */
       
    41  class CCmDriveInfo : public CBase
       
    42     {
       
    43     
       
    44     public:
       
    45     
       
    46         /**
       
    47          * Creates new CCmDriveInfo class.
       
    48          * @param None
       
    49          * @return  pointer to CCmDriveInfo class
       
    50          */    
       
    51         IMPORT_C static CCmDriveInfo* NewL();
       
    52        
       
    53         /**
       
    54          * Creates new CCmDriveInfo class.
       
    55          * @param None
       
    56          * @return  pointer to CCmDriveInfo class
       
    57          */        
       
    58         IMPORT_C static CCmDriveInfo* NewLC();
       
    59         
       
    60         /**
       
    61          * Destructor.
       
    62          */
       
    63         IMPORT_C virtual ~CCmDriveInfo();
       
    64             
       
    65     public:
       
    66         /**
       
    67          * Sets drive number
       
    68          * @since S60 3.1
       
    69          * @param aDriveNumber, drive number
       
    70          */
       
    71         IMPORT_C void SetDriveNumber( const TInt aDriveNumber );
       
    72 
       
    73         /**
       
    74          * Gets drive number
       
    75          * @since S60 3.1
       
    76          * @return TInt, drive number
       
    77          */
       
    78         IMPORT_C TInt DriveNumber() const;
       
    79         
       
    80         /**
       
    81          * Sets drive type
       
    82          * @since S60 3.1
       
    83          * @param aDriveType, drive type
       
    84          */
       
    85         IMPORT_C void SetDriveType( const TUint aDriveType );
       
    86 
       
    87         /**
       
    88          * Gets drive type
       
    89          * @since S60 3.1
       
    90          * @return TUint, drive type
       
    91          */
       
    92         IMPORT_C TUint DriveType() const;
       
    93         
       
    94         /**
       
    95          * Sets drive name
       
    96          * @since S60 3.1
       
    97          * @param aDriveNumber, drive name
       
    98          */
       
    99         IMPORT_C void SetDriveNameL( const TDesC& aDriveName ); 
       
   100 
       
   101         /**
       
   102          * Gets drive name
       
   103          * @since S60 3.1
       
   104          * @return TDesC*, drive name
       
   105          */
       
   106         IMPORT_C TDesC& DriveName() const;
       
   107                 
       
   108         /**
       
   109          * Sets drive size
       
   110          * @since S60 3.1
       
   111          * @param aDriveSize, drive size
       
   112          */
       
   113         IMPORT_C void SetDriveSize( const TInt64 aDriveSize );
       
   114 
       
   115         /**
       
   116          * Gets drive size
       
   117          * @since S60 3.1
       
   118          * @return TInt64, drive size
       
   119          */
       
   120         IMPORT_C TInt64 DriveSize() const;
       
   121 
       
   122         /**
       
   123          * Sets drive quota
       
   124          * @since S60 3.1
       
   125          * @param aDriveQuota, drive quota
       
   126          */        
       
   127         IMPORT_C void SetDriveQuota( const TInt64 aDriveQuota );
       
   128 
       
   129         /**
       
   130          * Gets drive quota
       
   131          * @since S60 3.1
       
   132          * @return drive quota
       
   133          */        
       
   134         IMPORT_C TInt64 DriveQuota() const;
       
   135  
       
   136         /**
       
   137          * Sets used drive quota
       
   138          * @since S60 3.1
       
   139          * @param aUsedDriveQuota, used drive quota
       
   140          */        
       
   141         IMPORT_C void SetUsedDriveQuota( const TInt64 aUsedDriveQuota );
       
   142 
       
   143         /**
       
   144          * Gets used drive quota
       
   145          * @since S60 3.1
       
   146          * @return used drive quota
       
   147          */        
       
   148         IMPORT_C TInt64 UsedDriveQuota() const;
       
   149                 
       
   150         /**
       
   151          * Sets drive id
       
   152          * @since S60 3.1
       
   153          * @param aDriveId, drive id
       
   154          */
       
   155         IMPORT_C void SetDriveId( const TUint aDriveId );
       
   156 
       
   157         /**
       
   158          * Gets drive Id
       
   159          * @since S60 3.1
       
   160          * @return TInt, drive id
       
   161          */
       
   162         IMPORT_C TUint DriveId() const;
       
   163 
       
   164         /**
       
   165          * Sets drive status
       
   166          * @since S60 3.1
       
   167          * @param aActive, ETrue if drive selected
       
   168          * @return None
       
   169          */        
       
   170         IMPORT_C void SetStatus( const TBool aActive );
       
   171         
       
   172         /**
       
   173          * Gets drive status
       
   174          * @since S60 3.1
       
   175          * @return ETrue if drive selected
       
   176          */        
       
   177         IMPORT_C TBool Status() const;
       
   178         
       
   179         /**
       
   180         * Externalizes container information to stream.
       
   181         * Leaves in case of errors.
       
   182         * @since Series 60 3.1
       
   183         * @param reference to RWriteStream
       
   184         * @return none
       
   185         */
       
   186         IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
       
   187         
       
   188         /**
       
   189         * Internalizes container information from stream.
       
   190         * Leaves in case of errors.
       
   191         * @since Series 60 3.1
       
   192         * @param reference to RReadStream
       
   193         * @return none
       
   194         */
       
   195         IMPORT_C void InternalizeL( RReadStream& aStream );        
       
   196         
       
   197     private:
       
   198     
       
   199         /**
       
   200          * CCmDriveInfo.
       
   201          */        
       
   202         CCmDriveInfo();
       
   203             
       
   204         /**
       
   205          * ConstructL.
       
   206          */
       
   207         void ConstructL();
       
   208             
       
   209     private:
       
   210     
       
   211         /**
       
   212          * drive number
       
   213          */
       
   214         TInt                    iDriveNumber;
       
   215         
       
   216         /**
       
   217          * drive type
       
   218          */
       
   219         TUint                   iDriveType;
       
   220         
       
   221         /**
       
   222          * drive name
       
   223          * owned
       
   224          */
       
   225         HBufC*                  iDriveName; 
       
   226         
       
   227         /**
       
   228          * used drive space
       
   229          */
       
   230         TInt64                  iSize;
       
   231 
       
   232         /**
       
   233          * drive capasity
       
   234          */        
       
   235         TInt64                  iQuota;
       
   236         
       
   237         /**
       
   238          * used drive capasity
       
   239          */        
       
   240         TInt64                  iUsedQuota;        
       
   241         
       
   242         /**
       
   243          * drive id
       
   244          */
       
   245         TUint                   iUniqueId;
       
   246         
       
   247         /**
       
   248          * drive active
       
   249          */
       
   250          TBool                  iActive;
       
   251                  
       
   252     };
       
   253  
       
   254 #endif // C_CCMDRIVEINFO_H