inc/CPEngAttributeListTransaction2.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:  Presence attribute list transactions.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CPENGATTRIBUTELISTTRANSACTION2_H
       
    19 #define __CPENGATTRIBUTELISTTRANSACTION2_H
       
    20 
       
    21 
       
    22 //  INCLUDES
       
    23 #include <E32Base.h>
       
    24 
       
    25 
       
    26 //FORWARD DECLARATIONS
       
    27 class CPEngAttributeListTransaction2Imp;
       
    28 class CPEngNWSessionSlotID2;
       
    29 class MPEngAttributeListTransactionObserver2;
       
    30 
       
    31 
       
    32 
       
    33 
       
    34 /**
       
    35  * Transaction API for presence attribute lists.
       
    36  *
       
    37  * With this API clients can publish attribute
       
    38  * lists to network.
       
    39  *
       
    40  * Attribute list publish is asynchronous network operation,
       
    41  * and its end results are signalled to given operation observer.
       
    42  *
       
    43  @lib PEngManager2.lib
       
    44  * @since 3.0
       
    45  */
       
    46 class CPEngAttributeListTransaction2 : public CBase
       
    47     {
       
    48 
       
    49         //-----------------------------------------------------------------------
       
    50     public: /* Construction */
       
    51 
       
    52         /**
       
    53          * Instantiates CPEngAttributeListTransaction2 object.
       
    54          *
       
    55          * Instantiates CPEngAttributeListTransaction2 object and connects
       
    56          * it to identified Presence Engine NWSessionSlot. NWSessionSlot
       
    57          * must be a valid, existing slot.
       
    58          *
       
    59          * Errors:
       
    60          *  - Requested NWSessionSlot not found: KErrNotFound
       
    61          *  - Given NWSessionSlotID malformed: KErrArgument
       
    62          *
       
    63          * @param aNWSessionSlotID The session slot ID to identify the
       
    64          * session slot.
       
    65          * @param aPriority The priority for CPEngAttributeListTransaction2
       
    66          * client side active objects. These active objects are used when
       
    67          * asynchronously delivering events to observers.
       
    68          *
       
    69          * @return New CPEngAttributeListTransaction2 instance.
       
    70          */
       
    71         IMPORT_C static CPEngAttributeListTransaction2* NewL(
       
    72             const CPEngNWSessionSlotID2& aNWSessionSlotID,
       
    73             TInt aPriority = CActive::EPriorityStandard );
       
    74 
       
    75         IMPORT_C static CPEngAttributeListTransaction2* NewLC(
       
    76             const CPEngNWSessionSlotID2& aNWSessionSlotID,
       
    77             TInt aPriority = CActive::EPriorityStandard );
       
    78 
       
    79 
       
    80         /**
       
    81          * Destructor.
       
    82          * Virtual by CBase.
       
    83          */
       
    84         ~CPEngAttributeListTransaction2();
       
    85 
       
    86 
       
    87 
       
    88     private:
       
    89         CPEngAttributeListTransaction2();
       
    90 
       
    91 
       
    92 
       
    93 
       
    94 
       
    95         //-----------------------------------------------------------------------
       
    96     public: /* Attribute list publish */
       
    97 
       
    98 
       
    99         /**
       
   100          * Tests is the publish already active.
       
   101          *
       
   102          * @since 3.0
       
   103          * @return ETrue if operation is active. Else EFalse.
       
   104          */
       
   105         IMPORT_C TBool IsPublishAttributeListsActive() const;
       
   106 
       
   107 
       
   108 
       
   109         /**
       
   110          * Publishes the attribute lists to the network server.
       
   111          *
       
   112          * There can be just one active publish operation at a time
       
   113          * per one CPEngAttributeListTransaction2 instance.
       
   114          *
       
   115          * @since 3.0
       
   116          * @param aObserver The observer to notify from attribute list
       
   117          * publish events.
       
   118          *
       
   119          * @return Result from initiating attribute list publish:
       
   120          *  - KErrNone if attribute list publish succesfully initiated.
       
   121          *  - KErrInUse if attribute publish already on going from object.
       
   122          *  - Else one of system wide error codes.
       
   123          */
       
   124         IMPORT_C TInt PublishAttributeLists(
       
   125             MPEngAttributeListTransactionObserver2& aObserver );
       
   126 
       
   127 
       
   128 
       
   129         /**
       
   130          * Cancels the attribute list publish.
       
   131          *
       
   132          * @since 3.0
       
   133          */
       
   134         IMPORT_C void CancelPublishAttributeLists();
       
   135 
       
   136 
       
   137 
       
   138 
       
   139         //-----------------------------------------------------------------------
       
   140     private: /* Data */
       
   141 
       
   142 
       
   143         //OWN: Implementation
       
   144         CPEngAttributeListTransaction2Imp*     iImp;
       
   145 
       
   146 
       
   147     };
       
   148 
       
   149 #endif //__CPENGATTRIBUTELISTTRANSACTION2_H
       
   150 
       
   151 
       
   152 
       
   153 //End of file
       
   154 
       
   155