~ubuntu-branches/ubuntu/wily/qtorganizer5-eds/wily

« back to all changes in this revision

Viewing changes to qorganizer/qorganizer-eds-enginedata.h

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Ubuntu daily release, Renato Araujo Oliveira Filho
  • Date: 2014-06-10 20:59:33 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20140610205933-xof0e416jfq3u7ea
Tags: 0.1.1+14.10.20140610.1-0ubuntu1
[ Ubuntu daily release ]
* New rebuild forced

[ Renato Araujo Oliveira Filho ]
* Only destroy request data in the requestDestroyed function. (LP:
  #1328144)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright 2013 Canonical Ltd.
3
 
 *
4
 
 * This file is part of canonical-pim-service
5
 
 *
6
 
 * contact-service-app is free software; you can redistribute it and/or modify
7
 
 * it under the terms of the GNU General Public License as published by
8
 
 * the Free Software Foundation; version 3.
9
 
 *
10
 
 * contact-service-app is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU 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, see <http://www.gnu.org/licenses/>.
17
 
 */
18
 
 
19
 
#ifndef __QORGANIZER_EDS_ENGINEDATA_H__
20
 
#define __QORGANIZER_EDS_ENGINEDATA_H__
21
 
 
22
 
#include <QSharedData>
23
 
#include <QMap>
24
 
 
25
 
#include <QtOrganizer/QOrganizerAbstractRequest>
26
 
#include <QtOrganizer/QOrganizerManagerEngine>
27
 
#include <QtOrganizer/QOrganizerItemChangeSet>
28
 
#include <QtOrganizer/QOrganizerCollectionChangeSet>
29
 
 
30
 
class SourceRegistry;
31
 
class ViewWatcher;
32
 
class RequestData;
33
 
 
34
 
class QOrganizerEDSEngineData : public QSharedData
35
 
{
36
 
public:
37
 
    QOrganizerEDSEngineData();
38
 
    QOrganizerEDSEngineData(const QOrganizerEDSEngineData& other);
39
 
    ~QOrganizerEDSEngineData();
40
 
 
41
 
    template<class K>
42
 
    void emitSharedSignals(K* cs)
43
 
    {
44
 
        Q_FOREACH(QtOrganizer::QOrganizerManagerEngine* engine, m_sharedEngines) {
45
 
            cs->emitSignals(engine);
46
 
        }
47
 
    }
48
 
 
49
 
    ViewWatcher* watch(const QString &collectionId);
50
 
    void unWatch(const QString &collectionId);
51
 
 
52
 
    QAtomicInt m_refCount;
53
 
    SourceRegistry *m_sourceRegistry;
54
 
    QSet<QtOrganizer::QOrganizerManagerEngine*> m_sharedEngines;
55
 
 
56
 
private:
57
 
    QMap<QString, ViewWatcher*> m_viewWatchers;
58
 
 
59
 
};
60
 
 
61
 
#endif