• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KTNEF Library

  • ktnef
ktnefattach.cpp
Go to the documentation of this file.
1/*
2 ktnefattach.cpp
3
4 Copyright (C) 2002 Michael Goffioul <kdeprint@swing.be>
5
6 This file is part of KTNEF, the KDE TNEF support library/program.
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either
11 version 2 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Library General Public License for more details.
17
18 You should have received a copy of the GNU Library General Public License
19 along with this library; see the file COPYING.LIB. If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
22 */
31#include "ktnefattach.h"
32#include "ktnefproperty.h"
33
34using namespace KTnef;
35
40//@cond PRIVATE
41class KTnef::KTNEFAttach::AttachPrivate
42{
43 public:
44 int state_;
45 int size_;
46 int offset_;
47 int displaysize_;
48 QString name_;
49 int index_;
50 QString filename_;
51 QString displayname_;
52 QString mimetag_;
53 QString extension_;
54};
55//@endcond
56
57KTNEFAttach::KTNEFAttach() : d( new KTnef::KTNEFAttach::AttachPrivate )
58{
59 d->state_ = Unparsed;
60 d->offset_ = -1;
61 d->size_ = 0;
62 d->displaysize_ = 0;
63 d->index_ = -1;
64}
65
66KTNEFAttach::~KTNEFAttach()
67{
68 delete d;
69}
70
71void KTNEFAttach::setTitleParsed()
72{
73 d->state_ |= TitleParsed;
74}
75
76void KTNEFAttach::setDataParsed()
77{
78 d->state_ |= DataParsed;
79}
80
81void KTNEFAttach::unsetDataParser()
82{
83 d->state_ = ( d->state_ & ~DataParsed );
84}
85
86void KTNEFAttach::setInfoParsed()
87{
88 d->state_ |= InfoParsed;
89}
90
91bool KTNEFAttach::titleParsed() const
92{
93 return d->state_ & TitleParsed;
94}
95
96bool KTNEFAttach::dataParsed() const
97{
98 return d->state_ & DataParsed;
99}
100
101bool KTNEFAttach::infoParsed() const
102{
103 return d->state_ & InfoParsed;
104}
105
106bool KTNEFAttach::checkState( int state ) const
107{
108 return d->state_ & state;
109}
110
111int KTNEFAttach::offset() const
112{
113 return d->offset_;
114}
115
116void KTNEFAttach::setOffset( int n )
117{
118 setDataParsed();
119 d->offset_ = n;
120}
121
122int KTNEFAttach::size() const
123{
124 return d->size_;
125}
126
127void KTNEFAttach::setSize( int s )
128{
129 d->size_ = s;
130}
131
132int KTNEFAttach::displaySize() const
133{
134 return d->displaysize_;
135}
136
137void KTNEFAttach::setDisplaySize( int s )
138{
139 d->displaysize_ = s;
140}
141
142QString KTNEFAttach::name() const
143{
144 return d->name_;
145}
146
147void KTNEFAttach::setName( const QString &str )
148{
149 setTitleParsed();
150 d->name_ = str;
151}
152
153int KTNEFAttach::index() const
154{
155 return d->index_;
156}
157
158void KTNEFAttach::setIndex( int i )
159{
160 setInfoParsed();
161 d->index_ = i;
162}
163
164QString KTNEFAttach::fileName() const
165{
166 return d->filename_;
167}
168
169void KTNEFAttach::setFileName( const QString &str )
170{
171 d->filename_ = str;
172}
173
174QString KTNEFAttach::displayName() const
175{
176 return d->displayname_;
177}
178
179void KTNEFAttach::setDisplayName( const QString &str )
180{
181 d->displayname_ = str;
182}
183
184QString KTNEFAttach::mimeTag() const
185{
186 return d->mimetag_;
187}
188
189void KTNEFAttach::setMimeTag( const QString &str )
190{
191 d->mimetag_ = str;
192}
193
194QString KTNEFAttach::extension() const
195{
196 return d->extension_;
197}
198
199void KTNEFAttach::setExtension( const QString &str )
200{
201 d->extension_ = str;
202}
KTnef::KTNEFAttach
Represents a TNEF attachment.
Definition: ktnefattach.h:52
KTnef::KTNEFAttach::setFileName
void setFileName(const QString &str)
Sets the filename of this attachment to str.
Definition: ktnefattach.cpp:169
KTnef::KTNEFAttach::size
int size() const
Returns the size of the attachment.
Definition: ktnefattach.cpp:122
KTnef::KTNEFAttach::setTitleParsed
void setTitleParsed()
Sets the TitleParsed flag for this attachment.
Definition: ktnefattach.cpp:71
KTnef::KTNEFAttach::setSize
void setSize(int size)
Sets the size of the attachment to size.
Definition: ktnefattach.cpp:127
KTnef::KTNEFAttach::setInfoParsed
void setInfoParsed()
Sets the InfoParsed flag for this attachment.
Definition: ktnefattach.cpp:86
KTnef::KTNEFAttach::setExtension
void setExtension(const QString &str)
Sets the filename extension of this attachment to str.
Definition: ktnefattach.cpp:199
KTnef::KTNEFAttach::setIndex
void setIndex(int indx)
Sets the index of this attachment to indx.
Definition: ktnefattach.cpp:158
KTnef::KTNEFAttach::setOffset
void setOffset(int offset)
Sets the offset value of this attachment to offset.
Definition: ktnefattach.cpp:116
KTnef::KTNEFAttach::setMimeTag
void setMimeTag(const QString &str)
Sets the MIME tag of this attachment to str.
Definition: ktnefattach.cpp:189
KTnef::KTNEFAttach::name
QString name() const
Returns the name of the attachment.
Definition: ktnefattach.cpp:142
KTnef::KTNEFAttach::titleParsed
bool titleParsed() const
Returns true if the TitleParsed flag is set; else returns false.
Definition: ktnefattach.cpp:91
KTnef::KTNEFAttach::setDataParsed
void setDataParsed()
Sets the DataParsed flag for this attachment.
Definition: ktnefattach.cpp:76
KTnef::KTNEFAttach::unsetDataParser
void unsetDataParser()
Unsets the DataParsed flag for this attachment.
Definition: ktnefattach.cpp:81
KTnef::KTNEFAttach::fileName
QString fileName() const
Returns the filename of the attachment.
Definition: ktnefattach.cpp:164
KTnef::KTNEFAttach::KTNEFAttach
KTNEFAttach()
Constructs a TNEF attachment.
Definition: ktnefattach.cpp:57
KTnef::KTNEFAttach::infoParsed
bool infoParsed() const
Returns true if the InfoParsed flag is set; else returns false.
Definition: ktnefattach.cpp:101
KTnef::KTNEFAttach::setName
void setName(const QString &str)
Sets the name of this attachment to str.
Definition: ktnefattach.cpp:147
KTnef::KTNEFAttach::offset
int offset() const
Returns the offset value of the attachment.
Definition: ktnefattach.cpp:111
KTnef::KTNEFAttach::index
int index() const
Returns the index of the attachment.
Definition: ktnefattach.cpp:153
KTnef::KTNEFAttach::mimeTag
QString mimeTag() const
Returns the MIME tag of the attachment.
Definition: ktnefattach.cpp:184
KTnef::KTNEFAttach::extension
QString extension() const
Returns the filename extension of the attachment.
Definition: ktnefattach.cpp:194
KTnef::KTNEFAttach::displayName
QString displayName() const
Returns the display name of the attachment.
Definition: ktnefattach.cpp:174
KTnef::KTNEFAttach::setDisplaySize
void setDisplaySize(int size)
Sets the display size of the attachment to size.
Definition: ktnefattach.cpp:137
KTnef::KTNEFAttach::~KTNEFAttach
~KTNEFAttach()
Destroys the TNEF attachment.
Definition: ktnefattach.cpp:66
KTnef::KTNEFAttach::displaySize
int displaySize() const
Returns the display size of the attachment.
Definition: ktnefattach.cpp:132
KTnef::KTNEFAttach::setDisplayName
void setDisplayName(const QString &str)
Sets the display name of this attachment to str.
Definition: ktnefattach.cpp:179
KTnef::KTNEFAttach::dataParsed
bool dataParsed() const
Returns true if the ParseState::DataParsed flag is set; else returns false.
Definition: ktnefattach.cpp:96
KTnef::KTNEFAttach::checkState
bool checkState(int state) const
Sets/Unsets the attachment state according to the state flag must be a ParseState type.
Definition: ktnefattach.cpp:106
KTnef::KTNEFAttach::DataParsed
@ DataParsed
The data is parsed.
Definition: ktnefattach.h:60
KTnef::KTNEFAttach::InfoParsed
@ InfoParsed
The info is parsed.
Definition: ktnefattach.h:61
KTnef::KTNEFAttach::Unparsed
@ Unparsed
Unparsed.
Definition: ktnefattach.h:58
KTnef::KTNEFAttach::TitleParsed
@ TitleParsed
The title is parsed.
Definition: ktnefattach.h:59
ktnefattach.h
This file is part of the API for handling TNEF data and defines the KTNEFAttach class.
ktnefproperty.h
This file is part of the API for handling TNEF data and defines the KTNEFProperty class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KTNEF Library

Skip menu "KTNEF Library"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal