source: trunk/CrypPluginBase/Delegates.cs @ 1137

Last change on this file since 1137 was 1137, checked in by arnold, 12 years ago

Completely redesigned Manager-JobAdmin-Worker-infrastructure to distribute Jobs with a Peer-to-Peer infrastructure to remote CT2-Workspaces.

To test this infrastructure, open 2 instances of CT and load P2P_Manager_NEW_DES.cte and in the other instance P2P_Worker_NEW.cte.
HINT: Working with remote peers isn't possible every time, because the so called "SuperNode", which is necessary for relaying, sometimes goes down. But testing this infrastructure on different computers in the same network should work every time.

File size: 4.1 KB
Line 
1/*
2   Copyright 2008 Martin Saternus, University of Duisburg-Essen
3
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15*/
16
17using System;
18using Cryptool.PluginBase.Editor;
19using Cryptool.PluginBase.Control;
20using Cryptool.PluginBase.Miscellaneous;
21
22namespace Cryptool.PluginBase
23{
24  #region public interface delegates
25  /// <summary>
26  /// Used by plugins to inform the editor about internal status changes. E.g. a comparator
27  /// plugin can send a new icon to show after comparison was done.
28  /// </summary>
29  public delegate void StatusChangedEventHandler(IPlugin sender, StatusEventArgs args);
30
31  /// <summary>
32  /// Used to send messages to the GUI log-window.
33  /// </summary>
34  public delegate void GuiLogNotificationEventHandler(IPlugin sender, GuiLogEventArgs args);
35
36  /// <summary>
37  /// Used to notify the editor about prgress changes in execution method.
38  /// </summary>
39  public delegate void PluginProgressChangedEventHandler(IPlugin sender, PluginProgressEventArgs args);
40  #endregion public interface delegates
41
42  # region editor delegates
43  /// <summary>
44  /// Used by editor plugins to communicate the selected plugin to CrypWin.
45  /// </summary>
46  public delegate void SelectedPluginChangedHandler(IEditor editor, PluginChangedEventArgs pce);
47
48  /// <summary>
49  /// Used by editor plugins to send DisplayLevel of loaded workspace to the CrypWin.
50  /// </summary>
51  public delegate void ChangeDisplayLevelHandler(IEditor editor, ChangeDisplayLevelEventArgs args);
52
53  /// <summary>
54  /// Used by editor plugins to send current project title to CrypWin.
55  /// </summary>
56  public delegate void ProjectTitleChangedHandler(IEditor editor, string newProjectTitle);
57
58  /// <summary>
59  /// Used by editor plugins after a project file was dropped on workspace, to inform the GUI
60  /// to execute project open operations (including questions for unsaved changes etc.).
61  /// </summary>
62  public delegate void OpenProjectFileHandler(IEditor editor, string fileName);
63
64  /// <summary>
65  /// This delegate is used by editors to inform the gui of EditorSpecificPluginChange.
66  /// This occurs after a new SubWorkspace was created.
67  /// </summary>
68  public delegate void EditorSpecificPluginsChanged(IEditor editor);
69  # endregion editor delegates
70
71  #region optional delegates
72  /// <summary>
73  /// This optional delegate can be used by plugins to inform editors of an
74  /// change of dynamic properties.
75  /// </summary>
76  public delegate void DynamicPropertiesChanged(IPlugin plugin);
77
78  /// <summary>
79  /// This optional delegate can be used to hide task pane settings.
80  /// </summary>
81  public delegate void TaskPaneAttributeChangedHandler(ISettings settings, TaskPaneAttributeChangedEventArgs args);
82  #endregion optional delegates
83
84  #region master-slave delegates
85  public delegate void KeyPatternChanged();
86  public delegate void IControlStatusChangedEventHandler(IControl sender, bool readyForExecution);
87
88  #region Delegates for Manager-/Worker-Infrastructure
89
90  /// <summary>
91    /// P2PWorker-Control delegate: will be thrown, when the actual job is successfully processed
92    /// </summary>
93    /// <param name="result"></param>
94  public delegate void ProcessingSuccessfullyEnded(BigInteger jobId, byte[] result);
95    /// <summary>
96    /// P2PWorker-Control delegate: will be thrown, when processing was canceled by the user or due to an error
97    /// </summary>
98    /// <param name="result"></param>
99  public delegate void ProcessingCanceled(byte[] result);
100  public delegate void InfoText(string sText, NotificationLevel notLevel);
101
102  #endregion
103  #endregion
104}
Note: See TracBrowser for help on using the repository browser.