uiservicetab/inc/tvimpstenums.h
branchRCL_3
changeset 28 3104fc151679
parent 27 2b7283837edb
child 29 9a48e301e94b
equal deleted inserted replaced
27:2b7283837edb 28:3104fc151679
     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: enum for service tab
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef TVIMPSTENUMSPC_H
       
    19 #define TVIMPSTENUMSPC_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <bamdesca.h>
       
    23 
       
    24 /*
       
    25 	This is main interface of arraywrapper on Process component side.
       
    26 	UI Side array decorator has to use this array and get the details required....
       
    27 	
       
    28 	
       
    29 */
       
    30 //FORWARD DECLARATION
       
    31 class MCCAParameter;
       
    32 class MCCAConnection;
       
    33 
       
    34 /**
       
    35  * structure
       
    36  * encapsulating data required for search 
       
    37  */
       
    38 struct TVIMPSTSearchData
       
    39 	{
       
    40 	TPtrC iFirstName; /*First name*/
       
    41 	TPtrC iLastName; /*Last name*/
       
    42 	TPtrC iEmailId;	/*Email Id*/
       
    43 	};
       
    44 	
       
    45 /**
       
    46  * structure
       
    47  * TSendData for temp use,to be removed later 
       
    48  */
       
    49 struct TSendData
       
    50     {
       
    51     TPtrC   msgText; /* actual message to be sent*/
       
    52     TPtrC   recipientID; /* Id of hte receiver of the msgText.*/
       
    53     
       
    54     };
       
    55  
       
    56 /**
       
    57  * structure
       
    58  * TNewContact encpsulating data required for addaing a new contact.
       
    59  */
       
    60 struct TNewContact
       
    61     {
       
    62     TPtrC   listId; /* list id*/
       
    63     TPtrC   displayName; /* display name*/
       
    64     TPtrC   userId; /* user id */
       
    65     
       
    66     };
       
    67  
       
    68 /**
       
    69  * structure
       
    70  * TLaunchCCAData encpsulating data required for launching the details view
       
    71  */
       
    72 struct TLaunchCCAData
       
    73     {
       
    74     MCCAParameter* iParameter;	 /* parameter */
       
    75 	MCCAConnection* iConnection;/* connection */
       
    76 	TInt iIndex; /* index of the contact */
       
    77     
       
    78     };
       
    79  
       
    80 /**
       
    81  * structure
       
    82  * TAddFriendResponse encpsulating data required for sending 
       
    83  * accapted/ rejected reactive authorization response.
       
    84  */
       
    85 struct TAddFriendResponse
       
    86     {
       
    87     const TDesC& iRequesterId ; /*  user id of the requestor*/
       
    88     TBool iResponse; // Accepted/Declined ETrue/EFalse
       
    89     };
       
    90 
       
    91 /**
       
    92  * structure
       
    93  * TVoipData encpsulating data required for voip
       
    94  */
       
    95 struct TVoipData
       
    96 	{
       
    97 	TInt iWindowGroup; /* window group*/
       
    98 	TInt iIndex; /* index of the contact */
       
    99 	TUint32 iServiceId; /* service id*/
       
   100 	};
       
   101 /**
       
   102  * TVPbkSelectedData encapsulating data required for
       
   103  * adding contact from phone book
       
   104  * iPackedLinks HBufC8 pointer to hold packed links from selection dialog.
       
   105  * iXSPList array of xsp id(s) retrived based on iPackedLinks.
       
   106  */
       
   107 struct TVPbkSelectedData
       
   108     {
       
   109     HBufC8* iPackedLinks;
       
   110     RPointerArray<HBufC> iXSPList;    
       
   111     };
       
   112 // CLASS DECLARATION
       
   113 
       
   114 /**
       
   115  *  TVIMPSTEnums all the enms and structures used across the application are defined here.
       
   116  *  @lib vimpstengine.lib
       
   117  *  @since 5.0
       
   118  */		
       
   119 class TVIMPSTEnums
       
   120     {
       
   121 
       
   122     public:	// Enumerations and typedefs
       
   123 
       
   124         /**
       
   125          * A enum
       
   126          * to identify which type of service.
       
   127          */
       
   128         enum TServiceIds
       
   129             {
       
   130             EXmppService = 0, /* xmmp service */
       
   131             EXizmoService /* gizmo service */
       
   132             };
       
   133     
       
   134     
       
   135     
       
   136         enum SubServiceType
       
   137             {
       
   138             EVoip,
       
   139             EPresence,
       
   140             EIM,
       
   141             ELast		
       
   142             };
       
   143     
       
   144         enum ExtentionType
       
   145             {
       
   146             ESearch,
       
   147             EBlocking,
       
   148             EContactManagement,
       
   149             EExtentionLast	
       
   150             };	
       
   151     
       
   152         enum FeatureSupport
       
   153             {
       
   154             ESupportUnKnown,
       
   155             ESupported,
       
   156             ENotSupported
       
   157             };			
       
   158     
       
   159         /**
       
   160          * A enum
       
   161          * Registration states to control views
       
   162          */
       
   163         enum TVIMPSTRegistrationState
       
   164             {
       
   165             ESVCENotRegistered = 0,/* Service Not registered*/
       
   166             ESVCERegistered = 0x8, /* Service registered */
       
   167             ESVCENetworkConnecting = 0x4, /* service connecting */		    
       
   168             ESVCEWaitingForNetwork = 0x2, /* service waiting for connection*/
       
   169             ESVCENetworkDisConnecting = 0x1, /* service disconnecting */
       
   170             ESVCEUpdatingContacts = 0x10
       
   171             };
       
   172     
       
   173     
       
   174         /**		 
       
   175          * A enum
       
   176          * to identify Type of operation
       
   177          */
       
   178         enum TOperationType
       
   179             {
       
   180             EAddItem, /* Add item */
       
   181             ERemoveItem, /* Remove Item */
       
   182             EUpdateItem /* Update Item */
       
   183             };
       
   184     
       
   185         /**
       
   186          * A enum
       
   187          * to identify errors.
       
   188          */
       
   189         enum TImpsCSPAllErrors
       
   190             {
       
   191             EImpsErrNone = 0, /* no error */
       
   192             ECSPInsufficientGroupPrivileges, /* Insufficient group privileges error */
       
   193             ECSPNotSupported, /* Not supported error */
       
   194             ECSPInvalidParameter, /* Invalid parameter error */
       
   195             ECSPMultipleErrors /* general error */
       
   196             };
       
   197     
       
   198         /**
       
   199          * A enum
       
   200          * to identify Type of item
       
   201          */
       
   202         enum TItem
       
   203             {
       
   204             EInvalid = -1, /* unknown Item */
       
   205             EOwnStatusItem, /* Own item */
       
   206             EContactItem, /* Contact Item */
       
   207             EContactListItem, /* ContactList Item */
       
   208             EFriendRequestItem,/* Friend request item */
       
   209             EUnknonContactItem /* contact item but not in friend list */
       
   210             };
       
   211     
       
   212         /**
       
   213          * A enum
       
   214          * to identify the onlne status
       
   215          */
       
   216         enum TOnlineStatus
       
   217             {
       
   218             EUnknown = -1, /* unknown status */
       
   219             EOffline, /* Offline status */
       
   220             EOnline, /* Online status */
       
   221             EInvisible, /* Invisible status */
       
   222             EAway, /* Away status */
       
   223             EBusy, /* Busy status */
       
   224             EOnPhone,
       
   225             EDoNotDisturb,
       
   226             EPending,
       
   227             EBlocked,
       
   228             EServiceOut,
       
   229             ECallForward
       
   230             };
       
   231     
       
   232         /**
       
   233          * A enum
       
   234          * ximp context states.
       
   235          */
       
   236         enum TLoginState
       
   237             {
       
   238             EOffLine = 0, /* Context is inactive */
       
   239             ELogging,          /* Context is binding to service */
       
   240             ELoggedIn, /* Context is active and binded to service */
       
   241             ELoggingOut,           /* Context is unbinding from service */
       
   242             ERequestComplete, /* user cancel login */
       
   243             ELoggingCancel /* user cancel ongoing login */
       
   244             };
       
   245     
       
   246         /**
       
   247          * A enum
       
   248          * Type of note
       
   249          */
       
   250         enum TNoteType
       
   251             {
       
   252             EUnKnown = -1, /* unknown note type*/
       
   253             EWaiteNote, /* Wait note */
       
   254             EInfoNote, /* Info note */
       
   255             EWaiteNoteWithRSK, /* wait note with RSK */
       
   256             EConfirmationNote, /* Confirmation Note */
       
   257             EInformationNote /* Information note.*/
       
   258             };
       
   259         /**
       
   260          * A enum
       
   261          * request presence
       
   262          */
       
   263         enum TVIMPSTPresenceRequestStatus
       
   264             {
       
   265             ESVCEPresenceRequestStatusUnKnown = -1, //unknown presence statusRequest Status might be NotFound
       
   266             ESVCEPresenceRequestStatusAlwaysAsk = 0, /* ask when ever there si a request for presence.*/
       
   267             ESVCEPresenceRequestStatusAutoAccept /* auto accept when ever there is a request for presence.*/
       
   268             };    
       
   269     
       
   270     
       
   271     
       
   272         /**
       
   273          * A enum
       
   274          * Presence event
       
   275          */
       
   276         enum TVIMPSTPresenceEvent
       
   277             {
       
   278             ESVCENoEvent = 0, /* No presence Event */
       
   279             ESVCERemotePartyAcceptedPresenceRequest, /* Remote contact accepted the presence request. */
       
   280             ESVCEExtensionRemotePartyBlockedYou, /* Remote contact blocked you */
       
   281             ESVCERemotePartyWantsToWatchYou /* remote contact requested for the your presence. */
       
   282             };
       
   283     
       
   284         /**
       
   285          * A enum
       
   286          * Filter type for getting right contacts.
       
   287          * Tells us what to show; for example EFilterAll
       
   288          *  does not filter out any statuses: all contacts are shown
       
   289          */
       
   290         enum TFilterType
       
   291             {
       
   292             EFilterNotDefined = -1, /* Filter Not defined */
       
   293             EFilterAll = 0, /* Filter All*/
       
   294             EFilterAndOperation = 1, /* Filter based on AND operation*/
       
   295             EFilterOnline = 2, /* Fileter online */
       
   296             EFilterNonBlocked = 4, /*  Filter non blocked */
       
   297             EFilterAway = 8, /*  Filter Away */
       
   298             EFilterNonOffline = 16 /*  this means online and away */ 
       
   299             };
       
   300     
       
   301         /**
       
   302          * A enum
       
   303          * to identify client type
       
   304          */
       
   305         enum TClientType
       
   306             {
       
   307             EUnknownClient = 0, /*  Unknown Client*/
       
   308             EMobile, /*  Mobile Client*/
       
   309             EPC /*  PC Client*/
       
   310             };       
       
   311     
       
   312         /**
       
   313          * A enum
       
   314          * observer event types
       
   315          */
       
   316         enum TVIMPSTStorgaeEventType
       
   317             {
       
   318             EStorageEventUnkown = -1,
       
   319             EStorageEventListAddition, /* Storege ListAddition event*/
       
   320             EStorageEventListDelete, /* Storege ListDelete event*/
       
   321             EStorageEventListChanged, /* Storege ListChanged event*/
       
   322             EStorageEventContactAddition, /* Storege ContactAddition event*/
       
   323             EStorageEventContactDelete, /* Storege ContactDeletion event*/
       
   324             EStorageEventContactChange, /* storage contact information chnaged*/
       
   325             EStorageAvatarChange, 	// avatar change signal,
       
   326             EStoragePresenceChange, // Contact presence chnages
       
   327             EStorageMultiplePresenceChange, // Contact presence chnages
       
   328             EStorageOwnPresenceChange,
       
   329             EStorageAllContactRemoved, // all storage contact removed 
       
   330             EStorageContactFetchComplete,
       
   331             EStorageEventDeleteFromPbk,
       
   332             EStorageEventOwnUserChanged,
       
   333             EStorageEventUserIdPreChange, // in pre change engin emust unsubscribe and close conversatio  if exist
       
   334             EStorageEventUserIdPostChange,// engine must subscribe here
       
   335             EStorageContactReadComplete,
       
   336             EStorageContactReading,
       
   337             EStorageContactFetching,
       
   338             EStorageContactFetchExistInStore,
       
   339             EStorageContactSynchronizing
       
   340             };
       
   341     
       
   342         /**
       
   343          * A enum 
       
   344          * Search Key Types
       
   345          */
       
   346         enum TVIMPSTSearchKey
       
   347             {
       
   348             EVIMPSTSearchKeyUknown = -1, /* Unknown search key */
       
   349             EVIMPSTFirstName = 600, /* First Name search key */
       
   350             EVIMPSTMiddleName, /* Middle Name search key */
       
   351             EVIMPSTLastName, /* Last NAme search key */
       
   352             EVIMPSTFullName, /* Full Name search key */
       
   353             EVIMPSTNickName, /* Nick Name search key */
       
   354             EVIMPSTBirthday, /* BirthDay search key */
       
   355             EVIMPSTCountry, /* Country search key */
       
   356             EVIMPSTCity, /* City search key */
       
   357             EVIMPSTState, /* State search key */
       
   358             EVIMPSTEmailAddress, /* Email Address search key */
       
   359             EVIMPSTUser, /* User search key */
       
   360             EVIMPSTOrganisation, /* Organization search key */
       
   361             EVIMPSTOrganisationUnit /* Organization Unit search key */
       
   362             };	
       
   363     
       
   364     
       
   365     
       
   366         enum TVIMPSTBindStatus
       
   367             {         
       
   368             EVIMPSTBindNotDone = 0,
       
   369             EVIMPSTBindDone,
       
   370             EVIMPSTUnBinding,
       
   371             EVIMPSTUnBindWaiting,
       
   372             EVIMPSTBindFailureMode
       
   373             };
       
   374     
       
   375         enum TPresenceStatus
       
   376             {
       
   377             EVIMPSTPresenceNotSubscribed = 0, // default values:
       
   378             EVIMPSTPresenceOnline,    // subscribed
       
   379             EVIMPSTPresenceOffline,   // subscribed
       
   380             EVIMPSTPresenceBlocked,   // blocked
       
   381             EVIMPSTPresencePending,   // subscribed
       
   382             EVIMPSTPresencePendingAuthorization,
       
   383             EVIMPSTPresencePendingBlock,
       
   384             EVIMPSTPresencePendingUnBlock,
       
   385             EVIMPSTPresenceAutoSubscribe,
       
   386             EVIMPSTPresenceSubscribeWaitingForContactCreation,
       
   387             EVIMPSTPresenceSubscribeWhenContactCreated
       
   388             };
       
   389     
       
   390         enum TPresenceEvent
       
   391             {
       
   392             EVIMPSTNoEvent = 0,
       
   393             EVIMPSTPresenceDataChanged,
       
   394             EVIMPSTRemotePartyAcceptedPresenceRequest,
       
   395             EVIMPSTRemotePartyBlockedYou,
       
   396             EVIMPSTRemotePartyWantsToWatchYou,
       
   397             EVIMPSTSubcribeListReceived
       
   398             };
       
   399         
       
   400         enum TIMEventType
       
   401             {
       
   402             EIMRequestCompleted = 0,
       
   403             EIMNewMessage ,
       
   404             EIMUnreadMessage,
       
   405             EIMUnreadChange,
       
   406             EIMNewChat,
       
   407             EIMChatStarted,
       
   408             EIMChatClosed,
       
   409             EIMAllChatClosed
       
   410             };
       
   411     };
       
   412 
       
   413 /**
       
   414  * structure
       
   415  * TVIMPSTSearchKeyData  encapsulates the data required for search key
       
   416  */
       
   417 struct TVIMPSTSearchKeyData
       
   418 	{
       
   419 	TVIMPSTEnums::TVIMPSTSearchKey iSearchKey; /* search key */
       
   420 	TPtrC iSearchLabel; /* Search lable */
       
   421 	TPtrC iSearchKeyData; /* isearchkeydata */	
       
   422 	};
       
   423 
       
   424 enum TErrorType
       
   425     {
       
   426     EProtected = 1, 
       
   427     ECorrupted,
       
   428     EErrExistInBlockList,
       
   429     EErrExistInContactList
       
   430     };
       
   431     
       
   432 //enums
       
   433 enum TXimpOperation
       
   434     {
       
   435     EVIMPSTXimpOperationNoOperation = 0,
       
   436     EVIMPSTXimpOperationBind,
       
   437     EVIMPSTXimpOperationUnBind,
       
   438     EVIMPSTXimpOperationGetSubscribedList,
       
   439     EVIMPSTXimpOperationGetBlockList,
       
   440     EVIMPSTXimpOperationGetPresenceGrantList,
       
   441     EVIMPSTXimpOperationGetWatcherList,
       
   442     EVIMPSTXimpOperationUnsubcribeWatcherList,
       
   443     EVIMPSTXimpOperationUnsubcribeGrantRequestList,
       
   444     EVIMPSTXimpOperationSubcribeGrantRequestList,
       
   445     EVIMPSTXimpOperationWithdrawPresenceGrant,
       
   446     EVIMPSTXimpOperationGrantPresenceForPresentity,
       
   447     EVIMPSTXimpOperationCancelPresenceBlockFromPresentity,
       
   448     EVIMPSTXimpOperationBlockPresenceForPresentity,
       
   449     EVIMPSTXimpOperationPublisOwnPresence,
       
   450     EVIMPSTXimpOperationSubscribe,
       
   451     EVIMPSTXimpOperationUnsubscribe,
       
   452     
       
   453     //Start of ContactMgmt Operations
       
   454     EVIMPSTXimpOperationAddContact,
       
   455     EVIMPSTXimpOperationDeleteContact,        
       
   456     //End of ContactMgmt Operations
       
   457     
       
   458     //Start of Search Feature Operations
       
   459     EVIMPSTXimpOperationSearchContact,
       
   460     EVIMPSTXimpOperationSubscribeSearchKeys
       
   461     //End of Search Feature Operations
       
   462     
       
   463   
       
   464     }; 
       
   465 
       
   466 enum TVIMPSTFeatureSupported //multiples of 2
       
   467 	{
       
   468 	EVIMPSTFeatureUnknown 		= 0,   
       
   469 	EVIMPSTFeaturePublish 		= 0x1,
       
   470 	EVIMPSTFeatureFetch   		= 0x2,
       
   471 	EVIMPSTFeatureSubscribe 	= 0x4,
       
   472 	EVIMPSTFeatureUnsubscribe 	= 0x8,
       
   473 	EVIMPSTFeatureAddContact 	= 0x10,
       
   474 	EVIMPSTFeatureDeleteContact = 0x20,
       
   475 	EVIMPSTFeatureBlock 		= 0x40,
       
   476 	EVIMPSTFeatureUnBlock 		= 0x80,
       
   477 	EVIMPSTFeatureAvatar 		= 0x100,
       
   478 	EVIMPSTFeatureCreateGroup 	= 0x200,
       
   479 	EVIMPSTFeatureDeleteGroup 	= 0x400,
       
   480 	EVIMPSTFeatureInstantMessage = 0x800,
       
   481 	EVIMPSTFeatureSearch 		= 0x1000,
       
   482 	EVIMPSTFeatureLast			= 0x2000
       
   483 	};
       
   484 	
       
   485 
       
   486 struct TStatusAndStatusText
       
   487 	{
       
   488 	TVIMPSTEnums::TOnlineStatus iStatus;
       
   489 	TBuf<50> iStatusText;
       
   490 	};
       
   491 
       
   492 /**
       
   493  * structure
       
   494  * encapsulating data required for avatar, filename and mimetype
       
   495  */
       
   496 struct TAvatarData
       
   497     {
       
   498     TVIMPSTEnums::TOnlineStatus iStatus;
       
   499 	TBuf<50> iStatusText;
       
   500     TPtrC iFileName;
       
   501     TPtrC8 iMimeType;
       
   502     };
       
   503     
       
   504 #endif      // TVIMPSTENUMS_H
       
   505