📄 rmamon.pas
字号:
unit RmaMon;
interface
uses
PnResult, PnTypes, RMaPckts;
(****************************************************************************
*
* $Id: rmamon.h,v 1.59 2000/04/24 23:23:21 smpatel 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 Registry Interfaces.
*
*)
(*
* Types of the values stored in the registry.
*)
type
_RMAPropType = (
PT_UNKNOWN,
PT_COMPOSITE, (* Contains other values (elements) *)
PT_INTEGER, (* 32-bit signed value *)
PT_INTREF, (* Integer reference object -- 32-bit signed integer *)
PT_STRING, (* Signed char* value *)
PT_BUFFER); (* IRMABuffer object *)
{$EXTERNALSYM _RMAPropType}
RMAPropType = _RMAPropType;
{$EXTERNALSYM RMAPropType}
(*
*
* Interface:
*
* IRMAPropWatchResponse
*
* Purpose:
*
* Interface for notification of additions/modifications/deletions of
* properties in the registry which are being watched.
*
* IID_IRMAPropWatchResponse:
*
* {00000602-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMAPropWatchResponse: TGUID = '{00000602-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAPropWatchResponse}
type
IRMAPropWatchResponse = interface (IUnknown)
['{00000602-0901-11d1-8B06-00A024406D59}']
(************************************************************************
* Method:
* IRMAPropWatchResponse::AddedProp
* Purpose:
* Gets called when a new Property gets added under the Property
* on which the Watch was set. It passes the id of the Property just
* added, its datatype and the id of its immediate parent COMPOSITE
* property.
*)
function AddedProp(ulId: UINT32; propType: RMAPropType; ulParentID: UINT32): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPropWatchResponse::ModifiedProp
* Purpose:
* Gets called when a watched Property gets modified. It passes
* the id of the Property just modified, its datatype and the
* id of its immediate parent COMPOSITE property.
*)
function ModifiedProp(ulId: UINT32; propType: RMAPropType; ulParentID: UINT32): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPropWatchResponse::DeletedProp
* Purpose:
* Gets called when a watched Property gets deleted. As can be
* seen, it returns the id of the Property just deleted and
* its immediate parent COMPOSITE property.
*)
function DeletedProp(ulId, ulParentID: UINT32): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAPropWatchResponse}
(*
*
* Interface:
*
* IRMAPropWatch
*
* Purpose:
*
* This interface allows the user to watch properties so that when
* changes happen to the properties the plugins receive notification via
* the IRMAPropWatchResponse API.
*
* IID_IRMAPropWatch:
*
* {00000601-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMAPropWatch: TGUID = '{00000601-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAPropWatch}
type
IRMAPropWatch = interface (IUnknown)
['{00000601-0901-11d1-8B06-00A024406D59}']
(************************************************************************
* Method:
* IRMAPropWatch::Init
* Purpose:
* Initialize with the response object so that the Watch
* notifications can be sent back to the respective plugins.
*
* pResponse - IN - pointer to the response object which gets used to
* initialize the IRMAPropWatch object. the response
* object gets AddRef'd in the Init method.
*)
function Init(pResponse: IRMAPropWatchResponse): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPropWatch::SetWatchOnRoot
* Purpose:
* The SetWatch method puts a watch at the highest level of
* the registry hierarchy. It notifies ONLY IF properties at THIS LEVEL
* get added/modified/deleted.
*)
function SetWatchOnRoot: UINT32; stdcall;
(************************************************************************
* Method:
* IRMAPropWatch::SetWatchByName
* Purpose:
* Sets a watch-point on the Property whose name is passed in.
* In case the mentioned Property gets modified or deleted a
* notification of that will be sent to the object which set the
* watch-point.
*
* pName - IN - name of Property on which a watch point is to be added
*)
function SetWatchByName(pName: PChar): UINT32; stdcall;
(************************************************************************
* Method:
* IRMAPropWatch::SetWatchById
* Purpose:
* Sets a watch-point on the Property whose name is passed in.
* In case the mentioned Property gets modified or deleted a
* notification of that will be sent to the object which set the
* watch-point.
*
* ulId - IN - unique id of Property on which a watch point is to be
* added
*)
function SetWatchById(ulId: UINT32): UINT32; stdcall;
(************************************************************************
* Method:
* IRMAPropWatch::ClearWatchOnRoot
* Purpose:
* It clears the watch on the root of the registry.
*)
function ClearWatchOnRoot: HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPropWatch::ClearWatchByName
* Purpose:
* Clears a watch-point based on the Property's name.
*
* pName - IN - name of Property whose watch point is to be cleared
*)
function ClearWatchByName(pName: PChar): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPropWatch::ClearWatchById
* Purpose:
* Clears a watch-point based on the Property's id.
*
* ulId - IN - unique id of Property whose watch point is to be cleared
*)
function ClearWatchById(ulId: UINT32): HRESULT; stdcall;
end;
{$EXTERNALSYM IRMAPropWatch}
(*
*
* Interface:
*
* IRMAPNRegistry
*
* Purpose:
*
* This inteface provides access to the "Registry" in the server and
* client. The "Registry" is a hierarchical structure of Name/Value
* pairs (properties) which is capable of storing many different types
* of data including strings, buffers, and integers. The registry
* provides various types of information including statistics,
* configuration information, and system status.
*
* Note: This registry is not related to the Windows system registry.
*
* IID_IRMAPNRegistry:
*
* {00000600-0901-11d1-8B06-00A024406D59}
*
*)
const
IID_IRMAPNRegistry: TGUID = '{00000600-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM IID_IRMAPNRegistry}
CLSID_IRMAPNRegistry: TGUID = '{00000600-0901-11d1-8B06-00A024406D59}';
{$EXTERNALSYM CLSID_IRMAPNRegistry}
type
IRMAPNRegistry = interface (IUnknown)
['{00000600-0901-11d1-8B06-00A024406D59}']
(************************************************************************
* Method:
* IRMAPNRegistry::CreatePropWatch
* Purpose:
* Create a new IRMAPropWatch object which can then be queried for
* the right kind of IRMAPropWatch object.
*
* pPropWatch - OUT - returns a new addref'ed IRMAPropWatch object
*)
function CreatePropWatch(out pPropWatch: IRMAPropWatch): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPNRegistry::AddComp
* Purpose:
* Add a COMPOSITE property to the registry and return its ID
* if successful. It returns ZERO (0) if an error occurred
* during the operation.
*
* pName - IN - name of the Property that is going to be added to
* the registry
*)
function AddComp(pName: PChar): UINT32; stdcall;
(************************************************************************
* Method:
* IRMAPNRegistry::AddInt
* Purpose:
* Add an INTEGER property with name in "pName" and value in
* "iValue" to the registry. The return value is the id to
* the newly added Property or ZERO if there was an error.
*
* pName - IN - name of the Property that is going to be added to
* the registry
* nValue - IN - integer value of the Property that is going to be
* added to the registry
*)
function AddInt(pName: PChar; nValue: INT32): UINT32; stdcall;
(************************************************************************
* Method:
* IRMAPNRegistry::GetIntByName
* Purpose:
* Retreive an INTEGER value from the registry given its Property
* name "pName". If the Property is found, it will return PNR_OK,
* otherwise it returns PNR_FAIL.
*
* pName - IN - name of the Property whose value is to be retreived
* nValue - OUT - parameter into which the value of the Property is
* going to be returned
*)
function GetIntByName(pName: PChar; var nValue: INT32): HRESULT; stdcall;
(************************************************************************
* Method:
* IRMAPNRegistry::GetIntById
* Purpose:
* Retreive an INTEGER value from the registry given its id "ulId".
* If the Property is found, it will return PNR_OK, otherwise it
* returns PNR_FAIL.
*
* ulId - IN - unique id of the Property whose value is to be retreived
* nValue - OUT - parameter into which the value of the Property is
* going to be returned
*)
function GetIntById(ulId: UINT32; var nValue: INT32): HRESULT; stdcall;
(************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -