summaryrefslogtreecommitdiffabout
path: root/kabc/resource.h
Unidiff
Diffstat (limited to 'kabc/resource.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/resource.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/kabc/resource.h b/kabc/resource.h
index 2024d2d..e5f0d5d 100644
--- a/kabc/resource.h
+++ b/kabc/resource.h
@@ -24,26 +24,24 @@ Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#ifndef KABC_RESOURCE_H 28#ifndef KABC_RESOURCE_H
29#define KABC_RESOURCE_H 29#define KABC_RESOURCE_H
30 30
31#include <kresources/resource.h> 31#include <kresources/resource.h>
32 32
33 33
34#include "addressbook.h" 34#include "addressbook.h"
35 35
36class KSyncProfile;
37
38namespace KABC { 36namespace KABC {
39 37
40/** 38/**
41 * @short Helper class for handling coordinated save of address books. 39 * @short Helper class for handling coordinated save of address books.
42 * 40 *
43 * This class is used as helper class for saving address book. 41 * This class is used as helper class for saving address book.
44 * @see requestSaveTicket(), save(). 42 * @see requestSaveTicket(), save().
45 */ 43 */
46class Ticket 44class Ticket
47{ 45{
48 friend class Resource; 46 friend class Resource;
49 public: 47 public:
@@ -51,35 +49,29 @@ class Ticket
51 49
52 private: 50 private:
53 Ticket( Resource *resource ) : mResource( resource ) {} 51 Ticket( Resource *resource ) : mResource( resource ) {}
54 52
55 Resource *mResource; 53 Resource *mResource;
56}; 54};
57 55
58/** 56/**
59 * @internal 57 * @internal
60 */ 58 */
61class Resource : public KRES::Resource 59class Resource : public KRES::Resource
62{ 60{
63private:
64 /**
65 * make this constructor private to force everybody to use the other one
66 */
67 Resource( const KConfig *config);
68
69public: 61public:
70 /** 62 /**
71 * Constructor 63 * Constructor
72 */ 64 */
73 Resource( const KConfig *config, bool syncable ); 65 Resource( const KConfig *config );
74 66
75 /** 67 /**
76 * Destructor. 68 * Destructor.
77 */ 69 */
78 virtual ~Resource(); 70 virtual ~Resource();
79 71
80 /** 72 /**
81 * Sets the address book of the resource. 73 * Sets the address book of the resource.
82 */ 74 */
83 void setAddressBook( AddressBook* ); 75 void setAddressBook( AddressBook* );
84 76
85 /** 77 /**
@@ -130,42 +122,36 @@ public:
130 virtual void cleanUp(); 122 virtual void cleanUp();
131 123
132 /** 124 /**
133 * Set name of file to be used for saving. 125 * Set name of file to be used for saving.
134 */ 126 */
135 virtual void setFileName( const QString & ); 127 virtual void setFileName( const QString & );
136 128
137 /** 129 /**
138 * Return name of file used for loading and saving the address book. 130 * Return name of file used for loading and saving the address book.
139 */ 131 */
140 virtual QString fileName() const; 132 virtual QString fileName() const;
141 133
142
143 virtual bool isSyncable() const;
144
145 virtual KSyncProfile* getSyncProfile();
146
147 /** 134 /**
148 * Set the name of resource.You can override this method, 135 * Set the name of resource.You can override this method,
149 * but also remember to call Resource::setResourceName(). 136 * but also remember to call Resource::setResourceName().
150 */ 137 */
151 virtual void setResourceName( const QString &name ); 138 virtual void setResourceName( const QString &name );
152 139
153 140
154 141
155protected: 142protected:
156 Ticket *createTicket( Resource * ); 143 Ticket *createTicket( Resource * );
157 virtual void doClose(); 144 virtual void doClose();
158 145
159private: 146private:
160 AddressBook *mAddressBook; 147 AddressBook *mAddressBook;
161 KSyncProfile *mSyncProfile;
162 QString mFileName; 148 QString mFileName;
163 149
164}; 150};
165 151
166 152
167} 153}
168 154
169 155
170 156
171#endif 157#endif