~ubuntu-branches/ubuntu/trusty/kdepimlibs/trusty

« back to all changes in this revision

Viewing changes to akonadi/tests/gidtest.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg, Rohan Garg, Philip Muškovac
  • Date: 2013-11-23 17:36:44 UTC
  • mfrom: (1.1.102)
  • Revision ID: package-import@ubuntu.com-20131123173644-p5ow94192ezsny8g
Tags: 4:4.11.80-0ubuntu1
[ Rohan Garg ]
* New upstream beta release
  - Bump akonadi requirement to 1.10.45
  - Update install files
  - Update symbols

[ Philip Muškovac ]
* kdepimlibs-dev/-dbg breaks/replaces kdepim-runtime/-dbg (<< 4:4.11.80)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2013 Christian Mollekopf <mollekopf@kolabsys.com>
 
3
 
 
4
    This library is free software; you can redistribute it and/or modify it
 
5
    under the terms of the GNU Library General Public License as published by
 
6
    the Free Software Foundation; either version 2 of the License, or (at your
 
7
    option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful, but WITHOUT
 
10
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
11
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
 
12
    License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Library General Public License
 
15
    along with this library; see the file COPYING.LIB.  If not, write to the
 
16
    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
17
    02110-1301, USA.
 
18
*/
 
19
 
 
20
#ifndef GIDTEST_H
 
21
#define GIDTEST_H
 
22
 
 
23
#include <QtCore/QObject>
 
24
 
 
25
class GidTest : public QObject
 
26
{
 
27
  Q_OBJECT
 
28
  private Q_SLOTS:
 
29
    void initTestCase();
 
30
    void testSetAndFetch_data();
 
31
    void testSetAndFetch();
 
32
    void testCreate();
 
33
    void testSetWithIgnorePayload();
 
34
    void testFetchScope();
 
35
};
 
36
 
 
37
#include <akonadi/gid/gidextractorinterface.h>
 
38
#include <akonadi/itemserializer_p.h>
 
39
#include <akonadi/itemserializerplugin.h>
 
40
 
 
41
class TestSerializer: public QObject,
 
42
                      public Akonadi::ItemSerializerPlugin,
 
43
                      public Akonadi::GidExtractorInterface
 
44
{
 
45
    Q_OBJECT
 
46
    Q_INTERFACES( Akonadi::ItemSerializerPlugin )
 
47
    Q_INTERFACES( Akonadi::GidExtractorInterface )
 
48
 
 
49
  public:
 
50
    bool deserialize( Akonadi::Item& item, const QByteArray& label, QIODevice& data, int version );
 
51
    void serialize( const Akonadi::Item& item, const QByteArray& label, QIODevice& data, int &version );
 
52
    QString extractGid( const Akonadi::Item& item ) const;
 
53
};
 
54
 
 
55
#endif