messagingapp/msgui/conversationview/inc/msgcharcounter_p.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 Symbian functionality to get message pdu details.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef MSGCHARCOUNTER_P_H
       
    19 #define MSGCHARCOUNTER_P_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 #include <gsmuelem.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MsgCharCounter;
       
    28 class CParaFormatLayer;
       
    29 class CCharFormatLayer;
       
    30 class CRichText;
       
    31 class CSmsHeader;
       
    32 class QString;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37  * MsgCharCounterPrivate
       
    38  *
       
    39  * This class is a Symbian private class which provides methods to set encoding
       
    40  * settings and get the PDU info.
       
    41  */
       
    42 class MsgCharCounterPrivate
       
    43 {
       
    44 public:
       
    45 
       
    46     /**
       
    47      * Two-phased constructor.
       
    48      * @param msgCharCounter Ptr to MsgCharCounter.
       
    49      */
       
    50     static MsgCharCounterPrivate* newL(MsgCharCounter* msgCharCounter);
       
    51 
       
    52     /**
       
    53      * Destructor.
       
    54      */
       
    55     ~MsgCharCounterPrivate();
       
    56 
       
    57     /**
       
    58      * To Set encoding settings like encoding type, character support and
       
    59      * alternative encoding if any.
       
    60      * @param unicodeMode True if unicode.
       
    61      * @param alternativeEncodingType Alternative 7bit encoding combinations.
       
    62      * @param charSupportType Character support type, full or reduced.
       
    63      */
       
    64     void setEncodingSettings(bool unicodeMode, int alternativeEncodingType,
       
    65         int charSupportType);
       
    66 
       
    67     /**
       
    68      * Gets the PDU info like, number of PDUs, number of remaining chars in last
       
    69      * PDU and encoding types used.
       
    70      * @param buf PDU buffer as input.
       
    71      * @param numOfRemainingChars output
       
    72      * @param numOfPDUs output
       
    73      * @param unicodeMode output
       
    74      * @param alternativeEncodingType output
       
    75      */
       
    76     void getNumPDUs(const QString &buf, int &numOfRemainingChars,
       
    77         int &numOfPDUs, bool &unicodeMode, int &alternativeEncodingType);
       
    78 
       
    79 private:
       
    80 
       
    81     /**
       
    82      * Constructor for performing 1st stage construction
       
    83      * @param .
       
    84      */
       
    85     MsgCharCounterPrivate(MsgCharCounter *msgCharCounter);
       
    86 
       
    87     /**
       
    88      * EPOC default constructor for performing 2nd stage construction
       
    89      */
       
    90     void constructL();
       
    91 
       
    92 private:
       
    93     // Data
       
    94 
       
    95     /**
       
    96      * Ptr to QT class MsgCharCounter.
       
    97      * Not Own.
       
    98      */
       
    99     MsgCharCounter *q_ptr;
       
   100 
       
   101     /**
       
   102      * Paragraph format layer.
       
   103      * Own.
       
   104      */
       
   105     CParaFormatLayer* mParaFormatLayer;
       
   106 
       
   107     /**
       
   108      * Character format layer.
       
   109      * Own.
       
   110      */
       
   111     CCharFormatLayer* mCharFormatLayer;
       
   112 
       
   113     /**
       
   114      * Text with rich formatting.
       
   115      * Own.
       
   116      */
       
   117     CRichText* mRichText;
       
   118 
       
   119     /**
       
   120      * SMS MTM encapsulation of an SMS message.
       
   121      * Own.
       
   122      */
       
   123     CSmsHeader* mSmsHeader;
       
   124 
       
   125     /**
       
   126      * True if message is converted to unicode.
       
   127      */
       
   128     TBool mUnicodeMode;
       
   129 
       
   130     /**
       
   131      * Character support, full or reduced.
       
   132      */
       
   133     TInt mCharSupportType;
       
   134 
       
   135     /**
       
   136      * GSM encoding type.
       
   137      */
       
   138     TSmsEncoding mAlternativeEncodingType;
       
   139 
       
   140 };
       
   141 
       
   142 #endif // MSGCHARCOUNTER_P_H
       
   143 
       
   144 //EOF