| williamr@2 |      1 | /*
 | 
| williamr@2 |      2 | * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
 | 
| williamr@2 |      3 | * All rights reserved.
 | 
| williamr@2 |      4 | * This component and the accompanying materials are made available
 | 
| williamr@4 |      5 | * under the terms of "Eclipse Public License v1.0"
 | 
| williamr@2 |      6 | * which accompanies this distribution, and is available
 | 
| williamr@4 |      7 | * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 | 
| williamr@2 |      8 | *
 | 
| williamr@2 |      9 | * Initial Contributors:
 | 
| williamr@2 |     10 | * Nokia Corporation - initial contribution.
 | 
| williamr@2 |     11 | *
 | 
| williamr@2 |     12 | * Contributors:
 | 
| williamr@2 |     13 | *
 | 
| williamr@2 |     14 | * Description:  
 | 
| williamr@2 |     15 | *     Client Mtm for multimedia messaging.
 | 
| williamr@2 |     16 | *     This is the API for accessing multimedia messaging engine.
 | 
| williamr@2 |     17 | *
 | 
| williamr@2 |     18 | */
 | 
| williamr@2 |     19 | 
 | 
| williamr@2 |     20 | 
 | 
| williamr@2 |     21 | 
 | 
| williamr@2 |     22 | #ifndef MMSCLIENT_H
 | 
| williamr@2 |     23 | #define MMSCLIENT_H
 | 
| williamr@2 |     24 | 
 | 
| williamr@2 |     25 | //  INCLUDES
 | 
| williamr@2 |     26 | #include  <mtclbase.h> // base client mtm
 | 
| williamr@2 |     27 | #include  <e32std.h>   // TTimeInterval & TTime
 | 
| williamr@2 |     28 | #include  "mmsconst.h" // common constants
 | 
| williamr@2 |     29 | 
 | 
| williamr@2 |     30 | // CONSTANTS
 | 
| williamr@2 |     31 | 
 | 
| williamr@2 |     32 | // MACROS
 | 
| williamr@2 |     33 | 
 | 
| williamr@2 |     34 | // DATA TYPES
 | 
| williamr@2 |     35 | typedef struct
 | 
| williamr@2 |     36 |     {
 | 
| williamr@2 |     37 |     const TUint SymbianCharsetUID;
 | 
| williamr@2 |     38 |     const TUint IANAMIBEnum;
 | 
| williamr@2 |     39 |     }TMmsCharacterSetLookup;
 | 
| williamr@2 |     40 | 
 | 
| williamr@2 |     41 | // FUNCTION PROTOTYPES
 | 
| williamr@2 |     42 | 
 | 
| williamr@2 |     43 | // FORWARD DECLARATIONS
 | 
| williamr@2 |     44 | class CMmsSettings;
 | 
| williamr@2 |     45 | class CMmsHeaders;
 | 
| williamr@2 |     46 | class CMsvMimeHeaders;
 | 
| williamr@2 |     47 | class CMsvFindText;
 | 
| williamr@2 |     48 | class CMmsAttachmentWaiter;
 | 
| williamr@2 |     49 | 
 | 
| williamr@2 |     50 | // CLASS DECLARATION
 | 
| williamr@2 |     51 | 
 | 
| williamr@2 |     52 | /**
 | 
| williamr@2 |     53 | *  Client Mtm for multimedia messaging subsystem. 
 | 
| williamr@2 |     54 | *
 | 
| williamr@2 |     55 | *  This class will be the interface to the UI component and other 
 | 
| williamr@2 |     56 | *  messaging component that might want to handle multimedia messages 
 | 
| williamr@2 |     57 | *  (For example SendAs interface).
 | 
| williamr@2 |     58 | * 
 | 
| williamr@2 |     59 | *  This class provides access to MMS specific headers in the message.
 | 
| williamr@2 |     60 | *
 | 
| williamr@2 |     61 | *  Note: new functions are added as the last virtual functions in order
 | 
| williamr@2 |     62 | *  not to to break the vtable
 | 
| williamr@2 |     63 | *
 | 
| williamr@2 |     64 | * @code
 | 
| williamr@2 |     65 | *  // Example of getting access to this class:
 | 
| williamr@2 |     66 | *
 | 
| williamr@2 |     67 | *  // Called by an application that implements
 | 
| williamr@2 |     68 | *  // MMsvSessionObserver interface
 | 
| williamr@2 |     69 | *
 | 
| williamr@2 |     70 | *  iSession = CMsvSession::OpenSyncL(*this);
 | 
| williamr@2 |     71 | *  CleanupStack::PushL(iSession);
 | 
| williamr@2 |     72 | *  iClientMtmRegistry = CClientMtmRegistry::NewL(*iSession);
 | 
| williamr@2 |     73 | *  CleanupStack::PushL(iClientMtmRegistry);
 | 
| williamr@2 |     74 | *  iMmsClient = (CMmsClientMtm *) iClientMtmRegistry->
 | 
| williamr@2 |     75 | *               NewMtmL(KUidMsgTypeMultimedia);
 | 
| williamr@2 |     76 | *  CleanupStack::PushL(iMmsClient);
 | 
| williamr@2 |     77 | *
 | 
| williamr@2 |     78 | *  // - do other initialization
 | 
| williamr@2 |     79 | *
 | 
| williamr@2 |     80 | *  CleanupStack::Pop(3); //iSession, iClientMtmRegistry, iMmsClient
 | 
| williamr@2 |     81 | *
 | 
| williamr@2 |     82 | *  // - call any public functions in CMmsClientMtm
 | 
| williamr@2 |     83 | *
 | 
| williamr@2 |     84 | *  // When the application finishes,
 | 
| williamr@2 |     85 | *  // it must delete the objects in reverse order:
 | 
| williamr@2 |     86 | *  delete iMmsClient;
 | 
| williamr@2 |     87 | *  delete iClientMtmRegistry;
 | 
| williamr@2 |     88 | *  delete iSession;
 | 
| williamr@2 |     89 | * @endcode
 | 
| williamr@2 |     90 | */
 | 
| williamr@2 |     91 | 
 | 
| williamr@2 |     92 | class CMmsClientMtm :public CBaseMtm
 | 
