C# Класс OpenHome.Net.Core.Library

Initialisation and finalisation of this library, plus utility functions
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AbortProcess ( ) : void

Terminate the process after a fatal error.

Create ( InitParams aParams ) : Library

Create the library instance.

Only one instance per process is allowed. This must be called before any other library function.

Dispose ( ) : void
Free ( IntPtr aPtr ) : void

Free memory returned by native code

NotifyResumed ( ) : void

Inform the library that the application has been resumed

This is necessary if the application may have been paused while other processes on a device continued to be executed (e.g. when an app moves to background on iOS). It is typically not necessary to call this when the host device resumes from hibernation.

NotifySuspended ( ) : void

Inform the library that the application has been suspended.

This is necessary if the application may be paused while other processes on a device continued to be executed (e.g. when an app moves to background on iOS). It is typically not necessary to call this when the host device hibernates.

RefreshNetworkAdapterList ( ) : void

Force a refresh of the library's list of available network adapters

This should only be required on platforms that are not capable of automatically detecting adapter changes.

SetCurrentSubnet ( NetworkAdapter aSubnet ) : void

Set which subnet the library should use

Device lists and subscriptions will be automatically updated. No other subnet will be selected if aSubnet is not available

SetDebugLevel ( DebugLevel aLevel ) : void

Set the level (if any) of debug logging.

Log messages will be passed to the callback registered in InitParams.LogOutput.

StartCombined ( uint aSubnet ) : CombinedStack

Start the library as both UPnP control point and device stacks

StartCp ( uint aSubnet ) : ControlPointStack

Start the library as a UPnP control point stack

StartDv ( ) : DeviceStack

Start the library as a UPnP device stack

Приватные методы

Метод Описание
CheckStartupError ( uint aError ) : void
FreeMemory ( IntPtr aPtr ) : void
Initialise ( InitParams aParams ) : void
Library ( InitParams aParams ) : System
OhNetAbortProcess ( ) : void
OhNetDebugSetLevel ( uint aLevel ) : void
OhNetFree ( IntPtr aPtr ) : void
OhNetInitParamsSetFreeExternalCallback ( IntPtr aParams, CallbackFreeMemory aCallback ) : void
OhNetLibraryClose ( ) : void
OhNetLibraryInitialise ( IntPtr aInitParams ) : int
OhNetLibraryInitialiseMinimal ( IntPtr aInitParams ) : int
OhNetLibraryNotifyResumed ( ) : void
OhNetLibraryNotifySuspended ( ) : void
OhNetLibraryStartCombined ( uint aSubnet ) : uint
OhNetLibraryStartCp ( uint aSubnet ) : uint
OhNetLibraryStartDv ( ) : uint
OhNetRefreshNetworkAdapterList ( ) : void
OhNetSetCurrentSubnet ( uint aSubnet ) : void

Описание методов

AbortProcess() публичный статический Метод

Terminate the process after a fatal error.
public static AbortProcess ( ) : void
Результат void

Create() публичный статический Метод

Create the library instance.
Only one instance per process is allowed. This must be called before any other library function.
public static Create ( InitParams aParams ) : Library
aParams InitParams
Результат Library

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Free() публичный статический Метод

Free memory returned by native code
public static Free ( IntPtr aPtr ) : void
aPtr System.IntPtr IntPtr returned by native code which is documented as requiring explicit destruction
Результат void

NotifyResumed() публичный Метод

Inform the library that the application has been resumed
This is necessary if the application may have been paused while other processes on a device continued to be executed (e.g. when an app moves to background on iOS). It is typically not necessary to call this when the host device resumes from hibernation.
public NotifyResumed ( ) : void
Результат void

NotifySuspended() публичный Метод

Inform the library that the application has been suspended.
This is necessary if the application may be paused while other processes on a device continued to be executed (e.g. when an app moves to background on iOS). It is typically not necessary to call this when the host device hibernates.
public NotifySuspended ( ) : void
Результат void

RefreshNetworkAdapterList() публичный Метод

Force a refresh of the library's list of available network adapters
This should only be required on platforms that are not capable of automatically detecting adapter changes.
public RefreshNetworkAdapterList ( ) : void
Результат void

SetCurrentSubnet() публичный Метод

Set which subnet the library should use
Device lists and subscriptions will be automatically updated. No other subnet will be selected if aSubnet is not available
public SetCurrentSubnet ( NetworkAdapter aSubnet ) : void
aSubnet NetworkAdapter Handle returned by SubnetAt()
Результат void

SetDebugLevel() публичный статический Метод

Set the level (if any) of debug logging.
Log messages will be passed to the callback registered in InitParams.LogOutput.
public static SetDebugLevel ( DebugLevel aLevel ) : void
aLevel DebugLevel Bit(s) specifying which debug levels to enable
Результат void

StartCombined() публичный Метод

Start the library as both UPnP control point and device stacks
public StartCombined ( uint aSubnet ) : CombinedStack
aSubnet uint
Результат CombinedStack

StartCp() публичный Метод

Start the library as a UPnP control point stack
public StartCp ( uint aSubnet ) : ControlPointStack
aSubnet uint
Результат ControlPointStack

StartDv() публичный Метод

Start the library as a UPnP device stack
public StartDv ( ) : DeviceStack
Результат DeviceStack