ICorePluginContext
Interface in Oadm.Sdk.Plugins · Oadm.Sdk.dll
What the server gives a core plugin in ICorePlugin.StartAsync.
public interface ICorePluginContextGuide: Core plugins and pages
Properties
Section titled “Properties”IPluginAudit? Audit { get; }Default implementation
The server’s audit log for what the plugin does by itself, without a user’s call (IPluginAudit, SDK 0.17.0): one “Plugin action” entry with the plugin’s name. Null on older hosts.
AutoAdd
Section titled “AutoAdd”IDeviceAutoAdd? AutoAdd { get; }Default implementation
Adds Axis devices the plugin saw on the network (DHCP leases) through the add page’s pipeline and follows managed devices to new addresses (IDeviceAutoAdd). Null when the host does not offer it.
DataDirectory
Section titled “DataDirectory”string? DataDirectory { get; }Default implementation
A private folder for the plugin’s working files (temporary downloads, built archives) inside the server’s data folder (<datafolder>/plugin-data/<plugin id>), created by the host on first use and protected like the data folder. The plugin cleans up what it writes. Null on hosts without one (use a folder of your own then).
DeviceScopes
Section titled “DeviceScopes”IDeviceScopes? DeviceScopes { get; }Default implementation
The device groups for objects the plugin keeps per group (IDeviceScopes, SDK 0.4.0). Null on older hosts (no groups: every object belongs to all devices).
Devices
Section titled “Devices”IDeviceRepository Devices { get; }Every managed device.
EventPublisher
Section titled “EventPublisher”IEventPublisher? EventPublisher { get; }Default implementation
Publishes the plugin’s events to the server’s event rules (the plugin implements IEventSource to declare them). Null when the host has no event rules or the plugin declares no events.
EventStreams
Section titled “EventStreams”IDeviceEventStreams? EventStreams { get; }Default implementation
Event streams of managed devices (RTSP metadata, opened by the server with the stored credentials, which never reach the plugin). Null when the host does not offer them.
EventSubscriptions
Section titled “EventSubscriptions”IEventSubscriptions? EventSubscriptions { get; }Default implementation
Receives every event published to the server, the same the event rules see (IEventSubscriptions). Null when the host has no event rules.
Events
Section titled “Events”IPluginEvents? Events { get; }Default implementation
Live events for the plugin’s client page (ICorePluginClientContext.WatchEventsAsync). Null when the host cannot push events: the page then polls through InvokeAsync.
Firewall
Section titled “Firewall”IFirewallRules? Firewall { get; }Default implementation
The host firewall for the ports the plugin serves (NTP UDP 123, DHCP UDP 67): open the rule while the service is enabled, close it when disabled or stopped (FirewallRuleKeeper). Only offered by the Windows server running as the installed service; null elsewhere (Linux, macOS, console runs, tests).
FolderCheck
Section titled “FolderCheck”IServerFolderCheck? FolderCheck { get; }Default implementation
The checks of a folder on the server an administrator chose for the plugin’s data (IServerFolderCheck, SDK 0.17.0; the client’s server folder picker shows the same result). Check again when the setting is saved. Null on older hosts.
IPluginJobs? Jobs { get; }Default implementation
Work a method starts for its user, owned by that user (IPluginJobs, SDK 0.4.0). Null on older hosts.
License
Section titled “License”IPluginLicense? License { get; }Default implementation
The license of the plugin’s package (plugin.json license), live: IPluginLicense.Changed fires when an administrator enters or removes a license and when it or the trial runs out. OADM only checks; the plugin decides what runs without a valid license. Null on hosts without licenses.
Logger
Section titled “Logger”ILogger Logger { get; }The server log.
Network
Section titled “Network”IPluginNetwork? Network { get; }Default implementation
Network checks routed like a device or a site, and listeners on the server’s own network (IPluginNetwork). Null on hosts without it.
PluginDirectory
Section titled “PluginDirectory”string? PluginDirectory { get; }Default implementation
Folder the plugin was loaded from (plugin.json, assemblies, data files such as a command library). Null for plugins registered in code. Use it instead of Assembly.Location.
IProLicense? Pro { get; }Default implementation
The server’s OADM PRO license, live (IProLicense.Changed): whether PRO is active, the plan, the devices and the last day. OADM only checks; a PRO plugin decides what runs without it. Null on hosts without licenses.
ProtectedTags
Section titled “ProtectedTags”IProtectedTags? ProtectedTags { get; }Default implementation
Tag names only users with all devices may add to or remove from devices (IProtectedTags, SDK 0.4.0). Null on older hosts: a plugin that acts on devices by tag then treats no tag as safe (fail closed).
Records
Section titled “Records”IPluginRecords? Records { get; }Default implementation
The plugin’s own records in the server database, one row per record (data that grows with the devices); null where the host keeps none. SDK 0.3.0 (OADM 4.1): a plugin that uses it sets minSdkVersion 0.3.0.
Secrets
Section titled “Secrets”ISecretProtector? Secrets { get; }Default implementation
Encrypts secrets the plugin stores in ICorePluginContext.Settings with the server’s master key (AES-256-GCM, like device passwords). Null when the host offers no protector: then do not store secrets.
Services
Section titled “Services”IPluginServices? Services { get; }Default implementation
Services core plugins offer each other (IPluginServices), e.g. the CAs of PKI. Null on hosts without them.
Settings
Section titled “Settings”IPluginSettings Settings { get; }The plugin’s own settings in the server database.
ISites? Sites { get; }Default implementation
The bound sites and relays into them (ISites). Null on hosts without sites.
StreamProbes
Section titled “StreamProbes”IDeviceStreamProbes? StreamProbes { get; }Default implementation
Measuring video streams of managed devices (packets, frames, bytes; opened by the server with the stored credentials, nothing decoded). Null when the host does not offer them. In the call of a user with a device group (and that user’s jobs) only devices of the group: any other id throws KeyNotFoundException. SDK 0.6.0: a plugin that uses it sets minSdkVersion 0.6.0.
System
Section titled “System”ISystemAccess System { get; }Default implementation
Every managed device, VAPIX client, task and event stream (SDK 0.4.0): for background work, which never carries a user. During the call of a user with a device group it refuses like ICorePluginContext.Devices, except in the methods that declare ICorePlugin.SystemAccessReason. Default: the context’s own members (older hosts).
ITaskRunner Tasks { get; }Starts and cancels tasks, e.g. of a task plugin the core plugin contributes.
TrustAnchors
Section titled “TrustAnchors”ITrustAnchors? TrustAnchors { get; }Default implementation
Certificate authorities this plugin wants the server to trust when it rates device certificates (Trusted in the device grid). Null when the host does not support it.
Uploads
Section titled “Uploads”IPluginUploads? Uploads { get; }Default implementation
SDK 0.15.0: the plugin’s own files as uploads for the tasks it starts (IPluginUploads). Null on older hosts and hosts without uploads.
UserCalls
Section titled “UserCalls”IUserCalls? UserCalls { get; }Default implementation
The current call of a stored user, for work a user set up to run later without them (Schedules, IUserCalls, SDK 0.16.0). Only bundled plugins get it; null for every other plugin and on older hosts.
IVapixClientFactory Vapix { get; }Logged-in VAPIX clients for the managed devices.