presadap12/impsplugin/inc/pimpsadapxmltools.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Various tools for XML
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __NIMPSADAPXMLTOOLS_H__
       
    19 #define __NIMPSADAPXMLTOOLS_H__
       
    20 
       
    21 //  INCLUDES
       
    22 #include <e32base.h>
       
    23 #include "PEngXMLTags.h"
       
    24 #include "impsplugintags.h"
       
    25 #include "PImpsAdapWVCspVersion.h"
       
    26 
       
    27 
       
    28 
       
    29 // FORWARD DECLARATION
       
    30 
       
    31 class MPEngXMLSerializer;
       
    32 class MPEngXMLParser;
       
    33 
       
    34 
       
    35 // NAMESPACE DEFINITION
       
    36 
       
    37 /**
       
    38  * Namespace encapsulating a collection of
       
    39  * List Library utility functions.
       
    40  */
       
    41 namespace NImpsAdapXMLTools
       
    42     {
       
    43     /**
       
    44      * Leave if there is error except, KErrAlreadyExists.
       
    45      *
       
    46      * @since 3.0
       
    47      * @param aError The errorcode which to handle
       
    48      */
       
    49     void LeaveIfMajorErrorL( TInt aError );
       
    50 
       
    51 #if 0
       
    52     /**
       
    53      * Parses contacts in the nick list response.
       
    54      *
       
    55      * @since 3.0
       
    56      * @param aResponse buffer with response to parse
       
    57      * @param aParsedContacts array to store parsed contacts
       
    58      * @param aContactList contact list model to look for contacts
       
    59      * @param aXMLparser1 XML parser1
       
    60      * @param aXMLparser2 XML parser2
       
    61      * @param aUpdateNickname
       
    62      * @param aNewContactCount count is goint to be increased for each new contact
       
    63      */
       
    64 
       
    65     TBool ParseContactListNickListL(
       
    66         const TDesC8& aResponse,
       
    67         RPointerArray<CPEngContactListModItemContainer>& aParsedContacts,
       
    68         CPEngContactListModBase& aContactList,
       
    69         MPEngXMLParser& aXMLparser1,
       
    70         MPEngXMLParser& aXMLparser2,
       
    71         TBool aUpdateNickname,
       
    72         TInt* aNewContactCount = NULL );
       
    73 
       
    74 
       
    75 
       
    76     /**
       
    77      * Parses plain contact IDs from the list response.
       
    78      *
       
    79      * @since 3.0
       
    80      * @param aResponse buffer with response to parse
       
    81      * @param aParsedContacts array to store parsed contacts
       
    82      * @param aContactList contact list model to look for contacts
       
    83      * @param aXMLparser1 XML parser1
       
    84      * @param aXMLparser2 XML parser2
       
    85      * @param aUpdateNickname
       
    86      * @param aNewContactCount count is goint to be increased for each new contact
       
    87      */
       
    88     /*
       
    89     TBool ParseContactListIDsL(
       
    90                        const TDesC8& aResponse,
       
    91                        RPointerArray<CPEngContactListModItemContainer>& aParsedContacts,
       
    92                        CPEngContactListModBase& aContactList,
       
    93                        MPEngXMLParser& aXMLparser1,
       
    94                        TBool aUpdateNickname,
       
    95                        TInt* aNewContactCount = NULL );
       
    96 
       
    97 
       
    98     */
       
    99     /**
       
   100      * Parse Contact list properties
       
   101      *
       
   102      * @since 3.0
       
   103      * @param aResponse buffer with response to parse
       
   104      * @param aSettings contact list settings, to store parsed data
       
   105      * @param aXMLparser1 XML parser1
       
   106      * @param aXMLparser2 XML parser2
       
   107      */
       
   108     /*
       
   109     TBool ParseContactListPropertiesL(
       
   110                        const TDesC8& aResponse,
       
   111                        CPEngContactListSettings& aSettings,
       
   112                        MPEngXMLParser& aXMLparser1,
       
   113                        MPEngXMLParser& aXMLparser2 );
       
   114 
       
   115     */
       
   116     /**
       
   117      * Remove bad contact from the contact list(local, network view)
       
   118      *
       
   119      * @since 3.0
       
   120      * @param aTransactionStatus transaction status with the bad contact ids
       
   121      * @param aContactList contact list
       
   122      */
       
   123     /*
       
   124     void RemoveBadContactsL(
       
   125                        const CPEngTransactionStatus& aTransactionStatus,
       
   126                        CPEngContactListModBase& aContactList );
       
   127 
       
   128     */
       
   129     /**
       
   130      * Remove bad contact Ids from the local view, so they will be removed
       
   131      * from the server at next transaction.
       
   132      *
       
   133      * @since 3.0
       
   134      * @param aTransactionStatus transaction status with the bad contact ids
       
   135      * @param aContactList contact list
       
   136      */
       
   137     /*
       
   138     void MarkForRemoveBadContactsL(
       
   139                        const CPEngTransactionStatus& aTransactionStatus,
       
   140                        CPEngContactListModBase& aContactList );
       
   141 
       
   142     */
       
   143 
       
   144 #endif
       
   145 
       
   146     /**
       
   147     * Append transaction content to the start of the buffer
       
   148     * @since 3.0
       
   149     * @param aXMLSerializer XML serializer
       
   150     * @param aCSPVersion CPS Version
       
   151     */
       
   152     void AppendTransactionContentTagXmlL(
       
   153         MPEngXMLSerializer& aXMLSerializer,
       
   154         TImpsAdapWVCspVersion aCSPVersion );
       
   155 
       
   156     void AppendUserIdXmlL( MPEngXMLSerializer& aXmlSerializer,
       
   157                            const TDesC16& aUserId );
       
   158 
       
   159     /**
       
   160      * Append Contact list "ReceiveList" tag for the
       
   161      * "ListManage-Request" request, if it is supported
       
   162      *
       
   163      * @since 3.0
       
   164      * @param aXMLSerializer XML serializer
       
   165      * @param aCSPVersion version of the CSP
       
   166      * @param aValue value of the ReceiveList tag
       
   167      */
       
   168     void ApppendReceiveListTagL( MPEngXMLSerializer& aXmlSerializer,
       
   169                                  TImpsAdapWVCspVersion& aCSPVersion,
       
   170                                  TBool aValue );
       
   171 
       
   172     void AppendContactListNameXmlL( MPEngXMLSerializer& aXmlSerializer,
       
   173                                     const TDesC16& aContactListName );
       
   174 
       
   175 #if 0
       
   176 
       
   177 
       
   178     /**
       
   179      * Append Presence Attributes for subscription to the XML buffer
       
   180      *
       
   181      * @since 3.0
       
   182      * @param aAttributes
       
   183      * @param aXMLSerializer XML serializer
       
   184      * @param aSessionSlotId Session slot Id
       
   185      * @param aCSPVersion CSP Version
       
   186      */
       
   187     //void AppendAttributesForSubscriptionXmlL(
       
   188     //                    const RArray<TUint32> aAttributes,
       
   189     //                    MPEngXMLSerializer& aXmlSerializer,
       
   190     //                    const CPEngSessionSlotId& aSessionSlotId,
       
   191     //                    TPEngWVCspVersion& aCSPVersion );
       
   192 
       
   193 
       
   194 
       
   195     /**
       
   196      * Append Contact list properties into the XML buffer
       
   197      *
       
   198      * @since 3.0
       
   199      * @param aXMLSerializer XML serializer
       
   200      * @param aSettings contact list settings
       
   201      */
       
   202     /*
       
   203     void AppendContactListPropertiesXmlL(
       
   204                        MPEngXMLSerializer& aXmlSerializer,
       
   205                        const CPEngContactListSettings& aSettings );
       
   206     */
       
   207 
       
   208 
       
   209 
       
   210 #endif
       
   211 
       
   212     }
       
   213 
       
   214 
       
   215 
       
   216 
       
   217 #endif // __NIMPSADAPXMLTOOLS_H__
       
   218 
       
   219 
       
   220 //  End of File
       
   221