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

akonadi

  • akonadi
agentbase_p.h
1 /*
2  Copyright (c) 2007 Volker Krause <vkrause@kde.org>
3  Copyright (c) 2008 Kevin Krammer <kevin.krammer@gmx.at>
4 
5  This library is free software; you can redistribute it and/or modify it
6  under the terms of the GNU Library General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or (at your
8  option) any later version.
9 
10  This library is distributed in the hope that it will be useful, but WITHOUT
11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13  License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to the
17  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  02110-1301, USA.
19 */
20 
21 #ifndef AKONADI_AGENTBASE_P_H
22 #define AKONADI_AGENTBASE_P_H
23 
24 #include "agentbase.h"
25 #include "tracerinterface.h"
26 
27 #include <klocale.h>
28 
29 #include <solid/networking.h>
30 
31 class QSettings;
32 
33 namespace Akonadi {
34 
38 class AgentBasePrivate : public QObject
39 {
40  Q_OBJECT
41  public:
42  AgentBasePrivate( AgentBase *parent );
43  virtual ~AgentBasePrivate();
44  void init();
45  virtual void delayedInit();
46 
47  void slotStatus( int status, const QString &message );
48  void slotPercent( int progress );
49  void slotWarning( const QString& message );
50  void slotError( const QString& message );
51  void slotNetworkStatusChange( Solid::Networking::Status );
52  void slotResumedFromSuspend();
53 
54  virtual void changeProcessed();
55 
56  QString defaultReadyMessage() const
57  {
58  if ( mOnline ) {
59  return i18nc( "@info:status Application ready for work", "Ready" );
60  }
61  return i18nc( "@info:status", "Offline" );
62  }
63 
64  QString defaultSyncingMessage() const
65  {
66  return i18nc( "@info:status", "Syncing..." );
67  }
68 
69  QString defaultErrorMessage() const
70  {
71  return i18nc( "@info:status", "Error." );
72  }
73 
74  void setProgramName();
75 
76  AgentBase *q_ptr;
77  Q_DECLARE_PUBLIC( AgentBase )
78 
79  QString mId;
80  QString mName;
81  QString mResourceTypeName;
82 
84  QDBusConnection mDBusConnection;
85 
86  int mStatusCode;
87  QString mStatusMessage;
88 
89  uint mProgress;
90  QString mProgressMessage;
91 
92  bool mNeedsNetwork;
93  bool mOnline;
94  bool mDesiredOnlineState;
95 
96  QSettings *mSettings;
97 
98  ChangeRecorder *mChangeRecorder;
99 
100  org::freedesktop::Akonadi::Tracer *mTracer;
101 
102  AgentBase::Observer *mObserver;
103 
104  public Q_SLOTS:
105  virtual void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
106  virtual void itemChanged( const Akonadi::Item &item, const QSet<QByteArray> &partIdentifiers );
107  virtual void itemMoved( const Akonadi::Item &, const Akonadi::Collection &source, const Akonadi::Collection &destination );
108  virtual void itemRemoved( const Akonadi::Item &item );
109  void itemLinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
110  void itemUnlinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
111 
112  virtual void collectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
113  virtual void collectionChanged( const Akonadi::Collection &collection );
114  virtual void collectionChanged( const Akonadi::Collection &collection, const QSet<QByteArray> &changedAttributes );
115  virtual void collectionMoved( const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination );
116  virtual void collectionRemoved( const Akonadi::Collection &collection );
117  void collectionSubscribed( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
118  void collectionUnsubscribed( const Akonadi::Collection &collection );
119 };
120 
121 }
122 
123 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:31 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • 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