source: trunk/CrypPlugins/PeerToPeerWorker_NEW/IControlWorker.cs @ 1139

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

1) Killed the LayoutUpdated-Event in WPF because it consumed 60-90% of the cpu load...
2) Changes Threading.Timer to Timers.Timer in P2PSubscriberBase.

File size: 1.7 KB
Line 
1/* Copyright 2010 Team CrypTool (Christian Arnold), Uni Duisburg-Essen
2
3   Licensed under the Apache License, Version 2.0 (the "License");
4   you may not use this file except in compliance with the License.
5   You may obtain a copy of the License at
6
7       http://www.apache.org/licenses/LICENSE-2.0
8
9   Unless required by applicable law or agreed to in writing, software
10   distributed under the License is distributed on an "AS IS" BASIS,
11   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   See the License for the specific language governing permissions and
13   limitations under the License.
14*/
15
16using System;
17using System.Collections.Generic;
18using System.Linq;
19using System.Text;
20using Cryptool.Plugins.PeerToPeer.Jobs;
21using Cryptool.PluginBase.Miscellaneous;
22
23namespace Cryptool.PluginBase.Control
24{
25    /// <summary>
26    /// Every PlugIn, which derives from this interface have to implement
27    /// the logics for processing a distributed JobPart
28    /// </summary>
29    public interface IControlWorker
30    {
31        event ProcessingSuccessfullyEnded OnProcessingSuccessfullyEnded;
32        event ProcessingCanceled OnProcessingCanceled;
33        event InfoText OnInfoTextReceived;
34
35        string TopicName { get; set; }
36
37        /// <summary>
38        /// tries to deserialize byte representation of a job. If this is possible,
39        /// JobAccepted event will be thrown, otherwise JobDeclined event will be thrown.
40        /// Catch OnProcessingStarted-Event to get result of this operation!
41        /// </summary>
42        /// <param name="job">byte representation of a job</param>
43        bool StartProcessing(byte[] job, out BigInteger jobId);
44        void StopProcessing();
45    }
46}
Note: See TracBrowser for help on using the repository browser.