wvuing/wvuiprocess/Inc/CCAArrayItemPC.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:  CCAContactItemPC, CCAContactListItemPC, CCAOwnDataItemPC,
       
    15 *				 CCAConversationItemPC, CCAInviteItemPC
       
    16 *                are the different types of array items stored in the MCAMainViewArrayPC
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef CCAARRAYITEMPC_H
       
    23 #define CCAARRAYITEMPC_H
       
    24 #include <e32base.h>
       
    25 
       
    26 #include "MCAMainViewArrayPC.h"
       
    27 #include "ChatDefinitions.h"
       
    28 
       
    29 /**
       
    30 * Base class for CCAContactItemPC, CCAContactListItemPC, CCAOwnDataItemPC
       
    31 * to be stored into an array of <CCAArrayItemPC> on the process component side.
       
    32 * The UI components will query for each item in this heterogeneous array to display
       
    33 * information like contactlist, contact, conversation, groups etc in the listbox of
       
    34 * the main view class
       
    35 */
       
    36 class MCAArrayItemPC
       
    37     {
       
    38 
       
    39     public:
       
    40 
       
    41         /**
       
    42         * Returns the default type of the listbox item
       
    43         * @return TEnumsPC::TItem: type of the listbox item as either EContactitem, EContactListItem etc
       
    44         */
       
    45         virtual TEnumsPC::TItem Type() = 0;
       
    46 
       
    47         /**
       
    48         * Returns the name of the listbox item
       
    49         * @return TPtrC: name of the listbox item to be displayed
       
    50         */
       
    51         virtual TPtrC GetItemNameText() = 0 ;
       
    52 
       
    53         /**
       
    54         * Sets the name of the listbox item
       
    55         * @param aName: Name of the listbox item to be set
       
    56         * @return void
       
    57         */
       
    58         virtual void SetItemNameText( const TDesC& aName ) = 0;
       
    59 
       
    60         /**
       
    61         * Returns the array index of the listbox item on engine/storage side
       
    62         * @return TInt: index of the listbox item on engine/storage side
       
    63         */
       
    64         virtual TInt GetItemEngineIndex() = 0;
       
    65 
       
    66         /**
       
    67         * Sets the on engine/storage side index of the listbox item
       
    68         * @param aIndex: index of the listbox item on engine/storage side
       
    69         * @return void
       
    70         */
       
    71         virtual void SetItemEngineIndex( TInt aIndex ) = 0;
       
    72 
       
    73         virtual ~MCAArrayItemPC() {};
       
    74 
       
    75     };
       
    76 
       
    77 /**
       
    78 * CCAContactItemPC is a structure that will encapsualte information on a contact
       
    79 * item in the single array on the process component side.
       
    80 */
       
    81 class CCAContactItemPC : public MCAArrayItemPC, public CBase
       
    82     {
       
    83 
       
    84     public: // symbain constructor , destructor
       
    85 
       
    86         /*
       
    87         * Returns the ContactitemPC instance
       
    88         */
       
    89         static CCAContactItemPC* NewL();
       
    90         /*
       
    91         * symbain way of construction
       
    92         */
       
    93         void ConstructL();
       
    94 
       
    95         /*
       
    96         * destructor
       
    97         */
       
    98         virtual ~CCAContactItemPC();
       
    99 
       
   100     private:
       
   101 
       
   102         /*
       
   103         * C++ default constructor
       
   104         */
       
   105         CCAContactItemPC();
       
   106 
       
   107     public:
       
   108 
       
   109         /**
       
   110         * Returns the blocked status of the contact item
       
   111         * @return bool: true if the contact item is blocked else false
       
   112         */
       
   113         TBool IsBlocked();
       
   114 
       
   115         /**
       
   116         * Returns the pending messages status of the contact item
       
   117         * @return bool: true if the contact item has pending messages
       
   118         * else return false
       
   119         */
       
   120         TBool IsMsgPending();
       
   121 
       
   122         /**
       
   123         * Sets the blocked status of the contact item
       
   124         * @param aBlockedStatus: true if the contact is blocked else false
       
   125         */
       
   126         void SetBlockedStatus( TBool aBlockedStatus );
       
   127 
       
   128         /**
       
   129         * Sets the messages pending status of the contact item
       
   130         * @param aPendingMessageStatus: true if the contact has pending messages
       
   131         * else false
       
   132         */
       
   133         void SetMsgPending( TBool aPendingMessageStatus );
       
   134 
       
   135         /**
       
   136         * Returns the online status of the contact item
       
   137         * @return TEnumsPC::TOnlineStatus: online status of the contact item
       
   138         * to be displayed as either Online, Away,  Busy etc
       
   139         */
       
   140         TEnumsPC::TOnlineStatus GetOnlineStatus();
       
   141 
       
   142         /**
       
   143         * Sets the online status of the contact item
       
   144         * @parama OnlineStatus: online status of the contact item to
       
   145         * be set as Online, Away,  Busy etc
       
   146         */
       
   147         void SetOnlineStatus( TEnumsPC::TOnlineStatus aOnlineStatus );
       
   148 
       
   149 
       
   150     public: //From MCAArrayItemPC
       
   151 
       
   152         /**
       
   153         * Returns the name of the contact item
       
   154         * @return TPtrC: name of the contact item to be displayed
       
   155         */
       
   156         TPtrC GetItemNameText();
       
   157 
       
   158         /**
       
   159         * Sets the name of the contact item
       
   160         * @param aName: Name of the contact item to be set
       
   161         * @return void
       
   162         */
       
   163         void SetItemNameText( const TDesC& );
       
   164 
       
   165         /**
       
   166         * Returns the default type of the contact item
       
   167         * @return TEnumsPC::TItem: type of the contact item as either
       
   168         * EContactitem, EContactListItem etc
       
   169         */
       
   170         TEnumsPC::TItem Type();
       
   171 
       
   172 
       
   173         /**
       
   174         * Get the index of the contact item from engine side model
       
   175         * @return TInt: index
       
   176         */
       
   177         inline TInt GetItemEngineIndex()
       
   178             {
       
   179             return iEngineIndex;
       
   180             }
       
   181 
       
   182         /**
       
   183         * Set the index of the contact item from engine side model
       
   184         * @param TInt: aIndex
       
   185         */
       
   186         inline void SetItemEngineIndex( TInt aIndex )
       
   187             {
       
   188             iEngineIndex  = aIndex;
       
   189             }
       
   190 
       
   191     private:
       
   192 
       
   193         /*
       
   194         * Online status of contact
       
   195         */
       
   196         TEnumsPC::TOnlineStatus iOnlineStatus;
       
   197 
       
   198         /*
       
   199         * Blocked status of contact
       
   200         */
       
   201         TBool iBlockedStatus;
       
   202 
       
   203         /*
       
   204         * Pending messages status of contact
       
   205         */
       
   206         TBool iUnreadmsgFlag;
       
   207 
       
   208         /*
       
   209         * Index of the item in mainviewitemarray
       
   210         */
       
   211         int		  	iMainViewArrayIndex;
       
   212 
       
   213         /*
       
   214            * Index of the item in engines model class
       
   215            */
       
   216         TInt	  	iEngineIndex;
       
   217 
       
   218         /**
       
   219         * The name of the listbox item
       
   220         */
       
   221         HBufC* iItemNameTextContact;
       
   222 
       
   223     };
       
   224 
       
   225 /**
       
   226 * CCAOpenChatsListItemPC is a structure that will encapsualte information on a contact
       
   227 * list in the single array on the process component side.
       
   228 */
       
   229 class CCAOpenChatsListItemPC : public MCAArrayItemPC, public CBase
       
   230     {
       
   231 
       
   232     public:
       
   233         // symbain way of construction
       
   234 
       
   235         static CCAOpenChatsListItemPC* NewL();
       
   236         void ConstructL();
       
   237         virtual ~CCAOpenChatsListItemPC();
       
   238 
       
   239     private:
       
   240 
       
   241         /*
       
   242         * C++ default constructor
       
   243         */
       
   244         CCAOpenChatsListItemPC();
       
   245     public:
       
   246 
       
   247         /**
       
   248         * Returns the expanded or collapsed state information of the contact list
       
   249         * @return bool: true if the contact list is collapsed else return false
       
   250         */
       
   251         TBool IsCollapsed();
       
   252 
       
   253         /**
       
   254         * Sets the collapsed/expanded state of the contact list
       
   255         * @param aCollapsed: true if the contact list item is collapsed else false
       
   256         */
       
   257         void SetCollapsed( TBool aCollapsed );
       
   258 
       
   259 
       
   260     public: //From CCAArrayItemPC
       
   261 
       
   262         /**
       
   263         * Returns the name of the contact list item
       
   264         * @return TPtrC: name of the contact item to be displayed
       
   265         */
       
   266         TPtrC GetItemNameText();
       
   267 
       
   268         /**
       
   269         * Sets the name of the contact list item
       
   270         * @param aName: Name of the contact list item to be set
       
   271         * @return void
       
   272         */
       
   273         void SetItemNameText( const TDesC& );
       
   274 
       
   275         /**
       
   276         * Returns the default type of the contact list item
       
   277         * @return TEnumsPC::TItem: type of the contact list item as either
       
   278         * EContactitem, EContactListItem etc
       
   279         */
       
   280         TEnumsPC::TItem Type();
       
   281 
       
   282         /**
       
   283         * Get the index of the contact item from engine side model
       
   284         * @return TInt: index
       
   285         */
       
   286         inline TInt GetItemEngineIndex()
       
   287             {
       
   288             return iEngineIndex;
       
   289             }
       
   290 
       
   291         /**
       
   292         * Set the index of the contact item from engine side model
       
   293         * @param TInt: aIndex
       
   294         */
       
   295         inline void SetItemEngineIndex( TInt aIndex )
       
   296             {
       
   297             iEngineIndex  = aIndex;
       
   298             }
       
   299 
       
   300     private:
       
   301 
       
   302         /*
       
   303          * collapsed/expanded status of the contact list
       
   304         */
       
   305         TBool iCollapsedStatus;
       
   306 
       
   307         /*
       
   308          * Total no. of contacts in the contact list
       
   309         */
       
   310         TInt  iTotalContacts;
       
   311 
       
   312         /*
       
   313          * Total no. of contacts that are online in the contact list
       
   314         */
       
   315         TInt  iOnlineContacts;
       
   316 
       
   317         /*
       
   318          * name of the contact list followed by
       
   319          * the (No. of Online Contacts/ Total contacts) in that contact list
       
   320         */
       
   321         HBufC* iText;
       
   322 
       
   323         /*
       
   324            * Index of the item in mainviewitemarray
       
   325            */
       
   326         int	iMainViewArrayIndex;
       
   327 
       
   328         /*
       
   329            * Index of the item in engines model class
       
   330            */
       
   331         int	iEngineIndex;
       
   332 
       
   333 
       
   334 
       
   335         /**
       
   336         * The name of the listbox item
       
   337         */
       
   338         HBufC* iItemNameTextChat;
       
   339 
       
   340     };
       
   341 
       
   342 
       
   343 /**
       
   344 * CCAConversationItemPC is a structure that will encapsualte information on a contact
       
   345 * item in the single array on the process component side.
       
   346 */
       
   347 class CCAConversationItemPC : public MCAArrayItemPC, public CBase
       
   348     {
       
   349 
       
   350     public:
       
   351         // symbain way of construction
       
   352 
       
   353         static CCAConversationItemPC* NewL( const TDesC& aUserId );
       
   354         void ConstructL( const TDesC& aUserId );
       
   355         virtual ~CCAConversationItemPC();
       
   356     private:
       
   357 
       
   358         /*
       
   359         * C++ default constructor
       
   360         */
       
   361         CCAConversationItemPC(  );
       
   362 
       
   363     public:
       
   364 
       
   365         /**
       
   366         * Returns the pending messages status of the contact item
       
   367         * @return bool: true if the contact item has pending messages
       
   368         * else return false
       
   369         */
       
   370         TBool IsMsgPending();
       
   371 
       
   372         /**
       
   373         * Sets the messages pending status of the contact item
       
   374         * @param aPendingMessageStatus: true if the contact has pending messages
       
   375         * else false
       
   376         */
       
   377         void SetMsgPending( TBool aPendingMessageStatus );
       
   378 
       
   379     public: //From CCAArrayItemPC
       
   380 
       
   381         /**
       
   382         * Returns the name of the contact item
       
   383         * @return TPtrC: name of the contact item to be displayed
       
   384         */
       
   385         TPtrC GetItemNameText();
       
   386 
       
   387         /**
       
   388         * Sets the name of the contact item
       
   389         * @param aName: Name of the contact item to be set
       
   390         * @return void
       
   391         */
       
   392         void SetItemNameText( const TDesC& );
       
   393 
       
   394 
       
   395         /**
       
   396         * Returns the default type of the contact item
       
   397         * @return TEnumsPC::TItem: type of the contact item as either
       
   398         * EContactitem, EContactListItem etc
       
   399         */
       
   400         TEnumsPC::TItem Type();
       
   401 
       
   402         /**
       
   403         * Get the index of the contact item from engine side model
       
   404         * @return TInt: index
       
   405         */
       
   406         inline TInt GetItemEngineIndex()
       
   407             {
       
   408             return iEngineIndex;
       
   409             }
       
   410 
       
   411         /**
       
   412         * Set the index of the contact item from engine side model
       
   413         * @param TInt: aIndex
       
   414         */
       
   415         inline void SetItemEngineIndex( TInt aIndex )
       
   416             {
       
   417             iEngineIndex  = aIndex;
       
   418             }
       
   419 
       
   420     public:
       
   421 
       
   422 
       
   423         /**
       
   424         * Returns the UserId of the conversation item
       
   425         * @return TPtrC: UserId to be displayed
       
   426         */
       
   427         const TDesC& UserId() const;
       
   428 
       
   429         /**
       
   430         * Returns the identification of the conversation item
       
   431         * @return TPtrC: identification to be displayed
       
   432         */
       
   433         const TDesC& Identification() const;
       
   434 
       
   435     private:
       
   436 
       
   437         /*
       
   438         * Pending messages status of contact
       
   439         */
       
   440         TBool iUnreadmsgFlag;
       
   441 
       
   442         /*
       
   443          * Index of the item in mainviewitemarray
       
   444          */
       
   445         int	iMainViewArrayIndex;
       
   446 
       
   447         /*
       
   448            * Index of the item in engines model class
       
   449            */
       
   450         int	iEngineIndex;
       
   451 
       
   452 
       
   453         /**
       
   454         * The name of the listbox item
       
   455         */
       
   456         HBufC* iItemNameTextConv;
       
   457 
       
   458         /**
       
   459         * The iUserId of the contact
       
   460         */
       
   461         HBufC* iUserId;
       
   462 
       
   463     };
       
   464 
       
   465 /**
       
   466  * CCAInviteItemPC is a structure that will encapsualte information
       
   467  */
       
   468 class CCAInviteItemPC : public MCAArrayItemPC, public CBase
       
   469     {
       
   470 
       
   471     public:
       
   472         // symbain way of construction
       
   473 
       
   474         static CCAInviteItemPC* NewL( const TDesC& aUserId,
       
   475                                       const TDesC& aInviteId );
       
   476         void ConstructL();
       
   477         virtual ~CCAInviteItemPC();
       
   478     private:
       
   479 
       
   480         /*
       
   481         * C++ default constructor
       
   482         */
       
   483         CCAInviteItemPC( const TDesC& aUserId, const TDesC& aInviteId );
       
   484 
       
   485     public: //From CCAArrayItemPC
       
   486 
       
   487         /**
       
   488         * Returns the name of the contact item
       
   489         * @return TPtrC: name of the contact item to be displayed
       
   490         */
       
   491         TPtrC GetItemNameText();
       
   492 
       
   493         /**
       
   494         * Sets the name of the contact item
       
   495         * @param aName: Name of the contact item to be set
       
   496         * @return void
       
   497         */
       
   498         void SetItemNameText( const TDesC& aName ) ;
       
   499 
       
   500         /**
       
   501         * Returns the default type of the contact item
       
   502         * @return TEnumsPC::TItem: type of the contact item as either
       
   503         * EContactitem, EContactListItem etc
       
   504         */
       
   505         TEnumsPC::TItem Type();
       
   506 
       
   507         MCAInvitation* GetInvitation();
       
   508 
       
   509         void  SetInvitation( const MCAInvitation* aInvitation );
       
   510 
       
   511         /**
       
   512         * Get the index of the contact item from engine side model
       
   513         * @return TInt: index
       
   514         */
       
   515         inline TInt GetItemEngineIndex()
       
   516             {
       
   517             return iEngineIndex;
       
   518             }
       
   519 
       
   520         /**
       
   521         * Set the index of the contact item from engine side model
       
   522         * @param TInt: aIndex
       
   523         */
       
   524         inline void SetItemEngineIndex( TInt aIndex )
       
   525             {
       
   526             iEngineIndex  = aIndex;
       
   527             }
       
   528 
       
   529     public:
       
   530 
       
   531 
       
   532         /**
       
   533         * Returns the UserId of the invitation item
       
   534         * @return TPtrC: UserId to be displayed
       
   535         */
       
   536         const TDesC& UserId() const;
       
   537 
       
   538         /**
       
   539         * Returns the UserId of the invitation item
       
   540         * @return TPtrC: UserId to be displayed
       
   541         */
       
   542         const TDesC& GetInviteID() const;
       
   543         /**
       
   544         * Returns the identification of the invitation item
       
   545         * @return TPtrC: identification to be displayed
       
   546         */
       
   547         const TDesC& Identification() const;
       
   548 
       
   549     private:
       
   550 
       
   551         // Flag for telling if invitation is opened.
       
   552 
       
   553         /*
       
   554            * Index of the item in mainviewitemarray
       
   555            */
       
   556         int	iMainViewArrayIndex;
       
   557 
       
   558         /*
       
   559            * Index of the item in engines model class
       
   560            */
       
   561         int	iEngineIndex;
       
   562 
       
   563         //The buffer has been changed to a heap buffer for optimization
       
   564 
       
   565         /**
       
   566         * The name of the listbox item
       
   567         */
       
   568         HBufC* iItemNameTextInvite;
       
   569 
       
   570         /**
       
   571         * The iUserId of the contact
       
   572         */
       
   573         const TDesC& iUserId;
       
   574         /**
       
   575         * The InviteId of the invitation
       
   576         */
       
   577         const TDesC& iInviteID;
       
   578 
       
   579         const MCAInvitation* iInvitation;
       
   580 
       
   581     };
       
   582 
       
   583 
       
   584 /**
       
   585  * CCAGroupItemPC will encapsualte information
       
   586  * about a group item
       
   587  */
       
   588 class CCAGroupItemPC : public CBase, public MCAArrayItemPC
       
   589     {
       
   590 
       
   591     public:
       
   592         /**
       
   593         * Two-phased constructor.
       
   594         * @param aEngine - Reference to chat engine component
       
   595         */
       
   596         static CCAGroupItemPC* NewL( const TDesC& aGroupId );
       
   597 
       
   598         /*
       
   599         * Symbian second phased constructor
       
   600         */
       
   601         void ConstructL( const TDesC& aGroupId );
       
   602 
       
   603         /*
       
   604         * Destructor
       
   605         */
       
   606         virtual ~CCAGroupItemPC();
       
   607 
       
   608     private:
       
   609 
       
   610         /*
       
   611         * C++ default constructor
       
   612         */
       
   613         CCAGroupItemPC();
       
   614 
       
   615     public:
       
   616 
       
   617         /**
       
   618         * Returns the pending messages status of the contact item
       
   619         * @return bool: true if the contact item has pending messages
       
   620         * else return false
       
   621         */
       
   622         TBool IsMsgPending();
       
   623 
       
   624         /**
       
   625         * Sets the messages pending status of the contact item
       
   626         * @param aPendingMessageStatus: true if the contact has pending messages
       
   627         * else false
       
   628         */
       
   629         void SetMsgPending( TBool aPendingMessageStatus );
       
   630 
       
   631     public: //From CCAArrayItemPC
       
   632 
       
   633         /**
       
   634         * Returns the name of the group item
       
   635         * @return TPtrC: name of the contact item to be displayed
       
   636         */
       
   637         TPtrC GetItemNameText();
       
   638 
       
   639         /**
       
   640         * Sets the name of the group item
       
   641         * @param aName: Name of the contact item to be set
       
   642         * @return void
       
   643         */
       
   644         void SetItemNameText( const TDesC& aName ) ;
       
   645 
       
   646         /**
       
   647         * Returns the default type of the group item
       
   648         * @return TEnumsPC::TItem: type of the item as either
       
   649         * EContactitem, EContactListItem etc
       
   650         */
       
   651         TEnumsPC::TItem Type();
       
   652 
       
   653         /**
       
   654         * Get the index of the group item from engine side model
       
   655         * @return TInt: index
       
   656         */
       
   657         inline TInt GetItemEngineIndex()
       
   658             {
       
   659             return iEngineIndex;
       
   660             }
       
   661 
       
   662         /**
       
   663         * Set the index of the group item from engine side model
       
   664         * @param TInt: aIndex
       
   665         */
       
   666         inline void SetItemEngineIndex( TInt aIndex )
       
   667             {
       
   668             iEngineIndex  = aIndex;
       
   669             }
       
   670 
       
   671         /**
       
   672         * Returns the GroupId of the conversation item
       
   673         * @return TPtrC: GroupId to be displayed
       
   674         */
       
   675         const TDesC& GroupId() const;
       
   676 
       
   677         /**
       
   678         * Returns the identification of the invitation item
       
   679         * @return TPtrC: identification to be displayed
       
   680         */
       
   681         const TDesC& Identification() const;
       
   682     private:
       
   683 
       
   684         /*
       
   685         * Pending messages status of contact
       
   686         */
       
   687         TBool iUnreadmsgFlag;
       
   688 
       
   689         /*
       
   690          * Index of the item in mainviewitemarray
       
   691          */
       
   692         TInt  iMainViewArrayIndex;
       
   693 
       
   694         /*
       
   695            * Index of the item in engines model class
       
   696            */
       
   697         TInt  iEngineIndex;
       
   698 
       
   699         /**
       
   700         * The name of the group item
       
   701         */
       
   702         HBufC* iItemNameTextGroup;
       
   703 
       
   704         /**
       
   705         * Owns the iGroupID
       
   706         */
       
   707         HBufC* iGroupId;
       
   708 
       
   709     };
       
   710 
       
   711 /**
       
   712 * CCAContactListItemPC is a structure that will encapsualte information on a contact
       
   713 * list in the single array on the process component side.
       
   714 */
       
   715 class CCAContactListItemPC : public MCAArrayItemPC, public CBase
       
   716     {
       
   717 
       
   718     public:
       
   719         // symbain way of construction
       
   720 
       
   721         static CCAContactListItemPC* NewL();
       
   722         void ConstructL();
       
   723         virtual ~CCAContactListItemPC();
       
   724 
       
   725     private:
       
   726 
       
   727         /*
       
   728         * C++ default constructor
       
   729         */
       
   730         CCAContactListItemPC();
       
   731 
       
   732     public:
       
   733 
       
   734         /**
       
   735         * Returns the expanded or collapsed state information of the contact list
       
   736         * @return bool: true if the contact list is collapsed else return false
       
   737         */
       
   738         TBool IsCollapsed();
       
   739 
       
   740         /**
       
   741         * Returns the pending messages status for the contacts in the contact list
       
   742         * @return bool: true if the contacts int he contact list has pending messages
       
   743         * else return false
       
   744         */
       
   745         TBool IsMsgPending();
       
   746 
       
   747         /**
       
   748         * Sets the collapsed/expanded state of the contact list
       
   749         * @param aCollapsed: true if the contact list item is collapsed else false
       
   750         */
       
   751         void SetCollapsed( TBool aCollapsed );
       
   752 
       
   753         /**
       
   754         * Sets the message pending status of the contacts in the contact list
       
   755         * @param aMessagePending: true if the contacts in the contact list have
       
   756         * pending messages else false
       
   757         */
       
   758         void SetMsgPending( TBool aMessagePending );
       
   759 
       
   760     public: //From CCAArrayItemPC
       
   761 
       
   762         /**
       
   763         * Returns the name of the contact list item
       
   764         * @return TPtrC: name of the contact item to be displayed
       
   765         */
       
   766         TPtrC GetItemNameText();
       
   767 
       
   768         /**
       
   769         * Sets the name of the contact list item
       
   770         * @param aName: Name of the contact list item to be set
       
   771         * @return void
       
   772         */
       
   773         void SetItemNameText( const TDesC& );
       
   774 
       
   775         /**
       
   776         * Returns the default type of the contact list item
       
   777         * @return TEnumsPC::TItem: type of the contact list item as either
       
   778         * EContactitem, EContactListItem etc
       
   779         */
       
   780         TEnumsPC::TItem Type();
       
   781 
       
   782         /**
       
   783         * Get the index of the contact item from engine side model
       
   784         * @return TInt: index
       
   785         */
       
   786         inline TInt GetItemEngineIndex()
       
   787             {
       
   788             return iEngineIndex;
       
   789             }
       
   790 
       
   791         /**
       
   792         * Set the index of the contact item from engine side model
       
   793         * @param TInt: aIndex
       
   794         */
       
   795         inline void SetItemEngineIndex( TInt aIndex )
       
   796             {
       
   797             iEngineIndex  = aIndex;
       
   798             }
       
   799 
       
   800     private:
       
   801 
       
   802         /*
       
   803          * collapsed/expanded status of the contact list
       
   804         */
       
   805         TBool iCollapsedStatus;
       
   806 
       
   807         /*
       
   808          * Pending messages status for contacts in the list
       
   809         */
       
   810         TBool iUnreadmsgFlag;
       
   811 
       
   812         /*
       
   813          * Total no. of contacts in the contact list
       
   814         */
       
   815         TInt  iTotalContacts;
       
   816 
       
   817         /*
       
   818          * name of the contact list followed by
       
   819          * the (No. of Online Contacts/ Total contacts) in that contact list
       
   820         */
       
   821         HBufC* iText;
       
   822 
       
   823         /*
       
   824            * Index of the item in mainviewitemarray
       
   825            */
       
   826         int	iMainViewArrayIndex;
       
   827 
       
   828         /*
       
   829            * Index of the item in engines model class
       
   830            */
       
   831         int	iEngineIndex;
       
   832 
       
   833 
       
   834         /**
       
   835         * The name of the listbox item
       
   836         */
       
   837         HBufC* iItemNameTextList;
       
   838     };
       
   839 
       
   840 /**
       
   841 * CCAOwnDataItemPC is a structure that will encapsualte information on Own data
       
   842 * item in the single array on the process component side.
       
   843 */
       
   844 class CCAOwnDataItemPC : public MCAArrayItemPC, public CBase
       
   845     {
       
   846 
       
   847     public:
       
   848         // symbain way of construction
       
   849 
       
   850         static CCAOwnDataItemPC* NewL();
       
   851         void ConstructL();
       
   852         virtual ~CCAOwnDataItemPC();
       
   853 
       
   854     private:
       
   855 
       
   856         // C++ default constructor
       
   857 
       
   858         CCAOwnDataItemPC();
       
   859 
       
   860     public:
       
   861 
       
   862         /**
       
   863         * Returns the online status of the own data item
       
   864         * @return TEnumsPC::TOnlineStatus: online status of own data item
       
   865         */
       
   866         TEnumsPC::TOnlineStatus GetOwnStatus();
       
   867 
       
   868         /**
       
   869         * Set the online status of the own data item
       
   870         * @param aOnlineStatus: online status of own data item
       
   871         */
       
   872         void SetOwnStatus( TEnumsPC::TOnlineStatus aOnlineStatus );
       
   873 
       
   874     public: //From CCAArrayItemPC
       
   875 
       
   876         /**
       
   877         * Returns the name of the contact list item
       
   878         * @return TPtrC: name of the contact item to be displayed
       
   879         */
       
   880         TPtrC GetItemNameText();
       
   881 
       
   882         /**
       
   883         * Sets the name of the contact list item
       
   884         * @param aName: Name of the contact list item to be set
       
   885         * @return void
       
   886         */
       
   887         void SetItemNameText( const TDesC& );
       
   888 
       
   889         /**
       
   890         * Returns the default type of the contact list item
       
   891         * @return TEnumsPC::TItem: type of the contact list item as either
       
   892         * EContactitem, EContactListItem etc
       
   893         */
       
   894         TEnumsPC::TItem Type();
       
   895 
       
   896         /**
       
   897         * Get the index of the contact item from engine side model
       
   898         * @return TInt: index
       
   899         */
       
   900         inline TInt GetItemEngineIndex()
       
   901             {
       
   902             return iEngineIndex;
       
   903             }
       
   904 
       
   905         /**
       
   906         * Set the index of the contact item from engine side model
       
   907         * @param TInt: aIndex
       
   908         */
       
   909         inline void SetItemEngineIndex( TInt aIndex )
       
   910             {
       
   911             iEngineIndex  = aIndex;
       
   912             }
       
   913 
       
   914     private:
       
   915         /*
       
   916         * online status of own data item
       
   917         */
       
   918         TEnumsPC::TOnlineStatus iOwnStatus;
       
   919 
       
   920 
       
   921         /*
       
   922            * Index of the item in mainviewitemarray
       
   923            */
       
   924         int	iMainViewArrayIndex;
       
   925 
       
   926         /*
       
   927            * Index of the item in engines model class
       
   928            */
       
   929         int	iEngineIndex;
       
   930 
       
   931 
       
   932         /**
       
   933         * The name of the listbox item
       
   934         */
       
   935         HBufC* iItemNameTextOwnData;
       
   936 
       
   937 
       
   938     };
       
   939 
       
   940 #endif  //CCAArrayItemPC_H