emailservices/nmutilities/inc/nmuriparser.h
author hgs
Thu, 14 Oct 2010 17:33:43 +0300
changeset 76 38bf5461e270
parent 74 6c59112cfd31
permissions -rw-r--r--
201041
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
74
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description: A utility class for parsing URI strings
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
#ifndef NMURIPARSER_H_
hgs
parents:
diff changeset
    18
#define NMURIPARSER_H_
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
#include <QObject>
hgs
parents:
diff changeset
    21
#include <QStringList>
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
#include "emailutilitiesdef.h"
hgs
parents:
diff changeset
    24
hgs
parents:
diff changeset
    25
/*!
hgs
parents:
diff changeset
    26
    \class NmUriParser
hgs
parents:
diff changeset
    27
    \brief A helper class for parsing URI strings
hgs
parents:
diff changeset
    28
*/
hgs
parents:
diff changeset
    29
class EMAIL_UTILITIES_EXPORT NmUriParser
hgs
parents:
diff changeset
    30
{
hgs
parents:
diff changeset
    31
public:
hgs
parents:
diff changeset
    32
hgs
parents:
diff changeset
    33
    NmUriParser();
hgs
parents:
diff changeset
    34
    ~NmUriParser();
hgs
parents:
diff changeset
    35
hgs
parents:
diff changeset
    36
    bool extractData(const QString &data);
hgs
parents:
diff changeset
    37
    void resetData();
hgs
parents:
diff changeset
    38
    
hgs
parents:
diff changeset
    39
    QString subject() const;
hgs
parents:
diff changeset
    40
    QStringList toAddresses() const;
hgs
parents:
diff changeset
    41
    QStringList ccAddresses() const;
hgs
parents:
diff changeset
    42
    QStringList bccAddresses() const;
hgs
parents:
diff changeset
    43
    QString bodyText() const;
hgs
parents:
diff changeset
    44
    
hgs
parents:
diff changeset
    45
private:
hgs
parents:
diff changeset
    46
    
hgs
parents:
diff changeset
    47
    void addAddressesToList(QString &addresses, QStringList &list);
hgs
parents:
diff changeset
    48
hgs
parents:
diff changeset
    49
private: // Data
hgs
parents:
diff changeset
    50
hgs
parents:
diff changeset
    51
    QString mSubject;
hgs
parents:
diff changeset
    52
    QStringList mToAddresses;
hgs
parents:
diff changeset
    53
    QStringList mCcAddresses;
hgs
parents:
diff changeset
    54
    QStringList mBccAddresses;
hgs
parents:
diff changeset
    55
    QString mBodyText;
hgs
parents:
diff changeset
    56
};
hgs
parents:
diff changeset
    57
#endif /* NMURIPARSER_H_*/