remotestoragefw/remotefileengine/inc/rsfwdirentattr.h
branchRCL_3
changeset 19 88ee4cf65e19
parent 16 87c71b25c937
child 20 1aa8c82cb4cb
equal deleted inserted replaced
16:87c71b25c937 19:88ee4cf65e19
     1 /*
       
     2 * Copyright (c) 2002-2004 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:  Directory entry container
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CRSFWDIRENTATTR_H
       
    20 #define CRSFWDIRENTATTR_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // CONSTANTS
       
    26 
       
    27 // DATA TYPES
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 
       
    31 // CLASS DECLARATION
       
    32 /**
       
    33  *  Filesystem object attribute container
       
    34  *  The attribute setting operations on this class
       
    35  *  do not affect any external objects -
       
    36  *  only the internal state of the object will be changed.
       
    37  *  Similarily, attribute getting operations only reflect the
       
    38  *  state of the object.
       
    39  *
       
    40  *  @lib rsfwcommon.lib
       
    41  *  @since Series 60 3.1
       
    42  */
       
    43 class CRsfwDirEntAttr: public CBase
       
    44     {
       
    45 public:
       
    46     enum TDirEntAttrString
       
    47         {
       
    48         EDirEntAttrStringMimeType = 0,
       
    49         EDirEntAttrStringETag,
       
    50         EDirEntAttrStringReserved,
       
    51         EDirEntAttrStringCount
       
    52         };
       
    53 
       
    54 public:
       
    55     /**
       
    56      * Two-phased constructor
       
    57      */
       
    58     IMPORT_C static CRsfwDirEntAttr* NewLC();
       
    59 
       
    60     /**
       
    61      * Two-phased constructor.
       
    62      * The attribute values are zeroed
       
    63      */
       
    64     IMPORT_C static CRsfwDirEntAttr* NewL();
       
    65 
       
    66     CRsfwDirEntAttr();
       
    67 
       
    68     IMPORT_C ~CRsfwDirEntAttr();
       
    69 
       
    70     /**
       
    71      * Gets file or directory attribute bits
       
    72      * (for SymbianOS standard bit definitions, see f32file.h)
       
    73      * @return attribute bits
       
    74      */
       
    75     IMPORT_C TUint Att() const;
       
    76 
       
    77     /**
       
    78      * Sets file or directory attribute bits
       
    79      * (for SymbianOS standard bit definitions, see f32file.h)
       
    80      * @param aAtt attribute bits
       
    81      */
       
    82     IMPORT_C void SetAtt(TUint aAtt);
       
    83 
       
    84     /**
       
    85      * Sets the given file or directory attribute bits to 1
       
    86      * (for SymbianOS standard bit definitions, see f32file.h)
       
    87      * @param aFlags attribute bits
       
    88      */
       
    89     IMPORT_C void SetAttFlags(TUint aFlags);
       
    90 
       
    91     /**
       
    92      * Resets the given file or directory attribute bits to 0
       
    93      * (for SymbianOS standard bit definitions, see f32file.h)
       
    94      * @param aFlags attribute bits
       
    95      *   (those bits are cleared that are set in aFlags)
       
    96      */
       
    97     IMPORT_C void ResetAttFlags(TUint aFlags);
       
    98 
       
    99     /**
       
   100      * Returns the size of the filesystem object
       
   101      * @return size in bytes
       
   102      */
       
   103     IMPORT_C TInt Size() const;
       
   104 
       
   105     /**
       
   106      * Sets the size of the filesystem object
       
   107      * @param aSize size in bytes
       
   108      */
       
   109     IMPORT_C void SetSize(TInt aSize);
       
   110 
       
   111     /**
       
   112      * Returns the last modified time of the filesystem object
       
   113      * @return last modified time
       
   114      */
       
   115     IMPORT_C TTime Modified() const;
       
   116 
       
   117     /**
       
   118      * Sets the last modified time of the filesystem object
       
   119      * @param aModified last modified time
       
   120      */
       
   121     IMPORT_C void SetModified(const TTime& aModified);
       
   122 
       
   123     /**
       
   124      * Returns the UID3 of the filesystem object
       
   125      * @return UID value
       
   126      */
       
   127     IMPORT_C const TUid& Uid();
       
   128 
       
   129     /**
       
   130      * Sets the UID3 time of the filesystem object
       
   131      * @param aUid UID value
       
   132      */
       
   133     IMPORT_C void SetUid(TUid aUid);
       
   134 
       
   135     /**
       
   136      * Returns a string value at the given index
       
   137      * @param aIndex index
       
   138      * @return string value
       
   139      */
       
   140     IMPORT_C const TDesC8* StringValue(TInt aIndex) const;
       
   141 
       
   142     /**
       
   143      * Sets a string value at the given index
       
   144      * @param aIndex index
       
   145      * @param string value
       
   146      */
       
   147     IMPORT_C void SetStringValueL(TInt aIndex, const TDesC8& aString);
       
   148 
       
   149     /**
       
   150      * Gets the MIME type
       
   151      * @return MIME type string
       
   152      */
       
   153     IMPORT_C const TDesC8* MimeType() const;
       
   154 
       
   155     /**
       
   156      * Sets the MIME type
       
   157      * @param aMimeType MIME type string
       
   158      */
       
   159     IMPORT_C void SetMimeTypeL(const TDesC8& aMimeType);
       
   160 
       
   161     /**
       
   162      * Gets the ETag
       
   163      * @return ETag string
       
   164      */
       
   165     IMPORT_C const TDesC8* ETag() const;
       
   166 
       
   167     /**
       
   168      * Sets the ETag type
       
   169      * @param aETag ETag type string
       
   170      */
       
   171     IMPORT_C void SetETagL(const TDesC8& aETag);
       
   172 
       
   173 private:
       
   174     void ConstructL();
       
   175 
       
   176 private:
       
   177     TUint iAtt;                                    // attribute bits
       
   178     TInt iSize;                                    // file size in bytes
       
   179     TTime iModified;                               // last modified         
       
   180     TUid iUid;                                     // Symbian data-type (UID3)
       
   181     HBufC8* iStringValues[EDirEntAttrStringCount]; // string values
       
   182     };
       
   183 
       
   184 
       
   185 #endif // CRSFWDIRENTATTR_H
       
   186 
       
   187 // End of File