inc/MPEngAttributeList2.h
branchRCL_3
changeset 13 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
12:6ca72c0fe49a 13:a941bc465d9f
       
     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:  Attribute list model interface & related definitions.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __MPENGATTRIBUTELIST2_H__
       
    19 #define __MPENGATTRIBUTELIST2_H__
       
    20 
       
    21 //  INCLUDES
       
    22 #include <E32Std.h>
       
    23 
       
    24 
       
    25 
       
    26 //FORWARD DECLARATIONS
       
    27 
       
    28 class MPEngAttributeListExt2;
       
    29 class MPEngAdvancedAttributeList2;
       
    30 
       
    31 // DATA TYPES
       
    32 
       
    33 /**
       
    34  * Attribute list set enumeration.
       
    35  *
       
    36  * @since
       
    37  */
       
    38 enum TPEngAttributeListsSet2
       
    39     {
       
    40     /**
       
    41      * The set of attribute lists which are on the network server.
       
    42      */
       
    43     EPEngNetworkAttributeLists = 1,
       
    44 
       
    45 
       
    46     /**
       
    47      * The set of the attribute lists locally on the terminal.
       
    48      */
       
    49     EPEngLocalAttributeLists = 2
       
    50     };
       
    51 
       
    52 
       
    53 
       
    54 
       
    55 
       
    56 // CLASS DECLARATION
       
    57 
       
    58 /**
       
    59  * Presence Attribute Lists interface
       
    60  *
       
    61  * This interface is used by the client to manage one attribute list.
       
    62  *
       
    63  * After attribute list was created and edited, attribute list must
       
    64  * to be attached to the particular contact list or presence contact.
       
    65  *
       
    66  * @since 3.0
       
    67  */
       
    68 class MPEngAttributeList2
       
    69     {
       
    70     public: //Mutators
       
    71 
       
    72         /**
       
    73          * Adds a presence attribute into the attribute list.
       
    74          *
       
    75          * @since 3.0
       
    76          * @param aPresenceAttribute The presence attribute which should
       
    77          *        be added into the attribute list. Attribute types known
       
    78          *        by Presence Engine are listed in PEngWVPresenceAttributes2.h.
       
    79          */
       
    80         virtual void AddPresenceAttributeL(
       
    81             TUint32 aPresenceAttribute ) = 0;
       
    82 
       
    83 
       
    84         /**
       
    85          * Removes the presence attribute from the attribute list.
       
    86          *
       
    87          * @since 3.0
       
    88          * @param aPresenceAttribute The presence attribute to remove
       
    89          *        from the attribute list. Attribute types known
       
    90          *        by Presence Engine are listed in PEngWVPresenceAttributes2.h.
       
    91          * @return KErrNone if operation was successful. Else a system wide error code.
       
    92          */
       
    93         virtual TInt RemovePresenceAttribute(
       
    94             TUint32 aPresenceAttribute ) = 0;
       
    95 
       
    96 
       
    97         /**
       
    98          * Removes all presence attributes from the attribute list
       
    99          *
       
   100          * @since 3.0
       
   101          */
       
   102         virtual void RemoveAllAttributes() = 0;
       
   103 
       
   104 
       
   105 
       
   106     public: //Accessors
       
   107 
       
   108         /**
       
   109          * Checks is the presence attribute valid and can it be added
       
   110          * into the attribute list.
       
   111          *
       
   112          * @since 3.0
       
   113          * @param aPresenceAttribute The presence attribute to check.
       
   114          *        Attribute types known by Presence Engine are listed in
       
   115          *        PEngWVPresenceAttributes2.h.
       
   116          * @return KErrNone if attribute is valid. Else a system wide error code.
       
   117          */
       
   118         virtual TInt ConfirmPresenceAttribute(
       
   119             TUint32 aPresenceAttribute ) const = 0 ;
       
   120 
       
   121 
       
   122         /**
       
   123          * Current set of presence attributes in the attribute list.
       
   124          *
       
   125          * @since 3.0
       
   126          * @return The list of the presence attributes
       
   127          * in the attribute list. Attribute types known
       
   128          * by Presence Engine are listed in PEngWVPresenceAttributes2.h.
       
   129          */
       
   130         virtual TArray<TUint32> ListOfAttributes() const = 0;
       
   131 
       
   132 
       
   133 
       
   134 
       
   135     private: //Extensions interfaces
       
   136 
       
   137 
       
   138         /**
       
   139          * Generic attribute list extension interface.
       
   140          *
       
   141          * @since 3.0
       
   142          * @return Attribute list extension.
       
   143          */
       
   144         virtual MPEngAttributeListExt2* Extension() = 0;
       
   145 
       
   146 
       
   147 
       
   148     public: //Presence Engine internal interface access
       
   149 
       
   150         /**
       
   151          * Presence Engine internal attribute list interface.
       
   152          *
       
   153          * @since 3.0
       
   154          * @return Attribute list internal interface.
       
   155          */
       
   156         virtual const MPEngAdvancedAttributeList2* Advanced() const = 0;
       
   157         virtual MPEngAdvancedAttributeList2* Advanced() = 0;
       
   158 
       
   159 
       
   160 
       
   161     public: //Cleanup support & destructor
       
   162 
       
   163         /**
       
   164          * Support for attribute list cleanup.
       
   165          *
       
   166          * When this method is called, concrete
       
   167          * attribute list instance is deleted and all
       
   168          * it runtime resources are freed.
       
   169          * ==> Attribute lists can be pushed on the
       
   170          * CleanupStack using CleanupClosePushL().
       
   171          *
       
   172          * @since 3.0
       
   173          */
       
   174         virtual void Close() = 0;
       
   175 
       
   176 
       
   177         /**
       
   178          * Destructor.
       
   179          */
       
   180         virtual ~MPEngAttributeList2() {};
       
   181 
       
   182     };
       
   183 
       
   184 #endif //   __MPENGATTRIBUTELIST2_H__
       
   185 
       
   186 // End of File
       
   187 
       
   188