~renatofilho/qtorganizer5-eds/fix-1240505

« back to all changes in this revision

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

  • Committer: Renato Araujo Oliveira Filho
  • Date: 2013-08-14 21:23:01 UTC
  • Revision ID: renato.filho@canonical.com-20130814212301-cmqs3nv48cvzy9qq
Initial commit.

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 ubuntu-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_REMOVEQUESTDATA_H__
 
20
#define __QORGANIZER_EDS_REMOVEQUESTDATA_H__
 
21
 
 
22
#include "qorganizer-eds-requestdata.h"
 
23
 
 
24
#include <glib.h>
 
25
 
 
26
class RemoveRequestData : public RequestData
 
27
{
 
28
public:
 
29
    RemoveRequestData(QOrganizerEDSEngine *engine, QtOrganizer::QOrganizerAbstractRequest *req);
 
30
    ~RemoveRequestData();
 
31
 
 
32
    QList<QtOrganizer::QOrganizerCollectionId> pendingCollections() const;
 
33
    QtOrganizer::QOrganizerCollectionId collectionId() const;
 
34
 
 
35
    void finish(QtOrganizer::QOrganizerManager::Error error = QtOrganizer::QOrganizerManager::NoError);
 
36
 
 
37
    GSList *compIds() const;
 
38
 
 
39
    QtOrganizer::QOrganizerCollectionId begin();
 
40
    void commit();
 
41
    virtual void cancel();
 
42
 
 
43
private:
 
44
    QSet<QtOrganizer::QOrganizerCollectionId> m_pendingCollections;
 
45
    QList<QtOrganizer::QOrganizerItem> m_pendingItems;
 
46
 
 
47
    bool m_sessionStaterd;
 
48
    GSList *m_currentCompIds;
 
49
    QList<QtOrganizer::QOrganizerItemId> m_currentIds;
 
50
    QtOrganizer::QOrganizerCollectionId m_currentCollectionId;
 
51
 
 
52
    void clear();
 
53
    GSList* takeItemsIds(QtOrganizer::QOrganizerCollectionId collectionId);
 
54
};
 
55
 
 
56
#endif