kitchensync
syncprocessmanager.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SYNCPROCESSMANAGER_H
00022 #define SYNCPROCESSMANAGER_H
00023
00024 #include <tqobject.h>
00025
00026 #include <libqopensync/group.h>
00027
00028 namespace QSync {
00029 class Environment;
00030 }
00031
00032 class SyncProcess;
00033
00034 class SyncProcessManager : public QObject
00035 {
00036 Q_OBJECT
00037 public:
00038 static SyncProcessManager *self();
00039
00043 ~SyncProcessManager();
00044
00048 QSync::Environment *environment() const { return mEnvironment; }
00049
00053 int count() const;
00054
00058 SyncProcess* at( int pos ) const;
00059
00063 SyncProcess* byGroup( const QSync::Group &group );
00064
00068 SyncProcess* byGroupName( const TQString &name );
00069
00073 void addGroup( const TQString &name );
00074
00078 void remove( SyncProcess *syncProcess );
00079
00083 QSync::Result addMember( SyncProcess *process, const QSync::Plugin &plugin );
00084
00085 signals:
00086 void changed();
00087 void syncProcessChanged( SyncProcess *process );
00088
00089 private:
00090 SyncProcessManager();
00091
00092 void init( QSync::Environment *environment );
00093
00094 TQValueList<SyncProcess*> mProcesses;
00095 QSync::Environment *mEnvironment;
00096
00097 static SyncProcessManager *mSelf;
00098 };
00099
00100 #endif
|