imservices/ossprotocoladaptation/inc/cosscontactmanager.h
changeset 46 860cd8a5168c
parent 35 085f765766a0
equal deleted inserted replaced
35:085f765766a0 46:860cd8a5168c
     1 /*
       
     2 * Copyright (c) 2007-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:  contact manager
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __COSSCONTACTMANAGER_H__
       
    19 #define __COSSCONTACTMANAGER_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 
       
    24 class MOSSProtocolConnectionManager;
       
    25 /**
       
    26  * COSSContactManager
       
    27  *
       
    28  */
       
    29 NONSHARABLE_CLASS ( COSSContactManager ) : public CBase       
       
    30     {
       
    31 
       
    32     public:
       
    33 
       
    34         static COSSContactManager* NewL(MOSSProtocolConnectionManager& aConnMan);
       
    35         ~COSSContactManager();
       
    36 
       
    37 
       
    38     private:
       
    39 
       
    40         COSSContactManager(MOSSProtocolConnectionManager& aConnMan);
       
    41         void ConstructL();
       
    42         
       
    43     public:
       
    44         /**
       
    45          *  get iFetchContactsFirstTime         
       
    46          */
       
    47         TBool IsFetchContactsFirstTime();
       
    48         /**
       
    49          *  iFetchInvitationsFirstTime         
       
    50          */
       
    51         TBool IsFetchInvitationsForFirstTime();
       
    52         /**
       
    53          *  Set iFetchContactsFirstTime 
       
    54          *  @param value to be set
       
    55          */
       
    56         void SetFetchContactsFirstTime(TBool aValue);
       
    57         /**
       
    58          *  Set iFetchInvitationsFirstTime
       
    59          *  @param value to be set
       
    60          */
       
    61         void SetFetchInvitationsForFirstTime(TBool aValue);
       
    62         /**
       
    63          *  Get reference to iContacts 
       
    64          *  @param iContacts
       
    65          */
       
    66         RPointerArray<HBufC>& GetContactsListL();
       
    67 
       
    68         /**
       
    69          *  Get reference to iInvitationList 
       
    70          *  @param return iInvitationList
       
    71          */
       
    72         RPointerArray<HBufC>& GetInvitationListL();
       
    73         /**
       
    74          *  give list of invitations to ximp fw and client side ui
       
    75          *  
       
    76          */
       
    77         void ReturnInvitationListL();
       
    78         /**
       
    79          *  give list of current member and remote pending contacts to ximp fw and client side ui
       
    80          *  
       
    81          */
       
    82         void ReturnContactsListL();
       
    83         /**
       
    84          *  remove a contact from the local copy of iContacts 
       
    85          *  @param aContactName to be removed
       
    86          */
       
    87         void RemoveContactFromLocalL(const TDesC& aContactName);
       
    88         /**
       
    89          *  add a contact to the local copy of iContacts 
       
    90          *  @param aContactName to be added
       
    91          */
       
    92         void AddContactToLocalL(const TDesC& aContactName);        
       
    93         /**
       
    94          *  remove a invitation from the local copy of iInvitationList 
       
    95          *  @param aContactName to be removed from the invitation list
       
    96          */
       
    97         void RemoveInvitationFromLocalL(const TDesC& aContactName);
       
    98         
       
    99     private:
       
   100         
       
   101         /**
       
   102          * Oss Protocol Plugin Contact Manager
       
   103          * Not own.  *** Write "Not own" if some other class owns this object.
       
   104          */
       
   105         MOSSProtocolConnectionManager& iConnMan;
       
   106         
       
   107         /**
       
   108          * stores if fetching contacts for the first time value
       
   109          * Own
       
   110          */
       
   111         TBool iFetchContactsFirstTime ;
       
   112         /**
       
   113          * stores if fetching invitations for the first time value
       
   114          * Own
       
   115          */
       
   116         TBool iFetchInvitationsFirstTime ;
       
   117         /**
       
   118          * current contacts. to maintain local copy of current contacts
       
   119          * own
       
   120          */
       
   121         RPointerArray<HBufC>   iContacts;
       
   122 
       
   123         /**
       
   124          * local copy of pending contacts or invitations
       
   125          * own
       
   126          */
       
   127         RPointerArray<HBufC>  iInvitationList;        
       
   128         
       
   129     };
       
   130 
       
   131 #endif // __COSSCONTACTMANAGER_H__
       
   132 
       
   133 // End of File
       
   134 
       
   135