7
// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
9
// Permission is hereby granted, free of charge, to any person obtaining
10
// a copy of this software and associated documentation files (the
11
// "Software"), to deal in the Software without restriction, including
12
// without limitation the rights to use, copy, modify, merge, publish,
13
// distribute, sublicense, and/or sell copies of the Software, and to
14
// permit persons to whom the Software is furnished to do so, subject to
15
// the following conditions:
17
// The above copyright notice and this permission notice shall be
18
// included in all copies or substantial portions of the Software.
20
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35
/// Progress status listener.
37
public interface IProgressStatus
40
/// Sets the description of the current operation.
42
/// <param name="msg">
46
/// This method is called by the add-in engine to show a description of the operation being monitorized.
48
void SetMessage (string msg);
51
/// Sets the progress of the operation.
53
/// <param name="progress">
54
/// A number between 0 and 1. 0 means no progress, 1 means operation completed.
57
/// This method is called by the add-in engine to show the progress of the operation being monitorized.
59
void SetProgress (double progress);
62
/// Writes text to the log.
64
/// <param name="msg">
67
void Log (string msg);
70
/// Log level requested by the user: 0: no log, 1: normal log, >1 verbose log
75
/// Reports a warning.
77
/// <param name="message">
81
/// This method is called by the add-in engine to report a warning in the operation being monitorized.
83
void ReportWarning (string message);
88
/// <param name="message">
91
/// <param name="exception">
92
/// Exception that caused the error. It can be null.
95
/// This method is called by the add-in engine to report an error occurred while executing the operation being monitorized.
97
void ReportError (string message, Exception exception);
100
/// Returns True when the user requested to cancel this operation
102
bool IsCanceled { get; }
105
/// Cancels the operation being montorized.