You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
2.8 KiB
116 lines
2.8 KiB
15 years ago
|
/*
|
||
|
This file is part of libkabc.
|
||
|
Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License as published by the Free Software Foundation; either
|
||
|
version 2 of the License, or (at your option) any later version.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#ifndef VCARDLINE_H
|
||
|
#define VCARDLINE_H
|
||
|
|
||
14 years ago
|
#include <tqstringlist.h>
|
||
|
#include <tqvaluelist.h>
|
||
|
#include <tqvariant.h>
|
||
|
#include <tqmap.h>
|
||
|
#include <tqstring.h>
|
||
15 years ago
|
|
||
|
namespace KABC {
|
||
|
|
||
|
class VCardLine
|
||
|
{
|
||
|
public:
|
||
14 years ago
|
typedef TQValueList<VCardLine> List;
|
||
|
typedef TQMap<TQString, TQStringList> ParamMap;
|
||
15 years ago
|
|
||
|
VCardLine();
|
||
14 years ago
|
VCardLine( const TQString &identifier );
|
||
|
VCardLine( const TQString &identifier, const TQVariant &value );
|
||
15 years ago
|
VCardLine( const VCardLine& );
|
||
|
|
||
|
~VCardLine();
|
||
|
|
||
|
VCardLine& operator=( const VCardLine& );
|
||
|
|
||
|
/**
|
||
|
* Sets the identifier of this line e.g. UID, FN, CLASS
|
||
|
*/
|
||
14 years ago
|
void setIdentifier( const TQString& identifier );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Returns the identifier of this line.
|
||
|
*/
|
||
14 years ago
|
TQString identifier() const;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Sets the value of of this line.
|
||
|
*/
|
||
14 years ago
|
void setValue( const TQVariant& value );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Returns the value of this line.
|
||
|
*/
|
||
14 years ago
|
TQVariant value() const;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Sets the group the line belongs to.
|
||
|
*/
|
||
14 years ago
|
void setGroup( const TQString& group );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Returns the group the line belongs to.
|
||
|
*/
|
||
14 years ago
|
TQString group() const;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Returns whether the line belongs to a group.
|
||
|
*/
|
||
|
bool hasGroup() const;
|
||
|
|
||
|
/**
|
||
|
* Returns all parameters.
|
||
|
*/
|
||
14 years ago
|
TQStringList parameterList() const;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Add a new parameter to the line.
|
||
|
*/
|
||
14 years ago
|
void addParameter( const TQString& param, const TQString& value );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Returns the values of a special parameter.
|
||
|
* You can get a list of all parameters with paramList().
|
||
|
*/
|
||
14 years ago
|
TQStringList parameters( const TQString& param ) const;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Returns only the first value of a special parameter.
|
||
|
* You can get a list of all parameters with paramList().
|
||
|
*/
|
||
14 years ago
|
TQString parameter( const TQString& param ) const;
|
||
15 years ago
|
|
||
|
private:
|
||
|
ParamMap mParamMap;
|
||
14 years ago
|
TQString mIdentifier;
|
||
|
TQVariant mValue;
|
||
15 years ago
|
|
||
|
class VCardLinePrivate;
|
||
|
VCardLinePrivate *d;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|