📄 rmaerror.pas
字号:
unit RmaError;
interface
uses
PnResult, PnTypes, RmaPckts;
//***************************************************************************
//
// $Id: rmaerror.h,v 1.19 1999/01/29 18:32:11 hboone Exp $
//
// 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.
//
//
// Message Severity values
const
PNLOG_EMERG = 0; // A panic condition. Server / Player will halt or restart.
{$EXTERNALSYM PNLOG_EMERG}
PNLOG_ALERT = 1; // A condition that should be corrected immediately. Needs user intervention to prevent problems.
{$EXTERNALSYM PNLOG_ALERT}
PNLOG_CRIT = 2; // Critical conditions.
{$EXTERNALSYM PNLOG_CRIT}
PNLOG_ERR = 3; // Errors.
{$EXTERNALSYM PNLOG_ERR}
PNLOG_WARNING = 4; // Warning messages.
{$EXTERNALSYM PNLOG_WARNING}
PNLOG_NOTICE = 5; // Conditions that are not error conditions, but should possibly be handled specially.
{$EXTERNALSYM PNLOG_NOTICE}
PNLOG_INFO = 6; // Informational messages.
{$EXTERNALSYM PNLOG_INFO}
PNLOG_DEBUG = 7; // Messages that contain information normally of use only when debugging a program.
{$EXTERNALSYM PNLOG_DEBUG}
//***************************************************************************
//
// Interface:
//
// IRMAErrorMessages
//
// Purpose:
//
// Error, event, and status message reporting interface
//
// IID_IRMAErrorMessages:
//
// {00000800-0901-11d1-8B06-00A024406D59}
//
//
const
IID_IRMAErrorMessages: TGUID = '{00000800-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAErrorMessages}
type
IRMAErrorMessages = interface (IUnknown)
['{00000800-0901-11d1-8B06-00A024406D59}']
//***********************************************************************
// 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.
//
//
function Report(unSeverity: UINT8; ulRMACode: PN_RESULT; ulUserCode: ULONG32;
pUserString, pMoreInfoURL: PChar): HRESULT; stdcall;
//***********************************************************************
// 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.
//
function GetErrorText(ulRMACode: PN_RESULT): IRMABuffer; stdcall;
end;
{$EXTERNALSYM IRMAErrorMessages}
//***************************************************************************
//
// Interface:
//
// IRMAErrorSink
//
// Purpose:
//
// Error Sink Interface
//
// IID_IRMAErrorSink:
//
// {00000801-0901-11d1-8B06-00A024406D59}
//
//
const
IID_IRMAErrorSink: TGUID = '{00000801-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAErrorSink}
type
IRMAErrorSink = interface (IUnknown)
['{00000801-0901-11d1-8B06-00A024406D59}']
//***********************************************************************
// 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
//
function ErrorOccurred(unSeverity: UINT8; ulRMACode, ulUserCode: ULONG32;
pUserString, pMoreInfoURL: PChar): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAErrorSink}
//***************************************************************************
//
// Interface:
//
// IRMAErrorSinkControl
//
// Purpose:
//
// Error Sink Control Interface
//
// IID_IRMAErrorSinkControl:
//
// {00000802-0901-11d1-8B06-00A024406D59}
//
//
const
IID_IRMAErrorSinkControl: TGUID = '{00000802-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAErrorSinkControl}
type
IRMAErrorSinkControl = interface (IUnknown)
['{00000802-0901-11d1-8B06-00A024406D59}']
//***********************************************************************
// 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).
//
function AddErrorSink(pErrorSink: IRMAErrorSink; unLowSeverity, unHighSeverity: UINT8): HRESULT; stdcall;
//***********************************************************************
// Method:
// IRMAErrorSinkControl::AddErrorSink
// Purpose:
// Call this method to remove an error sink.
//
function RemoveErrorSink(pErrorSink: IRMAErrorSink): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAErrorSinkControl}
implementation
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -