phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseproperty.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
    29  *  @lib cenrepdatabase.lib
    29  *  @lib cenrepdatabase.lib
    30  *  @since S60 V3.2
    30  *  @since S60 V3.2
    31  */
    31  */
    32 NONSHARABLE_CLASS( CCenRepDatabaseProperty ): public CBase
    32 NONSHARABLE_CLASS( CCenRepDatabaseProperty ): public CBase
    33     {
    33     {
    34     public: // Constructor and destructor
    34 	public: // Constructor and destructor
    35 
    35 
    36         /**
    36 	    /**
    37         * Two-phased constructor.
    37 	    * Two-phased constructor.
    38         */
    38 	    */
    39         IMPORT_C static CCenRepDatabaseProperty* NewL();
    39 	    IMPORT_C static CCenRepDatabaseProperty* NewL();
    40 
    40 
    41         /**
    41 	    /**
    42         * Two-phased constructor.
    42 	    * Two-phased constructor.
    43         */
    43 	    */
    44         IMPORT_C static CCenRepDatabaseProperty* NewLC();
    44 	    IMPORT_C static CCenRepDatabaseProperty* NewLC();
    45 
    45 
    46         /**
    46 	    /**
    47         * Destructors.
    47 	    * Destructors.
    48         */
    48 	    */
    49         IMPORT_C virtual ~CCenRepDatabaseProperty();
    49 	    IMPORT_C virtual ~CCenRepDatabaseProperty();
    50 
    50 
    51     public: // member functions
    51 	public: // member functions
    52         /**
    52 	    /**
    53          * Returns the name of this property
    53 	     * Returns the name of this property
    54          *
    54 	     *
    55          * @since S60 V3.2
    55 	     * @since S60 V3.2
    56          * @return Name of property
    56 	     * @return Name of property
    57          */
    57 	     */
    58         IMPORT_C TUint32 GetName() const;
    58 	    IMPORT_C TUint32 GetName() const;
    59 
    59 
    60         /**
    60 	    /**
    61          * Sets the name for this property
    61 	     * Sets the name for this property
    62          *
    62 	     *
    63          * @since S60 V3.2
    63 	     * @since S60 V3.2
    64          * @param aPropertyname new property name
    64 	     * @param aPropertyname new property name
    65          */
    65 	     */
    66         IMPORT_C void SetName( TUint32 aPropertyname );
    66 	    IMPORT_C void SetName( TUint32 aPropertyname );
    67 
    67 
    68         /**
    68 	    /**
    69          * Returns value of property
    69 	     * Returns value of property
    70          *
    70 	     *
    71          * @since S60 V3.2
    71 	     * @since S60 V3.2
    72          * @param aValue on return, TInt value
    72 	     * @param aValue on return, TInt value
    73          * @return Error code
    73 	     * @return Error code
    74          */
    74 	     */
    75         IMPORT_C TInt GetValue( TInt& aValue ) const;
    75 	    IMPORT_C TInt GetValue( TInt& aValue ) const;
    76 
    76 
    77         /**
    77 	    /**
    78          * Sets value of property. Value must match to datatype.
    78 	     * Sets value of property. Value must match to datatype.
    79          *
    79 	     *
    80          * @since S60 V3.2
    80 	     * @since S60 V3.2
    81          * @param aValue new TInt value to be set
    81 	     * @param aValue new TInt value to be set
    82          * @return Error code
    82 	     * @return Error code
    83          */
    83 	     */
    84         IMPORT_C TInt SetValue( TInt aValue );
    84 	    IMPORT_C TInt SetValue( TInt aValue );
    85 
    85 
    86         /**
    86 	    /**
    87          * Returns value of property
    87 	     * Returns value of property
    88          *
    88 	     *
    89          * @since S60 V3.2
    89 	     * @since S60 V3.2
    90          * @param aValue on return, descriptor value
    90 	     * @param aValue on return, descriptor value
    91          * @return Error code
    91 	     * @return Error code
    92          */
    92 	     */
    93         IMPORT_C const TDesC& GetDesValue() const;
    93 	    IMPORT_C const TDesC& GetDesValue() const;
    94 
    94 
    95         /**
    95 	    /**
    96          * Sets the value of property. Value must match to datatype.
    96 	     * Sets the value of property. Value must match to datatype.
    97          *
    97 	     *
    98          * @since S60 V3.2
    98 	     * @since S60 V3.2
    99          * @param aValue new descriptor
    99 	     * @param aValue new descriptor
   100          * @return Error code
   100 	     * @return Error code
   101          */
   101 	     */
   102         IMPORT_C TInt SetValue( const TDesC& aValue );
   102 	    IMPORT_C TInt SetValue( const TDesC& aValue );
   103 
   103 
   104 
   104 
   105         /**
   105 	    /**
   106          * Compares data of this property to another.
   106 	     * Compares data of this property to another.
   107          *
   107 	     *
   108          * @since S60 V3.2
   108 	     * @since S60 V3.2
   109          * @param aProperty property to be compared
   109 	     * @param aProperty property to be compared
   110          * @return ETrue if properties have same data
   110 	     * @return ETrue if properties have same data
   111          */
   111 	     */
   112         IMPORT_C TBool CCenRepDatabaseProperty::operator==( 
   112 	    IMPORT_C TBool CCenRepDatabaseProperty::operator==( 
   113                     const CCenRepDatabaseProperty& aProperty ) const;
   113 	                const CCenRepDatabaseProperty& aProperty ) const;
   114 
   114 
   115     private:
   115 	private:
   116 
   116 
   117         /**
   117 	    /**
   118         * C++ default constructor.
   118 	    * C++ default constructor.
   119         */
   119 	    */
   120         CCenRepDatabaseProperty();
   120 	    CCenRepDatabaseProperty();
   121         
   121 	    
   122         /**
   122 	    /**
   123         * By default Symbian 2nd phase constructor is private.
   123 	    * By default Symbian 2nd phase constructor is private.
   124         */
   124 	    */
   125         void ConstructL();
   125 	    void ConstructL();
   126 
   126 
   127     private: // data
   127 	private: // data
   128 
   128 
   129         /**
   129 	    /**
   130          * Descriptor of property value
   130 	     * Descriptor of property value
   131          * Own.
   131 	     * Own.
   132          */
   132 	     */
   133         RBuf iPropertyValue;
   133 	    RBuf iPropertyValue;
   134 
   134 
   135         /**
   135 	    /**
   136          * Name of property
   136 	     * Name of property
   137          */
   137 	     */
   138         TUint32 iPropertyName;
   138 	    TUint32 iPropertyName;
   139 
   139 
   140 
   140 
   141     private: // For testing
   141     private: // For testing
   142         #ifdef TEST_EUNIT
   142         #ifdef TEST_EUNIT
   143             friend class UT_CCenRepDatabaseProperty;
   143             friend class UT_CCenRepDatabaseProperty;