~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/uriloader/base/nsIWebProgressListener.idl

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 
2
 *
 
3
 * The contents of this file are subject to the Mozilla Public
 
4
 * License Version 1.1 (the "License"); you may not use this file
 
5
 * except in compliance with the License. You may obtain a copy of
 
6
 * the License at http://www.mozilla.org/MPL/
 
7
 * 
 
8
 * Software distributed under the License is distributed on an "AS
 
9
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
10
 * implied. See the License for the specific language governing
 
11
 * rights and limitations under the License.
 
12
 * 
 
13
 * The Original Code is the Mozilla browser.
 
14
 * 
 
15
 * The Initial Developer of the Original Code is Netscape
 
16
 * Communications, Inc.  Portions created by Netscape are
 
17
 * Copyright (C) 1999, Mozilla.  All Rights Reserved.
 
18
 * 
 
19
 * Contributor(s):
 
20
 *   Travis Bogard <travis@netscape.com>
 
21
 */
 
22
 
 
23
#include "nsISupports.idl"
 
24
 
 
25
/**
 
26
 * The nsIWebProgressListener interface is implemented by clients wishing to 
 
27
 * listen in on the progress associated with the loading of documents.
 
28
 *
 
29
 * @status UNDER_REVIEW
 
30
 */
 
31
 
 
32
interface nsIWebProgress;
 
33
interface nsIRequest;
 
34
interface nsIURI;
 
35
 
 
36
[scriptable, uuid(570F39D1-EFD0-11d3-B093-00A024FFC08C)]
 
37
interface nsIWebProgressListener : nsISupports
 
38
{
 
39
 /**
 
40
  * Progress state transition bits.
 
41
  * These flags indicate the various states that documents and requests
 
42
  * may transition through as they are being loaded.
 
43
  */
 
44
  const unsigned long STATE_START          = 0x00000001;
 
45
  const unsigned long STATE_REDIRECTING    = 0x00000002;
 
46
  const unsigned long STATE_TRANSFERRING   = 0x00000004;
 
47
  const unsigned long STATE_NEGOTIATING    = 0x00000008;
 
48
  const unsigned long STATE_STOP           = 0x00000010;
 
49
 
 
50
 /**
 
51
  * Progress State type bits.
 
52
  * These flags indicate whether the transition is occuring on a document
 
53
  * or an individual request within the document.
 
54
  */
 
55
  const unsigned long STATE_IS_REQUEST     = 0x00010000;
 
56
  const unsigned long STATE_IS_DOCUMENT    = 0x00020000;
 
57
  const unsigned long STATE_IS_NETWORK     = 0x00040000;
 
58
  const unsigned long STATE_IS_WINDOW      = 0x00080000;
 
59
 
 
60
 /**
 
61
  * Security state bits
 
62
  */
 
63
  const unsigned long STATE_IS_INSECURE     = 0x00000004;
 
64
  const unsigned long STATE_IS_BROKEN       = 0x00000001;
 
65
  const unsigned long STATE_IS_SECURE       = 0x00000002;
 
66
 
 
67
  const unsigned long STATE_SECURE_HIGH     = 0x00040000;
 
68
  const unsigned long STATE_SECURE_MED      = 0x00010000;
 
69
  const unsigned long STATE_SECURE_LOW      = 0x00020000;
 
70
 
 
71
 
 
72
 /**
 
73
  * Notification indicating the state has changed for one of the requests
 
74
  * associated with the document loaded.
 
75
  *
 
76
  * @param aWebProgress    The nsIWebProgress instance that fired the
 
77
  *                        notification
 
78
  *
 
79
  * @param aRequest        The nsIRequest which has changed state.
 
80
  *
 
81
  * @param aStateFlags     Flags indicating the state change.
 
82
  *
 
83
  * @param aStatus         Error status code associated with the state change.
 
84
  * This parameter should be ignored unless the status flag includes the
 
85
  * STATE_STOP bit. The status code will indicate success / failure of the
 
86
  * request associated with the state change.
 
87
  *
 
88
  * @return                NS_OK should always be returned.
 
89
  */
 
90
  void onStateChange(in nsIWebProgress aWebProgress,
 
91
                     in nsIRequest aRequest,
 
92
                     in unsigned long aStateFlags,
 
93
                     in nsresult aStatus);
 
94
 
 
95
 /**
 
96
  * Notification that the progress has changed for one of the requests being
 
97
  * monitored.
 
98
  *
 
99
  * @param aWebProgress        The nsIWebProgress instance that fired the
 
100
  *                            notification
 
101
  *
 
102
  * @param aRequest            The nsIRequest that has new progress.
 
103
  *
 
104
  * @param aCurSelfProgress    The current progress for aRequest.
 
105
  *
 
106
  * @param aMaxSelfProgress    The maximum progress for aRequest.  If this
 
107
  *                            value is not known then -1 is passed.
 
108
  *
 
109
  * @param aCurTotalProgress   The current progress for all the requests
 
110
  *                            being monitored.
 
111
  *
 
112
  * @param aMaxTotalProgress   The total progress for all the requests being
 
113
  *                            monitored.  If this value is not known then
 
114
  *                            -1 is passed.
 
115
  *
 
116
  * @return                    NS_OK should always be returned.
 
117
  */
 
118
  void onProgressChange(in nsIWebProgress aWebProgress,
 
119
                        in nsIRequest aRequest,
 
120
                        in long aCurSelfProgress,
 
121
                        in long aMaxSelfProgress,
 
122
                        in long aCurTotalProgress,
 
123
                        in long aMaxTotalProgress);
 
124
 /**
 
125
  * Called when the window being watched changes the location that is currently.
 
126
  * This is not when a load is requested, but rather once it is verified that 
 
127
  * the load is going to occur in the given window.  For instance, a load that
 
128
  * starts in a window might send progress and status messages, for the new site
 
129
  * but it will not send the onLocationChange until we are sure we are loading
 
130
  * this new page here.
 
131
  *
 
132
  * @param location   The URI of the location that is being loaded.
 
133
  *
 
134
  * @return           NS_OK should always be returned.
 
135
  */
 
136
  void onLocationChange(in nsIWebProgress aWebProgress,
 
137
                        in nsIRequest aRequest,
 
138
                        in nsIURI location);
 
139
 
 
140
 /**
 
141
  * Notification that the status has changed. The status message is usually
 
142
  * printed in the status bar of the browser.
 
143
  *
 
144
  * @return           NS_OK should always be returned.
 
145
  */
 
146
  void onStatusChange(in nsIWebProgress aWebProgress,
 
147
                      in nsIRequest aRequest,
 
148
                      in nsresult aStatus,
 
149
                      in wstring aMessage);
 
150
 
 
151
 
 
152
 /**
 
153
  * Notification called for security progress.  
 
154
  * This method will be called on security transitions (eg HTTP -> HTTPS, 
 
155
  * HTTPS -> HTTP, FOO -> https) and after document load completion.  
 
156
  * It might also be called if an error occurs during network loading.
 
157
  *
 
158
  * These notification will only occur if a security package is installed.
 
159
  *
 
160
  * @return           NS_OK should always be returned.
 
161
  */
 
162
 
 
163
 
 
164
  void onSecurityChange(in nsIWebProgress aWebProgress,
 
165
                        in nsIRequest aRequest,
 
166
                        in unsigned long state);
 
167
};
 
168
 
 
169