summaryrefslogtreecommitdiffabout
path: root/kabc/resource.h
Unidiff
Diffstat (limited to 'kabc/resource.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/resource.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/kabc/resource.h b/kabc/resource.h
index db806a6..7d42f81 100644
--- a/kabc/resource.h
+++ b/kabc/resource.h
@@ -84,97 +84,86 @@ public:
84 84
85 /** 85 /**
86 * Returns a pointer to the addressbook. 86 * Returns a pointer to the addressbook.
87 */ 87 */
88 AddressBook *addressBook(); 88 AddressBook *addressBook();
89 89
90 /** 90 /**
91 * Writes the resource specific config to file. 91 * Writes the resource specific config to file.
92 */ 92 */
93 virtual void writeConfig( KConfig *config ); 93 virtual void writeConfig( KConfig *config );
94 94
95 /** 95 /**
96 * Open the resource and returns if it was successfully 96 * Open the resource and returns if it was successfully
97 */ 97 */
98 virtual bool doOpen(); 98 virtual bool doOpen();
99 99
100 100
101 /** 101 /**
102 * Request a ticket, you have to pass through @ref save() to 102 * Request a ticket, you have to pass through @ref save() to
103 * allow locking. 103 * allow locking.
104 */ 104 */
105 virtual Ticket *requestSaveTicket(); 105 virtual Ticket *requestSaveTicket();
106 106
107 /** 107 /**
108 * Load all addressees to the addressbook 108 * Load all addressees to the addressbook
109 */ 109 */
110 virtual bool load(); 110 virtual bool load();
111 111
112 /** 112 /**
113 * Save all addressees to the addressbook. 113 * Save all addressees to the addressbook.
114 * 114 *
115 * @param ticket The ticket you get by @ref requestSaveTicket() 115 * @param ticket The ticket you get by @ref requestSaveTicket()
116 */ 116 */
117 virtual bool save( Ticket *ticket ); 117 virtual bool save( Ticket *ticket );
118 118
119 /** 119 /**
120 * Removes a addressee from resource. This method is mainly 120 * Removes a addressee from resource. This method is mainly
121 * used by record-based resources like LDAP or SQL. 121 * used by record-based resources like LDAP or SQL.
122 */ 122 */
123 virtual void removeAddressee( const Addressee& addr ); 123 virtual void removeAddressee( const Addressee& addr );
124 124
125 125
126 /** 126 /**
127 * This method is called by an error handler if the application 127 * This method is called by an error handler if the application
128 * crashed 128 * crashed
129 */ 129 */
130 virtual void cleanUp(); 130 virtual void cleanUp();
131 131
132
133 /**
134 * This method returns the number of elements that are currently in the resource.
135 */
136 virtual int count() const;
137
138 /**
139 * This method removes all elements from the resource!! (Not from the addressbook)
140 */
141 virtual bool clear();
142
143 /** 132 /**
144 * Set name of file to be used for saving. 133 * Set name of file to be used for saving.
145 */ 134 */
146 virtual void setFileName( const QString & ); 135 virtual void setFileName( const QString & );
147 136
148 /** 137 /**
149 * Return name of file used for loading and saving the address book. 138 * Return name of file used for loading and saving the address book.
150 */ 139 */
151 virtual QString fileName() const; 140 virtual QString fileName() const;
152 141
153 142
154 virtual bool isSyncable() const; 143 virtual bool isSyncable() const;
155 144
156 /** 145 /**
157 * Set the name of resource.You can override this method, 146 * Set the name of resource.You can override this method,
158 * but also remember to call Resource::setResourceName(). 147 * but also remember to call Resource::setResourceName().
159 */ 148 */
160 virtual void setResourceName( const QString &name ); 149 virtual void setResourceName( const QString &name );
161 150
162 151
163 152
164protected: 153protected:
165 Ticket *createTicket( Resource * ); 154 Ticket *createTicket( Resource * );
166 virtual void doClose(); 155 virtual void doClose();
167 156
168private: 157private:
169 AddressBook *mAddressBook; 158 AddressBook *mAddressBook;
170 KSyncProfile *mSyncProfile; 159 KSyncProfile *mSyncProfile;
171 QString mFileName; 160 QString mFileName;
172 161
173}; 162};
174 163
175 164
176} 165}
177 166
178 167
179 168
180#endif 169#endif