emailcontacts/contactactionservice/inc/mfsccontactset.h
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Declaration of interface MFscContactSet.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_FSCCONTACTSET_H
       
    20 #define M_FSCCONTACTSET_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <cntdef.h>
       
    24 
       
    25 //<cmail>
       
    26 #include "fsccontactactionservicedefines.h"
       
    27 //</cmail>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class MFscContactSetObserver;
       
    31 class MVPbkContactLink;
       
    32 
       
    33 /**
       
    34  *  Contact set.
       
    35  *  Defines an interface for contact set.
       
    36  *
       
    37  *  @since S60 3.1
       
    38  */
       
    39 class MFscContactSet
       
    40     {
       
    41     
       
    42 public: //Contact related methods
       
    43     
       
    44     /**
       
    45      * Contact count.
       
    46      *
       
    47      * @return contact count.
       
    48      */
       
    49     virtual TInt ContactCount() const = 0;
       
    50     
       
    51     /**
       
    52      * Checks if iterator has more contacts.
       
    53      *
       
    54      * @return ETrue if the iterator has more contacts.
       
    55      */
       
    56     virtual TBool HasNextContact() const = 0;
       
    57     
       
    58     /**
       
    59      * Sets the iterator to point to the first contact in the list.
       
    60      */
       
    61     virtual void SetToFirstContact() = 0;
       
    62     
       
    63     /**
       
    64      * Asynchronous operation for retrieving store contact for contact. 
       
    65      *
       
    66      * @param aObserver operation observer. 
       
    67      */
       
    68     virtual void NextContactL( MFscContactSetObserver* aObserver ) = 0;
       
    69     
       
    70     /**
       
    71      * Returns link for contact.
       
    72      */
       
    73     virtual MVPbkContactLink* NextContactLinkL() = 0;
       
    74     
       
    75     /**
       
    76      * Used for canceling asynchronous NextContactL operation.
       
    77      */
       
    78     virtual void CancelNextContactL() = 0;
       
    79 
       
    80     
       
    81 public: // Contact group related methods
       
    82     
       
    83     /**
       
    84      * Group count.
       
    85      *
       
    86      * @return group count.
       
    87      */
       
    88     virtual TInt GroupCount() const = 0;
       
    89     
       
    90     /**
       
    91      * Checks if iterator has more groups.
       
    92      *
       
    93      * @return ETrue if the iterator has more groups. 
       
    94      */
       
    95     virtual TBool HasNextGroup() const = 0;
       
    96     
       
    97     /**
       
    98      * Sets the iterator to point to the first group in the list.
       
    99      */
       
   100     virtual void SetToFirstGroup() = 0;
       
   101     
       
   102     /**
       
   103      * Asynchronous operation for retrieving store contact for group.
       
   104      * 
       
   105      * @param aObserver operation observer.
       
   106      */
       
   107     virtual void NextGroupL( MFscContactSetObserver* aObserver ) = 0;
       
   108     
       
   109     /**
       
   110      * Returns link for group.
       
   111      */
       
   112     virtual MVPbkContactLink* NextGroupLinkL() = 0;
       
   113     
       
   114     /**
       
   115      * Used for canceling asynchronous NextGroupL operation.
       
   116      */
       
   117     virtual void CancelNextGroupL() = 0;
       
   118     
       
   119     /**
       
   120      * Contact count of group.
       
   121      *
       
   122      * @param aStoreContact Group
       
   123      * @return group item count
       
   124      */
       
   125     virtual TInt GroupContactCountL( MVPbkStoreContact& aStoreContact ) = 0;
       
   126     
       
   127     /**
       
   128      * Asynchronous operation for retrieving contact from group.
       
   129      *
       
   130      * @param aStoreContact group
       
   131      * @param aIndex contsct index
       
   132      * @param aObserver operation observer
       
   133      */
       
   134     virtual void GetGroupContactL( MVPbkStoreContact& aStoreContact, 
       
   135             TInt aIndex, MFscContactSetObserver* aObserver ) = 0;
       
   136     
       
   137 public:
       
   138     
       
   139     /**
       
   140      * Destructor.
       
   141      */
       
   142     virtual ~MFscContactSet() {}
       
   143     
       
   144     };
       
   145 
       
   146 #endif // M_FSCCONTACTSET_H