Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
X_MS_MediaReceiverRegistrar.cs
1using System;
2using System.Collections.Generic;
3
5{
6//#pragma warning disable
11 {
12 private ServiceDescriptionDocument service;
13 private UPnPAction actionIsAuthorized = null;
14 private UPnPAction actionRegisterDevice = null;
15 private UPnPAction actionIsValidated = null;
16
21 {
22 this.service = Service;
23 }
24
28 public void IsAuthorized(string DeviceID, out long Result)
29 {
30 Dictionary<string, object> OutputValues = new Dictionary<string, object>();
31
32 if (actionIsAuthorized is null)
33 actionIsAuthorized = this.service.GetAction("IsAuthorized");
34
35 this.actionIsAuthorized.Invoke(out OutputValues,
36 new KeyValuePair<string, object>("DeviceID", DeviceID));
37
38 Result = (long)OutputValues["Result"];
39 }
40
44 public void RegisterDevice(byte[] RegistrationReqMsg, out byte[] RegistrationRespMsg)
45 {
46 Dictionary<string, object> OutputValues = new Dictionary<string, object>();
47
48 if (actionRegisterDevice is null)
49 actionRegisterDevice = this.service.GetAction("RegisterDevice");
50
51 this.actionRegisterDevice.Invoke(out OutputValues,
52 new KeyValuePair<string, object>("RegistrationReqMsg", RegistrationReqMsg));
53
54 RegistrationRespMsg = (byte[])OutputValues["RegistrationRespMsg"];
55 }
56
60 public void IsValidated(string DeviceID, out long Result)
61 {
62 Dictionary<string, object> OutputValues = new Dictionary<string, object>();
63
64 if (actionIsValidated is null)
65 actionIsValidated = this.service.GetAction("IsValidated");
66
67 this.actionIsValidated.Invoke(out OutputValues,
68 new KeyValuePair<string, object>("DeviceID", DeviceID));
69
70 Result = (long)OutputValues["Result"];
71 }
72 }
73//#pragma warning restore
74}
Contains the information provided in a Service Description Document, downloaded from a service in the...
UPnPAction GetAction(string Name)
Gets an action, given its name. If not found, null is returned.
void RegisterDevice(byte[] RegistrationReqMsg, out byte[] RegistrationRespMsg)
Generated from SCPD
void IsAuthorized(string DeviceID, out long Result)
Generated from SCPD
X_MS_MediaReceiverRegistrar(ServiceDescriptionDocument Service)
Generated from SCPD
void IsValidated(string DeviceID, out long Result)
Generated from SCPD
Contains information about an action.
Definition: UPnPAction.cs:15
object Invoke(out Dictionary< string, object > OutputValues, params KeyValuePair< string, object >[] InputValues)
Invokes the action.
Definition: UPnPAction.cs:80