| williamr@2 |     93 |     {
 | 
| williamr@2 |     94 |     public:  // Constructors and destructor
 | 
| williamr@2 |     95 | 
 | 
| williamr@2 |     96 |         /**
 | 
| williamr@2 |     97 |         * Factory function. 
 | 
| williamr@2 |     98 |         *
 | 
| williamr@2 |     99 |         * The only function exported by this polymorphic interface dll. 
 | 
| williamr@2 |    100 |         * This function is not directly called by the application that needs 
 | 
| williamr@2 |    101 |         * access, it is called by an instance of CClientMtmRegistry class.
 | 
| williamr@2 |    102 |         *
 | 
| williamr@2 |    103 |         * @param[in] aRegisteredMtmDll Mtm Dll registry class
 | 
| williamr@2 |    104 |         * @param[in] aSession Message Server session.
 | 
| williamr@2 |    105 |         * @return Pointer to CMmsClientMtm class.
 | 
| williamr@2 |    106 |         */
 | 
| williamr@2 |    107 |         IMPORT_C static CMmsClientMtm* NewL(
 | 
| williamr@2 |    108 |             CRegisteredMtmDll& aRegisteredMtmDll,
 | 
| williamr@2 |    109 |             CMsvSession& aSession );
 | 
| williamr@2 |    110 | 
 | 
| williamr@2 |    111 |         /**
 | 
| williamr@2 |    112 |         * Destructor.
 | 
| williamr@2 |    113 |         */
 | 
| williamr@2 |    114 |         virtual ~CMmsClientMtm();
 | 
| williamr@2 |    115 | 
 | 
| williamr@2 |    116 |     public:  // New functions
 | 
| williamr@2 |    117 | 
 | 
| williamr@2 |    118 |         // ----------------------------------------------------------
 | 
| williamr@2 |    119 |         // Functions to create and modify message entries
 | 
| williamr@2 |    120 | 
 | 
| williamr@2 |    121 |         /**
 | 
| williamr@2 |    122 |         * Create a new message entry.
 | 
| williamr@2 |    123 |         *
 | 
| williamr@2 |    124 |         * @param[in] aDestination Target folder.
 | 
| williamr@2 |    125 |         * @param[in] aCompletionStatus Reference to the status of an active object. 
 | 
| williamr@2 |    126 |         *     This status will contain the relevant error code when the operation 
 | 
| williamr@2 |    127 |         *     completes.
 | 
| williamr@2 |    128 |         * @return Pointer to a message server operation (active object). 
 | 
| williamr@2 |    129 |         *     When the message has been created the progress information of the 
 | 
| williamr@2 |    130 |         *     operation provides the id of the created message in an 8-bit package 
 | 
| williamr@2 |    131 |         *     buffer. While the operation is in progress the package will contain a 
 | 
| williamr@2 |    132 |         *     null id (KMsvNullIndexEntryId). If there is an error while 
 | 
| williamr@2 |    133 |         *     creating the message the message will be deleted and the 
 | 
| williamr@2 |    134 |         *     package will contain a null id.
 | 
| williamr@2 |    135 |         *
 | 
| williamr@2 |    136 |         * This function is suitable when the caller is an active object or the 
 | 
| williamr@2 |    137 |         * caller does not want to immediately change current context to the 
 | 
| williamr@2 |    138 |         * new message entry.
 | 
| williamr@2 |    139 |         *
 | 
| williamr@2 |    140 |         * If the caller is not an active object and the caller wants the context 
 | 
| williamr@2 |    141 |         * of CMmsClientMtm to be immediately set to the new entry, it is simpler 
 | 
| williamr@2 |    142 |         * to call CreateMessageL.
 | 
| williamr@2 |    143 |         * @see CMmsClientMtm::CreateMessageL
 | 
| williamr@2 |    144 |         *
 | 
| williamr@2 |    145 |         * @code
 | 
| williamr@2 |    146 |         * // This example shows usage with a caller that is not an active object,
 | 
| williamr@2 |    147 |         * // so a separate waiter is needed. If the caller is an active object,
 | 
| williamr@2 |    148 |         * // the caller gives its own status to the function and continues 
 | 
| williamr@2 |    149 |         * // execution in RunL function.
 | 
| williamr@2 |    150 |         *
 | 
| williamr@2 |    151 |         * CMsvOperation* myOperation = NULL;
 | 
| williamr@2 |    152 |         * CMsvOperationActiveSchedulerWait* wait = 
 | 
| williamr@2 |    153 |         *     CMsvOperationActiveSchedulerWait::NewLC();
 | 
| williamr@2 |    154 |         *
 | 
| williamr@2 |    155 |         * // destinationId specifies the destination folder.
 | 
| williamr@2 |    156 |         * myOperation = iMmsClient->CreateNewEntryL( destinationId, wait->iStatus );
 | 
| williamr@2 |    157 |         *
 | 
| williamr@2 |    158 |         * CleanupStack::PushL( myOperation );
 | 
| williamr@2 |    159 |         *
 | 
| williamr@2 |    160 |         * wait->Start();
 | 
| williamr@2 |    161 |         *
 | 
| williamr@2 |    162 |         * if ( wait->iStatus.Int() != KErrNone )
 | 
| williamr@2 |    163 |         *     { 
 | 
| williamr@2 |    164 |         *     // error handling, e.g. leave
 | 
| williamr@2 |    165 |         *     }
 | 
| williamr@2 |    166 |         *
 | 
| williamr@2 |    167 |         * // Get the message id
 | 
| williamr@2 |    168 |         * TPckgBuf<TMsvId> pkg;
 | 
| williamr@2 |    169 |         * pkg.Copy( myOperation->ProgressL() );
 | 
| williamr@2 |    170 |         * TMsvId progress = pkg();
 | 
| williamr@2 |    171 |         * CleanupStack::PopAndDestroy(2); // myOperation, wait;
 | 
| williamr@2 |    172 |         *
 | 
| williamr@2 |    173 |         * // Load the new message
 | 
| williamr@2 |    174 |         * iMmsClient->SwitchCurrentEntryL( progress );
 | 
| williamr@2 |    175 |         *
 | 
| williamr@2 |    176 |         * // load the default values that were already intialized
 | 
| williamr@2 |    177 |         * // when the message was created 
 | 
| williamr@2 |    178 |         * iMmsClient->LoadMessageL();
 | 
| williamr@2 |    179 |         * 
 | 
| williamr@2 |    180 |         * // continue adding data to the message
 | 
| williamr@2 |    181 |         * // ...
 | 
| williamr@2 |    182 |         * @endcode
 | 
| williamr@2 |    183 |         */
 | 
| williamr@2 |    184 |         virtual CMsvOperation* CreateNewEntryL(
 | 
| williamr@2 |    185 |             TMsvId aDestination,
 | 
| williamr@2 |    186 |             TRequestStatus& aCompletionStatus);
 | 
| williamr@2 |    187 | 
 | 
| williamr@2 |    188 | 
 | 
| williamr@2 |    189 |         // -------------------------------------------------------------------
 | 
| williamr@2 |    190 |         // FUNCTIONS TO HANDLE MMSC SETTINGS
 | 
| williamr@2 |    191 |         //
 | 
| williamr@2 |    192 |         // Only one MMS service entry may be created!
 | 
| williamr@2 |    193 |         //
 | 
| williamr@2 |    194 |         // The Client MTM maintains cached MMS service settings, referred to 
 | 
| williamr@2 |    195 |         // as current service below. Some of those cached settings are used 
 | 
| williamr@2 |    196 |         // as template values when a new multimedia message is created. 
 | 
| williamr@2 |    197 |         //
 | 
| williamr@2 |    198 |         // Use Base MTM functions to get default service id.
 | 
| williamr@2 |    199 | 
 | 
| williamr@2 |    200 | // <DEPRECATED>
 | 
| williamr@2 |    201 |         /**
 | 
| williamr@2 |    202 |         * Create new service entry.
 | 
| williamr@2 |    203 |         *
 | 
| williamr@2 |    204 |         * Context is set to the new service entry. 
 | 
| williamr@2 |    205 |         * Currently a maximum of one service is created, and further requests 
 | 
| williamr@2 |    206 |         * do not create a new service entry.
 | 
| williamr@2 |    207 |         * @deprecated Only one MMS service is supported and it is automatically created. 
 | 
| williamr@2 |    208 |         * Use DefaultServiceL() to get the id for the default service.
 | 
| williamr@2 |    209 |         */
 | 
| williamr@2 |    210 |         virtual void CreateServiceL();
 | 
| williamr@2 |    211 | // </DEPRECATED>
 | 
| williamr@2 |    212 | 
 | 
| williamr@2 |    213 |         // Functions to load, save, and access MMS Settings.
 | 
| williamr@2 |    214 |         // There is no need to change the context when these functions are used.
 | 
| williamr@2 |    215 |         //
 | 
| williamr@2 |    216 | 
 | 
| williamr@2 |    217 |         /**
 | 
| williamr@2 |    218 |         * Get a reference to CMmsSettings class.
 | 
| williamr@2 |    219 |         *
 | 
| williamr@2 |    220 |         * This method should be used by MMS UI only. Other applications should 
 | 
| williamr@2 |    221 |         * not touch the MMS settings. The methods are needed in MMS Client API 
 | 
| williamr@2 |    222 |         * to allow MMS UI to inform MMS Client MTM about changed settings. 
 | 
| williamr@2 |    223 |         *
 | 
| williamr@2 |    224 |         * The contents of the class are those used by MMS Client MTM 
 | 
| williamr@2 |    225 |         * when constructing a message. If the settings must be changed, 
 | 
| williamr@2 |    226 |         * a copy must be made, and SetSettingsL function used to deliver 
 | 
| williamr@2 |    227 |         * the settings to MMS Client MTM.
 | 
| williamr@2 |    228 |         *
 | 
| williamr@2 |    229 |         * @return constant reference to iMmsSettings member of CMmsClientMtm.
 | 
| williamr@2 |    230 |         *
 | 
| williamr@2 |    231 |         * @code
 | 
| williamr@2 |    232 |         * // Usage:
 | 
| williamr@2 |    233 |         * 
 | 
| williamr@2 |    234 |         * CMmsSettings* settings = CMmsSettings::NewL();
 | 
| williamr@2 |    235 |         * CleanupStack::PushL( settings );
 | 
| williamr@2 |    236 |         * iMmsClient->RestoreSettingsL();
 | 
| williamr@2 |    237 |         * settings->CopyL( iMmsClient->MmsSettings() );
 | 
| williamr@2 |    238 |         * 
 | 
| williamr@2 |    239 |         * // change settings here...
 | 
| williamr@2 |    240 |         * // The settings are changed using CMmsSettings API
 | 
| williamr@2 |    241 |         * 
 | 
| williamr@2 |    242 |         * iMmsClient->SetSettingsL( *settings );
 | 
| williamr@2 |    243 |         * iMmsClient->StoreSettingsL();
 | 
| williamr@2 |    244 |         * CleanupStack::PopAndDestroy(); // settings
 | 
| williamr@2 |    245 |         *
 | 
| williamr@2 |    246 |         * @endcode
 | 
| williamr@2 |    247 |         */
 | 
| williamr@2 |    248 |         virtual const CMmsSettings& MmsSettings();
 | 
| williamr@2 |    249 | 
 | 
| williamr@2 |    250 |         /**
 | 
| williamr@2 |    251 |         * Copy the values from aSettings to CMmsClientMtm.
 | 
| williamr@2 |    252 |         *
 | 
| williamr@2 |    253 |         * This method should be used by MMS UI only. Other applications should 
 | 
| williamr@2 |    254 |         * not touch the MMS settings. 
 | 
| williamr@2 |    255 |         *
 | 
| williamr@2 |    256 |         * Used to provide new settings to MMS Client MTM when settings have 
 | 
| williamr@2 |    257 |         * been changed. Will affect only messages created after the settings  
 | 
| williamr@2 |    258 |         * have been changed. 
 | 
| williamr@2 |    259 |         *
 | 
| williamr@2 |    260 |         * Use function StoreSettingsL to save the settings on disk.
 | 
| williamr@2 |    261 |         *
 | 
| williamr@2 |    262 |         * @param[in] aSettings New values for CMmsSettings
 | 
| williamr@2 |    263 |         */
 | 
| williamr@2 |    264 |         virtual void SetSettingsL( const CMmsSettings& aSettings );
 | 
| williamr@2 |    265 | 
 | 
| williamr@2 |    266 |         /**
 | 
| williamr@2 |    267 |         * Save settings to disk.
 | 
| williamr@2 |    268 |         *
 | 
| williamr@2 |    269 |         * This method should be used by MMS UI only. Other applications should 
 | 
| williamr@2 |    270 |         * not touch the MMS settings. 
 | 
| williamr@2 |    271 |         */
 | 
| williamr@2 |    272 |         virtual void StoreSettingsL();
 | 
| williamr@2 |    273 | 
 | 
| williamr@2 |    274 |         /**
 | 
| williamr@2 |    275 |         * Load settings from disk.
 | 
| williamr@2 |    276 |         *
 | 
| williamr@2 |    277 |         * This method should be used by MMS UI only. Other applications should 
 | 
| williamr@2 |    278 |         * not touch the MMS settings.
 | 
| williamr@2 |    279 |         */
 | 
| williamr@2 |    280 |         virtual void RestoreSettingsL();
 | 
| williamr@2 |    281 | 
 | 
| williamr@2 |    282 | // <DEPRECATED>
 | 
| williamr@2 |    283 |         /**
 | 
| williamr@2 |    284 |         * Restore factory settings.
 | 
| williamr@2 |    285 |         *
 | 
| williamr@2 |    286 |         * Restore settings from ROM to the default service entry and select it 
 | 
| williamr@2 |    287 |         * as the current service entry.
 | 
| williamr@2 |    288 |         * @param aLevel Defines the operations to be done. 
 | 
| williamr@2 |    289 |         * @deprecated MMS UI should restore the factory settings directly.
 | 
| williamr@2 |    290 |         */
 | 
| williamr@2 |    291 |         virtual void RestoreFactorySettingsL(
 | 
| williamr@2 |    292 |             TMmsFactorySettingsLevel aLevel = EMmsFactorySettingsLevelNormal );
 | 
| williamr@2 |    293 | // </DEPRECATED>
 | 
| williamr@2 |    294 | 
 | 
| williamr@2 |    295 |         /**
 | 
| williamr@2 |    296 |         * Validate service.
 | 
| williamr@2 |    297 |         *
 | 
| williamr@2 |    298 |         * Checks that access point refers to a valid entry in comms database.
 | 
| williamr@2 |    299 |         *
 | 
| williamr@2 |    300 |         * @param[in] aServiceId Id of the MMS service
 | 
| williamr@2 |    301 |         * @return Error code. 
 | 
| williamr@2 |    302 |         * - KErrNone: The service is OK.
 | 
| williamr@2 |    303 |         * - KErrNotFound: The service id is incorrect.
 | 
| williamr@2 |    304 |         * - KMmsErrorInvalidSettings: The settings contain invalid values. 
 | 
| williamr@2 |    305 |         * This error is possible only if the settings file has been corrupted.
 | 
| williamr@2 |    306 |         * - KMmsErrorNoWAPAccessPoint: No access point has been defined.
 | 
| williamr@2 |    307 |         * - KMmsErrorAP1Invalid: MMS access point refers to an invalid entry in comms 
 | 
| williamr@2 |    308 |         * database.
 | 
| williamr@2 |    309 |         * - KMmsErrorNoURI1: Home page has not been defined for MMS access point
 | 
| williamr@2 |    310 |         */
 | 
| williamr@2 |    311 |         virtual TInt ValidateService( TMsvId aServiceId );
 | 
| williamr@2 |    312 | 
 | 
| williamr@2 |    313 |         // -------------------------------------------------------------------
 | 
| williamr@2 |    314 |         // FUNCTIONS TO HANDLE MMS HEADERS
 | 
| williamr@2 |    315 | 
 | 
| williamr@2 |    316 |         // Accessors and mutators (getters and setters) for header fields.
 | 
| williamr@2 |    317 |         // Some of these header fields have default values that are assigned
 | 
| williamr@2 |    318 |         // from cached service settings when a new header is allocated.
 | 
| williamr@2 |    319 |         // Some header fields are needed by protocol only.
 | 
| williamr@2 |    320 |         // Those headers don't have accessors and mutators here,
 | 
| williamr@2 |    321 |         // as they are used by Server MTM who accesses them directly
 | 
| williamr@2 |    322 |         // through functions offered by CMmsHeaders.
 | 
| williamr@2 |    323 | 
 | 
| williamr@2 |    324 |         /**
 | 
| williamr@2 |    325 |         * Set the sender of the message.
 | 
| williamr@2 |    326 |         *
 | 
| williamr@2 |    327 |         * If the sender of the message is not explicitly defined, the Proxy-Relay 
 | 
| williamr@2 |    328 |         *     or MMS Service Centre will add the sender's phone number.
 | 
| williamr@2 |    329 |         *
 | 
| williamr@2 |    330 |         * @param[in] aAlias The phone number of the sender of the message. 
 | 
| williamr@2 |    331 |         *     Maximum length 256 characters. This string will be included 
 | 
| williamr@2 |    332 |         *     as the sender of the message when the message is sent, but 
 | 
| williamr@2 |    333 |         *     the MMS Service Centre will check the validity of the 
 | 
| williamr@2 |    334 |         *     value and replace it with the actual phone number of the 
 | 
| williamr@2 |    335 |         *     sender if it is not correct.
 | 
| williamr@2 |    336 |         */
 | 
| williamr@2 |    337 |         virtual void SetSenderL( const TDesC& aAlias );
 | 
| williamr@2 |    338 | 
 | 
| williamr@2 |    339 |         /**
 | 
| williamr@2 |    340 |         * Get the sender of the message.
 | 
| williamr@2 |    341 |         *
 | 
| williamr@2 |    342 |         * @return Address of the sender of the message (for example phone number). 
 | 
| williamr@2 |    343 |         *     If the sender has not been defined, returns an empty string.
 | 
| williamr@2 |    344 |         */
 | 
| williamr@2 |    345 |         virtual const TPtrC Sender() const;
 | 
| williamr@2 |    346 | 
 | 
| williamr@2 |    347 |         /**
 | 
| williamr@2 |    348 |         * Set the message class.
 | 
| williamr@2 |    349 |         *
 | 
| williamr@2 |    350 |         * If message class is not explicitly set, the message will have 
 | 
| williamr@2 |    351 |         *     class "Personal" by default.
 | 
| williamr@2 |    352 |         *
 | 
| williamr@2 |    353 |         * @param [in] aMessageClass Message class code. Possible values: 
 | 
| williamr@2 |    354 |         * - EMmsClassPersonal: Message is a normal person-to-person message (default).
 | 
| williamr@2 |    355 |         * - EMmsClassAdvertisement: Message contains an advertisement.
 | 
| williamr@2 |    356 |         * - EMmsClassInformational: Message contains data from an information service.
 | 
| williamr@2 |    357 |         * - EMmsClassAuto: Message has been automatically generated by the phone. 
 | 
| williamr@2 |    358 |         *   This class is only valid for a message that is a read report to another message.
 | 
| williamr@2 |    359 |         */
 | 
| williamr@2 |    360 |         virtual void SetMessageClass( TMmsMessageClass aMessageClass );
 | 
| williamr@2 |    361 | 
 | 
| williamr@2 |    362 |         /**
 | 
| williamr@2 |    363 |         * Get the message class.
 | 
| williamr@2 |    364 |         *
 | 
| williamr@2 |    365 |         * @return Message class. Possible values: 
 | 
| williamr@2 |    366 |         * - EMmsClassPersonal: Message is a normal person-to-person message (default).
 | 
| williamr@2 |    367 |         * - EMmsClassAdvertisement: Message contains an advertisement.
 | 
| williamr@2 |    368 |         * - EMmsClassInformational: Message contains data from an information service.
 | 
| williamr@2 |    369 |         * - EMmsClassAuto: Message has been automatically generated by the phone. 
 | 
| williamr@2 |    370 |         *   This class is only valid for a message that is a read report to another message.
 | 
| williamr@2 |    371 |         * - 0: Message class has not been defined. Handle as EMmsClassPersonal.
 | 
| williamr@2 |    372 |         */
 | 
| williamr@2 |    373 |         virtual TInt MessageClass() const;
 | 
| williamr@2 |    374 | 
 | 
| williamr@2 |    375 |         /**
 | 
| williamr@2 |    376 |         * Set the validity period of the message.
 | 
| williamr@2 |    377 |         *
 | 
| williamr@2 |    378 |         * If the validity period is not defined for the message, default 
 | 
| williamr@2 |    379 |         * validity period from MMS settings or MMS Service Centre will be used.
 | 
| williamr@2 |    380 |         *
 | 
| williamr@2 |    381 |         * @param[in] aInterval The length of time in seconds after which the 
 | 
| williamr@2 |    382 |         *     message will be discarded by MMS Service Centre. 
 | 
| williamr@2 |    383 |         *     MMSC may limit the maximum length of the validity period. 
 | 
| williamr@2 |    384 |         */
 | 
| williamr@2 |    385 |         virtual void SetExpiryInterval( TTimeIntervalSeconds aInterval );
 | 
| williamr@2 |    386 | 
 | 
| williamr@2 |    387 |         /**
 | 
| williamr@2 |    388 |         * Get the validity period of the message.
 | 
| williamr@2 |    389 |         *
 | 
| williamr@2 |    390 |         * @return Storage time of the message in MMS Service Centre (in seconds). 
 | 
| williamr@2 |    391 |         *     If the message cannot be delivered to the recipient within the 
 | 
| williamr@2 |    392 |         *     validity period, it will be discarded. If the validity period is 0, 
 | 
| williamr@2 |    393 |         *     it has not been defined.
 | 
| williamr@2 |    394 |         */
 | 
| williamr@2 |    395 |         virtual TTimeIntervalSeconds ExpiryInterval() const;
 | 
| williamr@2 |    396 | 
 | 
| williamr@2 |    397 |         /**
 | 
| williamr@2 |    398 |         * Set the expiration date of the message.
 | 
| williamr@2 |    399 |         *
 | 
| williamr@2 |    400 |         * @param[in] aDate The date and time when the message will expire 
 | 
| williamr@2 |    401 |         *     (In UTC time). The date must be later than 1970-01-01, 00:00:00 GMT 
 | 
| williamr@2 |    402 |         *     If the MMS Service Centre cannot deliver the message to the recipient 
 | 
| williamr@2 |    403 |         *     before the expiration date, the message will be discarded. If expiration 
 | 
| williamr@2 |    404 |         *     date or validity period have not been defined, default is used.
 | 
| williamr@2 |    405 |         */
 | 
| williamr@2 |    406 |         virtual void SetExpiryDate( TTime aDate );
 | 
| williamr@2 |    407 | 
 | 
| williamr@2 |    408 |         /**
 | 
| williamr@2 |    409 |         * Get the expiration date of the message.
 | 
| williamr@2 |    410 |         *
 | 
| williamr@2 |    411 |         * @return The date and time when the message will expire. (in UTC time). 
 | 
| williamr@2 |    412 |         *      If the expiration date has not been defined, TTime(0) will be 
 | 
| williamr@2 |    413 |         *      returned.
 | 
| williamr@2 |    414 |         */
 | 
| williamr@2 |    415 |         virtual TTime ExpiryDate() const;
 | 
| williamr@2 |    416 | 
 | 
| williamr@2 |    417 |         /**
 | 
| williamr@2 |    418 |         * Set the delivery time interval for the message.
 | 
| williamr@2 |    419 |         *
 | 
| williamr@2 |    420 |         * @param[in] aInterval The length of time in seconds after which the message 
 | 
| williamr@2 |    421 |         *     will be delivered to the recipient by the MMS Service Centre. 
 | 
| williamr@2 |    422 |         *     If neither delivery time interval or delivery date have been defined,
 | 
| williamr@2 |    423 |         *     MMS Service Centre will deliver the message immediately.
 | 
| williamr@2 |    424 |         */
 | 
| williamr@2 |    425 |         virtual void SetDeliveryTimeInterval( TTimeIntervalSeconds aInterval );
 | 
| williamr@2 |    426 | 
 | 
| williamr@2 |    427 |         /**
 | 
| williamr@2 |    428 |         * Get the delivery time interval of the message.
 | 
| williamr@2 |    429 |         *
 | 
| williamr@2 |    430 |         * @return The length of time in seconds after which the message will be 
 | 
| williamr@2 |    431 |         *     delivered to the recipient by MMS Service Centre. If the delivery 
 | 
| williamr@2 |    432 |         *     time interval is 0, it has not been defined.
 | 
| williamr@2 |    433 |         */
 | 
| williamr@2 |    434 |         virtual TTimeIntervalSeconds DeliveryTimeInterval() const;
 | 
| williamr@2 |    435 | 
 | 
| williamr@2 |    436 |         /**
 | 
| williamr@2 |    437 |         * Set the delivery date for the message.
 | 
| williamr@2 |    438 |         *
 | 
| williamr@2 |    439 |         * @param[in] aDate The date and time when the message will be delivered 
 | 
| williamr@2 |    440 |         *     to the recipient by the MMSC (in UTC time). The date must be 
 | 
| williamr@2 |    441 |         *     later than 1970-01-01, 00:00:00 GMT. If neither delivery time 
 | 
| williamr@2 |    442 |         *     interval or delivery date have been defined, MMS Service Centre 
 | 
| williamr@2 |    443 |         *     will deliver the message immediately.
 | 
| williamr@2 |    444 |         */
 | 
| williamr@2 |    445 |         virtual void SetDeliveryDate( TTime aDate );
 | 
| williamr@2 |    446 | 
 | 
| williamr@2 |    447 |         /**
 | 
| williamr@2 |    448 |         * Get the delivery date of the message.
 | 
| williamr@2 |    449 |         *
 | 
| williamr@2 |    450 |         * @return The date and time when the message will be (or was) delivered 
 | 
| williamr@2 |    451 |         *     to the  recipient by the MMSC (in UTC time). If the delivery date 
 | 
| williamr@2 |    452 |         *     has not been defined, TTime(0) is returned.
 | 
| williamr@2 |    453 |         */
 | 
| williamr@2 |    454 |         virtual TTime DeliveryDate() const;
 | 
| williamr@2 |    455 | 
 | 
| williamr@2 |    456 |         /**
 | 
| williamr@2 |    457 |         * Set the priority of the message. 
 | 
| williamr@2 |    458 |         *
 | 
| williamr@2 |    459 |         * If the priority of the message is not set, the default priority will be 
 | 
| williamr@2 |    460 |         *     "normal".
 | 
| williamr@2 |    461 |         *
 | 
| williamr@2 |    462 |         * @param[in] aPriority Message priority, possible values:
 | 
| williamr@2 |    463 |         * - EMmsPriorityLow:     Low priority.
 | 
| williamr@2 |    464 |         * - EMmsPriorityNormal:  Normal priority.
 | 
| williamr@2 |    465 |         * - EMmsPriorityHigh:    High priority.
 | 
| williamr@2 |    466 |         */
 | 
| williamr@2 |    467 |         virtual void SetMessagePriority( TMmsMessagePriority aPriority );
 | 
| williamr@2 |    468 | 
 | 
| williamr@2 |    469 |         /**
 | 
| williamr@2 |    470 |         * Get the priority of the message.
 | 
| williamr@2 |    471 |         *
 | 
| williamr@2 |    472 |         * @return Message priority, possible values:
 | 
| williamr@2 |    473 |         * - EMmsPriorityLow:     Low priority.
 | 
| williamr@2 |    474 |         * - EMmsPriorityNormal:  Normal priority.
 | 
| williamr@2 |    475 |         * - EMmsPriorityHigh:    High priority.
 | 
| williamr@2 |    476 |         * - 0: Priority has not been defined, treat as EMmsPriorityNormal
 | 
| williamr@2 |    477 |         */
 | 
| williamr@2 |    478 |         virtual TInt MessagePriority() const;
 | 
| williamr@2 |    479 | 
 | 
| williamr@2 |    480 |         /**
 | 
| williamr@2 |    481 |         * Set the sender visibility setting for the message.
 | 
| williamr@2 |    482 |         *
 | 
| williamr@2 |    483 |         * Indicates whether the MMS Service Centre should hide the sender's phone 
 | 
| williamr@2 |    484 |         *     number from the recipient. If the value is not defined, default is 
 | 
| williamr@2 |    485 |         *     used. The default is to show the sender's number unless the sender 
 | 
| williamr@2 |    486 |         *     has a secret number.
 | 
| williamr@2 |    487 |         *
 | 
| williamr@2 |    488 |         * @param[in] aVisibility Visibility of the sender's phone number to the 
 | 
| williamr@2 |    489 |         *    recipient. Possible values:
 | 
| williamr@2 |    490 |         * - EMmsSenderVisibilityDefault: Use default visibility.
 | 
| williamr@2 |    491 |         * - EMmsSenderVisibilityHide: Hide the sender's number.
 | 
| williamr@2 |    492 |         * - EMmsSenderVisibilityShow: Show the sender's number even if it is a 
 | 
| williamr@2 |    493 |         *     secret number.
 | 
| williamr@2 |    494 |         */
 | 
| williamr@2 |    495 |         virtual void SetSenderVisibility(
 | 
| williamr@2 |    496 |             TMmsMessageSenderVisibility aVisibility );
 | 
| williamr@2 |    497 | 
 | 
| williamr@2 |    498 |         /**
 | 
| williamr@2 |    499 |         * Get the sender visibility setting of the message.
 | 
| williamr@2 |    500 |         *
 | 
| williamr@2 |    501 |         * Indicates whether the MMS Service Centre should hide the sender's phone 
 | 
| williamr@2 |    502 |         *     number from the recipient. The default is show the sender's number 
 | 
| williamr@2 |    503 |         *     unless the server has a secret number.
 | 
| williamr@2 |    504 |         *
 | 
| williamr@2 |    505 |         * @return visibility setting. Possible values:
 | 
| williamr@2 |    506 |         * - EMmsSenderVisibilityDefault: Default visibility.
 | 
| williamr@2 |    507 |         * - EMmsSenderVisibilityHide: Hide the sender's number.
 | 
| williamr@2 |    508 |         * - EMmsSenderVisibilityShow: Show the sender's number even if it is a 
 | 
| williamr@2 |    509 |         *     secret number.
 | 
| williamr@2 |    510 |         * - 0: Sender visibilty has not been defined, use default.
 | 
| williamr@2 |    511 |         */
 | 
| williamr@2 |    512 |         virtual TInt SenderVisibility() const;
 | 
| williamr@2 |    513 | 
 | 
| williamr@2 |    514 |         /**
 | 
| williamr@2 |    515 |         * Set the delivery report request setting value for the message.
 | 
| williamr@2 |    516 |         *
 | 
| williamr@2 |    517 |         * If the value is not set, default value from MMS settings will be used.
 | 
| williamr@2 |    518 |         *
 | 
| williamr@2 |    519 |         * @param[in] aRequest tells if the user wants a delivery report for this 
 | 
| williamr@2 |    520 |         *    message. Possible values: 
 | 
| williamr@2 |    521 |         * - EMmsYes: The user wants a delivery report.
 | 
| williamr@2 |    522 |         * - EMmsNo:  The user does not want a delivery report.
 | 
| williamr@2 |    523 |         */
 | 
| williamr@2 |    524 |         virtual void SetDeliveryReport(
 | 
| williamr@2 |    525 |             TMmsYesNo aRequest );
 | 
| williamr@2 |    526 | 
 | 
| williamr@2 |    527 |         /**
 | 
| williamr@2 |    528 |         * Get the delivery report request setting of the message.
 | 
| williamr@2 |    529 |         *
 | 
| williamr@2 |    530 |         * If the value is not defined, default value from MMS settings is used.
 | 
| williamr@2 |    531 |         *
 | 
| williamr@2 |    532 |         * @return delivery report request setting. Possible values: 
 | 
| williamr@2 |    533 |         * - EMmsYes: The user wants a delivery report.
 | 
| williamr@2 |    534 |         * - EMmsNo:  The user does not want a delivery report.
 | 
| williamr@2 |    535 |         * - 0: Setting has not been defined.
 | 
| williamr@2 |    536 |         */
 | 
| williamr@2 |    537 |         virtual TInt DeliveryReport() const;
 | 
| williamr@2 |    538 | 
 | 
| williamr@2 |    539 |         /**
 | 
| williamr@2 |    540 |         * Set the read report request setting value for the message.
 | 
| williamr@2 |    541 |         *
 | 
| williamr@2 |    542 |         * Specifies if the user wants a read report for the current message. 
 | 
| williamr@2 |    543 |         * If this value is Yes, the recipient phone should send a read report  
 | 
| williamr@2 |    544 |         *    when the user opens the message for the first time.
 | 
| williamr@2 |    545 |         *
 | 
| williamr@2 |    546 |         * @param[in] aRequest read report request setting. Possible values:
 | 
| williamr@2 |    547 |         * - EMmsYes: The user wants a read report.
 | 
| williamr@2 |    548 |         * - EMmsNo:  The user does not want a read report.
 | 
| williamr@2 |    549 |         */
 | 
| williamr@2 |    550 |         virtual void SetReadReply( TMmsYesNo aRequest );
 | 
| williamr@2 |    551 | 
 | 
| williamr@2 |    552 |         /**
 | 
| williamr@2 |    553 |         * Get the read report request setting of the message.
 | 
| williamr@2 |    554 |         *
 | 
| williamr@2 |    555 |         * Specifies if the sender wants a read report for current message. 
 | 
| williamr@2 |    556 |         * If this value is yes and the message has been received by the phone 
 | 
| williamr@2 |    557 |         *     (has "KMmsMessageMobileTerminated" flag) a read report should be 
 | 
| williamr@2 |    558 |         *     sent to the sender of this message when the message is opened 
 | 
| williamr@2 |    559 |         *     for the first time.
 | 
| williamr@2 |    560 |         *
 | 
| williamr@2 |    561 |         * @return read report request setting. Possible values:
 | 
| williamr@2 |    562 |         * - EMmsYes: The user wants a read report.
 | 
| williamr@2 |    563 |         * - EMmsNo:  The user does not want a read report.
 | 
| williamr@2 |    564 |         * - 0: Setting has not been defined. Do not send a read report.
 | 
| williamr@2 |    565 |         */
 | 
| williamr@2 |    566 |         virtual TInt ReadReply() const;
 | 
| williamr@2 |    567 | 
 | 
| williamr@2 |    568 |         /**
 | 
| williamr@2 |    569 |         * Get the sending date and time of the message. 
 | 
| williamr@2 |    570 |         * Valid only for messages received by the phone.
 | 
| williamr@2 |    571 |         * @return the time when MMS Service Centre has received the message  
 | 
| williamr@2 |    572 |         *     from sender (in UTC time). 
 | 
| williamr@2 |    573 |         *     If the time has not been defined, returns TTime(0).
 | 
| williamr@2 |    574 |         */
 | 
| williamr@2 |    575 |         virtual TTime SendingDate() const;
 | 
| williamr@2 |    576 | 
 | 
| williamr@2 |    577 |         /**
 | 
| williamr@2 |    578 |         * Get the response text from the message.
 | 
| williamr@2 |    579 |         *
 | 
| williamr@2 |    580 |         * Valid only in cases a response text has been obtained from MMS Service 
 | 
| williamr@2 |    581 |         *     Centre. Possible cases are received messages and messages whose 
 | 
| williamr@2 |    582 |         *     senging has failed. The text may explain the cause of the failure.
 | 
| williamr@2 |    583 |         *
 | 
| williamr@2 |    584 |         * @return Response text string. If text is not defined, returns an empty 
 | 
| williamr@2 |    585 |         *     string.
 | 
| williamr@2 |    586 |         * @since 2.0
 | 
| williamr@2 |    587 |         */
 | 
| williamr@2 |    588 |         virtual TPtrC ResponseText() const;
 | 
| williamr@2 |    589 | 
 | 
| williamr@2 |    590 |         /**
 | 
| williamr@2 |    591 |         * Get the response status value from the message.
 | 
| williamr@2 |    592 |         *
 | 
| williamr@2 |    593 |         * This function returns the status MMS Service Centre has sent with a 
 | 
| williamr@2 |    594 |         *     retrieved message or as a response to a failure to send a message. 
 | 
| williamr@2 |    595 |         * The status code may be used in case of permanent failures to retrieve 
 | 
| williamr@2 |    596 |         *     or failures to send to indicate the reason of the failure.
 | 
| williamr@2 |    597 |         *
 | 
| williamr@2 |    598 |         * @return Status code sent by MMS Service Centre. Possible values are 
 | 
| williamr@2 |    599 |         *     defined in OMA MMS Encapsulations specifications, and depend on 
 | 
| williamr@2 |    600 |         *     the version of the MMS Service Centre sending the response. 
 | 
| williamr@2 |    601 |         * - Error codes 128 - 136 denote legacy errors from MMS encapsulation 
 | 
| williamr@2 |    602 |         *     version 1.0
 | 
| williamr@2 |    603 |         * - Error codes 192 - 223 denote transient failures.
 | 
| williamr@2 |    604 |         * - Error codes 224 - 255 denote permanent failures.
 | 
| williamr@2 |    605 |         * - 0 means the response status has not been set. Either the operation was 
 | 
| williamr@2 |    606 |         *     successful or the cause of the failure was not set by MMS Service Centre.
 | 
| williamr@2 |    607 |         * @since 3.0
 | 
| williamr@2 |    608 |         */
 | 
| williamr@2 |    609 |         virtual TInt ResponseStatus() const;
 | 
| williamr@2 |    610 | 
 | 
| williamr@2 |    611 |         /**
 | 
| williamr@2 |    612 |         * Get number of times the message has been forwarded.
 | 
| williamr@2 |    613 |         *
 | 
| williamr@2 |    614 |         * Returns the number of previous senders in case of a message that 
 | 
| williamr@2 |    615 |         *     has been forwarded from one terminal to another based on the 
 | 
| williamr@2 |    616 |         *     MMS notification only without retrieving the actual message to 
 | 
| williamr@2 |    617 |         *     the terminal first.
 | 
| williamr@2 |    618 |         *
 | 
| williamr@2 |    619 |         * @return Number of times the message has been forwarded.
 | 
| williamr@2 |    620 |         * @since 3.0
 | 
| williamr@2 |    621 |         */
 | 
| williamr@2 |    622 |         virtual TInt NumberOfPreviousSenders() const;
 | 
| williamr@2 |    623 | 
 | 
| williamr@2 |    624 |         /**
 | 
| williamr@2 |    625 |         * Get the address of a previous sender.
 | 
| williamr@2 |    626 |         *
 | 
| williamr@2 |    627 |         * The addresses of the previous senders are defined for messages that 
 | 
| williamr@2 |    628 |         *     have been forwarded without fetching them to the terminal first.
 | 
| williamr@2 |    629 |         *
 | 
| williamr@2 |    630 |         * @param[in] aSequenceNumber Indicates the number of the sender in the 
 | 
| williamr@2 |    631 |         *     sequence. 1 is the first sender, a higher number indicates a later 
 | 
| williamr@2 |    632 |         *     sender.
 | 
| williamr@2 |    633 |         * @return Address of the specified previous sender. If the sequence number 
 | 
| williamr@2 |    634 |         *     exceeds the number of senders or is less than 1, an empty string is 
 | 
| williamr@2 |    635 |         *     returned.
 | 
| williamr@2 |    636 |         * @since 3.0
 | 
| williamr@2 |    637 |         */
 | 
| williamr@2 |    638 |         virtual TPtrC PreviousSender( TInt aSequenceNumber ) const;
 | 
| williamr@2 |    639 | 
 | 
| williamr@2 |    640 |         /**
 | 
| williamr@2 |    641 |         * Get the time when the message was previously sent (in UTC time).
 | 
| williamr@2 |    642 |         *
 | 
| williamr@2 |    643 |         * The function is valid only for messages that have been forwarded 
 | 
| williamr@2 |    644 |         *     without fetching them to the terminal first.
 | 
| williamr@2 |    645 |         *
 | 
| williamr@2 |    646 |         * @param[in] aSequenceNumber Indicates the number of the sender in the 
 | 
| williamr@2 |    647 |         *     sequence. 1 is the first sender, a higher number indicates a later 
 | 
| williamr@2 |    648 |         *     sender.
 | 
| williamr@2 |    649 |         * @return Time of the previous sending (in UTC time). If the sequence 
 | 
| williamr@2 |    650 |         *     number exceeds the number of senders or is less than 1, TTime(0)  
 | 
| williamr@2 |    651 |         *     is returned.
 | 
| williamr@2 |    652 |         * @since 3.0
 | 
| williamr@2 |    653 |         */
 | 
| williamr@2 |    654 |         virtual TTime PreviousSendingDate( TInt aSequenceNumber ) const;
 | 
| williamr@2 |    655 | 
 | 
| williamr@2 |    656 |         /**
 | 
| williamr@2 |    657 |         * Get the time when the message was received in the terminal.
 | 
| williamr@2 |    658 |         *
 | 
| williamr@2 |    659 |         * @return Time of the arrival of the message (in UTC time). 
 | 
| williamr@2 |    660 |         *    If the time has not been defined, TTime(0) is returned.
 | 
| williamr@2 |    661 |         * @since 3.0
 | 
| williamr@2 |    662 |         */
 | 
| williamr@2 |    663 |         virtual TTime MessageReceiveTime() const;
 | 
| williamr@2 |    664 | 
 | 
| williamr@2 |    665 |         /**
 | 
| williamr@2 |    666 |         * Get the incoming message size.
 | 
| williamr@2 |    667 |         *
 | 
| williamr@2 |    668 |         * This is valid only for a notification.
 | 
| williamr@2 |    669 |         *
 | 
| williamr@2 |    670 |         * @return Message size in octets as specified in MMS Notification.
 | 
| williamr@2 |    671 |         */
 | 
| williamr@2 |    672 |         virtual TInt MessageTransferSize() const;
 | 
| williamr@2 |    673 | 
 | 
| williamr@2 |    674 |         /**
 | 
| williamr@2 |    675 |         * Get the Uri from which the message can be fetched.
 | 
| williamr@2 |    676 |         *
 | 
| williamr@2 |    677 |         * This is valid only for a nofification.
 | 
| williamr@2 |    678 |         *
 | 
| williamr@2 |    679 |         * @return Content location of the actual message, the Uri from which 
 | 
| williamr@2 |    680 |         *    the message is fetched from MMS Service Centre.
 | 
| williamr@2 |    681 |         */
 | 
| williamr@2 |    682 |         virtual TPtrC8 MessageContentLocation() const;
 | 
| williamr@2 |    683 | 
 | 
| williamr@2 |    684 |         /**
 | 
| williamr@2 |    685 |         * Set id of the root part of the message.
 | 
| williamr@2 |    686 |         *
 | 
| williamr@2 |    687 |         * @param[in] aId Attachment Id of the message part which controls the 
 | 
| williamr@2 |    688 |         *     display of the message. Should point to the SMIL part if present.
 | 
| williamr@2 |    689 |         */
 | 
| williamr@2 |    690 |         virtual void SetMessageRootL( const TMsvAttachmentId aId );
 | 
| williamr@2 |    691 | 
 | 
| williamr@2 |    692 |         /**
 | 
| williamr@2 |    693 |         * Get the id of the root part of the message.
 | 
| williamr@2 |    694 |         *
 | 
| williamr@2 |    695 |         * @return Id of the attachment that starts the message display, 
 | 
| williamr@2 |    696 |         * KMsvNullIndexEntryId if the root part has not been defined.
 | 
| williamr@2 |    697 |         */
 | 
| williamr@2 |    698 |         virtual TMsvAttachmentId MessageRootAttachment() const;
 | 
| williamr@2 |    699 | 
 | 
| williamr@2 |    700 |         /**
 | 
| williamr@2 |    701 |         * Set the maximum size of the images that can be inserted in the message.
 | 
| williamr@2 |    702 |         *
 | 
| williamr@2 |    703 |         * @param[in] aHeight Image height in pixels.
 | 
| williamr@2 |    704 |         * @param[in] aWidth Image width in pixels.
 | 
| williamr@2 |    705 |         */
 | 
| williamr@2 |    706 |         virtual void SetMaximumImage( TInt aWidth, TInt aHeight );
 | 
| williamr@2 |    707 | 
 | 
| williamr@2 |    708 |         /**
 | 
| williamr@2 |    709 |         * Get the maximum size of the images that can be inserted in the message.
 | 
| williamr@2 |    710 |         *
 | 
| williamr@2 |    711 |         * The returned values are 0 if the maximum values have not been defined.
 | 
| williamr@2 |    712 |         * @param[out] aHeight image height in pixels
 | 
| williamr@2 |    713 |         * @param[out] aWidth image width in pixels
 | 
| williamr@2 |    714 |         */
 | 
| williamr@2 |    715 |         virtual void GetMaximumImage( TInt& aWidth, TInt& aHeight ) const;
 | 
| williamr@2 |    716 | 
 | 
| williamr@2 |    717 |         // -------------------------------------------------------------------
 | 
| williamr@2 |    718 |         // GENERAL MESSAGE INFORMATION METHODS
 | 
| williamr@2 |    719 | 
 | 
| williamr@2 |    720 |         /**
 | 
| williamr@2 |    721 |         * Get the message size. 
 | 
| williamr@2 |    722 |         *
 | 
| williamr@2 |    723 |         * SaveMessageL and LoadMessageL updates the value. This function returns 
 | 
| williamr@2 |    724 |         * the total amount of disk space the message takes. The actual message 
 | 
| williamr@2 |    725 |         * size in transmission is smaller due to binary encoding of the headers.
 | 
| williamr@2 |    726 |         *
 | 
| williamr@2 |    727 |         * @return size of all message parts in bytes including both attachments 
 | 
| williamr@2 |    728 |         *     and internal header structures.
 | 
| williamr@2 |    729 |         */
 | 
| williamr@2 |    730 |         virtual TInt32 MessageSize();
 | 
| williamr@2 |    731 | 
 | 
| williamr@2 |    732 |         /**
 | 
| williamr@2 |    733 |         * Set the message description string.
 | 
| williamr@2 |    734 |         * 
 | 
| williamr@2 |    735 |         * This provides a method to override the default message description. 
 | 
| williamr@2 |    736 |         * The next SaveMessageL saves the description text in the 
 | 
| williamr@2 |    737 |         * TMsvEntry::iDescription field. This field is shown in Message Centre  
 | 
| williamr@2 |    738 |         * message lists to describe the contents of the message. Normally it is  
 | 
| williamr@2 |    739 |         * the message subject, but if there is no subject in the message, the 
 | 
| williamr@2 |    740 |         * caller may set some text from a text part of the message as the 
 | 
| williamr@2 |    741 |         * description. 
 | 
| williamr@2 |    742 |         *
 | 
| williamr@2 |    743 |         * Note that this method does not check the text length, so avoid long 
 | 
| williamr@2 |    744 |         * descriptions to minimize memory usage.
 | 
| williamr@2 |    745 |         *
 | 
| williamr@2 |    746 |         * @param[in] aText Message description
 | 
| williamr@2 |    747 |         */
 | 
| williamr@2 |    748 |         virtual void SetMessageDescriptionL( const TDesC& aText );
 | 
| williamr@2 |    749 | 
 | 
| williamr@2 |    750 |         // ---------------------------------------------------------------------
 | 
| williamr@2 |    751 |         // FUNCTIONS TO HANDLE EXTRA MESSAGE ATTRIBUTES (FOR UI USE ONLY)
 | 
| williamr@2 |    752 | 
 | 
| williamr@2 |    753 |         /**
 | 
| williamr@2 |    754 |         * Add attribute to an attribute array (for the use of MMS UI only).
 | 
| williamr@2 |    755 |         *
 | 
| williamr@2 |    756 |         * No duplicates are allowed. If an attribute exists, its value is changed. 
 | 
| williamr@2 |    757 |         * The attributes and their values can be arbitrary strings. There are no 
 | 
| williamr@2 |    758 |         * restrictions. The purpose is to allow the UI to store some extra 
 | 
| williamr@2 |    759 |         * information with the message. The values of the attibutes are not included 
 | 
| williamr@2 |    760 |         * when the message is sent.
 | 
| williamr@2 |    761 |         * @param[in] aName Name of the attribute (case sensitive).
 | 
| williamr@2 |    762 |         * @param[in] aValue Value of the attribute.
 | 
| williamr@2 |    763 |         *
 | 
| williamr@2 |    764 |         * @leave KErrArgument if length of aName or aValue is 0.
 | 
| williamr@2 |    765 |         * @leave KErrNoMemory if memory runs out while adding the attribute.
 | 
| williamr@2 |    766 |         */
 | 
| williamr@2 |    767 |         virtual void AddAttributeL( const TDesC& aName, const TDesC& aValue );
 | 
| williamr@2 |    768 | 
 | 
| williamr@2 |    769 |         /**
 | 
| williamr@2 |    770 |         * Get value of an attribute (for the use of MMS UI only).
 | 
| williamr@2 |    771 |         *
 | 
| williamr@2 |    772 |         * @param[in] aName Name of the attribute (case sensitive).
 | 
| williamr@2 |    773 |         * @return Value of the attribute.
 | 
| williamr@2 |    774 |         * @leave KErrNotFound if attribute not found or the length of aName is 0.
 | 
| williamr@2 |    775 |         */
 | 
| williamr@2 |    776 |         virtual TPtrC GetAttributeL( const TDesC& aName );
 | 
| williamr@2 |    777 | 
 | 
| williamr@2 |    778 |         /**
 | 
| williamr@2 |    779 |         * Check if attribute is present (for the use of MMS UI only).
 | 
| williamr@2 |    780 |         *
 | 
| williamr@2 |    781 |         * @param[in] aName Name of the attribute (case sensitive).
 | 
| williamr@2 |    782 |         * @return ETrue if the attribute is found, EFalse otherwise.
 | 
| williamr@2 |    783 |         */
 | 
| williamr@2 |    784 |         virtual TBool FindAttribute( const TDesC& aName );
 | 
| williamr@2 |    785 | 
 | 
| williamr@2 |    786 |         /**
 | 
| williamr@2 |    787 |         * Delete named attribute from list (for the use of MMS UI only).
 | 
| williamr@2 |    788 |         *
 | 
| williamr@2 |    789 |         * @param[in] aName Name of the attribute (case sensitive).
 | 
| williamr@2 |    790 |         */
 | 
| williamr@2 |    791 |         virtual void DeleteAttribute( const TDesC& aName );
 | 
| williamr@2 |    792 | 
 | 
| williamr@2 |    793 |         /**
 | 
| williamr@2 |    794 |         * Reset all attributes (for the use of MMS UI only).
 | 
| williamr@2 |    795 |         *
 | 
| williamr@2 |    796 |         * Removes all attributes (names and values) from the message.
 | 
| williamr@2 |    797 |         */
 | 
| williamr@2 |    798 |         virtual void ResetAttributes();
 | 
| williamr@2 |    799 | 
 | 
| williamr@2 |    800 |         // -------------------------------------------------------------------
 | 
| williamr@2 |    801 |         // FUNCTIONS TO HANDLE MESSAGE ATTACHMENTS
 | 
| williamr@2 |    802 | 
 | 
| williamr@2 |    803 |         /**
 | 
| williamr@2 |    804 |         * Create attachment entry and copy specified file to message store.
 | 
| williamr@2 |    805 |         *
 | 
| williamr@2 |    806 |         * The user should call SaveMessageL after having added all attachments 
 | 
| williamr@2 |    807 |         *     to update TMsvEntry of the message entry.
 | 
| williamr@2 |    808 |         *
 | 
| williamr@2 |    809 |         * @param[in] aStore An open edit store for the message entry. 
 | 
| williamr@2 |    810 |         *     Caller must commit and close the store when ready. (Several 
 | 
| williamr@2 |    811 |         *     attachments can be added before committing the store.)
 | 
| williamr@2 |    812 |         * @param[in] aFile Open file handle, source of the attachment. 
 | 
| williamr@2 |    813 |         *     Caller must close the file afterwards.
 | 
| williamr@2 |    814 |         * @param[in] aMimeType Mime type (content type) of the attachmet 
 | 
| williamr@2 |    815 |         *     in format type/subtype, for example image/jpeg.
 | 
| williamr@2 |    816 |         * @param[in] aMimeHeaders Mime headers for the attachment. If the content 
 | 
| williamr@2 |    817 |         *     type is not defined in aMimeHeaders, the function adds the mime type 
 | 
| williamr@2 |    818 |         *     and subtype from aMimeType. Suggested filename in aMimeHeaders is 
 | 
| williamr@2 |    819 |         *     used as attachment name.
 | 
| williamr@2 |    820 |         * @param[in] aAttachmentInfo Attachment into structure, must be 
 | 
| williamr@2 |    821 |         *     initialized to CMsvAttachment::EMsvFile. If mime type is added 
 | 
| williamr@2 |    822 |         *     into the attachment info, it must be of format type/subtype, 
 | 
| williamr@2 |    823 |         *     for example image/jpeg. On return AttachmentInfo contains data 
 | 
| williamr@2 |    824 |         *     about the attachment. Ownership of attachmentinfo is transferred 
 | 
| williamr@2 |    825 |         *     to attachment manager, it must not be deleted by caller. It must 
 | 
| williamr@2 |    826 |         *     not be put on cleanup stack either. MMS engine keeps it safe until 
 | 
| williamr@2 |    827 |         *     the ownership has been transferred.
 | 
| williamr@2 |    828 |         * @param[out] aAttaId Attachment id of the newly created attachment.
 | 
| williamr@2 |    829 |         *
 | 
| williamr@2 |    830 |         * @pre A message entry must exist. It may be a new entry or an old entry 
 | 
| williamr@2 |    831 |         *     to be edited.
 | 
| williamr@2 |    832 |         * @pre CMsvMimeHeaders structure must have been filled in advantage. 
 | 
| williamr@2 |    833 |         *     The following values should be set:
 | 
| williamr@2 |    834 |         * - Content type, for example image 
 | 
| williamr@2 |    835 |         * - Content subtype, for example jpeg
 | 
| williamr@2 |    836 |         * - Character set IANA MIBEnum value, for example 106 (utf-8). Should be 
 | 
| williamr@2 |    837 |         *      defined only if the content type is text.
 | 
| williamr@2 |    838 |         * - Content-id if the presentation part refers to the attachments by 
 | 
| williamr@2 |    839 |         *      content-ids.
 | 
| williamr@2 |    840 |         * - Suggested filename (name only, no path), the name that should be 
 | 
| williamr@2 |    841 |         *      used to store the attachment and used as suggested filename 
 | 
| williamr@2 |    842 |         *      when sending the message. If the suggested filename is not set, the
 | 
| williamr@2 |    843 |         *      name of the attachment file will be used.
 | 
| williamr@2 |    844 |         * - Content-location if the presentation part refers to the attachments by 
 | 
| williamr@2 |    845 |         *      using content-location. The content-location string must contain only 
 | 
| williamr@2 |    846 |         *      us-ascii characters.
 | 
| williamr@2 |    847 |         * - X-type parameters (if needed). These are always handled as pairs of a 
 | 
| williamr@2 |    848 |         *      parameter name and parameter value. A descriptor at an even idex 
 | 
| williamr@2 |    849 |         *      in the array (0, 2, 4, ...) represents the parameter name and a 
 | 
| williamr@2 |    850 |         *      descriptor at an odd index (1, 3, 5, ...) represents the parameter 
 | 
| williamr@2 |    851 |         *      value. If a parameter has no value, it must be indicated by an empty 
 | 
| williamr@2 |    852 |         *      descriptor. The X-type parameter array must always contain an even 
 | 
| williamr@2 |    853 |         *      number of elements.
 | 
| williamr@2 |    854 |         *
 | 
| williamr@2 |    855 |         * @code
 | 
| williamr@2 |    856 |         * // The following code shows a short example of how the attachement
 | 
| williamr@2 |    857 |         * // creation proceeds.
 | 
| williamr@2 |    858 |         *
 | 
| williamr@2 |    859 |         * // Assume that the client entry is set to the message entry.
 | 
| williamr@2 |    860 |         * // Attachments are added to the message entry one by one
 | 
| williamr@2 |    861 |         * CMsvStore* store = iMmsClient->Entry().EditStoreL();
 | 
| williamr@2 |    862 |         * CleanupStack::PushL(store);
 | 
| williamr@2 |    863 |         *
 | 
| williamr@2 |    864 |         * CMsvAttachment* attaInfo = NULL;
 | 
| williamr@2 |    865 |         * TMsvAttachmentId attaId = 0;
 | 
| williamr@2 |    866 |         *
 | 
| williamr@2 |    867 |         * RFile attaFile;
 | 
| williamr@2 |    868 |         * // Set filename of attachment
 | 
| williamr@2 |    869 |         * TFileName name( _L("C:\\pictures\\picture123.jpg") );
 | 
| williamr@2 |    870 |         *
 | 
| williamr@2 |    871 |         * CMsvMimeHeaders* mimeHeaders = CMsvMimeHeaders::NewL();
 | 
| williamr@2 |    872 |         * CleanupStack::PushL( mimeHeaders );
 | 
| williamr@2 |    873 |         *
 | 
| williamr@2 |    874 |         * // Set values to mime headers
 | 
| williamr@2 |    875 |         * mimeHeaders->SetContentTypeL( _L8( "image") );
 | 
| williamr@2 |    876 |         * mimeHeaders->SetContentSubTypeL( _L8( "jpeg" ) );
 | 
| williamr@2 |    877 |         *
 | 
| williamr@2 |    878 |         * _LIT8(KMimeType, "image/jpeg");
 | 
| williamr@2 |    879 |         * // CreateAttachment2L will set the content type to attachment Info
 | 
| williamr@2 |    880 |         *
 | 
| williamr@2 |    881 |         * // Open the attachment file for reading
 | 
| williamr@2 |    882 |         * attaFile.Open( iFs, name, EFileShareReadersOnly | EFileRead );
 | 
| williamr@2 |    883 |         * CleanupClosePushL(attaFile);
 | 
| williamr@2 |    884 |         *
 | 
| williamr@2 |    885 |         * attaInfo = CMsvAttachment::NewL(CMsvAttachment::EMsvFile);
 | 
| williamr@2 |    886 |         * // attaInfo ownerhip will be transferred to Attachment Manager.
 | 
| williamr@2 |    887 |         * // It must not be pushed onto the cleanupStack before calling 
 | 
| williamr@2 |    888 |         * // CreateAttachment2L.
 | 
| williamr@2 |    889 |         *
 | 
| williamr@2 |    890 |         * TMsvAttachmentId attaId = 0;
 | 
| williamr@2 |    891 |         *
 | 
| williamr@2 |    892 |         * iMmsClient->CreateAttachment2L(
 | 
| williamr@2 |    893 |         *     *store,   // edit store
 | 
| williamr@2 |    894 |         *     attaFile, // open file handle
 | 
| williamr@2 |    895 |         *     KMimeType, // combination type like image/jpeg
 | 
| williamr@2 |    896 |         *     *mimeHeaders,
 | 
| williamr@2 |    897 |         *     attaInfo,
 | 
| williamr@2 |    898 |         *     attaId);
 | 
| williamr@2 |    899 |         * // Now Attachment Manager owns the attaInfo
 | 
| williamr@2 |    900 |         * attaInfo = NULL;
 | 
| williamr@2 |    901 |         *
 | 
| williamr@2 |    902 |         * CleanupStack::PopAndDestroy(); // attaFile.Close()
 | 
| williamr@2 |    903 |         * CleanupStack::PopAndDestroy(); // mimeHeaders
 | 
| williamr@2 |    904 |         *
 | 
| williamr@2 |    905 |         * // Several attachments can be added before committing the store
 | 
| williamr@2 |    906 |         *
 | 
| williamr@2 |    907 |         * // Store must be committed before it is destroyed
 | 
| williamr@2 |    908 |         * store->CommitL();
 | 
| williamr@2 |    909 |         * CleanupStack::PopAndDestroy(); // store
 | 
| williamr@2 |    910 |         * @endcode
 | 
| williamr@2 |    911 |         */
 | 
| williamr@2 |    912 |         virtual void CreateAttachment2L(
 | 
| williamr@2 |    913 |             CMsvStore& aStore,
 | 
| williamr@2 |    914 |             RFile& aFile,
 | 
| williamr@2 |    915 |             TDesC8& aMimeType,
 | 
| williamr@2 |    916 |             CMsvMimeHeaders& aMimeHeaders,
 | 
| williamr@2 |    917 |             CMsvAttachment* aAttachmentInfo,
 | 
| williamr@2 |    918 |             TMsvAttachmentId& aAttaId);
 | 
| williamr@2 |    919 | 
 | 
| williamr@2 |    920 |         /**
 | 
| williamr@2 |    921 |         * Create a text/plain attachment.
 | 
| williamr@2 |    922 |         *
 | 
| williamr@2 |    923 |         * Creates a text attachment from text in a descriptor. 
 | 
| williamr@2 |    924 |         * Has option to convert all unicode paragraph separator marks to 
 | 
| williamr@2 |    925 |         *     line feeds. 
 | 
| williamr@2 |    926 |         * Converts text from unicode (ucs-2) to utf-8 before storing it.
 | 
| williamr@2 |    927 |         *
 | 
| williamr@2 |    928 |         * @param[in] aStore An open edit store. Caller must commit and close the 
 | 
| williamr@2 |    929 |         *     store (several attachments can be added before committing store).
 | 
| williamr@2 |    930 |         * @param[out] aAttachmentId Attachment id of the new attachment entry.
 | 
| williamr@2 |    931 |         * @param[in] aText Unicode text to be added as a text/plain attachment.
 | 
| williamr@2 |    932 |         * @param[in] aFile Suggested filename for the attachment.
 | 
| williamr@2 |    933 |         * @param[in] aConvertParagraphSeparator Flag that tells the function  
 | 
| williamr@2 |    934 |         *     to search for all 0x2029 characters (Unicode paragraph 
 | 
| williamr@2 |    935 |         *     separator) and to replace them with 0x000d 0x000a (carriage return, 
 | 
| williamr@2 |    936 |         *     line feed). 
 | 
| williamr@2 |    937 |         * Possible values:
 | 
| williamr@2 |    938 |         * - ETrue: Convert paragraph separators (default).
 | 
| williamr@2 |    939 |         * - EFalse: Do not convert paragraph separators.
 | 
| williamr@2 |    940 |         *
 | 
| williamr@2 |    941 |         * @pre A message entry must exist. It may be a new entry or an old entry 
 | 
| williamr@2 |    942 |         *     to be edited.
 | 
| williamr@2 |    943 |         *
 | 
| williamr@2 |    944 |         * @code
 | 
| williamr@2 |    945 |         *
 | 
| williamr@2 |    946 |         * TFileName attachmentFile( _L("story.txt") );
 | 
| williamr@2 |    947 |         *
 | 
| williamr@2 |    948 |         * CMsvStore* store = iMmsClient->Entry().EditStoreL();
 | 
| williamr@2 |    949 |         * CleanupStack::PushL(store);
 | 
| williamr@2 |    950 |         * TMsvAttachmentId attaId = 0;
 | 
| williamr@2 |    951 |         *
 | 
| williamr@2 |    952 |         * TBufC<12> story = _L( "Hello world!" );
 | 
| williamr@2 |    953 |         *
 | 
| williamr@2 |    954 |         * iMmsClient->CreateTextAttachmentL(
 | 
| williamr@2 |    955 |         *     *store,
 | 
| williamr@2 |    956 |         *     attaId,
 | 
| williamr@2 |    957 |         *     story,
 | 
| williamr@2 |    958 |         *     attachmentFile,
 | 
| williamr@2 |    959 |         *     ETrue )
 | 
| williamr@2 |    960 |         *
 | 
| williamr@2 |    961 |         * // When the call returns the id of the attachment will be strored in attaId
 | 
| williamr@2 |    962 |         *
 | 
| williamr@2 |    963 |         * // caller must commit the store as several attachments could be added berore
 | 
| williamr@2 |    964 |         * // committing the store.
 | 
| williamr@2 |    965 |         * store->CommitL();
 | 
| williamr@2 |    966 |         * CleanupStack::PopAndDestroy(); // store
 | 
| williamr@2 |    967 |         *
 | 
| williamr@2 |    968 |         * @endcode
 | 
| williamr@2 |    969 |         */
 | 
| williamr@2 |    970 |         virtual void CreateTextAttachmentL(
 | 
| williamr@2 |    971 |             CMsvStore& aStore,
 | 
| williamr@2 |    972 |             TMsvAttachmentId& aAttachmentId,
 | 
| williamr@2 |    973 |             const TDesC& aText,
 | 
| williamr@2 |    974 |             const TDesC& aFile,
 | 
| williamr@2 |    975 |             TBool aConvertParagraphSeparator = ETrue );
 | 
| williamr@2 |    976 | 
 | 
| williamr@2 |    977 |         // -------------------------------------------------------------------
 | 
| williamr@2 |    978 |         // MESSAGE HANDLING FUNCTIONS
 | 
| williamr@2 |    979 | 
 | 
| williamr@2 |    980 |         // NOTE: these are asynchronous functions
 | 
| williamr@2 |    981 | 
 | 
| williamr@2 |    982 |         /**
 | 
| williamr@2 |    983 |         * Send current message in the background.
 | 
| williamr@2 |    984 |         *
 | 
| williamr@2 |    985 |         * The message is automatically moved to Outbox folder before the 
 | 
| williamr@2 |    986 |         *     sending starts.
 | 
| williamr@2 |    987 |         *
 | 
| williamr@2 |    988 |         * @param[in] aCompletionStatus iStatus member of an active object. 
 | 
| williamr@2 |    989 |         *     It will be set as completed when the operating system has relayed 
 | 
| williamr@2 |    990 |         *     the request to the server side of Symbian Messaging System.
 | 
| williamr@2 |    991 |         * @param[in] aSendingTime Time at which the message is to be sent 
 | 
| williamr@2 |    992 |         *     given as UTC time. If aSending time is zero or in the past, the 
 | 
| williamr@2 |    993 |         *     message is scheduled to be sent as soon as possible.
 | 
| williamr@2 |    994 |         * @return Pointer to an operation active object. 
 | 
| williamr@2 |    995 |         *     The operation will complete when the sending has been successfully 
 | 
| williamr@2 |    996 |         *     scheduled. The actual sending will happen in the background. 
 | 
| williamr@2 |    997 |         *     If scheduling the send fails, the status of CMsvOperation will 
 | 
| williamr@2 |    998 |         *     contain the relevant error code. The operation object must not 
 | 
| williamr@2 |    999 |         *     be deleted before it completes.
 | 
| williamr@2 |   1000 |         *
 | 
| williamr@2 |   1001 |         * @leave KErrNoMemory or other Symbian error code. If the function leaves  
 | 
| williamr@2 |   1002 |         *     the owner of aCompletionStatus must not be set active because there 
 | 
| williamr@2 |   1003 |         *     will be no pending request.
 | 
| williamr@2 |   1004 |         */
 | 
| williamr@2 |   1005 |         virtual CMsvOperation* SendL( TRequestStatus& aCompletionStatus,
 | 
| williamr@2 |   1006 |             const TTime aSendingTime = TTime( 0 ) );
 | 
| williamr@2 |   1007 | 
 | 
| williamr@2 |   1008 |         /**
 | 
| williamr@2 |   1009 |         * Send a selection of messages in the background.
 | 
| williamr@2 |   1010 |         *
 | 
| williamr@2 |   1011 |         * The messages are moved to Outbox folder before the sending starts. 
 | 
| williamr@2 |   1012 |         *     All messages must be in the same place originally 
 | 
| williamr@2 |   1013 |         *     (all in drafts, or all in outbox, for example).
 | 
| williamr@2 |   1014 |         *
 | 
| williamr@2 |   1015 |         * @param[in] aSelection List of messages to be sent.
 | 
| williamr@2 |   1016 |         * @param[in] aCompletionStatus iStatus member of an active object. 
 | 
| williamr@2 |   1017 |         *     It will be set as completed when the operating system has relayed 
 | 
| williamr@2 |   1018 |         *     the request to the server side of Symbian Messaging System. 
 | 
| williamr@2 |   1019 |         * @param aSendingTime Time at which the message selection is to be sent 
 | 
| williamr@2 |   1020 |         *     given as UTC time. If aSending time is zero or in the past, the 
 | 
| williamr@2 |   1021 |         *     message is scheduled to be sent as soon as possible.
 | 
| williamr@2 |   1022 |         * @return Pointer to an operation active object. 
 | 
| williamr@2 |   1023 |         *     The operation will complete when the sending has been successfully 
 | 
| williamr@2 |   1024 |         *     scheduled. The actual sending will happen in the background. 
 | 
| williamr@2 |   1025 |         *     If scheduling the send fails, the status of CMsvOperation will 
 | 
| williamr@2 |   1026 |         *     contain the relevant error code. The operation object must not 
 | 
| williamr@2 |   1027 |         *     be deleted before it completes.
 | 
| williamr@2 |   1028 |         *
 | 
| williamr@2 |   1029 |         * @leave KErrNotFound if aSelection is empty, or other Symbian error code. 
 | 
| williamr@2 |   1030 |         *     If the function leaves the owner of aCompletionStatus must not be set  
 | 
| williamr@2 |   1031 |         *     active because there will be no pending request.
 | 
| williamr@2 |   1032 |         */
 | 
| williamr@2 |   1033 |         virtual CMsvOperation* SendL(
 | 
| williamr@2 |   1034 |             CMsvEntrySelection& aSelection,
 | 
| williamr@2 |   1035 |             TRequestStatus& aCompletionStatus,
 | 
| williamr@2 |   1036 |             TTime aSendingTime = TTime( 0 ) );
 | 
| williamr@2 |   1037 | 
 | 
| williamr@2 |   1038 |         /**
 | 
| williamr@2 |   1039 |         * Fetch pending MMS messages from MMS Service Centre to inbox.
 | 
| williamr@2 |   1040 |         *
 | 
| williamr@2 |   1041 |         * If there are notifications in postponed state they are all fetched. 
 | 
| williamr@2 |   1042 |         * If there are notification in inbox, they are not touched.
 | 
| williamr@2 |   1043 |         *
 | 
| williamr@2 |   1044 |         * @param[in] aCompletionStatus iStatus member of an active object. 
 | 
| williamr@2 |   1045 |         *     It will be set as completed when the operating system has relayed 
 | 
| williamr@2 |   1046 |         *     the request to the server side of Symbian Messaging System.
 | 
| williamr@2 |   1047 |         * @param[in] aForced indicates if the messages should be fetched 
 | 
| williamr@2 |   1048 |         *     regardless of current mode settings.
 | 
| williamr@2 |   1049 |         * - ETrue: User initiated fetch, use override.
 | 
| williamr@2 |   1050 |         * - EFalse: Event triggered fetch, fetch only if settings allow.
 | 
| williamr@2 |   1051 |         * @return Pointer to an operation active object. 
 | 
| williamr@2 |   1052 |         *     The operation will complete when the retrieving has been successfully 
 | 
| williamr@2 |   1053 |         *     scheduled. The actual retrieving will happen in the background. 
 | 
| williamr@2 |   1054 |         *     If scheduling the fetch fails, the status of CMsvOperation will 
 | 
| williamr@2 |   1055 |         *     contain the relevant error code. The operation object must not 
 | 
| williamr@2 |   1056 |         *     be deleted before it completes.
 | 
| williamr@2 |   1057 |         *
 | 
| williamr@2 |   1058 |         * @leave KErrNoMemory or other Symbian error code. If the function leaves 
 | 
| williamr@2 |   1059 |         *     the owner of aCompletionStatus must not be set active because there 
 | 
| williamr@2 |   1060 |         *     will be no pending request.
 | 
| williamr@2 |   1061 |         *
 | 
| williamr@2 |   1062 |         * @deprecated Postponed fetching mode is no longer supported by UI. In most 
 | 
| williamr@2 |   1063 |         *     cases this function would not have any effect.
 | 
| williamr@2 |   1064 |         */
 | 
| williamr@2 |   1065 |         virtual CMsvOperation* FetchAllL( TRequestStatus& aCompletionStatus,
 | 
| williamr@2 |   1066 |             TBool aForced = ETrue );
 | 
| williamr@2 |   1067 |             
 | 
| williamr@2 |   1068 |         /**
 | 
| williamr@2 |   1069 |         * Send a read report to the sender of a message.
 | 
| williamr@2 |   1070 |         *
 | 
| williamr@2 |   1071 |         * This function should be called when a new message is opened and the 
 | 
| williamr@2 |   1072 |         * sender of the message has specified that he wants a read report
 | 
| williamr@2 |   1073 |         * for the message in question. This function should not be called 
 | 
| williamr@2 |   1074 |         * if the settings indicate that sending read reports is not allowed.
 | 
| williamr@2 |   1075 |         *
 | 
| williamr@2 |   1076 |         * @param[in] aReadMessageId Id of the message for which a read report 
 | 
| williamr@2 |   1077 |         *     should be sent. The message must not be locked and the caller 
 | 
| williamr@2 |   1078 |         *     should not have CMsvStore open for the message as MMS Client Mtm 
 | 
| williamr@2 |   1079 |         *     must be able to read header fields from the original message.
 | 
| williamr@2 |   1080 |         * @param[in] aCompletionStatus iStatus member of an active object. 
 | 
| williamr@2 |   1081 |         *     It will be set as completed when the operating system has relayed  
 | 
| williamr@2 |   1082 |         *     the request to the server side of Symbian Messaging System.
 | 
| williamr@2 |   1083 |         * @param[in] aReadStatus indicates if the message was read 
 | 
| williamr@2 |   1084 |         *     Possible values:
 | 
| williamr@2 |   1085 |         * - EMmsReadStatusRead: The message was read.
 | 
| williamr@2 |   1086 |         * - EMmsReadStatusDeletedWithoutBeingRead: The message was deleted 
 | 
| williamr@2 |   1087 |         *         without being read.
 | 
| williamr@2 |   1088 |         * @return Pointer to an operation active object. 
 | 
| williamr@2 |   1089 |         *     The operation will complete when the sending of the read report 
 | 
| williamr@2 |   1090 |         *     has been successfully scheduled. The actual sending will happen 
 | 
| williamr@2 |   1091 |         *     in the background. If scheduling the send fails, the status of 
 | 
| williamr@2 |   1092 |         *     CMsvOperation will contain the relevant error code. 
 | 
| williamr@2 |   1093 |         *     If the sender of the message has not requested a read report or 
 | 
| williamr@2 |   1094 |         *     read report sending is not allowed, the operation completes 
 | 
| williamr@2 |   1095 |         *     with error code KErrGeneral. 
 | 
| williamr@2 |   1096 |         *     The operation object must not be deleted before it completes.
 | 
| williamr@2 |   1097 |         *
 | 
| williamr@2 |   1098 |         * @leave KErrLocked if the message entry cannot be accessed.
 | 
| williamr@2 |   1099 |         */
 | 
| williamr@2 |   1100 |         virtual CMsvOperation* SendReadReportL( TMsvId aReadMessageId,
 | 
| williamr@2 |   1101 |             TRequestStatus& aCompletionStatus,
 | 
| williamr@2 |   1102 |             TMmsReadStatus aReadStatus = EMmsReadStatusRead );
 | 
| williamr@2 |   1103 |             
 | 
| williamr@2 |   1104 |     public:  // FUNCTIONS FROM BASE CLASSES
 | 
| williamr@2 |   1105 | 
 | 
| williamr@2 |   1106 |         /**
 | 
| williamr@2 |   1107 |         * From CBaseMtm: Return type of this Mtm.
 | 
| williamr@2 |   1108 |         * @return Registered Mtm type.
 | 
| williamr@2 |   1109 |         */
 | 
| williamr@2 |   1110 |         inline TUid Type() const;
 | 
| williamr@2 |   1111 | 
 | 
| williamr@2 |   1112 | 
 | 
| williamr@2 |   1113 |         // Context specific functions
 | 
| williamr@2 |   1114 | 
 | 
| williamr@2 |   1115 |         /**
 | 
| williamr@2 |   1116 |         * From CBaseMtm: Set current context.
 | 
| williamr@2 |   1117 |         * @param[in] aEntry Pointer to entry instance.
 | 
| williamr@2 |   1118 |         */
 | 
| williamr@2 |   1119 |         inline void SetCurrentEntryL( CMsvEntry* aEntry );
 | 
| williamr@2 |   1120 | 
 | 
| williamr@2 |   1121 |         /**
 | 
| williamr@2 |   1122 |         * From CBaseMtm: Switch context to entry defined by aId.
 | 
| williamr@2 |   1123 |         * @param[in] aId Entry id in message store.
 | 
| williamr@2 |   1124 |         */
 | 
| williamr@2 |   1125 |         inline void SwitchCurrentEntryL( TMsvId aId );
 | 
| williamr@2 |   1126 | 
 | 
| williamr@2 |   1127 |         /**
 | 
| williamr@2 |   1128 |         * From CBaseMtm: Get reference to current entry.
 | 
| williamr@2 |   1129 |         * @return Reference to entry instance.
 | 
| williamr@2 |   1130 |         */
 | 
| williamr@2 |   1131 |         inline CMsvEntry& Entry() const;
 | 
| williamr@2 |   1132 | 
 | 
| williamr@2 |   1133 |         /**
 | 
| williamr@2 |   1134 |         * From CBaseMtm: Query if entry context has been set.
 | 
| williamr@2 |   1135 |         * @return Status, possible values:
 | 
| williamr@2 |   1136 |         * - ETrue:  Context has been set.
 | 
| williamr@2 |   1137 |         * - EFalse: Context has not been set.
 | 
| williamr@2 |   1138 |         */
 | 
| williamr@2 |   1139 |         inline TBool HasContext() const;
 | 
| williamr@2 |   1140 | 
 | 
| williamr@2 |   1141 |         // Message specific functions
 | 
| williamr@2 |   1142 | 
 | 
| williamr@2 |   1143 |         /**
 | 
| williamr@2 |   1144 |         * From CBaseMtm: Store current entry data.
 | 
| williamr@2 |   1145 |         */
 | 
| williamr@2 |   1146 |         void SaveMessageL();
 | 
| williamr@2 |   1147 | 
 | 
| williamr@2 |   1148 |         /**
 | 
| williamr@2 |   1149 |         * From CBaseMtm: Restore current entry data.
 | 
| williamr@2 |   1150 |         */
 | 
| williamr@2 |   1151 |         void LoadMessageL();
 | 
| williamr@2 |   1152 | 
 | 
| williamr@2 |   1153 |         /**
 | 
| williamr@2 |   1154 |         * From CBaseMtm: Checks that selected parts of current message are 
 | 
| williamr@2 |   1155 |         *     legal.
 | 
| williamr@2 |   1156 |         * @param[in] aPartList Flags specifying which parts to validate. 
 | 
| williamr@2 |   1157 |         *     (defined in MTMDEF.H). Possible values:
 | 
| williamr@2 |   1158 |         * - KMsvMessagePartPartBody: Ignored. MMS engine does not support 
 | 
| williamr@2 |   1159 |         *       separate message body.
 | 
| williamr@2 |   1160 |         * - KMsvMessagePartRecipient: Supported.
 | 
| williamr@2 |   1161 |         * - KMsvMessagePartOriginator Supported.
 | 
| williamr@2 |   1162 |         * - KMsvMessagePartDescription: Ignored. Description is always valid
 | 
| williamr@2 |   1163 |         * - KMsvMessagePartDate: Ignored. Date is always valid
 | 
| williamr@2 |   1164 |         * - KMsvMessagePartAttachments: Supported.
 | 
| williamr@2 |   1165 |         * @return TMsvPartList bitmask identifies each invalid part. If all parts 
 | 
| williamr@2 |   1166 |         *     are valid, returned value is 0.
 | 
| williamr@2 |   1167 |         */
 | 
| williamr@2 |   1168 |         TMsvPartList ValidateMessage( TMsvPartList aPartList );
 | 
| williamr@2 |   1169 | 
 | 
| williamr@2 |   1170 |         /**
 | 
| williamr@2 |   1171 |         * From CBaseMtm: Searches for specified text in selected parts of 
 | 
| williamr@2 |   1172 |         *     current message.
 | 
| williamr@2 |   1173 |         * @param[in] aTextToFind Text to search for.
 | 
| williamr@2 |   1174 |         * @param aPartList Flags specifying which parts to search. 
 | 
| williamr@2 |   1175 |         *     (defined in MTMDEF.H). Possible values: 
 | 
| williamr@2 |   1176 |         * - KMsvMessagePartPartBody: Ignored.
 | 
| williamr@2 |   1177 |         * - KMsvMessagePartRecipient: Supported.
 | 
| williamr@2 |   1178 |         * - KMsvMessagePartOriginator: Supported.
 | 
| williamr@2 |   1179 |         * - KMsvMessagePartDescription: Supported.
 | 
| williamr@2 |   1180 |         * - KMsvMessagePartDate: Ignored.
 | 
| williamr@2 |   1181 |         * - KMsvMessagePartAttachments: Ignored.
 | 
| williamr@2 |   1182 |         * @return TMsvPartList bitmask specifies in which of the specified parts the text
 | 
| williamr@2 |   1183 |         *     was found.
 | 
| williamr@2 |   1184 |         */
 | 
| williamr@2 |   1185 |         TMsvPartList Find( const TDesC& aTextToFind, TMsvPartList aPartList );
 | 
| williamr@2 |   1186 | 
 | 
| williamr@2 |   1187 |         /**
 | 
| williamr@2 |   1188 |         * From CBaseMtm: Send a reply to current message.
 | 
| williamr@2 |   1189 |         *
 | 
| williamr@2 |   1190 |         * @param[in] aDestination Id of the folder where the reply is generated.
 | 
| williamr@2 |   1191 |         * @param[in] aPartlist Flags specifying which standard message parts
 | 
| williamr@2 |   1192 |         *     are to be included in the response (defined in MTMDEF.H). Following 
 | 
| williamr@2 |   1193 |         *     values are possible:
 | 
| williamr@2 |   1194 |         * - KMsvMessagePartPartBody: Ignored.
 | 
| williamr@2 |   1195 |         * - KMsvMessagePartRecipient: Causes reply-to-all. Otherwise reply-to-sender 
 | 
| williamr@2 |   1196 |         *     only.
 | 
| williamr@2 |   1197 |         * - KMsvMessagePartOriginator: Ignored.
 | 
| williamr@2 |   1198 |         * - KMsvMessagePartDescription: Subject field is copied.
 | 
| williamr@2 |   1199 |         * - KMsvMessagePartDate: Ignored.
 | 
| williamr@2 |   1200 |         * - KMsvMessagePartAttachments: Ignored. Attachments are never copied to a reply.
 | 
| williamr@2 |   1201 |         * @param[in] aCompletionStatus Status of an active object. This status 
 | 
| williamr@2 |   1202 |         *     will be set as completed when the operation completes.
 | 
| williamr@2 |   1203 |         * @return Pointer to an operation active object. The progress information 
 | 
| williamr@2 |   1204 |         *     provides the id of the created message when the operation is complete. 
 | 
| williamr@2 |   1205 |         *     If there was an error while creating the message, then the message 
 | 
| williamr@2 |   1206 |         *     will be deleted and the result will contain a null id. 
 | 
| williamr@2 |   1207 |         *     The operation object must not be deleted before it completes.
 | 
| williamr@2 |   1208 |         */
 | 
| williamr@2 |   1209 |         CMsvOperation* ReplyL(
 | 
| williamr@2 |   1210 |             TMsvId aDestination,
 | 
| williamr@2 |   1211 |             TMsvPartList aPartlist,
 | 
| williamr@2 |   1212 |             TRequestStatus& aCompletionStatus );
 | 
| williamr@2 |   1213 | 
 | 
| williamr@2 |   1214 |         /**
 | 
| williamr@2 |   1215 |         * From CBaseMtm: Forward current message to new recipient.
 | 
| williamr@2 |   1216 |         *
 | 
| williamr@2 |   1217 |         * @param[in] aDestination Id of the folder where the new message 
 | 
| williamr@2 |   1218 |         *     is generated. 
 | 
| williamr@2 |   1219 |         * @param[in] aPartList Flags specifying which standard message parts 
 | 
| williamr@2 |   1220 |         *     are to be included in the response. Possible values:
 | 
| williamr@2 |   1221 |         * - KMsvMessagePartPartBody: Ignored.
 | 
| williamr@2 |   1222 |         * - KMsvMessagePartRecipient: Ignored.
 | 
| williamr@2 |   1223 |         * - KMsvMessagePartOriginator: Ignored.
 | 
| williamr@2 |   1224 |         * - KMsvMessagePartDescription: Subject field is copied.
 | 
| williamr@2 |   1225 |         * - KMsvMessagePartDate: Ignored.
 | 
| williamr@2 |   1226 |         * - KMsvMessagePartAttachments: Ignored. Attachments are always 
 | 
| williamr@2 |   1227 |         *       automatically included when forwarding a message.
 | 
| williamr@2 |   1228 |         * @param[in] aCompletionStatus Status of an active object. This status 
 | 
| williamr@2 |   1229 |         *     will be set as completed when the operation completes.
 | 
| williamr@2 |   1230 |         * @return Pointer to an operation active object. The progress information 
 | 
| williamr@2 |   1231 |         *     provides the id of the created message when the operation is complete. 
 | 
| williamr@2 |   1232 |         *     If there was an error while creating the message, then the message 
 | 
| williamr@2 |   1233 |         *     will be deleted and the result will contain a null id. 
 | 
| williamr@2 |   1234 |         *     The operation object must not be deleted before it completes.
 | 
| williamr@2 |   1235 |         */
 | 
| williamr@2 |   1236 |         CMsvOperation* ForwardL(
 | 
| williamr@2 |   1237 |             TMsvId aDestination,
 | 
| williamr@2 |   1238 |             TMsvPartList aPartList,
 | 
| williamr@2 |   1239 |             TRequestStatus& aCompletionStatus );
 | 
| williamr@2 |   1240 | 
 | 
| williamr@2 |   1241 |         /**
 | 
| williamr@2 |   1242 |         * New recipient list function is not virtual, and the base MTM 
 | 
| williamr@2 |   1243 |         * implementation must always be used. 
 | 
| williamr@2 |   1244 |         * The function is shown here for reference only:
 | 
| williamr@2 |   1245 |         *
 | 
| williamr@2 |   1246 |         * const CMsvRecipientList& AddresseeList() const;
 | 
| williamr@2 |   1247 |         */
 | 
| williamr@2 |   1248 | 
 | 
| williamr@2 |   1249 |         /**
 | 
| williamr@2 |   1250 |         * From CBaseMtm: Adds an addressee, cannot distiguish To, Cc, and Bcc.
 | 
| williamr@2 |   1251 |         *
 | 
| williamr@2 |   1252 |         * New addresses are handled as To type of addresses. 
 | 
| williamr@2 |   1253 |         * @param[in] aRealAddress Recipient address without alias.
 | 
| williamr@2 |   1254 |         */
 | 
| williamr@2 |   1255 |         void AddAddresseeL( const TDesC& aRealAddress );
 | 
| williamr@2 |   1256 | 
 | 
| williamr@2 |   1257 |         /**
 | 
| williamr@2 |   1258 |         * From CBaseMtm: Adds an addressee, cannot distiguish To, Cc, and Bcc.
 | 
| williamr@2 |   1259 |         *
 | 
| williamr@2 |   1260 |         * New addresses are handled as To type of addresses.
 | 
| williamr@2 |   1261 |         * @param[in] aRealAddress Recipient address.
 | 
| williamr@2 |   1262 |         * @param[in] aAlias Descriptive name for the recipient.
 | 
| williamr@2 |   1263 |         */
 | 
| williamr@2 |   1264 |         void AddAddresseeL( const TDesC& aRealAddress, const TDesC& aAlias );
 | 
| williamr@2 |   1265 | 
 | 
| williamr@2 |   1266 |         /**
 | 
| williamr@2 |   1267 |         * From CBaseMtm: Adds a typed addressee (To, Cc or Bcc).
 | 
| williamr@2 |   1268 |         *
 | 
| williamr@2 |   1269 |         * @param[in] aType recipient type. Possible values:
 | 
| williamr@2 |   1270 |         * - EMsvRecipientTo: Normal recipient.
 | 
| williamr@2 |   1271 |         * - EMsvRecipientCc: Recipient of a carbon copy.
 | 
| williamr@2 |   1272 |         * - EMsvRecipientBcc: Recipient of a blind carbon copy.
 | 
| williamr@2 |   1273 |         * @param[in] aRealAddress Address string without alias.
 | 
| williamr@2 |   1274 |         */
 | 
| williamr@2 |   1275 |         virtual void AddAddresseeL(
 | 
| williamr@2 |   1276 |             TMsvRecipientType aType,
 | 
| williamr@2 |   1277 |             const TDesC& aRealAddress);
 | 
| williamr@2 |   1278 | 
 | 
| williamr@2 |   1279 |         /**
 | 
| williamr@2 |   1280 |         * From CBaseMtm: Adds a typed addressee (To, Cc or Bcc).
 | 
| williamr@2 |   1281 |         *
 | 
| williamr@2 |   1282 |         * @param[in] aType recipient type. Possible values:
 | 
| williamr@2 |   1283 |         * - EMsvRecipientTo: Normal recipient.
 | 
| williamr@2 |   1284 |         * - EMsvRecipientCc: Recipient of a carbon copy.
 | 
| williamr@2 |   1285 |         * - EMsvRecipientBcc: Recipient of a blind carbon copy.
 | 
| williamr@2 |   1286 |         * @param[in] aRealAddress Address string without alias.
 | 
| williamr@2 |   1287 |         * @param[in] aAlias Descriptive name for the recipient.
 | 
| williamr@2 |   1288 |         */
 | 
| williamr@2 |   1289 |         virtual void AddAddresseeL(
 | 
| williamr@2 |   1290 |             TMsvRecipientType aType,
 | 
| williamr@2 |   1291 |             const TDesC& aRealAddress,
 | 
| williamr@2 |   1292 |             const TDesC& aAlias);
 | 
| williamr@2 |   1293 | 
 | 
| williamr@2 |   1294 |         /**
 | 
| williamr@2 |   1295 |         * From CBaseMtm: Removes an entry from addressee list.
 | 
| williamr@2 |   1296 |         *
 | 
| williamr@2 |   1297 |         * Cannot distinguish To, Cc and Bcc.
 | 
| williamr@2 |   1298 |         * @param[in] aIndex Index to the array of addresses from 
 | 
| williamr@2 |   1299 |         *     AddresseeList() function.
 | 
| williamr@2 |   1300 |         */
 | 
| williamr@2 |   1301 |         void RemoveAddressee( TInt aIndex );
 | 
| williamr@2 |   1302 | 
 | 
| williamr@2 |   1303 |         // Note: rich text body not supported in MMS Message encapsulation.
 | 
| williamr@2 |   1304 | 
 | 
| williamr@2 |   1305 |         /**
 | 
| williamr@2 |   1306 |         * From CBaseMtm: Get rich text body of the message.
 | 
| williamr@2 |   1307 |         *
 | 
| williamr@2 |   1308 |         * MMS does not support separate message body. Body is ignored. 
 | 
| williamr@2 |   1309 |         * All MMS message parts are attachments.
 | 
| williamr@2 |   1310 |         * @return Rich text body from CBaseMtm.
 | 
| williamr@2 |   1311 |         */
 | 
| williamr@2 |   1312 |         inline CRichText& Body();
 | 
| williamr@2 |   1313 | 
 | 
| williamr@2 |   1314 |         /**
 | 
| williamr@2 |   1315 |         * From CBaseMtm: Get rich text body.
 | 
| williamr@2 |   1316 |         *
 | 
| williamr@2 |   1317 |         * MMS does not support separate message body. Body is ignored. 
 | 
| williamr@2 |   1318 |         * All MMS message parts are attachments.
 | 
| williamr@2 |   1319 |         * @return Rich text body from CBaseMtm.
 | 
| williamr@2 |   1320 |         */
 | 
| williamr@2 |   1321 |         inline const CRichText& Body() const;
 | 
| williamr@2 |   1322 | 
 | 
| williamr@2 |   1323 |         /**
 | 
| williamr@2 |   1324 |         * From CBaseMtm: Set message subject.
 | 
| williamr@2 |   1325 |         * @param[in] aSubject Message subject.
 | 
| williamr@2 |   1326 |         */
 | 
| williamr@2 |   1327 |         void SetSubjectL( const TDesC& aSubject );
 | 
| williamr@2 |   1328 | 
 | 
| williamr@2 |   1329 |         /**
 | 
| williamr@2 |   1330 |         * From CBaseMtm: Get message subject.
 | 
| williamr@2 |   1331 |         * @return Message subject.
 | 
| williamr@2 |   1332 |         */
 | 
| williamr@2 |   1333 |         const TPtrC SubjectL() const;
 | 
| williamr@2 |   1334 | 
 | 
| williamr@2 |   1335 |         // General MTM-specific functionality
 | 
| williamr@2 |   1336 | 
 | 
| williamr@2 |   1337 |         /**
 | 
| williamr@2 |   1338 |         * From CBaseMtm: Query capabilities of MTM.
 | 
| williamr@2 |   1339 |         *
 | 
| williamr@2 |   1340 |         * @param[in] aCapability UID specifying which capablity is queried. 
 | 
| williamr@2 |   1341 |         *    For the possible Capability UIDs and types of return values 
 | 
| williamr@2 |   1342 |         *    see mtmuids.h
 | 
| williamr@2 |   1343 |         * @param[out] aResponse The value describing the capability at return.
 | 
| williamr@2 |   1344 |         * @return error code, Possible values:
 | 
| williamr@2 |   1345 |         * - KErrNone: Specified capability is supported and aResponse 
 | 
| williamr@2 |   1346 |         *       contains the value of the capability if available.
 | 
| williamr@2 |   1347 |         * - KErrNotSupported: Capability is not supported.
 | 
| williamr@2 |   1348 |         */
 | 
| williamr@2 |   1349 |         TInt QueryCapability( TUid aCapability, TInt& aResponse );
 | 
| williamr@2 |   1350 | 
 | 
| williamr@2 |   1351 |         /**
 | 
| williamr@2 |   1352 |         * From CBaseMtm: Pass a request to MMS Server MTM.
 | 
| williamr@2 |   1353 |         *
 | 
| williamr@2 |   1354 |         * Pass a function code to Server MTM, wait until the 
 | 
| williamr@2 |   1355 |         *     function returns. This function can be used to 
 | 
| williamr@2 |   1356 |         *     invoke synchronous protocol-specific operations. 
 | 
| williamr@2 |   1357 |         *     The supported functions are private and this function should 
 | 
| williamr@2 |   1358 |         *     be called by MMS UI only.
 | 
| williamr@2 |   1359 |         * @param[in] aFunctionId Enumeration constant defining the operation.
 | 
| williamr@2 |   1360 |         * @param[in] aSelection Array of message entry ids to be operated on. 
 | 
| williamr@2 |   1361 |         * @param[in] aParameter A descriptor that contains any parameters 
 | 
| williamr@2 |   1362 |         *     required by function specified by aFunctionId.
 | 
| williamr@2 |   1363 |         */
 | 
| williamr@2 |   1364 |         void InvokeSyncFunctionL(
 | 
| williamr@2 |   1365 |             TInt aFunctionId,
 | 
| williamr@2 |   1366 |             const CMsvEntrySelection& aSelection,
 | 
| williamr@2 |   1367 |             TDes8& aParameter );
 | 
| williamr@2 |   1368 | 
 | 
| williamr@2 |   1369 |         /**
 | 
| williamr@2 |   1370 |         * From CBaseMtm: Pass an asychronous request to Server MTM.
 | 
| williamr@2 |   1371 |         *
 | 
| williamr@2 |   1372 |         * Pass a function code to Server MTM. The operation will 
 | 
| williamr@2 |   1373 |         *     run in the background. This function can be used to  
 | 
| williamr@2 |   1374 |         *     invoke asynchronous protocol-specific operations. 
 | 
| williamr@2 |   1375 |         *     The supported functions are private and this function should 
 | 
| williamr@2 |   1376 |         *     be called by MMS UI only.
 | 
| williamr@2 |   1377 |         * @param[in] aFunctionId Enumeration constant defining the operation.
 | 
| williamr@2 |   1378 |         * @param[in] aSelection Array of message entry ids to be uperated on.
 | 
| williamr@2 |   1379 |         * @param[in] aParameter A descriptor that contains any parameters 
 | 
| williamr@2 |   1380 |         *     required by function specified by aFunctionId.
 | 
| williamr@2 |   1381 |         * @param[in] aCompletionStatus Status of an active object. 
 | 
| williamr@2 |   1382 |         *     This status will be set as completed when the operation completes
 | 
| williamr@2 |   1383 |         * @return Pointer to a message server operation (active object). 
 | 
| williamr@2 |   1384 |         */
 | 
| williamr@2 |   1385 |         CMsvOperation*  InvokeAsyncFunctionL(
 | 
| williamr@2 |   1386 |             TInt aFunctionId,
 | 
| williamr@2 |   1387 |             const CMsvEntrySelection& aSelection,
 | 
| williamr@2 |   1388 |             TDes8& aParameter,
 | 
| williamr@2 |   1389 |             TRequestStatus& aCompletionStatus );
 | 
| williamr@2 |   1390 | 
 | 
| williamr@2 |   1391 |         /**
 | 
| williamr@2 |   1392 |         * From CBaseMtm: Return session that was set at initialization.
 | 
| williamr@2 |   1393 |         * @return Reference to Message Server session object.
 | 
| williamr@2 |   1394 |         */
 | 
| williamr@2 |   1395 |         inline CMsvSession& Session();
 | 
| williamr@2 |   1396 | 
 | 
| williamr@2 |   1397 |         // Functions for SendAs support
 | 
| williamr@2 |   1398 | 
 | 
| williamr@2 |   1399 |         /**
 | 
| williamr@2 |   1400 |         * From CBaseMtm: Add a file attachment to the current message entry.
 | 
| williamr@2 |   1401 |         *
 | 
| williamr@2 |   1402 |         * The attachment is referenced by its file path and is copied into the
 | 
| williamr@2 |   1403 |         * message store. 
 | 
| williamr@2 |   1404 |         * This function needs an edit store for the current entry. 
 | 
| williamr@2 |   1405 |         * The caller should not keep the store open. 
 | 
| williamr@2 |   1406 |         * The store is committed and closed after each attachment operation. 
 | 
| williamr@2 |   1407 |         * Only one asynchronous operation can be running at any one time.
 | 
| williamr@2 |   1408 |         *
 | 
| williamr@2 |   1409 |         * If the file is a plain text file with ucs-2 character set MMS Engine 
 | 
| williamr@2 |   1410 |         * will convert the character set to utf-8 and create a text attachment 
 | 
| williamr@2 |   1411 |         * using this character set. The original file is not affected. This 
 | 
| williamr@2 |   1412 |         * must be done because MMS text attachments should be sent using 
 | 
| williamr@2 |   1413 |         * utf-8 character set.
 | 
| williamr@2 |   1414 |         *
 | 
| williamr@2 |   1415 |         * @param[in] aFilePath Full path specification of the attachment file.
 | 
| williamr@2 |   1416 |         * @param[in] aMimeType Mime type of the attachment file.
 | 
| williamr@2 |   1417 |         * @param[in] aCharset IANA MIBEnum of the character set of the attachment. 
 | 
| williamr@2 |   1418 |         *        If character set is not relevant for current attachment type, 
 | 
| williamr@2 |   1419 |         *        aCharset should be 0.
 | 
| williamr@2 |   1420 |         * @param[in] aStatus The request status to complete.
 | 
| williamr@2 |   1421 |         * @leave System-wide error codes.
 | 
| williamr@2 |   1422 |         *
 | 
| williamr@2 |   1423 |         * @code
 | 
| williamr@2 |   1424 |         *
 | 
| williamr@2 |   1425 |         * TFileName attachmentFile( _L("c:\\pictures\\picture123.jpg") );
 | 
| williamr@2 |   1426 |         * TBufC8<20> mimeType = _L8( "image/jpeg" );
 | 
| williamr@2 |   1427 |         * TUint charset = 0; // no character set needed for images
 | 
| williamr@2 |   1428 |         *
 | 
| williamr@2 |   1429 |         * CMsvOperationActiveSchedulerWait* wait = 
 | 
| williamr@2 |   1430 |         *     CMsvOperationActiveSchedulerWait::NewLC();
 | 
| williamr@2 |   1431 |         *
 | 
| williamr@2 |   1432 |         * iMmsClient->AddAttachmentL(
 | 
| williamr@2 |   1433 |         *     attachmentFile,
 | 
| williamr@2 |   1434 |         *     mimeType,
 | 
| williamr@2 |   1435 |         *     charset,
 | 
| williamr@2 |   1436 |         *     wait->iStatus);
 | 
| williamr@2 |   1437 |         *
 | 
| williamr@2 |   1438 |         * wait->Start();
 | 
| williamr@2 |   1439 |         *
 | 
| williamr@2 |   1440 |         * if ( wait->iStatus.Int() != KErrNone )
 | 
| williamr@2 |   1441 |         *     { 
 | 
| williamr@2 |   1442 |         *     // error handling, e.g. leave
 | 
| williamr@2 |   1443 |         *     }
 | 
| williamr@2 |   1444 |         *
 | 
| williamr@2 |   1445 |         * CleanupStack::PopAndDestroy(); // wait
 | 
| williamr@2 |   1446 |         *
 | 
| williamr@2 |   1447 |         * // The attachment has been added, store has been committed, and attachment data
 | 
| williamr@2 |   1448 |         * // has been copied to the message store.
 | 
| williamr@2 |   1449 |         * // If the original file is now modified, it does not affect the attachment file 
 | 
| williamr@2 |   1450 |         * // in the message store any more.
 | 
| williamr@2 |   1451 |         *
 | 
| williamr@2 |   1452 |         * @endcode
 | 
| williamr@2 |   1453 |         */
 | 
| williamr@2 |   1454 |         void AddAttachmentL( const TDesC& aFilePath,
 | 
| williamr@2 |   1455 |             const TDesC8& aMimeType,
 | 
| williamr@2 |   1456 |             TUint aCharset,
 | 
| williamr@2 |   1457 |             TRequestStatus& aStatus );
 | 
| williamr@2 |   1458 | 
 | 
| williamr@2 |   1459 |         /**
 | 
| williamr@2 |   1460 |         * From CBaseMtm: Add a file attachment to the current message entry.
 | 
| williamr@2 |   1461 |         *
 | 
| williamr@2 |   1462 |         * The attachment is referenced by an open file handle and is copied
 | 
| williamr@2 |   1463 |         * into the message store. 
 | 
| williamr@2 |   1464 |         * This function needs an edit store for the current entry. 
 | 
| williamr@2 |   1465 |         * The caller should not keep the store open. 
 | 
| williamr@2 |   1466 |         * The store is committed and closed after each attachment operation. 
 | 
| williamr@2 |   1467 |         *
 | 
| williamr@2 |   1468 |         * If the file is a plain text file with ucs-2 character set MMS Engine 
 | 
| williamr@2 |   1469 |         * will convert the character set to utf-8 and create a text attachment 
 | 
| williamr@2 |   1470 |         * using this character set. The original file is not affected. This 
 | 
| williamr@2 |   1471 |         * must be done because MMS text attachments should be sent using 
 | 
| williamr@2 |   1472 |         * utf-8 character set.
 | 
| williamr@2 |   1473 |         *
 | 
| williamr@2 |   1474 |         * Only one asynchronous operation can be running at any one time.
 | 
| williamr@2 |   1475 |         * @param[in] aFile An open file handle for the file attachment. The handle 
 | 
| williamr@2 |   1476 |         *    is closed when the function completes.
 | 
| williamr@2 |   1477 |         * @param[in] aMimeType Mime type of the attachment file.
 | 
| williamr@2 |   1478 |         * @param[in] aCharset IANA MIBEnum of the character set of the attachment. 
 | 
| williamr@2 |   1479 |         *        If character set is not relevant for current attachment type, 
 | 
| williamr@2 |   1480 |         *        aCharset should be 0.
 | 
| williamr@2 |   1481 |         * @param[in] aStatus The request status to complete.
 | 
| williamr@2 |   1482 |         * @leave System-wide error codes.
 | 
| williamr@2 |   1483 |         *
 | 
| williamr@2 |   1484 |         * The function closes the file handle when done. The caller must not attempt 
 | 
| williamr@2 |   1485 |         * to close the file handle afterwards.
 | 
| williamr@2 |   1486 |         *
 | 
| williamr@2 |   1487 |         * @code
 | 
| williamr@2 |   1488 |         *
 | 
| williamr@2 |   1489 |         * TFileName attachmentFile( _L("c:\\private\\privatedir\\picture123.jpg") );
 | 
| williamr@2 |   1490 |         * RFile fileHandle;
 | 
| williamr@2 |   1491 |         * TBufC8<20> mimeType = _L8( "image/jpeg" );
 | 
| williamr@2 |   1492 |         * TUint charset = 0; // no character set needed for images
 | 
| williamr@2 |   1493 |         *
 | 
| williamr@2 |   1494 |         * fileHandle.Open( iFs, attachmentFile, EFileShareReadersOnly | EFileRead );
 | 
| williamr@2 |   1495 |         * CleanupClosePush(fileHandle);
 | 
| williamr@2 |   1496 |         *
 | 
| williamr@2 |   1497 |         * CMsvOperationActiveSchedulerWait* wait = 
 | 
| williamr@2 |   1498 |         *     CMsvOperationActiveSchedulerWait::NewLC();
 | 
| williamr@2 |   1499 |         *
 | 
| williamr@2 |   1500 |         * iMmsClient->AddAttachmentL(
 | 
| williamr@2 |   1501 |         *     fileHandle,
 | 
| williamr@2 |   1502 |         *     mimeType,
 | 
| williamr@2 |   1503 |         *     charset,
 | 
| williamr@2 |   1504 |         *     wait->iStatus);
 | 
| williamr@2 |   1505 |         *
 | 
| williamr@2 |   1506 |         * wait->Start();
 | 
| williamr@2 |   1507 |         *
 | 
| williamr@2 |   1508 |         * if ( wait->iStatus.Int() != KErrNone )
 | 
| williamr@2 |   1509 |         *     { 
 | 
| williamr@2 |   1510 |         *     // error handling, e.g. leave
 | 
| williamr@2 |   1511 |         *     }
 | 
| williamr@2 |   1512 |         *
 | 
| williamr@2 |   1513 |         * CleanupStack::PopAndDestroy(); // wait
 | 
| williamr@2 |   1514 |         * CleanupStack::Pop(); // file handle was closed if function did not leave
 | 
| williamr@2 |   1515 |         *
 | 
| williamr@2 |   1516 |         * @endcode
 | 
| williamr@2 |   1517 |         */
 | 
| williamr@2 |   1518 |         void AddAttachmentL( RFile& aFile,
 | 
| williamr@2 |   1519 |             const TDesC8& aMimeType,
 | 
| williamr@2 |   1520 |             TUint aCharset,
 | 
| williamr@2 |   1521 |             TRequestStatus& aStatus );
 | 
| williamr@2 |   1522 | 
 | 
| williamr@2 |   1523 |         /**
 | 
| williamr@2 |   1524 |         * From CBaseMtm: Add a file attachment to the current message entry 
 | 
| williamr@2 |   1525 |         *     as a linked file.
 | 
| williamr@2 |   1526 |         *
 | 
| williamr@2 |   1527 |         * The attachment is referenced by its file path and is not copied 
 | 
| williamr@2 |   1528 |         * into the message store. The attachment file is always used from 
 | 
| williamr@2 |   1529 |         * its original location on disk indicated by the aFilePath 
 | 
| williamr@2 |   1530 |         * parameter.
 | 
| williamr@2 |   1531 |         *
 | 
| williamr@2 |   1532 |         * This function needs an edit store for the current entry. 
 | 
| williamr@2 |   1533 |         * The caller should not keep the store open. 
 | 
| williamr@2 |   1534 |         * The store is committed and closed after each attachment operation. 
 | 
| williamr@2 |   1535 |         * Only one asynchronous operation can be running at any one time. 
 | 
| williamr@2 |   1536 |         * 
 | 
| williamr@2 |   1537 |         * The file must be in some public directory so that MMS Engine can access 
 | 
| williamr@2 |   1538 |         * the file when it is actually sent. If the file is a plain text attachment 
 | 
| williamr@2 |   1539 |         * the character set cannot be converted to utf-8 as the original file cannot 
 | 
| williamr@2 |   1540 |         * be changed. Text files should not be sent as linked attachmets unless the 
 | 
| williamr@2 |   1541 |         * character set of the file is utf-8.
 | 
| williamr@2 |   1542 |         *
 | 
| williamr@2 |   1543 |         * @param[in] aFilePath Full path specification of the attachment file.
 | 
| williamr@2 |   1544 |         * @param[in] aMimeType Mime type of the attachment file.
 | 
| williamr@2 |   1545 |         * @param[in] aCharset IANA MIBEnum of the character set of the attachment. 
 | 
| williamr@2 |   1546 |         *        If character set is not relevant for current attachment type, 
 | 
| williamr@2 |   1547 |         *        aCharset should be 0.
 | 
| williamr@2 |   1548 |         * @param[in] aStatus The request status to complete.
 | 
| williamr@2 |   1549 |         * @leave System-wide error codes.
 | 
| williamr@2 |   1550 |         */
 | 
| williamr@2 |   1551 |         void AddLinkedAttachmentL( const TDesC& aFilePath,
 | 
| williamr@2 |   1552 |             const TDesC8& aMimeType,
 | 
| williamr@2 |   1553 |             TUint aCharset,
 | 
| williamr@2 |   1554 |             TRequestStatus& aStatus );
 | 
| williamr@2 |   1555 | 
 | 
| williamr@2 |   1556 |         /**
 | 
| williamr@2 |   1557 |         * From CBaseMtm: Add a message entry as an attachment to the current 
 | 
| williamr@2 |   1558 |         *     message entry.
 | 
| williamr@2 |   1559 |         *
 | 
| williamr@2 |   1560 |         * Not supported. No Message attachments allowed in MMS.
 | 
| williamr@2 |   1561 |         * @leave KErrNotSupported
 | 
| williamr@2 |   1562 |         */
 | 
| williamr@2 |   1563 |         void AddEntryAsAttachmentL( TMsvId aAttachmentId,
 | 
| williamr@2 |   1564 |             TRequestStatus& aStatus );
 | 
| williamr@2 |   1565 | 
 | 
| williamr@2 |   1566 |         /**
 | 
| williamr@2 |   1567 |         * From CBaseMtm: Create an attachment and return an open file handle for it.
 | 
| williamr@2 |   1568 |         *
 | 
| williamr@2 |   1569 |         * This function needs an edit store for the current entry. 
 | 
| williamr@2 |   1570 |         * The caller should not keep the store open. 
 | 
| williamr@2 |   1571 |         * The store is committed and closed after each attachment operation. 
 | 
| williamr@2 |   1572 |         * Only one asynchronous operation can be running at any one time.
 | 
| williamr@2 |   1573 |         *
 | 
| williamr@2 |   1574 |         * @param[in] aFileName Suggested filename.
 | 
| williamr@2 |   1575 |         * @param[out] aAttachmentFile An open file handle for read/write 
 | 
| williamr@2 |   1576 |         *     attachment file. The caller must close the handle.
 | 
| williamr@2 |   1577 |         * @param[in] aMimeType Mime type of the attachment file.
 | 
| williamr@2 |   1578 |         * @param[in] aCharset IANA MIBEnum of the character set of the attachment. 
 | 
| williamr@2 |   1579 |         *        If character set is not relevant for current attachment type, 
 | 
| williamr@2 |   1580 |         *        aCharset should be 0.
 | 
| williamr@2 |   1581 |         * @param[in] aStatus The request status to complete.
 | 
| williamr@2 |   1582 |         * @leave System-wide error codes.
 | 
| williamr@2 |   1583 |         *
 | 
| williamr@2 |   1584 |         * @code
 | 
| williamr@2 |   1585 |         * TFileName attachmentFile( _L("picture123.jpg") );
 | 
| williamr@2 |   1586 |         * RFile fileHandle;
 | 
| williamr@2 |   1587 |         * TBufC8<20> mimeType = _L8( "image/jpeg" );
 | 
| williamr@2 |   1588 |         * TUint charset = 0; // no character set needed for images
 | 
| williamr@2 |   1589 |         *
 | 
| williamr@2 |   1590 |         * CMsvOperationActiveSchedulerWait* wait = 
 | 
| williamr@2 |   1591 |         *     CMsvOperationActiveSchedulerWait::NewLC();
 | 
| williamr@2 |   1592 |         *
 | 
| williamr@2 |   1593 |         * iMmsClient->CreateAttachmentL(
 | 
| williamr@2 |   1594 |         *     attachmentFile,
 | 
| williamr@2 |   1595 |         *     fileHandle,
 | 
| williamr@2 |   1596 |         *     mimeType,
 | 
| williamr@2 |   1597 |         *     charset,
 | 
| williamr@2 |   1598 |         *     wait->iStatus);
 | 
| williamr@2 |   1599 |         *
 | 
| williamr@2 |   1600 |         * wait->Start();
 | 
| williamr@2 |   1601 |         *
 | 
| williamr@2 |   1602 |         * // When the function returns, the store has been committed
 | 
| williamr@2 |   1603 |         *
 | 
| williamr@2 |   1604 |         * // The attachment file handle is now open for writing the attachment data
 | 
| williamr@2 |   1605 |         * CleanupClosePush(fileHandle);
 | 
| williamr@2 |   1606 |         *
 | 
| williamr@2 |   1607 |         * if ( wait->iStatus.Int() != KErrNone )
 | 
| williamr@2 |   1608 |         *     { 
 | 
| williamr@2 |   1609 |         *     // error handling, e.g. leave
 | 
| williamr@2 |   1610 |         *     }
 | 
| williamr@2 |   1611 |         *
 | 
| williamr@2 |   1612 |         * // write file content to open handle
 | 
| williamr@2 |   1613 |         * // ... 
 | 
| williamr@2 |   1614 |         *
 | 
| williamr@2 |   1615 |         * CleanupStack::PopAndDestroy(); // close file handle
 | 
| williamr@2 |   1616 |         * CleanupStack::PopAndDestroy(); // wait
 | 
| williamr@2 |   1617 |         *
 | 
| williamr@2 |   1618 |         * @endcode
 | 
| williamr@2 |   1619 |         */
 | 
| williamr@2 |   1620 |         void CreateAttachmentL( const TDesC& aFileName,
 | 
| williamr@2 |   1621 |             RFile& aAttachmentFile,
 | 
| williamr@2 |   1622 |             const TDesC8& aMimeType,
 | 
| williamr@2 |   1623 |             TUint aCharset,
 | 
| williamr@2 |   1624 |             TRequestStatus& aStatus);
 | 
| williamr@2 |   1625 | 
 | 
| williamr@2 |   1626 |         /**
 | 
| williamr@2 |   1627 |         * From CBaseMtm: Cancel the current attachment operation.
 | 
| williamr@2 |   1628 |         */
 | 
| williamr@2 |   1629 |         void CancelAttachmentOperation();
 | 
| williamr@2 |   1630 | 
 | 
| williamr@2 |   1631 |         // End of attachment funtions to support SendAs
 | 
| williamr@2 |   1632 | 
 | 
| williamr@2 |   1633 |         /**
 | 
| williamr@2 |   1634 |         * From CBaseMtm: Create an empty entry as the child of the current context.
 | 
| williamr@2 |   1635 |         *
 | 
| williamr@2 |   1636 |         * Sets the new entry as current context. 
 | 
| williamr@2 |   1637 |         * The entry will be invisible and under construction.
 | 
| williamr@2 |   1638 |         *
 | 
| williamr@2 |   1639 |         * @param[in] aServiceId Service id for the new entry.
 | 
| williamr@2 |   1640 |         *
 | 
| williamr@2 |   1641 |         * @code
 | 
| williamr@2 |   1642 |         * // Context must be set to parent folder for CreateMessageL
 | 
| williamr@2 |   1643 |         * // This example creates the message to drafts folder
 | 
| williamr@2 |   1644 |         *
 | 
| williamr@2 |   1645 |         * TMsvId serviceId = iMmsClient->DefaultServiceL();
 | 
| williamr@2 |   1646 |         * iMmsClient->SwitchCurrentEntryL( KMsvDraftEntryId );
 | 
| williamr@2 |   1647 |         * iMmsClient->CreateMessageL( serviceId );
 | 
| williamr@2 |   1648 |         *
 | 
| williamr@2 |   1649 |         * // The message entry is invisible and in "In Preparation" state.
 | 
| williamr@2 |   1650 |         * // The context of CMmsClientMtm has now been switched to the new message entry.
 | 
| williamr@2 |   1651 |         * // The message entry is still completely empty.
 | 
| williamr@2 |   1652 |         * // Continue by adding data to the message
 | 
| williamr@2 |   1653 |         * // ...
 | 
| williamr@2 |   1654 |         * @endcode
 | 
| williamr@2 |   1655 |         */
 | 
| williamr@2 |   1656 |         void CreateMessageL( TMsvId aServiceId );
 | 
| williamr@2 |   1657 | 
 | 
| williamr@2 |   1658 |         /**
 | 
| williamr@2 |   1659 |         * From CBaseMtm: Inform Client MTM about bio type change.
 | 
| williamr@2 |   1660 |         *
 | 
| williamr@2 |   1661 |         * This function does nothing.
 | 
| williamr@2 |   1662 |         */
 | 
| williamr@2 |   1663 |         void BioTypeChangedL( TUid aBioTypeUid );
 | 
| williamr@2 |   1664 | 
 | 
| williamr@2 |   1665 |         /**
 | 
| williamr@2 |   1666 |         * From CBaseMtm: Return id of default service for this MTM type.
 | 
| williamr@2 |   1667 |         *
 | 
| williamr@2 |   1668 |         * Only one MMS service is supported.
 | 
| williamr@2 |   1669 |         * @return default service id.
 | 
| williamr@2 |   1670 |         */
 | 
| williamr@2 |   1671 |         TMsvId DefaultServiceL() const;
 | 
| williamr@2 |   1672 | 
 | 
| williamr@2 |   1673 |         /**
 | 
| williamr@2 |   1674 |         * From CBaseMtm: Remove default service.
 | 
| williamr@2 |   1675 |         *
 | 
| williamr@2 |   1676 |         * Does nothing. Deletion of service not supported. 
 | 
| williamr@2 |   1677 |         */
 | 
| williamr@2 |   1678 |         void RemoveDefaultServiceL();
 | 
| williamr@2 |   1679 | 
 | 
| williamr@2 |   1680 |         /**
 | 
| williamr@2 |   1681 |         * From CBaseMtm: Change default service.
 | 
| williamr@2 |   1682 |         *
 | 
| williamr@2 |   1683 |         * Does nothing. Changing of default service not supported. 
 | 
| williamr@2 |   1684 |         */
 | 
| williamr@2 |   1685 |         void ChangeDefaultServiceL(const TMsvId& aService);
 | 
| williamr@2 |   1686 | 
 | 
| williamr@2 |   1687 |     protected:  // New functions
 | 
| williamr@2 |   1688 | 
 | 
| williamr@2 |   1689 |         /**
 | 
| williamr@2 |   1690 |         * Lists all visible and free MMS Notifications from inbox.
 | 
| williamr@2 |   1691 |         * @return selection of Notifications in inbox.
 | 
| williamr@2 |   1692 |         * @since 2.8
 | 
| williamr@2 |   1693 |         */
 | 
| williamr@2 |   1694 |         CMsvEntrySelection* ListNotificationsInInboxL();
 | 
| williamr@2 |   1695 | 
 | 
| williamr@2 |   1696 |     protected:  // Functions from base classes
 | 
| williamr@2 |   1697 | 
 | 
| williamr@2 |   1698 |         /**
 | 
| williamr@2 |   1699 |         * From CBaseMtm: Called after the context of this instance
 | 
| williamr@2 |   1700 |         * has been changed to another entry.
 | 
| williamr@2 |   1701 |         */
 | 
| williamr@2 |   1702 |         void ContextEntrySwitched();
 | 
| williamr@2 |   1703 | 
 | 
| williamr@2 |   1704 |         /**
 | 
| williamr@2 |   1705 |         * From CBaseMtm: React to changes
 | 
| williamr@2 |   1706 |         * @param[in] aEvent Code that tells which event has occurred. 
 | 
| williamr@2 |   1707 |         *     Event codes defined in MSVAPI.H
 | 
| williamr@2 |   1708 |         * @param[in] arg1 Depends on Event
 | 
| williamr@2 |   1709 |         * @param[in] arg2 Depends on Event
 | 
| williamr@2 |   1710 |         * @param[in] arg3 Depends on Event
 | 
| williamr@2 |   1711 |         */
 | 
| williamr@2 |   1712 |         void HandleEntryEventL(
 | 
| williamr@2 |   1713 |             TMsvEntryEvent aEvent,
 | 
| williamr@2 |   1714 |             TAny* arg1,
 | 
| williamr@2 |   1715 |             TAny* arg2,
 | 
| williamr@2 |   1716 |             TAny* arg3 );
 | 
| williamr@2 |   1717 | 
 | 
| williamr@2 |   1718 |         /**
 | 
| williamr@2 |   1719 |         * By default Symbian OS constructor is private.
 | 
| williamr@2 |   1720 |         * @param[in] aRegisteredMtmDll Reference to Mtm Dll registry class
 | 
| williamr@2 |   1721 |         * @param[in] aSession Reference to a Message Server session.
 | 
| williamr@2 |   1722 |         */
 | 
| williamr@2 |   1723 |         CMmsClientMtm(
 | 
| williamr@2 |   1724 |             CRegisteredMtmDll& aRegisteredMtmDll,
 | 
| williamr@2 |   1725 |             CMsvSession& aSession );
 | 
| williamr@2 |   1726 | 
 | 
| williamr@2 |   1727 |         void ConstructL();
 | 
| williamr@2 |   1728 | 
 | 
| williamr@2 |   1729 |     private:
 | 
| williamr@2 |   1730 | 
 | 
| williamr@2 |   1731 |         /**
 | 
| williamr@2 |   1732 |         * Build the iAddresseeList from the iMmsHeaders data.
 | 
| williamr@2 |   1733 |         */
 | 
| williamr@2 |   1734 |         void BuildAddresseeListL();
 | 
| williamr@2 |   1735 | 
 | 
| williamr@2 |   1736 |         /**
 | 
| williamr@2 |   1737 |         * Add entries from the the specified array to iAddresseeList.
 | 
| williamr@2 |   1738 |         * @param aArray recipient array.
 | 
| williamr@2 |   1739 |         * @param aValue recipient type.
 | 
| williamr@2 |   1740 |         */
 | 
| williamr@2 |   1741 |         void BuildAddresseeListL(
 | 
| williamr@2 |   1742 |             const CDesCArray& aArray, TMsvRecipientType aValue);
 | 
| williamr@2 |   1743 | 
 | 
| williamr@2 |   1744 |         /**
 | 
| williamr@2 |   1745 |         * Attachments size
 | 
| williamr@2 |   1746 |         * @return size of all attachments, binary data + mime headers.
 | 
| williamr@2 |   1747 |         */
 | 
| williamr@2 |   1748 |         TInt32 AttachmentsSizeL();
 | 
| williamr@2 |   1749 | 
 | 
| williamr@2 |   1750 |         /**
 | 
| williamr@2 |   1751 |         * List notifications in MMS folder.
 | 
| williamr@2 |   1752 |         * @return selection of notifications
 | 
| williamr@2 |   1753 |         */
 | 
| williamr@2 |   1754 |         CMsvEntrySelection* ListMmsFolderNotificationsL();
 | 
| williamr@2 |   1755 | 
 | 
| williamr@2 |   1756 |         /**
 | 
| williamr@2 |   1757 |         * List notifications in inbox - only for mode switch fetch.
 | 
| williamr@2 |   1758 |         * @return selection of notifications
 | 
| williamr@2 |   1759 |         */
 | 
| williamr@2 |   1760 |         CMsvEntrySelection* ListInboxNotificationsL();
 | 
| williamr@2 |   1761 | 
 | 
| williamr@2 |   1762 |         /**
 | 
| williamr@2 |   1763 |         * Fetch messages corresponding to unhandled notifications in ibox
 | 
| williamr@2 |   1764 |         * This function is needed only when the fetching mode is changed
 | 
| williamr@2 |   1765 |         * @param[in] aCompletionStatus iStatus member of an active object.
 | 
| williamr@2 |   1766 |         *     It will be set as completed when the request has finished.
 | 
| williamr@2 |   1767 |         * @aparam[in] aForced indicates if the messages should be fetched
 | 
| williamr@2 |   1768 |         *     regardless of current mode settings.
 | 
| williamr@2 |   1769 |         *     ETrue = user initiated fetch, use override
 | 
| williamr@2 |   1770 |         *     EFalse = event triggered fetch, fetch only if settings allow.
 | 
| williamr@2 |   1771 |         * @return pointer to an operation active object.
 | 
| williamr@2 |   1772 |         *     If successful, this is an asynchronously completing operation.
 | 
| williamr@2 |   1773 |         *     If failed, this is a completed operation, with status set to
 | 
| williamr@2 |   1774 |         *     the relevant error code.
 | 
| williamr@2 |   1775 |         */
 | 
| williamr@2 |   1776 |         CMsvOperation* FetchAllFromInboxL( TRequestStatus& aCompletionStatus,
 | 
| williamr@2 |   1777 |             TBool aForced = ETrue );
 | 
| williamr@2 |   1778 | 
 | 
| williamr@2 |   1779 |         /**
 | 
| williamr@2 |   1780 |         * Convert date time from UTC to local time.
 | 
| williamr@2 |   1781 |         * @param aDate UTC date time
 | 
| williamr@2 |   1782 |         * @return local time
 | 
| williamr@2 |   1783 |         */
 | 
| williamr@2 |   1784 |         // all times expressed in global time zone - no conversions
 | 
| williamr@2 |   1785 |         /*
 | 
| williamr@2 |   1786 |         TInt64 ConvertUTCDateToLocal( TInt64 aDate ) const;
 | 
| williamr@2 |   1787 |         */
 | 
| williamr@2 |   1788 | 
 | 
| williamr@2 |   1789 |         /**
 | 
| williamr@2 |   1790 |         * Find text from the given recipient list.
 | 
| williamr@2 |   1791 |         * @param[in] aTextToFind a text to be searched
 | 
| williamr@2 |   1792 |         * @param[in] aPartList message part list
 | 
| williamr@2 |   1793 |         * @param[in] aRecipients the recipient list
 | 
| williamr@2 |   1794 |         * @param[in] aFindText CMsvFindText object to help in the find
 | 
| williamr@2 |   1795 |         * @return ETrue if match found.
 | 
| williamr@2 |   1796 |         */
 | 
| williamr@2 |   1797 |         TBool FindInRecipientL(
 | 
| williamr@2 |   1798 |             const TDesC& aTextToFind,
 | 
| williamr@2 |   1799 |             TMsvPartList aPartlist,
 | 
| williamr@2 |   1800 |             const CDesCArray& aRecipients,
 | 
| williamr@2 |   1801 |             CMsvFindText& aFindText );
 | 
| williamr@2 |   1802 | 
 | 
| williamr@2 |   1803 |         /**
 | 
| williamr@2 |   1804 |         * Add an attachment from public location either as copied file or
 | 
| williamr@2 |   1805 |         *     linked file.
 | 
| williamr@2 |   1806 |         * @param[in] aFilePath The full path specification of the attachment file.
 | 
| williamr@2 |   1807 |         * @param[in] aMimeType The mime type of the attachment file.
 | 
| williamr@2 |   1808 |         * @param[in] aType CMsvAttachment::EMsvFile or
 | 
| williamr@2 |   1809 |         *     CMsvAttachment::EMsvLinkedFile
 | 
| williamr@2 |   1810 |         * @param[in] aStatus The request status to complete when request has
 | 
| williamr@2 |   1811 |         *     completed.
 | 
| williamr@2 |   1812 |         * @param[in] aCharacter set IANA MIBEnum of the character set for the
 | 
| williamr@2 |   1813 |         *     attachment if needed.
 | 
| williamr@2 |   1814 |         */
 | 
| williamr@2 |   1815 |         void AddFilePathAttachmentL(const TDesC& aFilePath,
 | 
| williamr@2 |   1816 |             const TDesC8& aMimeType,
 | 
| williamr@2 |   1817 |             CMsvAttachment::TMsvAttachmentType aType,
 | 
| williamr@2 |   1818 |             TRequestStatus& aStatus,
 | 
| williamr@2 |   1819 |             const TUint aCharacterSet = 0 );
 | 
| williamr@2 |   1820 | 
 | 
| williamr@2 |   1821 |         /**
 | 
| williamr@2 |   1822 |         * Store attribures to attribute stream in message entry
 | 
| williamr@2 |   1823 |         * @param[in] aStore message store
 | 
| williamr@2 |   1824 |         */
 | 
| williamr@2 |   1825 |         void StoreAttributesL( CMsvStore& aStore );
 | 
| williamr@2 |   1826 | 
 | 
| williamr@2 |   1827 |         /**
 | 
| williamr@2 |   1828 |         * Restore attribures from attribute stream in message entry
 | 
| williamr@2 |   1829 |         * @param[in] aStore message store
 | 
| williamr@2 |   1830 |         */
 | 
| williamr@2 |   1831 |         void RestoreAttributesL( CMsvStore& aStore );
 | 
| williamr@2 |   1832 | 
 | 
| williamr@2 |   1833 |         /**
 | 
| williamr@2 |   1834 |         * Checks whether given sample is UTF16 text.
 | 
| williamr@2 |   1835 |         * @since    3.0
 | 
| williamr@2 |   1836 |         * @param[in]    aSample text sample
 | 
| williamr@2 |   1837 |         * @return   1015 if the sample starts with unicode BOM
 | 
| williamr@2 |   1838 |         *           (unicode with explicit byte mark)
 | 
| williamr@2 |   1839 |         *           0 otherwise
 | 
| williamr@2 |   1840 |         */
 | 
| williamr@2 |   1841 |         TUint GetUnicodeCharacterSet( TDesC8& aSample );
 | 
| williamr@2 |   1842 | 
 | 
| williamr@2 |   1843 |         /**
 | 
| williamr@2 |   1844 |         * Reads bytes from so that sample is full or if file is shorter than
 | 
| williamr@2 |   1845 |         *     sample then read whole file.
 | 
| williamr@2 |   1846 |         * @since    3.0
 | 
| williamr@2 |   1847 |         * @param[in]    aFile  open file handle to read bytes from
 | 
| williamr@2 |   1848 |         * @param[out]   aSample sample buffer filled with data
 | 
| williamr@2 |   1849 |         */
 | 
| williamr@2 |   1850 |         void ReadBytesFromFileL( const RFile aFile, TDes8& aSample );
 | 
| williamr@2 |   1851 | 
 | 
| williamr@2 |   1852 |         /**
 | 
| williamr@2 |   1853 |         * Tries to recognize character set from given sample.
 | 
| williamr@2 |   1854 |         * @since    3.0
 | 
| williamr@2 |   1855 |         * @param[in]   aFile  File to be recognized
 | 
| williamr@2 |   1856 |         * @return   CharConv UID of the character set
 | 
| williamr@2 |   1857 |         */
 | 
| williamr@2 |   1858 |         TUint RecognizeCharSetL( RFile& aFile );
 | 
| williamr@2 |   1859 | 
 | 
| williamr@2 |   1860 | 
 | 
| williamr@2 |   1861 |     public:     // Data
 | 
| williamr@2 |   1862 | 
 | 
| williamr@2 |   1863 |     protected:  // Data
 | 
| williamr@2 |   1864 |         CMmsSettings* iMmsSettings;  // MMSC settings (access point etc.)
 | 
| williamr@2 |   1865 | 
 | 
| williamr@2 |   1866 |         CMmsHeaders*  iMmsHeaders;   // MMS message headers
 | 
| williamr@2 |   1867 |         TMsvId        iServiceId;    // last selected service
 | 
| williamr@2 |   1868 |         TBool         iFetchAll;     // All the messages are fetched when
 | 
| williamr@2 |   1869 |                                      // settings are saved after certain fetch
 | 
| williamr@2 |   1870 |                                      // mode change.
 | 
| williamr@2 |   1871 |         TBool         iFetchOverride; // force fetching all messages.
 | 
| williamr@2 |   1872 |         TInt          iMessageDrive; // messages are on C: drive by default,
 | 
| williamr@2 |   1873 |                                      // may be moved to other drive
 | 
| williamr@2 |   1874 |         TInt32        iHomeMode;     // receiving mode in the home network
 | 
| williamr@2 |   1875 |         TInt32        iRoamingMode;  // receiving mode when roaming
 | 
| williamr@2 |   1876 |         TInt          iAccessPointCount; // number of access points
 | 
| williamr@2 |   1877 |         CDesCArrayFlat* iAttributes;     // zero or more attributes for UI.
 | 
| williamr@2 |   1878 |                                          // Name, value pairs
 | 
| williamr@2 |   1879 |     	CMsvSession& iOwnSession;    // copy of session because base class session is private
 | 
| williamr@2 |   1880 | 
 | 
| williamr@2 |   1881 | 
 | 
| williamr@2 |   1882 |     private:    // Data
 | 
| williamr@2 |   1883 |         // active object that commits the store when attachment operation
 | 
| williamr@2 |   1884 |         // is complete
 | 
| williamr@2 |   1885 |         CMmsAttachmentWaiter* iAttaWaiter;
 | 
| williamr@2 |   1886 | 
 | 
| williamr@2 |   1887 |     public:     // Friend classes
 | 
| williamr@2 |   1888 | 
 | 
| williamr@2 |   1889 |     protected:  // Friend classes
 | 
| williamr@2 |   1890 | 
 | 
| williamr@2 |   1891 |     private:    // Friend classes
 | 
| williamr@2 |   1892 | 
 | 
| williamr@2 |   1893 |     };
 | 
| williamr@2 |   1894 | 
 | 
| williamr@2 |   1895 | // panic function
 | 
| williamr@2 |   1896 | GLREF_C void gPanic( TMmsPanic aPanic );
 | 
| williamr@2 |   1897 | 
 | 
| williamr@2 |   1898 | #include "mmsclient.inl"
 | 
| williamr@2 |   1899 | 
 | 
| williamr@2 |   1900 | #endif      // MMSCLIENT_H
 | 
| williamr@2 |   1901 | 
 | 
| williamr@2 |   1902 | // End of File
 | 
| williamr@2 |   1903 | 
 |