~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/mono-addins/Mono.Addins/Mono.Addins/IProgressStatus.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// IProgressStatus.cs
 
3
//
 
4
// Author:
 
5
//   Lluis Sanchez Gual
 
6
//
 
7
// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
 
8
//
 
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:
 
16
// 
 
17
// The above copyright notice and this permission notice shall be
 
18
// included in all copies or substantial portions of the Software.
 
19
// 
 
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.
 
27
//
 
28
 
 
29
 
 
30
using System;
 
31
 
 
32
namespace Mono.Addins
 
33
{
 
34
        /// <summary>
 
35
        /// Progress status listener.
 
36
        /// </summary>
 
37
        public interface IProgressStatus
 
38
        {
 
39
                /// <summary>
 
40
                /// Sets the description of the current operation.
 
41
                /// </summary>
 
42
                /// <param name="msg">
 
43
                /// A message
 
44
                /// </param>
 
45
                /// <remarks>
 
46
                /// This method is called by the add-in engine to show a description of the operation being monitorized.
 
47
                /// </remarks>
 
48
                void SetMessage (string msg);
 
49
                
 
50
                /// <summary>
 
51
                /// Sets the progress of the operation.
 
52
                /// </summary>
 
53
                /// <param name="progress">
 
54
                /// A number between 0 and 1. 0 means no progress, 1 means operation completed.
 
55
                /// </param>
 
56
                /// <remarks>
 
57
                /// This method is called by the add-in engine to show the progress of the operation being monitorized.
 
58
                /// </remarks>
 
59
                void SetProgress (double progress);
 
60
                
 
61
                /// <summary>
 
62
                /// Writes text to the log.
 
63
                /// </summary>
 
64
                /// <param name="msg">
 
65
                /// Message to write
 
66
                /// </param>
 
67
                void Log (string msg);
 
68
                
 
69
                /// <summary>
 
70
                /// Log level requested by the user: 0: no log, 1: normal log, >1 verbose log
 
71
                /// </summary>
 
72
                int LogLevel { get; }
 
73
                
 
74
                /// <summary>
 
75
                /// Reports a warning.
 
76
                /// </summary>
 
77
                /// <param name="message">
 
78
                /// Warning message
 
79
                /// </param>
 
80
                /// <remarks>
 
81
                /// This method is called by the add-in engine to report a warning in the operation being monitorized.
 
82
                /// </remarks>
 
83
                void ReportWarning (string message);
 
84
                
 
85
                /// <summary>
 
86
                /// Reports an error.
 
87
                /// </summary>
 
88
                /// <param name="message">
 
89
                /// Error message
 
90
                /// </param>
 
91
                /// <param name="exception">
 
92
                /// Exception that caused the error. It can be null.
 
93
                /// </param>
 
94
                /// <remarks>
 
95
                /// This method is called by the add-in engine to report an error occurred while executing the operation being monitorized.
 
96
                /// </remarks>
 
97
                void ReportError (string message, Exception exception);
 
98
                
 
99
                /// <summary>
 
100
                /// Returns True when the user requested to cancel this operation
 
101
                /// </summary>
 
102
                bool IsCanceled { get; }
 
103
                
 
104
                /// <summary>
 
105
                /// Cancels the operation being montorized.
 
106
                /// </summary>
 
107
                void Cancel ();
 
108
        }
 
109
}