messagingapp/msgutils/unieditorplugins/unieditorsmsplugin/inc/unieditorsmsplugin.h
changeset 25 84d9eb65b26f
parent 23 238255e8b033
child 27 e4592d119491
child 37 518b245aa84c
child 79 2981cb3aa489
equal deleted inserted replaced
23:238255e8b033 25:84d9eb65b26f
     1 /*
       
     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 UNIEDITORSMSPLUGIN_H_
       
    19 #define UNIEDITORSMSPLUGIN_H_
       
    20 
       
    21 
       
    22 #include <QObject>
       
    23 #include "unieditorplugininterface.h"
       
    24 
       
    25 class UniEditorSmsPluginPrivate;
       
    26 
       
    27 /**
       
    28  * Unified editor send SMS plugin.
       
    29  */
       
    30 class UniEditorSmsPlugin : public QObject, public UniEditorPluginInterface
       
    31 {
       
    32 Q_OBJECT
       
    33     Q_INTERFACES(UniEditorPluginInterface)
       
    34 
       
    35 public:
       
    36     /**
       
    37      * Constructor
       
    38      */
       
    39     UniEditorSmsPlugin(QObject* parent = 0);
       
    40 
       
    41     /**
       
    42      * Destructor
       
    43      */
       
    44     ~UniEditorSmsPlugin();
       
    45 
       
    46     /**
       
    47      *  Message type (SMS/MMS etc..)
       
    48      *  @return type of message
       
    49      */
       
    50     ConvergedMessage::MessageType messageType();
       
    51 
       
    52     /**
       
    53      * convert from message store entry to convergedmessage type
       
    54      * @param aId message entry id
       
    55      * @return convergedmessage
       
    56      */
       
    57     ConvergedMessage* convertFrom( TMsvId aId );
       
    58     
       
    59     /**
       
    60      * delete entry from drafts folder
       
    61      * @param aId message entry id to be deleted
       
    62      */
       
    63     void deleteDraftsEntry( TMsvId aId );
       
    64 
       
    65     /**
       
    66      * convert from convergedmessage to entry in message store
       
    67      * @param aMessage convergedmessage
       
    68      * @return message entry id
       
    69      */
       
    70     TMsvId convertTo( ConvergedMessage *aMessage );
       
    71 
       
    72     /**
       
    73      * send message
       
    74      * @param message entry id
       
    75      * @return true, if send is successfull
       
    76      */
       
    77     bool send(TMsvId aId);
       
    78 
       
    79     /**
       
    80      * check if service is valid
       
    81      * @return true/false
       
    82      */
       
    83     TBool isServiceValid();
       
    84 
       
    85     /**
       
    86      * validate settings
       
    87      * @param aEmailOverSms true if email over sms is supported, else false
       
    88      * @return true/false
       
    89      */
       
    90     TBool validateService( TBool aEmailOverSms = EFalse );
       
    91 
       
    92 private:
       
    93     UniEditorSmsPluginPrivate* d_ptr;
       
    94 };
       
    95 
       
    96 #endif //UNIEDITORSMSPLUGIN_H_