messagingappbase/smsmtm/clientmtm/inc/tmsvsmsentry.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
child 79 2981cb3aa489
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // tmsvsmsentry.h
       
    15 //
       
    16 /**
       
    17  * @file 
       
    18  * @publishedPartner
       
    19  * @released
       
    20  */
       
    21 
       
    22 #ifndef __TMSVSMSENTRY_H__
       
    23 #define __TMSVSMSENTRY_H__
       
    24 
       
    25 #include <gsmuelem.h>
       
    26 
       
    27 /**
       
    28 A specialisation of the message server index class for SMS message entries.
       
    29 
       
    30 It provides accessers for SMS message specific data, for instance the class type
       
    31 of the SMS message.
       
    32 
       
    33 @publishedPartner
       
    34 @released
       
    35 */
       
    36 class TMsvSmsEntry : public TMsvEntry
       
    37 	{
       
    38 public:
       
    39 
       
    40 /**
       
    41 Defines a set flags used to access message entry data specific to an SMS message.
       
    42 
       
    43 @publishedPartner
       
    44 @released
       
    45 
       
    46 */
       
    47 	enum TMsvSmsEntryFlags
       
    48 		{
       
    49 /**
       
    50 Clears the entire set of SMS flags.
       
    51 */
       
    52 		EMsvSmsEntryClearFlag				= 0x00000000,
       
    53 /**
       
    54 Mask for the protocol identifier data.
       
    55 */
       
    56 		EMsvSmsEntryProtocolIdentifier		= 0x000000FF,
       
    57 /**
       
    58 Mask for the User Prompt Indicator flag.
       
    59 */
       
    60 		EMsvSmsEntryUserPromptIndicator 	= 0x00000100,
       
    61 /**
       
    62 Mask for the SMS class data.
       
    63 */
       
    64 		EMsvSmsEntryClass					= 0x00000E00,
       
    65 /**
       
    66 Mask for the flag indicating whether the class data has been defined.
       
    67 */
       
    68 		EMsvSmsEntryClassDefined			= 0x00001000,
       
    69 /**
       
    70 Mask for the flag indicating whether the message ID is valid. 
       
    71 */
       
    72 		EMsvSmsMessageValid					= 0x00002000,
       
    73 /**
       
    74 Mask for the delivery acknowledgement information.
       
    75 */
       
    76 		EMsvSmsEntryDeliveryAckSummary		= 0x0001C000,
       
    77 /**
       
    78 Parameter defining the number of bits to be shifted in order for the SMS class
       
    79 data to be at the LSB of the data block.
       
    80 */
       
    81 		EMsvSmsEntryClassShift				= 9,
       
    82 /**
       
    83 Parameter defining the number of bits to be shifted in order for the delivery
       
    84 acknowlwdgement information to be at the LSB of the data block.
       
    85 */
       
    86 		EMsvSmsEntryDeliveryAckSummaryShift	= 14
       
    87 		};
       
    88 
       
    89 /**
       
    90 Defines the summary acknowledgement information.
       
    91 
       
    92 This information indicates whether the SMS message is not supplying a summary 
       
    93 for an acknowledgement, is still expecting acknowledgments or it has received 
       
    94 all expected acknowledgements.
       
    95 
       
    96 If all acknowledgements have been received the summary indicates whether all 
       
    97 the recipients have successfully acknowledged the message, all failed or there
       
    98 was a mixture of successful and failed acknowledgements from the recipients. 
       
    99 */
       
   100 	enum TMsvSmsEntryAckSummary
       
   101 		{
       
   102 /**
       
   103 No summary information is being formed.
       
   104 */
       
   105 		ENoAckSummary			= 0,
       
   106 /**
       
   107 The message is waiting for acknowledgements to be received for all recipients
       
   108 of this message. Some recipients may have received their acknowledgements but
       
   109 there are still some recipients that have not.
       
   110 */
       
   111 		EPendingAcks,
       
   112 /**
       
   113 The summary indicates that the message was successfully acknowledged by all recipients.
       
   114 */
       
   115 		EAllSuccessful,
       
   116 /**
       
   117 The summary indicates that the message failed to be acknowledged by all recipients.
       
   118 */
       
   119 		EAllFailed,
       
   120 /**
       
   121 The summary indicates a mixture of successful and failed acknowledgements from 
       
   122 the recipients of the message. All recipients of this message have received 
       
   123 their acknowledgements.
       
   124 */
       
   125 		EMixed
       
   126 		};
       
   127 
       
   128 public:
       
   129 	inline TMsvSmsEntry();
       
   130 	inline TMsvSmsEntry(const TMsvEntry& aEntry);
       
   131 
       
   132 	inline void SetUserPromptIndicator(TBool aUPI);
       
   133 	inline TBool UserPromptIndicator() const;
       
   134 
       
   135 	inline TUint8 ProtocolIdentifier() const;
       
   136 	inline void SetProtocolIdentifier(TSmsProtocolIdentifier aPID);
       
   137 	inline void SetProtocolIdentifier(TUint8 aPID);
       
   138 
       
   139 	inline TBool Class(TSmsDataCodingScheme::TSmsClass& aClass) const;
       
   140 	inline void SetClass(TBool aClassDefined,TSmsDataCodingScheme::TSmsClass aClass = TSmsDataCodingScheme::ESmsClass0);
       
   141 
       
   142 	IMPORT_C TMsvSmsEntryAckSummary AckSummary(TSmsAckType aAckType) const;
       
   143 	IMPORT_C void SetAckSummary(TSmsAckType aAckType, TMsvSmsEntryAckSummary aAckSummary);
       
   144 
       
   145 	IMPORT_C TBool MessageId(TInt32& aMessageId) const;
       
   146 	IMPORT_C void SetMessageId(TInt32 aMessageId, TBool aIsValid);
       
   147 	};
       
   148 
       
   149 /**
       
   150 The UID that indentifies the SMS message editor application.
       
   151 
       
   152 This is the response to the query for the KUidMsvMtmQueryEditorUidValue
       
   153 capability.
       
   154 
       
   155 @see	CSmsClientMtm::QueryCapability
       
   156 
       
   157 @publishedPartner
       
   158 @released
       
   159 */
       
   160 const TInt KUidMsgSmsEditorAppVal=0x1000163f;
       
   161 
       
   162 
       
   163 
       
   164 #include <tmsvsmsentry.inl>
       
   165 
       
   166 #endif //__TMSVSMSENTRY_H__