phonebookui/Phonebook2/inc/cpbkxrclprotocolenvimpl.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 //
       
     2 /*
       
     3 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     4 * All rights reserved.
       
     5 * This component and the accompanying materials are made available
       
     6 * under the terms of "Eclipse Public License v1.0"
       
     7 * which accompanies this distribution, and is available
       
     8 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9 *
       
    10 * Initial Contributors:
       
    11 * Nokia Corporation - initial contribution.
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description:  Definition of the class CPbkxRclProtocolEnvImpl.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPBKXRCLPROTOCOLENVIMPL_H
       
    21 #define CPBKXRCLPROTOCOLENVIMPL_H
       
    22 
       
    23 #include <mpbkxremotecontactlookupprotocolenv.h>
       
    24 
       
    25 const TInt KPbkxRclCrUid = 0x2001F3FE;
       
    26 const TInt KPbkxRclProtocolUidKey = 1;
       
    27 const TInt KPbkxRclAccountUidKey = 2;
       
    28 const TInt KPbkxRemoteContactLookupAdapterIfUid = 0x2001FE1F;
       
    29 
       
    30 /**
       
    31 * Factory class for creating data objects.
       
    32 *
       
    33 * @lib pbkxengine.lib
       
    34 * @since S60 3.1
       
    35 */
       
    36 class CPbkxRclProtocolEnvImpl : 
       
    37     public CBase,
       
    38     public MPbkxRemoteContactLookupProtocolEnv
       
    39     {
       
    40 public: // constructors and destructor
       
    41 
       
    42     /**
       
    43     * Two-phased constructor.
       
    44     *
       
    45     * @return Created object.
       
    46     */
       
    47     IMPORT_C static CPbkxRclProtocolEnvImpl* NewL();
       
    48     
       
    49     /**
       
    50     * Two-phased constructor.
       
    51     *
       
    52     * Leaves pointer to the created object on cleanupstack.
       
    53     *
       
    54     * @return Created object.
       
    55     */
       
    56     IMPORT_C static CPbkxRclProtocolEnvImpl* NewLC();
       
    57 
       
    58     /**
       
    59     * Destructor.
       
    60     */
       
    61     virtual ~CPbkxRclProtocolEnvImpl();
       
    62 
       
    63 public: // functions from MPbkxRemoteContactLookupProtocolEnv
       
    64 
       
    65     /**
       
    66     * Creates a new protocol account instance.
       
    67     *
       
    68     * Ownership is transferred to caller.
       
    69     *
       
    70     * @param aId protocol account ID
       
    71     * @param aName protocol account name
       
    72     * @return Created account.
       
    73     */
       
    74     virtual CPbkxRemoteContactLookupProtocolAccount* NewProtocolAccountL( 
       
    75         TPbkxRemoteContactLookupProtocolAccountId aId, 
       
    76         const TDesC& aName );
       
    77         
       
    78     /**
       
    79     * Creates a new protocol result instance.
       
    80     *
       
    81     * Ownership is transferred to caller.
       
    82     *
       
    83     * @param aIsComplete is search result complete?
       
    84     * @param aContactItem contact item, owernship is transfered to this object
       
    85     * @param aExtraProtocolData extra protocol data for two-phase search
       
    86     * @return Created protocol result.
       
    87     */
       
    88     virtual CPbkxRemoteContactLookupProtocolResult* NewProtocolResultL(
       
    89         TBool aIsComplete, 
       
    90         CContactItem& aContactItem, 
       
    91         const TDesC& aExtraProtocolData );
       
    92 
       
    93 private: // constructors
       
    94 
       
    95     /**
       
    96     * Constructor.
       
    97     */
       
    98     CPbkxRclProtocolEnvImpl();
       
    99 
       
   100     /**
       
   101     * Second-phase constructor.
       
   102     */
       
   103     void ConstructL();
       
   104 
       
   105     };
       
   106 
       
   107 #endif