• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8" ?>
2
3<node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
4  <interface name="org.chromium.WebServer.ProtocolHandler">
5    <!-- Methods -->
6    <method name="AddRequestHandler">
7      <tp:docstring>
8        Adds a handler for the given |url|, and optionally request |method|.
9        On success returns a handler ID.
10      </tp:docstring>
11      <arg name="url" type="s" direction="in"/>
12      <arg name="method" type="s" direction="in"/>
13      <arg name="service_name" type="s" direction="in"/>
14      <arg name="request_handler_id" type="s" direction="out"/>
15      <annotation name="org.chromium.DBus.Method.Kind" value="normal"/>
16      <annotation name="org.chromium.DBus.Method.IncludeDBusMessage"
17                  value="true"/>
18    </method>
19    <method name="RemoveRequestHandler">
20      <tp:docstring>
21        Removes a previously registered request handler.
22        The |handler_id| is the ID returned from AddHanlder() method.
23      </tp:docstring>
24      <arg name="request_handler_id" type="s" direction="in"/>
25      <annotation name="org.chromium.DBus.Method.Kind" value="normal"/>
26    </method>
27    <method name="GetRequestFileData">
28      <tp:docstring>
29        Returns the contents of the given uploaded file. The |file_id| parameter
30        must correspond to the file_id member of FileInfo structure returned
31        by |Files| property for the given |request_id|.
32      </tp:docstring>
33      <arg name="request_id" type="s" direction="in"/>
34      <arg name="file_id" type="i" direction="in"/>
35      <arg name="contents" type="h" direction="out"/>
36      <annotation name="org.chromium.DBus.Method.Kind" value="normal"/>
37    </method>
38    <method name="CompleteRequest">
39      <tp:docstring>
40        Fulfills the request with specified |request_id| and provides response.
41        |data_size| if the size of the data is known. Otherwise should be set to
42        a value of -1. The actual data is to be written to the pipe provided
43        in |response_stream| file descriptor.
44      </tp:docstring>
45      <arg name="request_id" type="s" direction="in"/>
46      <arg name="status_code" type="i" direction="in"/>
47      <arg name="headers" type="a(ss)" direction="in"/>
48      <arg name="data_size" type="x" direction="in"/>
49      <arg name="response_stream" type="h" direction="out"/>
50      <annotation name="org.chromium.DBus.Method.Kind" value="normal"/>
51    </method>
52    <!-- Properties -->
53    <property name="Id" type="s" access="read">
54      <tp:docstring>
55        Returns a unique ID of this instance.
56      </tp:docstring>
57    </property>
58    <property name="Name" type="s" access="read">
59      <tp:docstring>
60        Returns the name of the handler. Multiple related protocol handler
61        could share the same name so that clients don't have to register
62        request handlers for each of them separately.
63      </tp:docstring>
64    </property>
65    <property name="Port" type="q" access="read">
66      <tp:docstring>
67        Returns the port number this instance is serving requests on.
68      </tp:docstring>
69    </property>
70    <property name="Protocol" type="s" access="read">
71      <tp:docstring>
72        Returns the protocol name of this instance ("http" or "https").
73      </tp:docstring>
74    </property>
75    <property name="CertificateFingerprint" type="ay" access="read">
76      <tp:docstring>
77        Returns the TLS certificate fingerprint used for HTTPS instance or
78        empty array if this is an unsecured HTTP instance.
79      </tp:docstring>
80    </property>
81  </interface>
82</node>
83