comparison dwt/internal/mozilla/nsIChannel.d @ 125:5583f8eeee6c

Synced mozilla with dwt-linux
author Jacob Carlborg <doob@me.com>
date Fri, 16 Jan 2009 12:49:08 +0100
parents d8635bb48c7c
children
comparison
equal deleted inserted replaced
124:540fa4e9974a 125:5583f8eeee6c
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1
3 *
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
8 *
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
13 *
14 * The Original Code is Mozilla Communicator client code, released March 31, 1998.
15 *
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation.
18 * Portions created by Netscape are Copyright (C) 1998-1999
19 * Netscape Communications Corporation. All Rights Reserved.
20 *
21 * Contributor(s):
22 *
23 * IBM
24 * - Binding to permit interfacing between Mozilla and DWT
25 * - Copyright (C) 2003, 2008 IBM Corp. All Rights Reserved.
26 *
27 * ***** END LICENSE BLOCK ***** */
28 module dwt.internal.mozilla.nsIChannel; 1 module dwt.internal.mozilla.nsIChannel;
29 2
30 import dwt.dwthelper.utils; 3 import dwt.internal.mozilla.Common;
4 import dwt.internal.mozilla.nsID;
5 import dwt.internal.mozilla.nsISupports;
31 6
32 public class nsIChannel extends nsIRequest { 7 import dwt.internal.mozilla.nsIRequest;
8 import dwt.internal.mozilla.nsIURI;
9 import dwt.internal.mozilla.nsIInterfaceRequestor;
10 import dwt.internal.mozilla.nsIInputStream;
11 import dwt.internal.mozilla.nsIStreamListener;
12 import dwt.internal.mozilla.nsStringAPI;
33 13
34 static final int LAST_METHOD_ID = nsIRequest.LAST_METHOD_ID + 16; 14 const char[] NS_ICHANNEL_IID_STR = "c63a055a-a676-4e71-bf3c-6cfa11082018";
15 const nsIID NS_ICHANNEL_IID=
16 {0xc63a055a, 0xa676, 0x4e71,
17 [ 0xbf, 0x3c, 0x6c, 0xfa, 0x11, 0x08, 0x20, 0x18 ]};
35 18
36 public static final String NS_ICHANNEL_IID_STR = 19 interface nsIChannel : nsIRequest {
37 "c63a055a-a676-4e71-bf3c-6cfa11082018";
38 20
39 public static final nsID NS_ICHANNEL_IID = 21 static const char[] IID_STR = NS_ICHANNEL_IID_STR;
40 new nsID(NS_ICHANNEL_IID_STR); 22 static const nsIID IID = NS_ICHANNEL_IID;
41 23
42 public nsIChannel(int /*long*/ address) { 24 extern(System):
43 super(address); 25 nsresult GetOriginalURI(nsIURI *aOriginalURI);
44 } 26 nsresult SetOriginalURI(nsIURI aOriginalURI);
27 nsresult GetURI(nsIURI *aURI);
28 nsresult GetOwner(nsISupports *aOwner);
29 nsresult SetOwner(nsISupports aOwner);
45 30
46 public int GetOriginalURI(int /*long*/[] aOriginalURI) { 31 nsresult GetNotificationCallbacks(nsIInterfaceRequestor *aNotificationCallbacks);
47 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 1, getAddress(), aOriginalURI); 32 nsresult SetNotificationCallbacks(nsIInterfaceRequestor aNotificationCallbacks);
48 } 33 nsresult GetSecurityInfo(nsISupports *aSecurityInfo);
34 nsresult GetContentType(nsACString * aContentType);
35 nsresult SetContentType(nsACString * aContentType);
36 nsresult GetContentCharset(nsACString * aContentCharset);
37 nsresult SetContentCharset(nsACString * aContentCharset);
38 nsresult GetContentLength(PRInt32 *aContentLength);
39 nsresult SetContentLength(PRInt32 aContentLength);
40 nsresult Open(nsIInputStream *_retval);
41 nsresult AsyncOpen(nsIStreamListener aListener, nsISupports aContext);
49 42
50 public int SetOriginalURI(int /*long*/ aOriginalURI) { 43 enum { LOAD_DOCUMENT_URI = 65536U };
51 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 2, getAddress(), aOriginalURI); 44 enum { LOAD_RETARGETED_DOCUMENT_URI = 131072U };
52 } 45 enum { LOAD_REPLACE = 262144U };
46 enum { LOAD_INITIAL_DOCUMENT_URI = 524288U };
47 enum { LOAD_TARGETED = 1048576U };
48 enum { LOAD_CALL_CONTENT_SNIFFERS = 2097152U };
49 }
53 50
54 public int GetURI(int /*long*/[] aURI) {
55 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 3, getAddress(), aURI);
56 }
57
58 public int GetOwner(int /*long*/[] aOwner) {
59 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 4, getAddress(), aOwner);
60 }
61
62 public int SetOwner(int /*long*/ aOwner) {
63 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 5, getAddress(), aOwner);
64 }
65
66 public int GetNotificationCallbacks(int /*long*/[] aNotificationCallbacks) {
67 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 6, getAddress(), aNotificationCallbacks);
68 }
69
70 public int SetNotificationCallbacks(int /*long*/ aNotificationCallbacks) {
71 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 7, getAddress(), aNotificationCallbacks);
72 }
73
74 public int GetSecurityInfo(int /*long*/[] aSecurityInfo) {
75 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 8, getAddress(), aSecurityInfo);
76 }
77
78 public int GetContentType(int /*long*/ aContentType) {
79 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 9, getAddress(), aContentType);
80 }
81
82 public int SetContentType(int /*long*/ aContentType) {
83 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 10, getAddress(), aContentType);
84 }
85
86 public int GetContentCharset(int /*long*/ aContentCharset) {
87 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 11, getAddress(), aContentCharset);
88 }
89
90 public int SetContentCharset(int /*long*/ aContentCharset) {
91 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 12, getAddress(), aContentCharset);
92 }
93
94 public int GetContentLength(int[] aContentLength) {
95 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 13, getAddress(), aContentLength);
96 }
97
98 public int SetContentLength(int aContentLength) {
99 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 14, getAddress(), aContentLength);
100 }
101
102 public int Open(int /*long*/[] _retval) {
103 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 15, getAddress(), _retval);
104 }
105
106 public int AsyncOpen(int /*long*/ aListener, int /*long*/ aContext) {
107 return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 16, getAddress(), aListener, aContext);
108 }
109
110 public static final int LOAD_DOCUMENT_URI = 65536;
111
112 public static final int LOAD_RETARGETED_DOCUMENT_URI = 131072;
113
114 public static final int LOAD_REPLACE = 262144;
115
116 public static final int LOAD_INITIAL_DOCUMENT_URI = 524288;
117
118 public static final int LOAD_TARGETED = 1048576;
119
120 public static final int LOAD_CALL_CONTENT_SNIFFERS = 2097152;
121 }