bookmarksyncee.h
00001 #ifndef BOOKMARKSYNCEE_H
00002 #define BOOKMARKSYNCEE_H
00003
00004
00005 #include <qvaluelist.h>
00006
00007 #include <kbookmark.h>
00008
00009 #include "ksyncer.h"
00010
00011 class KBookmarkManager;
00012
00013 class BookmarkSyncEntry : public KSyncEntry
00014 {
00015 public:
00016 BookmarkSyncEntry(KBookmark);
00017
00018 QString name();
00019 QString id();
00020 QString timestamp();
00021
00022 bool equals(KSyncEntry *entry);
00023
00024 KBookmark bookmark() const { return mBookmark; }
00025
00026 private:
00027 KBookmark mBookmark;
00028 };
00029
00034 class BookmarkSyncee : public KSyncee
00035 {
00036 public:
00037 BookmarkSyncee();
00038 ~BookmarkSyncee();
00039
00040 BookmarkSyncEntry *firstEntry();
00041 BookmarkSyncEntry *nextEntry();
00042
00043
00044
00045 void addEntry(KSyncEntry *);
00046 void removeEntry(KSyncEntry *);
00047
00048 bool read();
00049 bool write();
00050
00051 private:
00052 BookmarkSyncEntry *createEntry(KBookmark);
00053 void listGroup(KBookmarkGroup);
00054 KBookmarkGroup findGroup(KBookmarkGroup group);
00055
00056 KBookmarkManager *mBookmarkManager;
00057 QValueList<QDomElement> mBookmarks;
00058 QValueList<QDomElement>::ConstIterator mBookmarkIterator;
00059 QPtrList<BookmarkSyncEntry> mEntries;
00060 };
00061
00062 #endif
This file is part of the documentation for kdelibs Version 3.1.4.