| 31 |      1 | /*
 | 
|  |      2 |  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 | 
|  |      3 |  * All rights reserved.
 | 
|  |      4 |  * This component and the accompanying materials are made available
 | 
|  |      5 |  * under the terms of "Eclipse Public License v1.0"
 | 
|  |      6 |  * which accompanies this distribution, and is available
 | 
|  |      7 |  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 | 
|  |      8 |  *
 | 
|  |      9 |  * Initial Contributors:
 | 
|  |     10 |  * Nokia Corporation - initial contribution.
 | 
|  |     11 |  *
 | 
|  |     12 |  * Contributors:
 | 
|  |     13 |  *
 | 
|  |     14 |  * Description:
 | 
|  |     15 |  *
 | 
|  |     16 |  */
 | 
|  |     17 | 
 | 
|  |     18 | #ifndef UNIEDITORPLUGININTERFACE_H_
 | 
|  |     19 | #define UNIEDITORPLUGININTERFACE_H_
 | 
|  |     20 | 
 | 
|  |     21 | #include <QtPlugin>
 | 
|  |     22 | #include <msvstd.h>
 | 
|  |     23 | #include <gsmuelem.h>
 | 
|  |     24 | #include "convergedmessage.h"
 | 
|  |     25 | 
 | 
|  |     26 | 
 | 
|  |     27 | class UniEditorPluginInterface
 | 
|  |     28 | {
 | 
|  |     29 | public:
 | 
|  |     30 |     
 | 
|  |     31 |     /**
 | 
|  |     32 |      * Enum defining EditorOperation 
 | 
|  |     33 |      * @attention This enum can have values from 0 to 2 only.
 | 
|  |     34 |      */
 | 
|  |     35 |     enum EditorOperation
 | 
|  |     36 |     {
 | 
|  |     37 |         Forward = 0, 
 | 
|  |     38 |         ReplyAll, 
 | 
|  |     39 |         Default 
 | 
|  |     40 |     };
 | 
|  |     41 | 
 | 
|  |     42 |     /**
 | 
|  |     43 |      * Destructor
 | 
|  |     44 |      */
 | 
|  |     45 |     virtual ~UniEditorPluginInterface()
 | 
|  |     46 |     {
 | 
|  |     47 |     }
 | 
|  |     48 | 
 | 
|  |     49 |     /**
 | 
|  |     50 | 	 * Type of the message (SMS/MMS etc..)
 | 
|  |     51 | 	 * @return message type
 | 
|  |     52 | 	 */
 | 
|  |     53 | 	virtual ConvergedMessage::MessageType messageType()=0;
 | 
|  |     54 | 
 | 
|  |     55 |     /**
 | 
|  |     56 |      * Converts message from message store into ConvergedMessage 
 | 
|  |     57 |      * based on the operation
 | 
|  |     58 |      * @param TMsvId id
 | 
|  |     59 |      * @param aOperation operation type
 | 
|  |     60 |      * @return ConvergedMessage object is returned in successfull cases and 
 | 
|  |     61 |      *         NULL is returned in failure cases. The ownership of the object
 | 
|  |     62 |      *         is transferred to the caller. 
 | 
|  |     63 |      */
 | 
|  |     64 |     virtual ConvergedMessage* convertFrom( TMsvId aId,
 | 
|  |     65 |         UniEditorPluginInterface::EditorOperation aOperation
 | 
|  |     66 |         =UniEditorPluginInterface::Default)=0;
 | 
|  |     67 | 
 | 
|  |     68 |     /**
 | 
|  |     69 |      * delete entry from drafts folder
 | 
|  |     70 |      * @param aId TMsvId of the message entry to be deleted
 | 
|  |     71 |      */
 | 
|  |     72 |     virtual void deleteDraftsEntry( TMsvId aId )=0;
 | 
|  |     73 | 
 | 
|  |     74 |     /**
 | 
|  |     75 |      * convert convergedmessage type to messaging f/w message entry
 | 
|  |     76 |      * @param aMessage convergedmessage
 | 
|  |     77 |      * @return message entry id in message store
 | 
|  |     78 |      */
 | 
|  |     79 |     virtual TMsvId convertTo( ConvergedMessage *aMessage ) = 0;
 | 
|  |     80 | 
 | 
|  |     81 |     /**
 | 
|  |     82 |      * send message
 | 
|  |     83 |      * @param aId message entry id in message store
 | 
|  |     84 |      * @return true if client-mtm send is successful else returns false
 | 
|  |     85 |      */
 | 
|  |     86 |     virtual bool send(TMsvId aId) = 0;
 | 
|  |     87 | 
 | 
|  |     88 |     /**
 | 
|  |     89 |      * check if service is valid
 | 
|  |     90 |      * @return true/false
 | 
|  |     91 |      */
 | 
|  |     92 |     virtual TBool isServiceValid() = 0;
 | 
|  |     93 | 
 | 
|  |     94 |     /**
 | 
|  |     95 |      * validate service settings
 | 
|  |     96 |      * @param aEmailOverSms true if email over sms is supported, else false
 | 
|  |     97 |      * @return true/false
 | 
|  |     98 |      */
 | 
|  |     99 |     virtual TBool validateService( TBool aEmailOverSms = EFalse ) = 0;
 | 
|  |    100 |     
 | 
|  |    101 |     /*
 | 
|  |    102 |      * Turkish SMS(PREQ2265) specific...
 | 
|  |    103 |      */
 | 
|  |    104 |     virtual void setEncodingSettings(TBool aUnicodeMode,
 | 
|  |    105 |         TSmsEncoding aAlternativeEncodingType, TInt charSupportType)=0;
 | 
|  |    106 | 
 | 
|  |    107 |     /**
 | 
|  |    108 |      * for deciding on reduced or full charset support
 | 
|  |    109 |      */
 | 
|  |    110 |     virtual bool getNumPDUs(QString& aBuf, TInt& aNumOfRemainingChars,
 | 
|  |    111 |         TInt& aNumOfPDUs, TBool& aUnicodeMode,
 | 
|  |    112 |         TSmsEncoding& aAlternativeEncodingType)=0;
 | 
|  |    113 | 
 | 
|  |    114 | };
 | 
|  |    115 | 
 | 
|  |    116 | Q_DECLARE_INTERFACE(UniEditorPluginInterface,
 | 
|  |    117 |         "org.nokia.messaging.UniEditorPluginInterface/1.0")
 | 
|  |    118 | 
 | 
|  |    119 | 
 | 
|  |    120 | #endif //UNIEDITORPLUGININTERFACE_H_
 |