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

KCal Library

  • kcal
kresult.h
Go to the documentation of this file.
1 /*
2  This file is part of KDE.
3 
4  Copyright (c) 2005 Cornelius Schumacher <schumacher@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
28 #ifndef KRESULT_H
29 #define KRESULT_H
30 
31 #include <QtCore/QString>
32 #include "kcal_export.h"
33 
34 namespace KCal {
35 
109 class KCAL_EXPORT_DEPRECATED KResult
110 {
111  public:
115  enum Type {
116  Ok,
117  InProgress,
118  Error
119  };
120 
124  enum ErrorType {
125  NotAnError,
126  Undefined,
127  InvalidUrl,
128  WrongParameter,
129  ConnectionFailed,
130  WriteError,
131  ReadError,
132  ParseError,
133  WrongSchemaRevision
134  };
135 
139  KResult();
140 
144  KResult( const KResult & );
145 
150  explicit KResult( Type type );
151 
159  explicit KResult( ErrorType error, const QString &details = QString() );
160 
164  ~KResult();
165 
171  operator bool() const;
172 
176  bool isOk() const;
177 
181  bool isInProgress() const;
182 
186  bool isError() const;
187 
191  ErrorType error() const;
192 
198  QString message() const;
199 
210  void setDetails( const QString &details );
211 
216  QString details() const;
217 
222  QString fullMessage() const;
223 
230  KResult &chain( const KResult &result );
231 
236  bool hasChainedResult() const;
237 
241  KResult chainedResult() const;
242 
247  QString chainedMessage() const;
248 
249  private:
250  //@cond PRIVATE
251  class Private;
252  Private *const d;
253  //@endcond
254 };
255 
260 class KCAL_EXPORT_DEPRECATED KResultOk : public KResult
261 {
262  public:
266  KResultOk() : KResult( Ok ), d( 0 ) {}
267 
268  private:
269  //@cond PRIVATE
270  class Private;
271  Private *const d;
272  //@endcond
273 };
274 
279 class KCAL_EXPORT_DEPRECATED KResultInProgress : public KResult
280 {
281  public:
285  KResultInProgress() : KResult( InProgress ), d( 0 ) {}
286 
287  private:
288  //@cond PRIVATE
289  class Private;
290  Private *const d;
291  //@endcond
292 };
293 
298 class KCAL_EXPORT_DEPRECATED KResultError : public KResult
299 {
300  public:
304  KResultError() : KResult( Error ), d( 0 ) {}
305 
314  explicit KResultError( ErrorType error, const QString &details = QString() )
315  : KResult( error, details ), d( 0 ) {}
316 
323  KResultError( const QString &details ) :
324  KResult( Undefined, details ), d( 0 ) {}
325 
326  private:
327  //@cond PRIVATE
328  Q_DISABLE_COPY( KResultError )
329  class Private;
330  Private *const d;
331  //@endcond PRIVATE
332 };
333 
334 }
335 
336 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:29:16 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCal Library

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

kdepimlibs-4.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 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