Ejemplo n.º 1
0
Archivo: KfsScan.cs Proyecto: tmbx/kwm
        public KfsFsWatcher(KfsShare share)
        {
            Share = share;
            Instance = new FileSystemWatcher(Share.ShareFullPath);

            // Invoke event handlers in the UI thread
            Control c = (Control)Misc.MainForm;
            Instance.SynchronizingObject = c;

            // We must be notified of directory and file creation / renaming / file size change / file lastWrite change.
            Instance.NotifyFilter = NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.Size | NotifyFilters.LastWrite;

            // Watch recursively
            Instance.IncludeSubdirectories = true;

            Instance.Changed += HandleOnWatcherChanged;
            Instance.Created += HandleOnWatcherChanged;
            Instance.Deleted += HandleOnWatcherChanged;
            Instance.Renamed += HandleOnWatcherChanged;
            Instance.Error += HandleOnWatcherError;
            Instance.EnableRaisingEvents = true;
        }
Ejemplo n.º 2
0
 public KfsUploadThread(KfsShare share, byte[] ticket, ulong emailID,
     SortedDictionary<UInt64, KfsUploadBatchFile> orderTree,
     KfsPhase1Payload phase1Payload)
     : base(share, ticket, emailID)
 {
     Debug.Assert(orderTree.Count > 0);
     OrderTree = orderTree;
     Phase1Payload = phase1Payload;
     FileArray = new KfsUploadBatchFile[OrderTree.Count];
     OrderTree.Values.CopyTo(FileArray, 0);
 }
Ejemplo n.º 3
0
Archivo: KfsScan.cs Proyecto: tmbx/kwm
        public KfsPartialScanThread(KfsShare _share, List<string> _toScan)
        {
            m_share = _share;

            foreach (string path in _toScan)
            {
                m_results.Add(new KfsScan(m_share, path));
            }
        }
Ejemplo n.º 4
0
 public UiTransferMsg(KfsShare share)
 {
     Share = share;
 }
Ejemplo n.º 5
0
 public KfsMetaDataThread(KfsShare s, byte[] ticket, KfsPhase1Payload payload)
     : base(s, ticket, 0)
 {
     Phase1Payload = payload;
 }
Ejemplo n.º 6
0
 public KfsStatusView(KfsShare S)
 {
     Share = S;
     Share.StatusView = this;
 }
Ejemplo n.º 7
0
 public KfsFileTransfer(KfsShare s, UInt64 orderID, String lastFullPath)
 {
     Share = s;
     OrderID = orderID;
     LastFullPath = lastFullPath;
 }
Ejemplo n.º 8
0
 public KfsUpdateServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid, UInt64 i)
     : base(s, eid, date, uid, cid)
 {
     Inode = i;
 }
Ejemplo n.º 9
0
 public KfsCreateServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid, bool f, UInt64 ci, UInt64 pi, String n)
     : base(s, eid, date, uid, cid)
 {
     IsFile = f;
     CreatedInode = ci;
     ParentInode = pi;
     Name = n;
 }
Ejemplo n.º 10
0
 public KfsPhase2ServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid)
     : base(s, eid, date, uid, cid)
 {
 }
Ejemplo n.º 11
0
 public KfsServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid)
 {
     Share = s;
     EventID = eid;
     OpID = Share.ServerOpID++;
     Date = date;
     UserID = uid;
     CommitID = cid;
 }
Ejemplo n.º 12
0
 public KfsMoveServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid, bool f, UInt64 mi, UInt64 di, String n)
     : base(s, eid, date, uid, cid)
 {
     IsFile = f;
     MovedInode = mi;
     DestinationDirInode = di;
     DestName = n;
 }
Ejemplo n.º 13
0
 public KfsDeleteServerOp(KfsShare s, UInt64 eid, UInt64 date, UInt32 uid, UInt64 cid, bool f, UInt64 i)
     : base(s, eid, date, uid, cid)
 {
     IsFile = f;
     Inode = i;
 }
Ejemplo n.º 14
0
 public KfsFileUpload(KfsShare s, UInt64 orderID, UInt64 trackedInode, String trackedPath, 
     String lastFullPath, String uploadPath, UInt64 size, UInt64 updateCommitID,
     ulong emailID)
     : base(s, orderID, lastFullPath)
 {
     TrackedInode = trackedInode;
     TrackedPath = trackedPath;
     UploadPath = uploadPath;
     Size = size;
     UpdateCommitID = updateCommitID;
     EmailID = emailID;
 }
