~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to kmail/groupware_types.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  -*- mode: C++; c-file-style: "gnu" -*-
2
 
 *
3
 
 *  This file is part of KMail, the KDE mail client.
4
 
 *  Copyright (c) 2007 Montel Laurent <montel@kde.org>
5
 
 *
6
 
 *  KMail is free software; you can redistribute it and/or modify it
7
 
 *  under the terms of the GNU General Public License, version 2, as
8
 
 *  published by the Free Software Foundation.
9
 
 *
10
 
 *  KMail is distributed in the hope that it will be useful, but
11
 
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 
 *  General Public License for more details.
14
 
 *
15
 
 *  You should have received a copy of the GNU General Public License
16
 
 *  along with this program; if not, write to the Free Software
17
 
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18
 
 *
19
 
 *  In addition, as a special exception, the copyright holders give
20
 
 *  permission to link the code of this program with any edition of
21
 
 *  the Qt library by Trolltech AS, Norway (or with modified versions
22
 
 *  of Qt that use the same license as Qt), and distribute linked
23
 
 *  combinations including the two.  You must obey the GNU General
24
 
 *  Public License in all respects for all of the code used other than
25
 
 *  Qt.  If you modify this file, you may extend this exception to
26
 
 *  your version of the file, but you are not obligated to do so.  If
27
 
 *  you do not wish to do so, delete this exception statement from
28
 
 *  your version.
29
 
 */
30
 
 
31
 
#ifndef KMAIL_GROUPWARETYPES_H
32
 
#define KMAIL_GROUPWARETYPES_H
33
 
 
34
 
#include <QMetaType>
35
 
 
36
 
#define KMAIL_DBUS_SERVICE "org.kde.kmail"
37
 
#define KMAIL_DBUS_GROUPWARE_PATH "/Groupware"
38
 
#define KMAIL_DBUS_GROUPWARE_INTERFACE "org.kde.kmail.groupware"
39
 
 
40
 
namespace KMail {
41
 
 
42
 
  struct SubResource {
43
 
    SubResource() {
44
 
      writable=false;
45
 
      alarmRelevant=false;
46
 
    }
47
 
    SubResource( const QString& loc, const QString& lab, bool rw, bool ar )
48
 
      : location( loc ), label( lab ), writable( rw ), alarmRelevant( ar ) {}
49
 
    QString location; // unique
50
 
    QString label;    // shown to the user
51
 
    bool writable;
52
 
    bool alarmRelevant;
53
 
 
54
 
    typedef QList<SubResource> List;
55
 
  };
56
 
 
57
 
  /// The format of the mails containing other contents than actual mail
58
 
  /// (like contacts, calendar etc.)
59
 
  /// This is currently either ical/vcard, or XML.
60
 
  /// For actual mail folders this simply to know which resource handles it
61
 
  /// This enum matches the one defined in kmail.kcfg
62
 
  enum StorageFormat { StorageIcalVcard, StorageXML };
63
 
 
64
 
  /// This bitfield indicates which changes have been made in a folder, at syncing time.
65
 
  enum FolderChanges { NoChange = 0, ContentsChanged = 1, ACLChanged = 2 };
66
 
 
67
 
  /** Custom header structure, consisting of the header name and value. */
68
 
  struct CustomHeader
69
 
  {
70
 
    CustomHeader() {}
71
 
    CustomHeader( const QByteArray &n, const QString &v ) :
72
 
        name( n ), value( v ) {}
73
 
 
74
 
    QByteArray name;
75
 
    QString value;
76
 
 
77
 
    typedef QList<CustomHeader> List;
78
 
  };
79
 
 
80
 
  /** Sernum/data pairs, used to transfer the actual incidence content. */
81
 
  struct SernumDataPair
82
 
  {
83
 
    SernumDataPair() {}
84
 
    SernumDataPair( quint32 n, const QString &d ) :
85
 
        sernum( n ), data( d ) {}
86
 
    quint32 sernum;
87
 
    QString data;
88
 
 
89
 
    typedef QList<SernumDataPair> List;
90
 
  };
91
 
 
92
 
  /**
93
 
    Register D-Bus types.
94
 
  */
95
 
  void registerGroupwareTypes();
96
 
}
97
 
 
98
 
typedef QMap<quint32, QString> Quint32QStringMap;
99
 
 
100
 
Q_DECLARE_METATYPE( KMail::SubResource )
101
 
Q_DECLARE_METATYPE( KMail::SubResource::List )
102
 
Q_DECLARE_METATYPE( Quint32QStringMap )
103
 
Q_DECLARE_METATYPE( KMail::CustomHeader )
104
 
Q_DECLARE_METATYPE( KMail::CustomHeader::List )
105
 
Q_DECLARE_METATYPE( KMail::SernumDataPair )
106
 
Q_DECLARE_METATYPE( KMail::SernumDataPair::List )
107
 
 
108
 
#endif