]> git.0d.be Git - empathy.git/blob - extensions/Debug.xml
Updated Debug spec.
[empathy.git] / extensions / Debug.xml
1 <?xml version="1.0" ?>
2 <node name="/Debug"
3   xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
4   <tp:copyright>Copyright (C) 2009 Collabora Ltd.</tp:copyright>
5   <tp:license xmlns="http://www.w3.org/1999/xhtml">
6     <p>This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.</p>
10
11 <p>This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 Lesser General Public License for more details.</p>
15
16 <p>You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
19   </tp:license>
20   <interface name="org.freedesktop.Telepathy.Debug.DRAFT"
21     tp:causes-havoc="experimental">
22     <tp:added version="0.17.24"/>
23
24     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
25       <p>An interface for providing debug messages.</p>
26
27       <p>This interface is primarily provided by one object per
28       service, at the path <tt>/org/freedesktop/Telepathy/debug</tt>.</p>
29     </tp:docstring>
30
31     <property name="Enabled" type="b" access="readwrite"
32       tp:name-for-bindings="Enabled">
33       <tp:docstring>
34         TRUE if the <tp:member-ref>NewDebugMessage</tp:member-ref> signal
35         should be emitted when a new debug message is generated.
36       </tp:docstring>
37     </property>
38
39     <method name="GetMessages" tp:name-for-bindings="Get_Messages">
40       <tp:docstring>
41         Retrieve buffered debug messages. An implementation could have a
42         limit on how many message it keeps and so the array returned from
43         this method should not be assumed to be all of the messages in
44         the lifetime of the service.
45       </tp:docstring>
46
47       <arg direction="out" name="Messages" type="a(dsus)"
48         tp:type="Debug_Message[]">
49         <tp:docstring>
50           A list of debug messages.
51         </tp:docstring>
52       </arg>
53     </method>
54
55     <signal name="NewDebugMessage" tp:name-for-bindings="New_Debug_Message">
56       <tp:docstring>
57         Emitted when a debug messages is generated if the
58         <tp:member-ref>Enabled</tp:member-ref> property is set to TRUE.
59       </tp:docstring>
60
61       <arg name="time" type="d">
62         <tp:docstring>
63           Timestamp of the debug message.
64         </tp:docstring>
65       </arg>
66       <arg name="domain" type="s">
67         <tp:docstring>
68           Domain of the debug message, as described in the Debug_Message struct.
69         </tp:docstring>
70       </arg>
71       <arg name="level" type="u" tp:type="Debug_Level">
72         <tp:docstring>
73           Level of the debug message.
74         </tp:docstring>
75       </arg>
76       <arg name="message" type="s">
77         <tp:docstring>
78           The text of the debug message.
79         </tp:docstring>
80       </arg>
81     </signal>
82
83     <tp:enum name="Debug_Level" type="u">
84       <tp:enumvalue suffix="Error" value="0">
85         <tp:docstring>
86           Log level for errors. Error messages are always fatal, resulting
87           in the service terminating after something completely
88           unexpected occurred.
89         </tp:docstring>
90       </tp:enumvalue>
91       <tp:enumvalue suffix="Critical" value="1">
92         <tp:docstring>
93           Log level for critical messages. Critical messages are messages
94           that the service might predict and it is up to the service itself
95           to decide whether to terminate following a critical message.
96         </tp:docstring>
97       </tp:enumvalue>
98       <tp:enumvalue suffix="Warning" value="2">
99         <tp:docstring>
100           Log level for warnings.
101         </tp:docstring>
102       </tp:enumvalue>
103       <tp:enumvalue suffix="Message" value="3">
104         <tp:docstring>
105           Log level for messages.
106         </tp:docstring>
107       </tp:enumvalue>
108       <tp:enumvalue suffix="Info" value="4">
109         <tp:docstring>
110           Log level for information messages.
111         </tp:docstring>
112       </tp:enumvalue>
113       <tp:enumvalue suffix="Debug" value="5">
114         <tp:docstring>
115           Log level for debug messages.
116         </tp:docstring>
117       </tp:enumvalue>
118     </tp:enum>
119
120     <tp:struct name="Debug_Message" array-name="Debug_Message_List">
121       <tp:docstring>
122         A struct representing a debug message, as returned by
123         <tp:member-ref>GetMessages</tp:member-ref>.
124       </tp:docstring>
125
126       <tp:member type="d" name="Timestamp">
127         <tp:docstring>
128           Timestamp of the debug message. This is a double to allow
129           more accuracy in the time the message was logged.
130         </tp:docstring>
131       </tp:member>
132
133       <tp:member type="s" name="Domain">
134         <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
135           <p>Domain of the debug message. This is used to identify
136           the source of debug messages. For example, debug messages
137           from a connection manager could have this Domain struct
138           member be the name of the connection manager, and logs
139           from any helper library could have the name of the helper
140           library.</p>
141
142           <p>The domain could also contain a category as to where
143           the log message originated separated by a forward-slash.
144           For example, if a debug message was output in a connection
145           manager called "dummy", in the file-transfer code, this
146           Domain struct member might be <tt>dummy/file-transfer</tt>.</p>
147         </tp:docstring>
148       </tp:member>
149
150       <tp:member type="u" tp:type="Debug_Level" name="Level">
151         <tp:docstring>
152           Level of the debug message. This states the severity of the
153           debug message.
154         </tp:docstring>
155       </tp:member>
156
157       <tp:member type="s" name="Message">
158         <tp:docstring>
159           The text of the debug message.
160         </tp:docstring>
161       </tp:member>
162     </tp:struct>
163
164   </interface>
165 </node>
166 <!-- vim:set sw=2 sts=2 et ft=xml: -->