Ejemplo n.º 15
0
 public KfsLocalDirectory(KfsShare S, KfsLocalDirectory P, String N)
     : base(S, P, N)
 {
 }
Ejemplo n.º 16
0
 public override void NormalizeState()
 {
     if (m_share == null) m_share = new KfsShare(this);
     m_share.NormalizeState();
 }
Ejemplo n.º 17
0
 /// <summary>
 /// This constructor creates the path but does NOT insert it in the view.
 /// </summary>
 /// <param name="S">Share</param>
 /// <param name="P">Local object, if any</param>
 /// <param name="N">Server object, if any</param>
 public KfsStatusPath(KfsShare s, String path, KfsLocalObject lo, KfsServerObject so)
 {
     Share = s;
     Path = path;
     Name = KfsPath.BaseName(path);
     LocalObject = lo;
     ServerObject = so;
 }
Ejemplo n.º 18
0
        public override void PrepareForRebuild(KwsRebuildInfo rebuildInfo)
        {
            if (rebuildInfo.DeleteLocalDataFlag) DeleteLocalFiles();

            // Create a new share object if this is not a soft upgrade.
            if (!rebuildInfo.UpgradeFlag) m_share = new KfsShare(this);

            base.PrepareForRebuild(rebuildInfo);
            NormalizeState();
        }
Ejemplo n.º 19
0
 public KfsPipeline(KfsShare S)
 {
     Share = S;
     Share.Pipeline = this;
     WakeupTimer = new KWakeupTimer();
     WakeupTimer.TimerWakeUpCallback = OnTimerEvent;
 }
Ejemplo n.º 20
0
 public AppKfs(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     m_share = info.GetValue("m_Share", typeof(KfsShare)) as KfsShare;
 }
Ejemplo n.º 21
0
 public KfsTransferThread(KfsShare share, byte[] ticket)
     : base(share.App.Helper, null, 0)
 {
     Share = share;
     Ticket = ticket;
 }
Ejemplo n.º 22
0
Archivo: KfsGate.cs Proyecto: tmbx/kwm
 public KfsGate(KfsShare s)
 {
     Share = s;
     Share.Gate = this;
 }
Ejemplo n.º 23
0
 public KfsMetaDataManager(KfsShare s)
 {
     Share = s;
     Share.MetaDataManager = this;
 }
Ejemplo n.º 24
0
 public KfsTransferThread(KfsShare share, byte[] ticket, ulong emailID)
     : base(share.App.Helper, null, 0)
 {
     Share = share;
     Ticket = ticket;
     EmailID = emailID;
 }
Ejemplo n.º 25
0
Archivo: KfsScan.cs Proyecto: tmbx/kwm
 public KfsInitialScanThread(KfsShare _share)
 {
     m_share = _share;
 }
Ejemplo n.º 26
0
 /// <summary>
 /// This constructor creates the object and inserts it in the view.
 /// </summary>
 /// <param name="S">Share</param>
 /// <param name="P">Parent directory</param>
 /// <param name="N">Name</param>
 public KfsLocalObject(KfsShare S, KfsLocalDirectory P, String N)
 {
     Share = S;
     Parent = P;
     Name = N;
     AddToView();
 }
Ejemplo n.º 27
0
Archivo: KfsScan.cs Proyecto: tmbx/kwm
 public KfsScan(KfsShare _share, String _path)
 {
     m_share = _share;
     m_subtreePath = _path;
 }
Ejemplo n.º 28
0
        public KfsLocalView(KfsShare S)
        {
            Share = S;
            Share.LocalView = this;

            // Create the root directory.
            new KfsLocalDirectory(Share, null, "");
        }
Ejemplo n.º 29
0
Archivo: KfsScan.cs Proyecto: tmbx/kwm
 /// <summary>
 /// Request the watcher to stop watching.
 /// </summary>
 public void StopWatching()
 {
     Share = null;
     Instance.EnableRaisingEvents = false;
 }
Ejemplo n.º 30
0
 public KfsUploadManager(KfsShare S)
 {
     Share = S;
     Share.UploadManager = this;
 }