messagingapp/msgui/msgapp/inc/msgutils.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 23 Jun 2010 18:09:17 +0300
changeset 43 35b64624a9e7
parent 23 238255e8b033
permissions -rw-r--r--
Revision: 201023 Kit: 2010125

/*
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
 *
 * Description:Utility class having static helper methods.
 *
 */

#ifndef MSGUTILS_H_
#define MSGUTILS_H_

//FORWARD DECLARATIONS.
class QDateTime;
class QString;

/**
 * Utility class having static utility functions.
 */
class MsgUtils
{
public:
    // DATA
    /**
     * Character support
     */
    enum MsgCharSupport
    {
        msgCharSupportFull = 0,
        msgCharSupportReduced
    };
private:
    //constructor and destructor made private to avoid instantiation of this class.
    /**
     * Constructor
     */
    MsgUtils(){};
    
    /**
     * Destructor
     */
    ~MsgUtils(){};
    
public:

    /**
     * Converts QDateTime to formatted string.
     * @param dateTime QDateTime object to be converted to formatted string.
     * @param format determines the format of the result string.
     * @return formatted string representation of dateTime specified by format.
     * if date is invalid empty string is returned.
     * if format string is invalid, format string itself is returned.
     */
    static QString dateTimeToString(const QDateTime& dateTime,
        const QString& format);

};

#endif /* MSGUTILS_H_ */

// EOF