inc/unieditorplugininterface.h
changeset 23 238255e8b033
child 25 84d9eb65b26f
equal deleted inserted replaced
5:4697dfb2d7ad 23:238255e8b033
       
     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 "convergedmessage.h"
       
    24 
       
    25 
       
    26 class UniEditorPluginInterface
       
    27 {
       
    28 public:
       
    29 
       
    30     /**
       
    31      * Destructor
       
    32      */
       
    33     virtual ~UniEditorPluginInterface()
       
    34     {
       
    35     }
       
    36 
       
    37     /**
       
    38 	 * Type of the message (SMS/MMS etc..)
       
    39 	 * @return message type
       
    40 	 */
       
    41 	virtual ConvergedMessage::MessageType messageType()=0;
       
    42 
       
    43     /**
       
    44      * Converts message from message store into ConvergedMessage
       
    45      * @param TMsvId id
       
    46      * @return ConvergedMessage object is returned in successfull cases and 
       
    47      *         NULL is returned in failure cases. The ownership of the object
       
    48      *         is transferred to the caller. 
       
    49      */
       
    50     virtual ConvergedMessage* convertFrom( TMsvId aId )=0;
       
    51 
       
    52     /**
       
    53      * delete entry from drafts folder
       
    54      * @param aId TMsvId of the message entry to be deleted
       
    55      */
       
    56     virtual void deleteDraftsEntry( TMsvId aId )=0;
       
    57 
       
    58     /**
       
    59      * convert convergedmessage type to messaging f/w message entry
       
    60      * @param aMessage convergedmessage
       
    61      * @return message entry id in message store
       
    62      */
       
    63     virtual TMsvId convertTo( ConvergedMessage *aMessage ) = 0;
       
    64 
       
    65     /**
       
    66      * send message
       
    67      * @param aId message entry id in message store
       
    68      * @return true if client-mtm send is successful else returns false
       
    69      */
       
    70     virtual bool send(TMsvId aId) = 0;
       
    71 
       
    72     /**
       
    73      * check if service is valid
       
    74      * @return true/false
       
    75      */
       
    76     virtual TBool isServiceValid() = 0;
       
    77 
       
    78     /**
       
    79      * validate service settings
       
    80      * @param aEmailOverSms true if email over sms is supported, else false
       
    81      * @return true/false
       
    82      */
       
    83     virtual TBool validateService( TBool aEmailOverSms = EFalse ) = 0;
       
    84 
       
    85 };
       
    86 
       
    87 Q_DECLARE_INTERFACE(UniEditorPluginInterface,
       
    88         "org.nokia.messaging.UniEditorPluginInterface/1.0")
       
    89 
       
    90 
       
    91 #endif //UNIEDITORPLUGININTERFACE_H_