~renatofilho/buteo-sync-plugins-contacts/solve-eds-conflict

« back to all changes in this revision

Viewing changes to storage-change-notifier/contacts/ContactsChangeNotifierPlugin.h

  • Committer: CI Train Bot
  • Author(s): Renato Araujo Oliveira Filho
  • Date: 2015-09-24 17:50:44 UTC
  • mfrom: (1.3.53 initial-vr)
  • Revision ID: ci-train-bot@canonical.com-20150924175044-rp0akjs0h1xwxmpj
Implemented buteo contacts sync plugin for google, heavily based on:
  - https://github.com/nemomobile-graveyard/buteo-sync-plugins-google
  - https://github.com/nemomobile/buteo-sync-plugins-social
Approved by: Michael Sheldon

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
 **
 
3
 ** Copyright (C) 2015 Canonical Ltd.
 
4
 **
 
5
 ** Contact: Renato Araujo Oliveira Filho <renato.filho@canonical.com>
 
6
 **
 
7
 ** This program/library is free software; you can redistribute it and/or
 
8
 ** modify it under the terms of the GNU Lesser General Public License
 
9
 ** version 2.1 as published by the Free Software Foundation.
 
10
 **
 
11
 ** This program/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
 ** Lesser General Public License for more details.
 
15
 **
 
16
 ** You should have received a copy of the GNU Lesser General Public
 
17
 ** License along with this program/library; if not, write to the Free
 
18
 ** Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
19
 ** 02110-1301 USA
 
20
 **
 
21
 ****************************************************************************/
 
22
 
 
23
#ifndef CONTACTSCHANGENOTIFIERPLUGIN_H
 
24
#define CONTACTSCHANGENOTIFIERPLUGIN_H
 
25
 
 
26
#include "StorageChangeNotifierPlugin.h"
 
27
 
 
28
class ContactsChangeNotifier;
 
29
 
 
30
class ContactsChangeNotifierPlugin : public Buteo::StorageChangeNotifierPlugin
 
31
{
 
32
    Q_OBJECT
 
33
 
 
34
public:
 
35
    /*! \brief constructor
 
36
     * see StorageChangeNotifierPlugin
 
37
     */
 
38
    ContactsChangeNotifierPlugin(const QString& aStorageName);
 
39
 
 
40
    /*! \brief destructor
 
41
     */
 
42
    ~ContactsChangeNotifierPlugin();
 
43
 
 
44
    /*! \brief see StorageChangeNotifierPlugin::name
 
45
     */
 
46
    QString name() const;
 
47
 
 
48
    /*! \brief see StorageChangeNotifierPlugin::hasChanges
 
49
     */
 
50
    bool hasChanges() const;
 
51
 
 
52
    /*! \brief see StorageChangeNotifierPlugin::changesReceived
 
53
     */
 
54
    void changesReceived();
 
55
 
 
56
    /*! \brief see StorageChangeNotifierPlugin::enable
 
57
     */
 
58
    void enable();
 
59
 
 
60
    /*! \brief see StorageChangeNotifierPlugin::disable
 
61
     */
 
62
    void disable(bool disableAfterNextChange = false);
 
63
 
 
64
private Q_SLOTS:
 
65
    /*! \brief handles a change notification from contacts notifier
 
66
     */
 
67
    void onChange();
 
68
 
 
69
private:
 
70
    ContactsChangeNotifier* icontactsChangeNotifier;
 
71
    bool ihasChanges;
 
72
    bool iDisableLater;
 
73
};
 
74
 
 
75
#endif