equal
  deleted
  inserted
  replaced
  
    
    
|         |      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:Utility class having static helper methods. | 
|         |     15  * | 
|         |     16  */ | 
|         |     17  | 
|         |     18 #ifndef MSGUTILS_H_ | 
|         |     19 #define MSGUTILS_H_ | 
|         |     20  | 
|         |     21 //FORWARD DECLARATIONS. | 
|         |     22 class QDateTime; | 
|         |     23 class QString; | 
|         |     24  | 
|         |     25 /** | 
|         |     26  * Utility class having static utility functions. | 
|         |     27  */ | 
|         |     28 class MsgUtils | 
|         |     29 { | 
|         |     30 public: | 
|         |     31     // DATA | 
|         |     32     /** | 
|         |     33      * Character support | 
|         |     34      */ | 
|         |     35     enum MsgCharSupport | 
|         |     36     { | 
|         |     37         msgCharSupportFull = 0, | 
|         |     38         msgCharSupportReduced | 
|         |     39     }; | 
|         |     40 private: | 
|         |     41     //constructor and destructor made private to avoid instantiation of this class. | 
|         |     42     /** | 
|         |     43      * Constructor | 
|         |     44      */ | 
|         |     45     MsgUtils(){}; | 
|         |     46      | 
|         |     47     /** | 
|         |     48      * Destructor | 
|         |     49      */ | 
|         |     50     ~MsgUtils(){}; | 
|         |     51      | 
|         |     52 public: | 
|         |     53  | 
|         |     54     /** | 
|         |     55      * Converts QDateTime to formatted string. | 
|         |     56      * @param dateTime QDateTime object to be converted to formatted string. | 
|         |     57      * @param format determines the format of the result string. | 
|         |     58      * @return formatted string representation of dateTime specified by format. | 
|         |     59      * if date is invalid empty string is returned. | 
|         |     60      * if format string is invalid, format string itself is returned. | 
|         |     61      */ | 
|         |     62     static QString dateTimeToString(const QDateTime& dateTime, | 
|         |     63         const QString& format); | 
|         |     64  | 
|         |     65 }; | 
|         |     66  | 
|         |     67 #endif /* MSGUTILS_H_ */ | 
|         |     68  | 
|         |     69 // EOF |