00001
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 TQObject
00035 {
00036 Q_OBJECT
00037 TQ_OBJECT
00038 public:
00039 static SyncProcessManager *self();
00040
00044 ~SyncProcessManager();
00045
00049 QSync::Environment *environment() const { return mEnvironment; }
00050
00054 int count() const;
00055
00059 SyncProcess* at( int pos ) const;
00060
00064 SyncProcess* byGroup( const QSync::Group &group );
00065
00069 SyncProcess* byGroupName( const TQString &name );
00070
00074 void addGroup( const TQString &name );
00075
00079 void remove( SyncProcess *syncProcess );
00080
00084 QSync::Result addMember( SyncProcess *process, const QSync::Plugin &plugin );
00085
00086 signals:
00087 void changed();
00088 void syncProcessChanged( SyncProcess *process );
00089
00090 private:
00091 SyncProcessManager();
00092
00093 void init( QSync::Environment *environment );
00094
00095 TQValueList<SyncProcess*> mProcesses;
00096 QSync::Environment *mEnvironment;
00097
00098 static SyncProcessManager *mSelf;
00099 };
00100
00101 #endif