inc/MPEngPresenceAttrTypeProperties2.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 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:  Presence attribute type properties.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MPENGPRESENCEATTRTYPEPROPERTIES2_H
       
    19 #define __MPENGPRESENCEATTRTYPEPROPERTIES2_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Std.h>
       
    23 
       
    24 
       
    25 //FORWARD DECLARATIONS
       
    26 class MPEngPresenceAttrTypePropertiesExt2;
       
    27 
       
    28 
       
    29 
       
    30 // DATA DECLARATION
       
    31 
       
    32 
       
    33 /**
       
    34  * Attribute data originator.
       
    35  *
       
    36  * Attribute data originator specifies which
       
    37  * presence service element is responsible of
       
    38  * filling the attribute data.
       
    39  *
       
    40  * Purely server originated attributes and
       
    41  * also local attributes are not allowed to
       
    42  * be published from client to network server.
       
    43  *
       
    44  * @since 3.0
       
    45  */
       
    46 enum TPEngAttributeOriginator
       
    47     {
       
    48     /**
       
    49      * Attribute originator is unknown.
       
    50      */
       
    51     EPEngOriginatorUnknown = -1,
       
    52 
       
    53 
       
    54     /**
       
    55      * Attribute is local one and can't be used in network transactions.
       
    56      */
       
    57     EPEngLocalAttribute = 1,
       
    58 
       
    59 
       
    60     /**
       
    61      * Attribute values are filled by the network server.
       
    62      */
       
    63     EPEngServerOriginated = 2,
       
    64 
       
    65 
       
    66     /**
       
    67      * Attribute values are filled by the publishing client.
       
    68      */
       
    69     EPEngClientOriginated = 3,
       
    70 
       
    71 
       
    72     /**
       
    73      * Attribute values are filled by the client and
       
    74      * the network server.
       
    75      */
       
    76     EPEngClientServerOriginated = 4
       
    77     };
       
    78 
       
    79 
       
    80 
       
    81 
       
    82 
       
    83 // CLASS DECLARATION
       
    84 /**
       
    85  * Attribute type properties.
       
    86  *
       
    87  * Interface to access presence attribute properties.
       
    88  * Concrete presence attribute types share these properties
       
    89  * but they have different property values.
       
    90  *
       
    91  * @since 3.0
       
    92  */
       
    93 class MPEngPresenceAttrTypeProperties2
       
    94     {
       
    95     public: //Attribute type specific data
       
    96 
       
    97         /**
       
    98          * Attribute type ID.
       
    99          *
       
   100          * Returns ID identifying attribute type.
       
   101          *
       
   102          * Attribute type ID identifies the presence data
       
   103          * contained in the attribute. Concrete attribute types
       
   104          * have their own data semantics that has to be known
       
   105          * before using the attribute model.
       
   106          *
       
   107          * @since 3.0
       
   108          * @return Attribute type identifier.
       
   109          */
       
   110         virtual TUint32 Type() const = 0;
       
   111 
       
   112 
       
   113         /**
       
   114          * Presence attribute data originator.
       
   115          *
       
   116          * Possible originator values are listed in
       
   117          * TPEngAttributeOriginator enumeration.
       
   118          *
       
   119          * @since 3.0
       
   120          * @return Originator.
       
   121          */
       
   122         virtual TPEngAttributeOriginator Originator() const = 0;
       
   123 
       
   124 
       
   125 
       
   126     public: //Generic properties
       
   127 
       
   128 
       
   129         /**
       
   130          * Gets attribute type property as TInt.
       
   131          *
       
   132          * @since 3.0
       
   133          * @parm aPropertyName The property name.
       
   134          * @parm aPropertyLevel The property level.
       
   135          * @param aProperty On the return contains the property value.
       
   136          * @return  Result from property get:
       
   137          *  - KErrNone if property succesfully get.
       
   138          *  - KErrNotSupported if requested property not supported.
       
   139          *  - Else one of system wide error codes.
       
   140          */
       
   141         virtual TInt GetProperty(
       
   142             TUint aPropertyName,
       
   143             TUint aPropertyLevel,
       
   144             TInt& aProperty ) const = 0;
       
   145 
       
   146 
       
   147         /**
       
   148          * Gets attribute type property as 8 bit descriptor
       
   149          *
       
   150          * @since 3.0
       
   151          * @parm aPropertyName The property name.
       
   152          * @parm aPropertyLevel The property level.
       
   153          * @param aProperty On the return contains the property value.
       
   154          * @return  Result from property get:
       
   155          *  - KErrNone if property succesfully get.
       
   156          *  - KErrNotSupported if requested property not supported.
       
   157          *  - Else one of system wide error codes.
       
   158          */
       
   159         virtual TInt GetProperty(
       
   160             TUint aPropertyName,
       
   161             TUint aPropertyLevel,
       
   162             TDes8& aProperty ) const = 0;
       
   163 
       
   164 
       
   165 
       
   166 
       
   167         /**
       
   168          * Gets attribute type property as 16 bit pointer descriptor
       
   169          *
       
   170          * @since 3.0
       
   171          * @parm aPropertyName The property name.
       
   172          * @parm aPropertyLevel The property level.
       
   173          * @param aProperty On the return contains the property value.
       
   174          * @return  Result from property get:
       
   175          *  - KErrNone if property succesfully get.
       
   176          *  - KErrNotSupported if requested property not supported.
       
   177          *  - Else one of system wide error codes.
       
   178          */
       
   179         virtual TInt GetPropertyPtr(
       
   180             TUint aPropertyName,
       
   181             TUint aPropertyLevel,
       
   182             TPtrC16& aProperty ) const = 0;
       
   183 
       
   184 
       
   185 
       
   186 
       
   187     private: //Extensions interfaces
       
   188 
       
   189 
       
   190         /**
       
   191          * Generic attribute property extension interface.
       
   192          *
       
   193          * @since 3.0
       
   194          * @return Attribute property extension.
       
   195          */
       
   196         virtual MPEngPresenceAttrTypePropertiesExt2* Extension() = 0;
       
   197 
       
   198 
       
   199         /**
       
   200          * Attribute model type specific property extension.
       
   201          *
       
   202          * @since 3.0
       
   203          * @return Attribute type specific property extension.
       
   204          */
       
   205         virtual TAny* TypeExtension( TUint32 aType ) = 0;
       
   206 
       
   207 
       
   208 
       
   209 
       
   210     protected: //Destructor
       
   211 
       
   212         /**
       
   213          * Inline virtual destructor.
       
   214          *
       
   215          * Concrete attribute property objects
       
   216          * can't be destroyed using this interface.
       
   217          */
       
   218         virtual ~MPEngPresenceAttrTypeProperties2() {};
       
   219 
       
   220     };
       
   221 
       
   222 
       
   223 
       
   224 #endif      // __MPENGPRESENCEATTRTYPEPROPERTIES2_H
       
   225 
       
   226 
       
   227 //  End of File
       
   228 
       
   229 
       
   230