Beispiel #1
0
        public PassiveSearch()
        {
            UpdateBase = new FlowLib.Events.FmdcEventHandler(PassiveSearch_UpdateBase);

            HubSetting settings = new HubSetting();

            settings.Address     = "127.0.0.1";
            settings.Port        = 411;
            settings.DisplayName = "FlowLib";
            settings.Protocol    = "Auto";

            Hub hubConnection = new Hub(settings, this);

            hubConnection.ProtocolChange += new FmdcEventHandler(hubConnection_ProtocolChange);
            hubConnection.Connect();

            // Wait 5 seconds (We should really listen on ConnectionStatusChange instead.
            System.Threading.Thread.Sleep(5 * 1000);

            // Send Search
            SearchInfo searchInfo = new SearchInfo();

            searchInfo.Set(SearchInfo.SEARCH, "Ubuntu");

            UpdateBase(this, new FlowLib.Events.FmdcEventArgs(Actions.Search, searchInfo));
        }
Beispiel #2
0
        public DcBot(HubSetting settings)
        {
            UpdateBase = new FlowLib.Events.FmdcEventHandler(DcBot_UpdateBase);

            downloadManager.DownloadCompleted += new FmdcEventHandler(downloadManager_DownloadCompleted);

            // Creates a empty share
            Share share = new Share("Testing");
            // Do we want bot to be active?
            if (Program.USE_ACTIVE_MODE)
            {
                if (Program.PORT_TLS > 0)
                {
                    share.Port = Program.PORT_TLS;
                }
                else
                {
                    share.Port = Program.PORT_ACTIVE;
                }

                incomingConnectionListener = new TcpConnectionListener(Program.PORT_ACTIVE);
                incomingConnectionListener.Update += new FmdcEventHandler(Connection_Update);
                incomingConnectionListener.Start();

                // TLS listener
                incomingConnectionListenerTLS = new TcpConnectionListener(Program.PORT_TLS);
                incomingConnectionListenerTLS.Update += new FmdcEventHandler(Connection_UpdateTLS);
                incomingConnectionListenerTLS.Start();
            }
            // Adds common filelist to share
            AddFilelistsToShare(share);

            hubConnection = new Hub(settings, this);

            hubConnection.Me.TagInfo.Version = "Serie V:20101125";
            hubConnection.Me.TagInfo.Slots = 2;
            // DO NOT CHANGE THIS LINE!
            hubConnection.Me.Set(UserInfo.PID, "7OP7K374IKV7YMEYUI5F5R4YICFT36M7FL64AWY");

            // Adds share to hub
            hubConnection.Share = share;

            // Do we want bot to be active?
            if (Program.USE_ACTIVE_MODE)
            {
                hubConnection.Me.TagInfo.Mode = FlowLib.Enums.ConnectionTypes.Direct;
                hubConnection.Me.Set(UserInfo.SECURE, Program.PORT_TLS.ToString());
            }
            else
            {
                hubConnection.Me.TagInfo.Mode = FlowLib.Enums.ConnectionTypes.Passive;
                hubConnection.Me.Set(UserInfo.SECURE, "");
            }

            hubConnection.ConnectionStatusChange += new FmdcEventHandler(hubConnection_ConnectionStatusChange);
            hubConnection.ProtocolChange += new FmdcEventHandler(hubConnection_ProtocolChange);
            hubConnection.SecureUpdate += new FmdcEventHandler(hubConnection_SecureUpdate);
        }
Beispiel #3
0
        public void Init()
        {
            Application.InitilizeAll();

            UpdateBase = new FlowLib.Events.FmdcEventHandler(SendMainChatOrPMToHub_UpdateBase);

            _settings             = new HubSetting();
            _settings.Address     = "127.0.0.1";
            _settings.Port        = 411;
            _settings.DisplayName = "FlowLib";
            _settings.Password    = "******";
        }
        public void Init()
        {
            Application.InitilizeAll();

            UpdateBase = new FlowLib.Events.FmdcEventHandler(SendMainChatOrPMToHub_UpdateBase);

            _settings = new HubSetting();
            _settings.Address = "127.0.0.1";
            _settings.Port = 411;
            _settings.DisplayName = "FlowLib";
            _settings.Password = "******";
        }
Beispiel #5
0
        public void Init()
        {
            Application.InitilizeAll();

            _testTimeoutLength = 20;

            UpdateBase = new FlowLib.Events.FmdcEventHandler(Downloading_In_PassiveMode_UpdateBase);

            downloadManager.DownloadCompleted += new FmdcEventHandler(downloadManager_DownloadCompleted);
            downloadManager.DownloadAdded     += new FmdcEventHandler(downloadManager_DownloadAdded);
            downloadManager.SourceAdded       += new FmdcEventHandler(downloadManager_SourceAdded);
            downloadManager.SegmentCompleted  += new FmdcEventHandler(downloadManager_SegmentCompleted);

            _settings             = new HubSetting();
            _settings.Address     = "127.0.0.1";
            _settings.Port        = 411;
            _settings.DisplayName = "FlowLib";
            _settings.Password    = "******";
        }
