messagingapp/msgui/conversationview/inc/msgcharcounter.h
changeset 27 e4592d119491
parent 25 84d9eb65b26f
child 30 6a20128ce557
child 32 f3f513612312
equal deleted inserted replaced
25:84d9eb65b26f 27:e4592d119491
     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:Implements QT functionality to get message pdu details.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef MSGCHARCOUNTER_H
       
    19 #define MSGCHARCOUNTER_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <QObject>
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class MsgCharCounterPrivate;
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30  * MsgCharCounter
       
    31  * 
       
    32  * This class is a QT public class which provides methods to set encoding
       
    33  * settings and get the PDU info.
       
    34  */
       
    35 class MsgCharCounter : public QObject
       
    36 {
       
    37 	Q_OBJECT
       
    38 
       
    39 public:
       
    40 
       
    41 	/**
       
    42 	 * Default Constructor.
       
    43 	 */
       
    44 	MsgCharCounter(QObject *parent = 0);
       
    45 
       
    46 	/**
       
    47 	 * Destructor.
       
    48 	 */
       
    49 	~MsgCharCounter();
       
    50 	
       
    51 	/**
       
    52 	 * To Set encoding settings like encoding type, character support and
       
    53 	 * alternative encoding if any.
       
    54 	 */
       
    55 	void setEncodingSettings();
       
    56 	
       
    57 	/**
       
    58 	 * Gets the PDU info like, number of PDUs, number of remaining chars in last
       
    59 	 * PDU and encoding types used.
       
    60 	 * @param buf PDU buffer as input.
       
    61 	 * @param numOfRemainingChars output
       
    62 	 * @param numOfPDUs output
       
    63 	 * @param unicodeMode output
       
    64 	 * @param alternativeEncodingType output
       
    65 	 */
       
    66 	void getNumPDUs(const QString &buf, int &numOfRemainingChars,
       
    67 				int &numOfPDUs, bool &unicodeMode,
       
    68 				int &alternativeEncodingType);
       
    69 
       
    70 private:
       
    71 
       
    72 	/**
       
    73 	 * Pointer to S60 class MsgFetcherPrivate.
       
    74 	 * Own.
       
    75 	 */
       
    76 	MsgCharCounterPrivate *d_ptr;
       
    77 };
       
    78 
       
    79 #endif /* MSGCHARCOUNTER_H */
       
    80 
       
    81 // EOF