inc/CPEngAttributeListStore2.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:  Store API to retrieve attribute lists.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CPENGATTRIBUTELISTSTORE2_H__
       
    19 #define __CPENGATTRIBUTELISTSTORE2_H__
       
    20 
       
    21 // INCLUDES
       
    22 #include <E32Base.h>
       
    23 #include <MPEngAttributeList2.h>
       
    24 
       
    25 
       
    26 
       
    27 //FORWARD DECLARATIONS
       
    28 class CPEngAttributeListStore2Imp;
       
    29 class CPEngNWSessionSlotID2;
       
    30 
       
    31 
       
    32 
       
    33 /**
       
    34  * Store API to retrieve presence attribute lists.
       
    35  *
       
    36  * With this API clients can access and initialize
       
    37  * presence attribute lists.
       
    38  *
       
    39  * @lib PEngManager2.lib
       
    40  * @since 3.0
       
    41  */
       
    42 class CPEngAttributeListStore2 : public CBase
       
    43     {
       
    44         //-----------------------------------------------------------------------
       
    45     public: /* Construction */
       
    46 
       
    47 
       
    48         /**
       
    49          * Instantiates CPEngAttributeListStore2 object.
       
    50          *
       
    51          * Instantiates CPEngAttributeListStore2 object and connects it to
       
    52          * identified Presence Engine side NWSessionSlot. NWSessionSlot
       
    53          * must be a valid, existing slot.
       
    54          *
       
    55          * @Error KErrNotFound Requested NWSessionSlot not found
       
    56          * @error KErrArgument Given NWSessionSlotID malformed
       
    57          *
       
    58          * @param aNWSessionSlotID The session slot ID to identify the
       
    59          * session slot.
       
    60          * @param aPriority The priority for Presence Engine client side active
       
    61          * objects. These active objects are used when asynchronously delivering
       
    62          * events to observers or maintaining Presence Cache state.
       
    63          *
       
    64          * @return New CPEngAttributeStore2 instance.
       
    65          */
       
    66         IMPORT_C static CPEngAttributeListStore2* NewL(
       
    67             const CPEngNWSessionSlotID2& aNWSessionSlotID,
       
    68             TInt aPriority = CActive::EPriorityStandard );
       
    69 
       
    70         IMPORT_C static CPEngAttributeListStore2* NewLC(
       
    71             const CPEngNWSessionSlotID2& aNWSessionSlotID,
       
    72             TInt aPriority = CActive::EPriorityStandard );
       
    73 
       
    74 
       
    75         /**
       
    76          * Destructor.
       
    77          * Virtual by CBase.
       
    78          */
       
    79         ~CPEngAttributeListStore2();
       
    80 
       
    81 
       
    82 
       
    83     private:
       
    84         CPEngAttributeListStore2();
       
    85 
       
    86 
       
    87 
       
    88 
       
    89         //-----------------------------------------------------------------------
       
    90     public: /* Presence attribute lists */
       
    91 
       
    92 
       
    93         /**
       
    94          * Creates a new empty presence attribute list.
       
    95          * Ownership of created attribute list is transferred to caller.
       
    96          *
       
    97          * @since 3.0
       
    98          * @return New attribute list instance.
       
    99          */
       
   100         IMPORT_C MPEngAttributeList2* CreateEmptyAttributeListL();
       
   101 
       
   102 
       
   103 
       
   104 
       
   105         //-----------------------------------------------------------------------
       
   106     public: /* Default attribute list */
       
   107 
       
   108 
       
   109         /**
       
   110          * Gets default attribute list.
       
   111          *
       
   112          * @since 3.0
       
   113          * @param aAttributeListsSet Wether to get local or network
       
   114          * version of attribute list.
       
   115          * @return Attribute list instance. Ownership is returned to caller.
       
   116          */
       
   117         IMPORT_C MPEngAttributeList2* GetDefaultAttributeListL(
       
   118             TPEngAttributeListsSet2 aAttrListsSet );
       
   119 
       
   120 
       
   121 
       
   122         /**
       
   123          * Sets attribute list as default attribute list.
       
   124          *
       
   125          * @since 3.0
       
   126          * @param aAttributeList The attribute list to set as default
       
   127          * attribute list.
       
   128          */
       
   129         IMPORT_C void SetAsDefaultAttributeListL(
       
   130             MPEngAttributeList2& aAttributeList );
       
   131 
       
   132 
       
   133         /**
       
   134          * Deletes the default attribute list.
       
   135          *
       
   136          * @since 3.0
       
   137          */
       
   138         IMPORT_C void DeleteDefaultAttributeListL();
       
   139 
       
   140 
       
   141 
       
   142 
       
   143 
       
   144 
       
   145         //-----------------------------------------------------------------------
       
   146     public: /* Contact list attribute lists */
       
   147 
       
   148 
       
   149         /**
       
   150          * Get contact list's attribute list
       
   151          *
       
   152          * @since 3.0
       
   153          * @param aContactListName Name of the contact list.
       
   154          * @param aAttributeListsSet Wether to get local or network
       
   155          * version of attribute list.
       
   156          * @return Attribute list instance. Ownership is returned to caller.
       
   157          */
       
   158         IMPORT_C MPEngAttributeList2* GetAttributeListForContactListL(
       
   159             const TDesC& aContactListName,
       
   160             TPEngAttributeListsSet2 aAttrListsSet );
       
   161 
       
   162 
       
   163         /**
       
   164          * Attaches attribute list to contact list.
       
   165          *
       
   166          * @since 3.0
       
   167          * @param aContactListName Name of the contact list.
       
   168          * @param aAttributeList The attribute list to be attached.
       
   169          */
       
   170         IMPORT_C void AttachAttributeListToContactListL(
       
   171             const TDesC& aContactListName,
       
   172             MPEngAttributeList2& aAttributeList );
       
   173 
       
   174 
       
   175         /**
       
   176          * Delete attribute list from contact list
       
   177          *
       
   178          * @since 3.0
       
   179          * @param aContactListName Name of the contact list.
       
   180          */
       
   181         IMPORT_C void DeleteAttributeListFromContactListL(
       
   182             const TDesC& aContactListName );
       
   183 
       
   184 
       
   185 
       
   186 
       
   187 
       
   188 
       
   189         //-----------------------------------------------------------------------
       
   190     public: /* Presence user attribute lists */
       
   191 
       
   192 
       
   193         /**
       
   194          * Get user's attribute list
       
   195          *
       
   196          * @since 3.0
       
   197          * @param aPresenceID User's presence id.
       
   198          * @param aAttributeListsSet Wether to get local or network
       
   199          * version of attribute list model.
       
   200          * @return Attribute list instance. Ownership is returned to caller.
       
   201          */
       
   202         IMPORT_C MPEngAttributeList2* GetAttributeListForUserL(
       
   203             const TDesC& aPresenceID,
       
   204             TPEngAttributeListsSet2 aAttrListsSet );
       
   205 
       
   206 
       
   207 
       
   208         /**
       
   209          * Attaches attribute list to user.
       
   210          *
       
   211          * @since 3.0
       
   212          * @param aPresenceID User's presence id.
       
   213          * @param aAttributeList The attribute list to be attached.
       
   214          */
       
   215         IMPORT_C void AttachAttributeListToUserL(
       
   216             const TDesC& aPresenceID,
       
   217             MPEngAttributeList2& aList );
       
   218 
       
   219 
       
   220 
       
   221 
       
   222         /**
       
   223          * Deletes attribute list from user.
       
   224          *
       
   225          * @since 3.0
       
   226          * @param aPresenceID User's presence id.
       
   227          */
       
   228         IMPORT_C void DeleteAttributeListFromUserL(
       
   229             const TDesC& aPresenceID );
       
   230 
       
   231 
       
   232 
       
   233 
       
   234         //-----------------------------------------------------------------------
       
   235     private: /* Data */
       
   236 
       
   237 
       
   238         //OWN: Implementation
       
   239         CPEngAttributeListStore2Imp*     iImp;
       
   240 
       
   241     };
       
   242 
       
   243 
       
   244 
       
   245 #endif      //  __CPENGATTRIBUTELISTSTORE2_H__
       
   246 
       
   247 
       
   248 // End of file
       
   249 
       
   250