Beispiel #6
0
        public PassiveSearch()
        {
            UpdateBase = new FlowLib.Events.FmdcEventHandler(PassiveSearch_UpdateBase);

            HubSetting settings = new HubSetting();
            settings.Address = "127.0.0.1";
            settings.Port = 411;
            settings.DisplayName = "FlowLib";
            settings.Protocol = "Auto";

            Hub hubConnection = new Hub(settings,this);
            hubConnection.ProtocolChange += new FmdcEventHandler(hubConnection_ProtocolChange);
            hubConnection.Connect();

            // Wait 5 seconds (We should really listen on ConnectionStatusChange instead.
            System.Threading.Thread.Sleep(5 * 1000);

            // Send Search
            SearchInfo searchInfo = new SearchInfo();
            searchInfo.Set(SearchInfo.SEARCH, "Ubuntu");

            UpdateBase(this, new FlowLib.Events.FmdcEventArgs(Actions.Search, searchInfo));
        }
        public DcBot(HubSetting settings)
        {
            UpdateBase = new FlowLib.Events.FmdcEventHandler(DcBot_UpdateBase);

            downloadManager.DownloadCompleted += new FmdcEventHandler(downloadManager_DownloadCompleted);

            // Creates a empty share
            Share share = new Share("Testing");

            // Do we want bot to be active?
            if (Program.USE_ACTIVE_MODE)
            {
                if (Program.PORT_TLS > 0)
                {
                    share.Port = Program.PORT_TLS;
                }
                else
                {
                    share.Port = Program.PORT_ACTIVE;
                }

                incomingConnectionListener         = new TcpConnectionListener(Program.PORT_ACTIVE);
                incomingConnectionListener.Update += new FmdcEventHandler(Connection_Update);
                incomingConnectionListener.Start();

                // TLS listener
                incomingConnectionListenerTLS         = new TcpConnectionListener(Program.PORT_TLS);
                incomingConnectionListenerTLS.Update += new FmdcEventHandler(Connection_UpdateTLS);
                incomingConnectionListenerTLS.Start();
            }
            // Adds common filelist to share
            AddFilelistsToShare(share);

            hubConnection = new Hub(settings, this);

            hubConnection.Me.TagInfo.Version = "Serie V:20101125";
            hubConnection.Me.TagInfo.Slots   = 2;
            // DO NOT CHANGE THIS LINE!
            hubConnection.Me.Set(UserInfo.PID, "7OP7K374IKV7YMEYUI5F5R4YICFT36M7FL64AWY");


            // Adds share to hub
            hubConnection.Share = share;


            // Do we want bot to be active?
            if (Program.USE_ACTIVE_MODE)
            {
                hubConnection.Me.TagInfo.Mode = FlowLib.Enums.ConnectionTypes.Direct;
                hubConnection.Me.Set(UserInfo.SECURE, Program.PORT_TLS.ToString());
            }
            else
            {
                hubConnection.Me.TagInfo.Mode = FlowLib.Enums.ConnectionTypes.Passive;
                hubConnection.Me.Set(UserInfo.SECURE, "");
            }

            hubConnection.ConnectionStatusChange += new FmdcEventHandler(hubConnection_ConnectionStatusChange);
            hubConnection.ProtocolChange         += new FmdcEventHandler(hubConnection_ProtocolChange);
            hubConnection.SecureUpdate           += new FmdcEventHandler(hubConnection_SecureUpdate);
        }
Beispiel #8
0
 public UiHub()
 {
     UpdateBase = new FlowLib.Events.FmdcEventHandler(UHub_UpdateBase);
 }
Beispiel #9
0
 public UiHub()
 {
     UpdateBase = new FlowLib.Events.FmdcEventHandler(UHub_UpdateBase);
 }
Beispiel #10
0
        public void Init()
        {
            Application.InitilizeAll();

            _testTimeoutLength = 20;

            UpdateBase = new FlowLib.Events.FmdcEventHandler(Downloading_In_PassiveMode_UpdateBase);

            downloadManager.DownloadCompleted += new FmdcEventHandler(downloadManager_DownloadCompleted);
            downloadManager.DownloadAdded += new FmdcEventHandler(downloadManager_DownloadAdded);
            downloadManager.SourceAdded += new FmdcEventHandler(downloadManager_SourceAdded);
            downloadManager.SegmentCompleted += new FmdcEventHandler(downloadManager_SegmentCompleted);

            _settings = new HubSetting();
            _settings.Address = "127.0.0.1";
            _settings.Port = 411;
            _settings.DisplayName = "FlowLib";
            _settings.Password = "******";
        }