1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
|
/****************************************************************************
*
* $Id: rmaerror.h 7 2003-05-30 02:18:02Z gabest $
*
* Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
*
* http://www.real.com/devzone
*
* This program contains proprietary
* information of Progressive Networks, Inc, and is licensed
* subject to restrictions on use and distribution.
*
*
* RealMedia Architecture error reporting interfaces.
*
*/
#ifndef _RMAERROR_H_
#define _RMAERROR_H_
/*
* Forward declarations of some interfaces defined here-in.
*/
typedef _INTERFACE IRMABuffer IRMABuffer;
typedef _INTERFACE IRMAErrorSinkControl IRMAErrorSinkControl;
/* Message Severity values */
enum {
PNLOG_EMERG = 0, /* A panic condition. Server / Player will halt or
restart. */
PNLOG_ALERT = 1, /* A condition that should be corrected immediately.
Needs user intervention to prevent problems. */
PNLOG_CRIT = 2, /* Critical conditions. */
PNLOG_ERR = 3, /* Errors. */
PNLOG_WARNING = 4, /* Warning messages. */
PNLOG_NOTICE = 5, /* Conditions that are not error conditions, but
should possibly be handled specially. */
PNLOG_INFO = 6, /* Informational messages. */
PNLOG_DEBUG = 7 /* Messages that contain information normally of use
only when debugging a program. */
};
/****************************************************************************
*
* Interface:
*
* IRMAErrorMessages
*
* Purpose:
*
* Error, event, and status message reporting interface
*
* IID_IRMAErrorMessages:
*
* {00000800-0901-11d1-8B06-00A024406D59}
*
*/
DEFINE_GUID(IID_IRMAErrorMessages, 0x00000800, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
0xa0, 0x24, 0x40, 0x6d, 0x59);
#undef INTERFACE
#define INTERFACE IRMAErrorMessages
DECLARE_INTERFACE_(IRMAErrorMessages, IUnknown)
{
/*
* IUnknown methods
*/
STDMETHOD(QueryInterface) (THIS_
REFIID riid,
void** ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*
* IRMAErrorMessages methods
*/
/************************************************************************
* Method:
* IRMAErrorMessages::Report
* Purpose:
* Call this method to report an error, event, or status message.
* Parameters:
*
* const UINT8 unSeverity
* Type of report. This value will impact how the player, tool, or
* server will react to the report. Possible values are described
* above. Depending on the error type, an error message with the
* RMA code, anda string translation of that code will be displayed.
* The error dialog includes a "more info" section that displays the
* user code and string, and a link to the more info URL. In the
* server these messages are logged to the log file.
*
* const ULONG32 ulRMACode
* Well known RMA error code. This will be translated to a text
* representation for display in an error dialog box or log file.
*
* const ULONG32 ulUserCode
* User specific error code. This will NOT be translated to a text
* representation. This can be any value the caller wants, it will
* be logged or displayed but not interpretted.
*
* const char* pUserString
* User specific error string. This will NOT be translated or
* modified. This can be any value the caller wants, it will
* be logged or displayed but not interpretted.
*
* const char* pMoreInfoURL
* User specific more info URL string.
*
*/
STDMETHOD(Report) (THIS_
const UINT8 unSeverity,
PN_RESULT ulRMACode,
const ULONG32 ulUserCode,
const char* pUserString,
const char* pMoreInfoURL) PURE;
/************************************************************************
* Method:
* IRMAErrorMessages::GetErrorText
* Purpose:
* Call this method to get the text description of a RMA error code.
* Parameters:
* PN_RESULT ulRMACode (A RMA error code)
* Return Value:
* IRMABuffer* containing error text.
*/
STDMETHOD_(IRMABuffer*, GetErrorText) (THIS_
PN_RESULT ulRMACode) PURE;
};
/****************************************************************************
*
* Interface:
*
* IRMAErrorSink
*
* Purpose:
*
* Error Sink Interface
*
* IID_IRMAErrorSink:
*
* {00000801-0901-11d1-8B06-00A024406D59}
*
*/
DEFINE_GUID(IID_IRMAErrorSink, 0x00000801, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
0xa0, 0x24, 0x40, 0x6d, 0x59);
#undef INTERFACE
#define INTERFACE IRMAErrorSink
DECLARE_INTERFACE_(IRMAErrorSink, IUnknown)
{
/*
* IUnknown methods
*/
STDMETHOD(QueryInterface) (THIS_
REFIID riid,
void** ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*
* IRMAErrorSink methods
*/
/************************************************************************
* Method:
* IRMAErrorSink::ErrorOccurred
* Purpose:
* After you have registered your error sink with an
* IRMAErrorSinkControl (either in the server or player core) this
* method will be called to report an error, event, or status message.
*
* The meaning of the arguments is exactly as described in
* rmaerror.h
*/
STDMETHOD(ErrorOccurred) (THIS_
const UINT8 unSeverity,
const ULONG32 ulRMACode,
const ULONG32 ulUserCode,
const char* pUserString,
const char* pMoreInfoURL
) PURE;
};
/****************************************************************************
*
* Interface:
*
* IRMAErrorSinkControl
*
* Purpose:
*
* Error Sink Control Interface
*
* IID_IRMAErrorSinkControl:
*
* {00000802-0901-11d1-8B06-00A024406D59}
*
*/
DEFINE_GUID(IID_IRMAErrorSinkControl, 0x00000802, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
0xa0, 0x24, 0x40, 0x6d, 0x59);
#undef INTERFACE
#define INTERFACE IRMAErrorSinkControl
DECLARE_INTERFACE_(IRMAErrorSinkControl, IUnknown)
{
/*
* IUnknown methods
*/
STDMETHOD(QueryInterface) (THIS_
REFIID riid,
void** ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE;
/*
* IRMAErrorSinkControl methods
*/
/************************************************************************
* Method:
* IRMAErrorSinkControl::AddErrorSink
* Purpose:
* Call this method to tell the sink controller to handle an error
* sink.
*
* This method also allows you to set a range of severity levels which
* you will receive reports for.
*
* Note: You should specify an invalid range (Low = 1, High = 0 for
* example) if you don't want to receive any errors.
*
* The default severity range is PNLOG_EMERG to PNLOG_INFO (0-6).
*/
STDMETHOD(AddErrorSink) (THIS_
IRMAErrorSink* pErrorSink,
const UINT8 unLowSeverity,
const UINT8 unHighSeverity) PURE;
/************************************************************************
* Method:
* IRMAErrorSinkControl::AddErrorSink
* Purpose:
* Call this method to remove an error sink.
*/
STDMETHOD(RemoveErrorSink) (THIS_
IRMAErrorSink* pErrorSink) PURE;
};
#endif /* _RMAERROR_H_ */
|