console/kabcclient
#include <inputformatimpls.h>
Public Member Functions | |
VCardInput () | |
virtual | ~VCardInput () |
virtual QString | description () const |
virtual KABC::Addressee | readAddressee (std::istream &stream) |
virtual bool | setCodec (QTextCodec *codec) |
virtual bool | setOptions (const QByteArray &options) |
Public Member Functions inherited from InputFormat | |
virtual | ~InputFormat () |
virtual QString | optionUsage () const |
Detailed Description
Input parser for VCard data.
Treats input as contact data formatted according to the VCard specification. Delegates actual parsing to KABC::VCardConverter
Available through FormatFactory::inputFormat(), name "vcard"
Definition at line 78 of file inputformatimpls.h.
Constructor & Destructor Documentation
VCardInput::VCardInput | ( | ) |
Definition at line 95 of file inputformatimpls.cpp.
|
virtual |
Definition at line 109 of file inputformatimpls.cpp.
Member Function Documentation
|
virtual |
Returns a translate description of the input format.
Returns a translated description of the parser and its general capabilities.
- Returns
- a short descriptive string what kind of input format it can handle
- Note
- Implementations should not include the optional settings a parser understands, this is what optionUsage() is for. As the description is displayed after the format name, it is recommended to add two tabs after each newline for aligned output
Implements InputFormat.
Definition at line 102 of file inputformatimpls.cpp.
|
virtual |
Reads a single contact from the input stream.
Aggregates lines from input until it encounters "END:VCARD". When it does, it delegates parsing of the accumulated string to KABC::VCardConverter::parseVCard()
- Parameters
-
stream the standard input stream to read text from
- Returns
- a KABC::Addressee object containing the read data
Implements InputFormat.
Definition at line 146 of file inputformatimpls.cpp.
|
virtual |
Sets the text codec to use.
This allows to have the text read from the input stream interpreted according to a specific text encoding. Depending on the format's specifications not all technically available codecs might be valid
- Warning
- Always set a codec, the input formats need it!
- Parameters
-
codec the text encoding handler to use
- Returns
true
if the input format accepts this codec. i.e. can work with it reasonably. Otherwise returnsfalse
Implements InputFormat.
Definition at line 124 of file inputformatimpls.cpp.
|
virtual |
Configures the input format.
Sets parser options, i.e. format specific settings that change how the input format treats the input text.
- Parameters
-
options a string as taken from the commandline
- Returns
false
if the options are not valid or if the input format doesn't support options.true
if the options where valid
- Note
- Implementations can use any format in their options string. However it is recommended to stay consistent with the other format implementations and use a comma separated list
Implements InputFormat.
Definition at line 116 of file inputformatimpls.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.