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

KTNEF Library

  • sources
  • kde-4.12
  • kdepimlibs
  • 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 
34 using namespace KTnef;
35 
40 //@cond PRIVATE
41 class 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 
57 KTNEFAttach::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 
66 KTNEFAttach::~KTNEFAttach()
67 {
68  delete d;
69 }
70 
71 void KTNEFAttach::setTitleParsed()
72 {
73  d->state_ |= TitleParsed;
74 }
75 
76 void KTNEFAttach::setDataParsed()
77 {
78  d->state_ |= DataParsed;
79 }
80 
81 void KTNEFAttach::unsetDataParser()
82 {
83  d->state_ = ( d->state_ & ~DataParsed );
84 }
85 
86 void KTNEFAttach::setInfoParsed()
87 {
88  d->state_ |= InfoParsed;
89 }
90 
91 bool KTNEFAttach::titleParsed() const
92 {
93  return d->state_ & TitleParsed;
94 }
95 
96 bool KTNEFAttach::dataParsed() const
97 {
98  return d->state_ & DataParsed;
99 }
100 
101 bool KTNEFAttach::infoParsed() const
102 {
103  return d->state_ & InfoParsed;
104 }
105 
106 bool KTNEFAttach::checkState( int state ) const
107 {
108  return d->state_ & state;
109 }
110 
111 int KTNEFAttach::offset() const
112 {
113  return d->offset_;
114 }
115 
116 void KTNEFAttach::setOffset( int n )
117 {
118  setDataParsed();
119  d->offset_ = n;
120 }
121 
122 int KTNEFAttach::size() const
123 {
124  return d->size_;
125 }
126 
127 void KTNEFAttach::setSize( int s )
128 {
129  d->size_ = s;
130 }
131 
132 int KTNEFAttach::displaySize() const
133 {
134  return d->displaysize_;
135 }
136 
137 void KTNEFAttach::setDisplaySize( int s )
138 {
139  d->displaysize_ = s;
140 }
141 
142 QString KTNEFAttach::name() const
143 {
144  return d->name_;
145 }
146 
147 void KTNEFAttach::setName( const QString &str )
148 {
149  setTitleParsed();
150  d->name_ = str;
151 }
152 
153 int KTNEFAttach::index() const
154 {
155  return d->index_;
156 }
157 
158 void KTNEFAttach::setIndex( int i )
159 {
160  setInfoParsed();
161  d->index_ = i;
162 }
163 
164 QString KTNEFAttach::fileName() const
165 {
166  return d->filename_;
167 }
168 
169 void KTNEFAttach::setFileName( const QString &str )
170 {
171  d->filename_ = str;
172 }
173 
174 QString KTNEFAttach::displayName() const
175 {
176  return d->displayname_;
177 }
178 
179 void KTNEFAttach::setDisplayName( const QString &str )
180 {
181  d->displayname_ = str;
182 }
183 
184 QString KTNEFAttach::mimeTag() const
185 {
186  return d->mimetag_;
187 }
188 
189 void KTNEFAttach::setMimeTag( const QString &str )
190 {
191  d->mimetag_ = str;
192 }
193 
194 QString KTNEFAttach::extension() const
195 {
196  return d->extension_;
197 }
198 
199 void KTNEFAttach::setExtension( const QString &str )
200 {
201  d->extension_ = str;
202 }
KTnef::KTNEFAttach::index
int index() const
Returns the index of the attachment.
Definition: ktnefattach.cpp:153
KTnef::KTNEFAttach::titleParsed
bool titleParsed() const
Returns true if the TitleParsed flag is set; else returns false.
Definition: ktnefattach.cpp:91
KTnef::KTNEFAttach::setOffset
void setOffset(int offset)
Sets the offset value of this attachment to offset.
Definition: ktnefattach.cpp:116
KTnef::KTNEFAttach::displaySize
int displaySize() const
Returns the display size of the attachment.
Definition: ktnefattach.cpp:132
KTnef::KTNEFAttach::setDisplaySize
void setDisplaySize(int size)
Sets the display size of the attachment to size.
Definition: ktnefattach.cpp:137
KTnef::KTNEFAttach::infoParsed
bool infoParsed() const
Returns true if the InfoParsed flag is set; else returns false.
Definition: ktnefattach.cpp:101
KTnef::KTNEFAttach::setInfoParsed
void setInfoParsed()
Sets the InfoParsed flag for this attachment.
Definition: ktnefattach.cpp:86
KTnef::KTNEFAttach::dataParsed
bool dataParsed() const
Returns true if the ParseState::DataParsed flag is set; else returns false.
Definition: ktnefattach.cpp:96
KTnef::KTNEFAttach::setExtension
void setExtension(const QString &str)
Sets the filename extension of this attachment to str.
Definition: ktnefattach.cpp:199
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::displayName
QString displayName() const
Returns the display name of the attachment.
Definition: ktnefattach.cpp:174
KTnef::KTNEFAttach::size
int size() const
Returns the size of the attachment.
Definition: ktnefattach.cpp:122
KTnef::KTNEFAttach::setDataParsed
void setDataParsed()
Sets the DataParsed flag for this attachment.
Definition: ktnefattach.cpp:76
KTnef::KTNEFAttach::fileName
QString fileName() const
Returns the filename of the attachment.
Definition: ktnefattach.cpp:164
KTnef::KTNEFAttach::setMimeTag
void setMimeTag(const QString &str)
Sets the MIME tag of this attachment to str.
Definition: ktnefattach.cpp:189
KTnef::KTNEFAttach::setFileName
void setFileName(const QString &str)
Sets the filename of this attachment to str.
Definition: ktnefattach.cpp:169
KTnef::KTNEFAttach::Unparsed
Unparsed.
Definition: ktnefattach.h:58
KTnef::KTNEFAttach::unsetDataParser
void unsetDataParser()
Unsets the DataParsed flag for this attachment.
Definition: ktnefattach.cpp:81
KTnef::KTNEFAttach
Represents a TNEF attachment.
Definition: ktnefattach.h:51
KTnef::KTNEFAttach::extension
QString extension() const
Returns the filename extension of the attachment.
Definition: ktnefattach.cpp:194
KTnef::KTNEFAttach::setName
void setName(const QString &str)
Sets the name of this attachment to str.
Definition: ktnefattach.cpp:147
KTnef::KTNEFAttach::TitleParsed
The title is parsed.
Definition: ktnefattach.h:59
KTnef::KTNEFAttach::setTitleParsed
void setTitleParsed()
Sets the TitleParsed flag for this attachment.
Definition: ktnefattach.cpp:71
KTnef::KTNEFAttach::KTNEFAttach
KTNEFAttach()
Constructs a TNEF attachment.
Definition: ktnefattach.cpp:57
ktnefproperty.h
This file is part of the API for handling TNEF data and defines the KTNEFProperty class...
KTnef::KTNEFAttach::setSize
void setSize(int size)
Sets the size of the attachment to size.
Definition: ktnefattach.cpp:127
KTnef::KTNEFAttach::~KTNEFAttach
~KTNEFAttach()
Destroys the TNEF attachment.
Definition: ktnefattach.cpp:66
KTnef::KTNEFAttach::InfoParsed
The info is parsed.
Definition: ktnefattach.h:61
KTnef::KTNEFAttach::offset
int offset() const
Returns the offset value of the attachment.
Definition: ktnefattach.cpp:111
KTnef::KTNEFAttach::DataParsed
The data is parsed.
Definition: ktnefattach.h:60
ktnefattach.h
This file is part of the API for handling TNEF data and defines the KTNEFAttach class.
KTnef::KTNEFAttach::setIndex
void setIndex(int indx)
Sets the index of this attachment to indx.
Definition: ktnefattach.cpp:158
KTnef::KTNEFAttach::name
QString name() const
Returns the name of the attachment.
Definition: ktnefattach.cpp:142
KTnef::KTNEFAttach::setDisplayName
void setDisplayName(const QString &str)
Sets the display name of this attachment to str.
Definition: ktnefattach.cpp:179
KTnef::KTNEFAttach::mimeTag
QString mimeTag() const
Returns the MIME tag of the attachment.
Definition: ktnefattach.cpp:184
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:01:10 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



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