本文整理汇总了C#中UPnPArgument类的典型用法代码示例。如果您正苦于以下问题:C# UPnPArgument类的具体用法?C# UPnPArgument怎么用?C# UPnPArgument使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UPnPArgument类属于命名空间,在下文中一共展示了UPnPArgument类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Error_Sink_GetTransportInfo
private void Error_Sink_GetTransportInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
if(OnResult_GetTransportInfo != null)
{
OnResult_GetTransportInfo((System.UInt32 )Args[0].DataValue, (Enum_TransportState)0, (Enum_TransportStatus)0, (Enum_TransportPlaySpeed)0, e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_GetTransportInfo.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_GetTransportInfo)wr.Target)((System.UInt32 )Args[0].DataValue, (Enum_TransportState)0, (Enum_TransportStatus)0, (Enum_TransportPlaySpeed)0, e, Handle);
}
else
{
WeakList_GetTransportInfo.Remove(wr);
}
}
}
开发者ID:Scannow,项目名称:SWYH,代码行数:19,代码来源:CpAVTransport.cs
示例2: Sync_GetCurrentConnectionIDs
public void Sync_GetCurrentConnectionIDs(out System.String ConnectionIDs)
{
UPnPArgument[] args = new UPnPArgument[1];
args[0] = new UPnPArgument("ConnectionIDs", "");
_S.InvokeSync("GetCurrentConnectionIDs", args);
ConnectionIDs = (System.String) args[0].DataValue;
return;
}
开发者ID:Scannow,项目名称:SWYH,代码行数:8,代码来源:CpConnectionManager.cs
示例3: Sink_GetCurrentConnectionIDs
private void Sink_GetCurrentConnectionIDs(UPnPService sender, string MethodName, UPnPArgument[] Args, object RetVal, int Handle)
{
if(OnResult_GetCurrentConnectionIDs != null)
{
OnResult_GetCurrentConnectionIDs((System.String )Args[0].DataValue, null, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_GetCurrentConnectionIDs.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_GetCurrentConnectionIDs)wr.Target)((System.String )Args[0].DataValue, null, Handle);
}
else
{
WeakList_GetCurrentConnectionIDs.Remove(wr);
}
}
}
开发者ID:Scannow,项目名称:SWYH,代码行数:19,代码来源:CpConnectionManager.cs
示例4: ConnectionComplete
public int ConnectionComplete(System.Int32 ConnectionID)
{
UPnPArgument[] args = new UPnPArgument[1];
args[0] = new UPnPArgument("ConnectionID", ConnectionID);
return(_S.InvokeAsync("ConnectionComplete", args, new UPnPService.UPnPServiceInvokeHandler(Sink_ConnectionComplete), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_ConnectionComplete)));
}
开发者ID:Scannow,项目名称:SWYH,代码行数:6,代码来源:CpConnectionManager.cs
示例5: Sync_GetProtocolInfo
public void Sync_GetProtocolInfo(out System.String Source, out System.String Sink)
{
UPnPArgument[] args = new UPnPArgument[2];
args[0] = new UPnPArgument("Source", "");
args[1] = new UPnPArgument("Sink", "");
_S.InvokeSync("GetProtocolInfo", args);
Source = (System.String) args[0].DataValue;
Sink = (System.String) args[1].DataValue;
return;
}
开发者ID:Scannow,项目名称:SWYH,代码行数:10,代码来源:CpConnectionManager.cs
示例6: PrepareForConnection
public int PrepareForConnection(System.String RemoteProtocolInfo, System.String PeerConnectionManager, System.Int32 PeerConnectionID, Enum_A_ARG_TYPE_Direction Direction)
{
UPnPArgument[] args = new UPnPArgument[7];
args[0] = new UPnPArgument("RemoteProtocolInfo", RemoteProtocolInfo);
args[1] = new UPnPArgument("PeerConnectionManager", PeerConnectionManager);
args[2] = new UPnPArgument("PeerConnectionID", PeerConnectionID);
switch(Direction)
{
case Enum_A_ARG_TYPE_Direction.INPUT:
args[3] = new UPnPArgument("Direction", "Input");
break;
case Enum_A_ARG_TYPE_Direction.OUTPUT:
args[3] = new UPnPArgument("Direction", "Output");
break;
default:
args[3] = new UPnPArgument("Direction", GetUnspecifiedValue("Enum_A_ARG_TYPE_Direction"));
break;
}
args[4] = new UPnPArgument("ConnectionID", "");
args[5] = new UPnPArgument("AVTransportID", "");
args[6] = new UPnPArgument("RcsID", "");
return(_S.InvokeAsync("PrepareForConnection", args, new UPnPService.UPnPServiceInvokeHandler(Sink_PrepareForConnection), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_PrepareForConnection)));
}
开发者ID:Scannow,项目名称:SWYH,代码行数:23,代码来源:CpConnectionManager.cs
示例7: Error_Sink_PrepareForConnection
private void Error_Sink_PrepareForConnection(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
for(int i=0;i<Args.Length;++i)
{
switch(Args[i].Name)
{
case "Direction":
switch((string)Args[i].DataValue)
{
case "Input":
Args[i].DataValue = Enum_A_ARG_TYPE_Direction.INPUT;
break;
case "Output":
Args[i].DataValue = Enum_A_ARG_TYPE_Direction.OUTPUT;
break;
}
break;
}
}
if(OnResult_PrepareForConnection != null)
{
OnResult_PrepareForConnection((System.String )Args[0].DataValue, (System.String )Args[1].DataValue, (System.Int32 )Args[2].DataValue, (Enum_A_ARG_TYPE_Direction )Args[3].DataValue, (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_PrepareForConnection.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_PrepareForConnection)wr.Target)((System.String )Args[0].DataValue, (System.String )Args[1].DataValue, (System.Int32 )Args[2].DataValue, (Enum_A_ARG_TYPE_Direction )Args[3].DataValue, (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), e, Handle);
}
else
{
WeakList_PrepareForConnection.Remove(wr);
}
}
}
开发者ID:Scannow,项目名称:SWYH,代码行数:36,代码来源:CpConnectionManager.cs
示例8: Sink_GetPositionInfo
private void Sink_GetPositionInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, object RetVal, int Handle)
{
if(OnResult_GetPositionInfo != null)
{
OnResult_GetPositionInfo((System.UInt32 )Args[0].DataValue, (System.UInt32 )Args[1].DataValue, (System.String )Args[2].DataValue, (System.String )Args[3].DataValue, (System.String )Args[4].DataValue, (System.String )Args[5].DataValue, (System.String )Args[6].DataValue, (System.Int32 )Args[7].DataValue, (System.Int32 )Args[8].DataValue, null, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_GetPositionInfo.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_GetPositionInfo)wr.Target)((System.UInt32 )Args[0].DataValue, (System.UInt32 )Args[1].DataValue, (System.String )Args[2].DataValue, (System.String )Args[3].DataValue, (System.String )Args[4].DataValue, (System.String )Args[5].DataValue, (System.String )Args[6].DataValue, (System.Int32 )Args[7].DataValue, (System.Int32 )Args[8].DataValue, null, Handle);
}
else
{
WeakList_GetPositionInfo.Remove(wr);
}
}
}
开发者ID:Scannow,项目名称:SWYH,代码行数:19,代码来源:CpAVTransport.cs
示例9: Sync_Record
public void Sync_Record(System.UInt32 InstanceID)
{
UPnPArgument[] args = new UPnPArgument[1];
args[0] = new UPnPArgument("InstanceID", InstanceID);
_S.InvokeSync("Record", args);
InstanceID = (System.UInt32) args[0].DataValue;
return;
}
开发者ID:Scannow,项目名称:SWYH,代码行数:8,代码来源:CpAVTransport.cs
示例10: Sync_GetPositionInfo
public void Sync_GetPositionInfo(System.UInt32 InstanceID, out System.UInt32 Track, out System.String TrackDuration, out System.String TrackMetaData, out System.String TrackURI, out System.String RelTime, out System.String AbsTime, out System.Int32 RelCount, out System.Int32 AbsCount)
{
UPnPArgument[] args = new UPnPArgument[9];
args[0] = new UPnPArgument("InstanceID", InstanceID);
args[1] = new UPnPArgument("Track", "");
args[2] = new UPnPArgument("TrackDuration", "");
args[3] = new UPnPArgument("TrackMetaData", "");
args[4] = new UPnPArgument("TrackURI", "");
args[5] = new UPnPArgument("RelTime", "");
args[6] = new UPnPArgument("AbsTime", "");
args[7] = new UPnPArgument("RelCount", "");
args[8] = new UPnPArgument("AbsCount", "");
_S.InvokeSync("GetPositionInfo", args);
InstanceID = (System.UInt32) args[0].DataValue;
Track = (System.UInt32) args[1].DataValue;
TrackDuration = (System.String) args[2].DataValue;
TrackMetaData = (System.String) args[3].DataValue;
TrackURI = (System.String) args[4].DataValue;
RelTime = (System.String) args[5].DataValue;
AbsTime = (System.String) args[6].DataValue;
RelCount = (System.Int32) args[7].DataValue;
AbsCount = (System.Int32) args[8].DataValue;
return;
}
开发者ID:Scannow,项目名称:SWYH,代码行数:24,代码来源:CpAVTransport.cs
示例11: GetPositionInfo
public int GetPositionInfo(System.UInt32 InstanceID)
{
UPnPArgument[] args = new UPnPArgument[9];
args[0] = new UPnPArgument("InstanceID", InstanceID);
args[1] = new UPnPArgument("Track", "");
args[2] = new UPnPArgument("TrackDuration", "");
args[3] = new UPnPArgument("TrackMetaData", "");
args[4] = new UPnPArgument("TrackURI", "");
args[5] = new UPnPArgument("RelTime", "");
args[6] = new UPnPArgument("AbsTime", "");
args[7] = new UPnPArgument("RelCount", "");
args[8] = new UPnPArgument("AbsCount", "");
return(_S.InvokeAsync("GetPositionInfo", args, new UPnPService.UPnPServiceInvokeHandler(Sink_GetPositionInfo), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_GetPositionInfo)));
}
开发者ID:Scannow,项目名称:SWYH,代码行数:14,代码来源:CpAVTransport.cs
示例12: Error_Sink_Seek
private void Error_Sink_Seek(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
for(int i=0;i<Args.Length;++i)
{
switch(Args[i].Name)
{
case "Unit":
switch((string)Args[i].DataValue)
{
case "ABS_TIME":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.ABS_TIME;
break;
case "REL_TIME":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.REL_TIME;
break;
case "ABS_COUNT":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.ABS_COUNT;
break;
case "REL_COUNT":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.REL_COUNT;
break;
case "TRACK_NR":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.TRACK_NR;
break;
case "CHANNEL_FREQ":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.CHANNEL_FREQ;
break;
case "TAPE-INDEX":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.TAPE_INDEX;
break;
case "FRAME":
Args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.FRAME;
break;
}
break;
}
}
if(OnResult_Seek != null)
{
OnResult_Seek((System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_SeekMode )Args[1].DataValue, (System.String )Args[2].DataValue, e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_Seek.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_Seek)wr.Target)((System.UInt32 )Args[0].DataValue, (Enum_A_ARG_TYPE_SeekMode )Args[1].DataValue, (System.String )Args[2].DataValue, e, Handle);
}
else
{
WeakList_Seek.Remove(wr);
}
}
}
开发者ID:Scannow,项目名称:SWYH,代码行数:54,代码来源:CpAVTransport.cs
示例13: Seek
public int Seek(System.UInt32 InstanceID, Enum_A_ARG_TYPE_SeekMode Unit, System.String Target)
{
UPnPArgument[] args = new UPnPArgument[3];
args[0] = new UPnPArgument("InstanceID", InstanceID);
switch(Unit)
{
case Enum_A_ARG_TYPE_SeekMode.ABS_TIME:
args[1] = new UPnPArgument("Unit", "ABS_TIME");
break;
case Enum_A_ARG_TYPE_SeekMode.REL_TIME:
args[1] = new UPnPArgument("Unit", "REL_TIME");
break;
case Enum_A_ARG_TYPE_SeekMode.ABS_COUNT:
args[1] = new UPnPArgument("Unit", "ABS_COUNT");
break;
case Enum_A_ARG_TYPE_SeekMode.REL_COUNT:
args[1] = new UPnPArgument("Unit", "REL_COUNT");
break;
case Enum_A_ARG_TYPE_SeekMode.TRACK_NR:
args[1] = new UPnPArgument("Unit", "TRACK_NR");
break;
case Enum_A_ARG_TYPE_SeekMode.CHANNEL_FREQ:
args[1] = new UPnPArgument("Unit", "CHANNEL_FREQ");
break;
case Enum_A_ARG_TYPE_SeekMode.TAPE_INDEX:
args[1] = new UPnPArgument("Unit", "TAPE-INDEX");
break;
case Enum_A_ARG_TYPE_SeekMode.FRAME:
args[1] = new UPnPArgument("Unit", "FRAME");
break;
default:
args[1] = new UPnPArgument("Unit", GetUnspecifiedValue("Enum_A_ARG_TYPE_SeekMode"));
break;
}
args[2] = new UPnPArgument("Target", Target);
return(_S.InvokeAsync("Seek", args, new UPnPService.UPnPServiceInvokeHandler(Sink_Seek), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_Seek)));
}
开发者ID:Scannow,项目名称:SWYH,代码行数:37,代码来源:CpAVTransport.cs
示例14: Sync_Seek
public void Sync_Seek(System.UInt32 InstanceID, Enum_A_ARG_TYPE_SeekMode Unit, System.String Target)
{
UPnPArgument[] args = new UPnPArgument[3];
args[0] = new UPnPArgument("InstanceID", InstanceID);
switch(Unit)
{
case Enum_A_ARG_TYPE_SeekMode.ABS_TIME:
args[1] = new UPnPArgument("Unit", "ABS_TIME");
break;
case Enum_A_ARG_TYPE_SeekMode.REL_TIME:
args[1] = new UPnPArgument("Unit", "REL_TIME");
break;
case Enum_A_ARG_TYPE_SeekMode.ABS_COUNT:
args[1] = new UPnPArgument("Unit", "ABS_COUNT");
break;
case Enum_A_ARG_TYPE_SeekMode.REL_COUNT:
args[1] = new UPnPArgument("Unit", "REL_COUNT");
break;
case Enum_A_ARG_TYPE_SeekMode.TRACK_NR:
args[1] = new UPnPArgument("Unit", "TRACK_NR");
break;
case Enum_A_ARG_TYPE_SeekMode.CHANNEL_FREQ:
args[1] = new UPnPArgument("Unit", "CHANNEL_FREQ");
break;
case Enum_A_ARG_TYPE_SeekMode.TAPE_INDEX:
args[1] = new UPnPArgument("Unit", "TAPE-INDEX");
break;
case Enum_A_ARG_TYPE_SeekMode.FRAME:
args[1] = new UPnPArgument("Unit", "FRAME");
break;
default:
args[1] = new UPnPArgument("Unit", GetUnspecifiedValue("Enum_A_ARG_TYPE_SeekMode"));
break;
}
args[2] = new UPnPArgument("Target", Target);
_S.InvokeSync("Seek", args);
for(int i=0;i<args.Length;++i)
{
switch(args[i].Name)
{
case "Unit":
switch((string)args[i].DataValue)
{
case "ABS_TIME":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.ABS_TIME;
break;
case "REL_TIME":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.REL_TIME;
break;
case "ABS_COUNT":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.ABS_COUNT;
break;
case "REL_COUNT":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.REL_COUNT;
break;
case "TRACK_NR":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.TRACK_NR;
break;
case "CHANNEL_FREQ":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.CHANNEL_FREQ;
break;
case "TAPE-INDEX":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.TAPE_INDEX;
break;
case "FRAME":
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode.FRAME;
break;
default:
SetUnspecifiedValue("Enum_A_ARG_TYPE_SeekMode", (string)args[i].DataValue);
args[i].DataValue = Enum_A_ARG_TYPE_SeekMode._UNSPECIFIED_;
break;
}
break;
}
}
InstanceID = (System.UInt32) args[0].DataValue;
Unit = (Enum_A_ARG_TYPE_SeekMode) args[1].DataValue;
Target = (System.String) args[2].DataValue;
return;
}
开发者ID:Scannow,项目名称:SWYH,代码行数:80,代码来源:CpAVTransport.cs
示例15: Error_Sink_GetCurrentConnectionInfo
private void Error_Sink_GetCurrentConnectionInfo(UPnPService sender, string MethodName, UPnPArgument[] Args, UPnPInvokeException e, int Handle)
{
if(OnResult_GetCurrentConnectionInfo != null)
{
OnResult_GetCurrentConnectionInfo((System.Int32 )Args[0].DataValue, (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (Enum_A_ARG_TYPE_Direction)0, (Enum_A_ARG_TYPE_ConnectionStatus)0, e, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_GetCurrentConnectionInfo.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_GetCurrentConnectionInfo)wr.Target)((System.Int32 )Args[0].DataValue, (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.String)UPnPService.CreateObjectInstance(typeof(System.String),null), (System.Int32)UPnPService.CreateObjectInstance(typeof(System.Int32),null), (Enum_A_ARG_TYPE_Direction)0, (Enum_A_ARG_TYPE_ConnectionStatus)0, e, Handle);
}
else
{
WeakList_GetCurrentConnectionInfo.Remove(wr);
}
}
}
开发者ID:Scannow,项目名称:SWYH,代码行数:19,代码来源:CpConnectionManager.cs
示例16: Record
public int Record(System.UInt32 InstanceID)
{
UPnPArgument[] args = new UPnPArgument[1];
args[0] = new UPnPArgument("InstanceID", InstanceID);
return(_S.InvokeAsync("Record", args, new UPnPService.UPnPServiceInvokeHandler(Sink_Record), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_Record)));
}
开发者ID:Scannow,项目名称:SWYH,代码行数:6,代码来源:CpAVTransport.cs
示例17: Sync_PrepareForConnection
public void Sync_PrepareForConnection(System.String RemoteProtocolInfo, System.String PeerConnectionManager, System.Int32 PeerConnectionID, Enum_A_ARG_TYPE_Direction Direction, out System.Int32 ConnectionID, out System.Int32 AVTransportID, out System.Int32 RcsID)
{
UPnPArgument[] args = new UPnPArgument[7];
args[0] = new UPnPArgument("RemoteProtocolInfo", RemoteProtocolInfo);
args[1] = new UPnPArgument("PeerConnectionManager", PeerConnectionManager);
args[2] = new UPnPArgument("PeerConnectionID", PeerConnectionID);
switch(Direction)
{
case Enum_A_ARG_TYPE_Direction.INPUT:
args[3] = new UPnPArgument("Direction", "Input");
break;
case Enum_A_ARG_TYPE_Direction.OUTPUT:
args[3] = new UPnPArgument("Direction", "Output");
break;
default:
args[3] = new UPnPArgument("Direction", GetUnspecifiedValue("Enum_A_ARG_TYPE_Direction"));
break;
}
args[4] = new UPnPArgument("ConnectionID", "");
args[5] = new UPnPArgument("AVTransportID", "");
args[6] = new UPnPArgument("RcsID", "");
_S.InvokeSync("PrepareForConnection", args);
for(int i=0;i<args.Length;++i)
{
switch(args[i].Name)
{
case "Direction":
switch((string)args[i].DataValue)
{
case "Input":
args[i].DataValue = Enum_A_ARG_TYPE_Direction.INPUT;
break;
case "Output":
args[i].DataValue = Enum_A_ARG_TYPE_Direction.OUTPUT;
break;
default:
SetUnspecifiedValue("Enum_A_ARG_TYPE_Direction", (string)args[i].DataValue);
args[i].DataValue = Enum_A_ARG_TYPE_Direction._UNSPECIFIED_;
break;
}
break;
}
}
RemoteProtocolInfo = (System.String) args[0].DataValue;
PeerConnectionManager = (System.String) args[1].DataValue;
PeerConnectionID = (System.Int32) args[2].DataValue;
Direction = (Enum_A_ARG_TYPE_Direction) args[3].DataValue;
ConnectionID = (System.Int32) args[4].DataValue;
AVTransportID = (System.Int32) args[5].DataValue;
RcsID = (System.Int32) args[6].DataValue;
return;
}
开发者ID:Scannow,项目名称:SWYH,代码行数:52,代码来源:CpConnectionManager.cs
示例18: Sync_SetRecordQualityMode
public void Sync_SetRecordQualityMode(System.UInt32 InstanceID, Enum_CurrentRecordQualityMode NewRecordQualityMode)
{
UPnPArgument[] args = new UPnPArgument[2];
args[0] = new UPnPArgument("InstanceID", InstanceID);
switch(NewRecordQualityMode)
{
case Enum_CurrentRecordQualityMode._0_EP:
args[1] = new UPnPArgument("NewRecordQualityMode", "0:EP");
break;
case Enum_CurrentRecordQualityMode._1_LP:
args[1] = new UPnPArgument("NewRecordQualityMode", "1:LP");
break;
case Enum_CurrentRecordQualityMode._2_SP:
args[1] = new UPnPArgument("NewRecordQualityMode", "2:SP");
break;
case Enum_CurrentRecordQualityMode._0_BASIC:
args[1] = new UPnPArgument("NewRecordQualityMode", "0:BASIC");
break;
case Enum_CurrentRecordQualityMode._1_MEDIUM:
args[1] = new UPnPArgument("NewRecordQualityMode", "1:MEDIUM");
break;
case Enum_CurrentRecordQualityMode._2_HIGH:
args[1] = new UPnPArgument("NewRecordQualityMode", "2:HIGH");
break;
case Enum_CurrentRecordQualityMode.NOT_IMPLEMENTED:
args[1] = new UPnPArgument("NewRecordQualityMode", "NOT_IMPLEMENTED");
break;
case Enum_CurrentRecordQualityMode._VENDOR_DEFINED_:
args[1] = new UPnPArgument("NewRecordQualityMode", " vendor-defined ");
break;
default:
args[1] = new UPnPArgument("NewRecordQualityMode", GetUnspecifiedValue("Enum_CurrentRecordQualityMode"));
break;
}
_S.InvokeSync("SetRecordQualityMode", args);
for(int i=0;i<args.Length;++i)
{
switch(args[i].Name)
{
case "NewRecordQualityMode":
switch((string)args[i].DataValue)
{
case "0:EP":
args[i].DataValue = Enum_CurrentRecordQualityMode._0_EP;
break;
case "1:LP":
args[i].DataValue = Enum_CurrentRecordQualityMode._1_LP;
break;
case "2:SP":
args[i].DataValue = Enum_CurrentRecordQualityMode._2_SP;
break;
case "0:BASIC":
args[i].DataValue = Enum_CurrentRecordQualityMode._0_BASIC;
break;
case "1:MEDIUM":
args[i].DataValue = Enum_CurrentRecordQualityMode._1_MEDIUM;
break;
case "2:HIGH":
args[i].DataValue = Enum_CurrentRecordQualityMode._2_HIGH;
break;
case "NOT_IMPLEMENTED":
args[i].DataValue = Enum_CurrentRecordQualityMode.NOT_IMPLEMENTED;
break;
case " vendor-defined ":
args[i].DataValue = Enum_CurrentRecordQualityMode._VENDOR_DEFINED_;
break;
default:
SetUnspecifiedValue("Enum_CurrentRecordQualityMode", (string)args[i].DataValue);
args[i].DataValue = Enum_CurrentRecordQualityMode._UNSPECIFIED_;
break;
}
break;
}
}
InstanceID = (System.UInt32) args[0].DataValue;
NewRecordQualityMode = (Enum_CurrentRecordQualityMode) args[1].DataValue;
return;
}
开发者ID:Scannow,项目名称:SWYH,代码行数:78,代码来源:CpAVTransport.cs
示例19: Sink_PrepareForConnection
private void Sink_PrepareForConnection(UPnPService sender, string MethodName, UPnPArgument[] Args, object RetVal, int Handle)
{
for(int i=0;i<Args.Length;++i)
{
switch(Args[i].Name)
{
case "Direction":
switch((string)Args[i].DataValue)
{
case "Input":
Args[i].DataValue = Enum_A_ARG_TYPE_Direction.INPUT;
break;
case "Output":
Args[i].DataValue = Enum_A_ARG_TYPE_Direction.OUTPUT;
break;
default:
SetUnspecifiedValue("Enum_A_ARG_TYPE_Direction", (string)Args[i].DataValue);
Args[i].DataValue = Enum_A_ARG_TYPE_Direction._UNSPECIFIED_;
break;
}
break;
}
}
if(OnResult_PrepareForConnection != null)
{
OnResult_PrepareForConnection((System.String )Args[0].DataValue, (System.String )Args[1].DataValue, (System.Int32 )Args[2].DataValue, (Enum_A_ARG_TYPE_Direction )Args[3].DataValue, (System.Int32 )Args[4].DataValue, (System.Int32 )Args[5].DataValue, (System.Int32 )Args[6].DataValue, null, Handle);
}
WeakReference[] w = (WeakReference[])WeakList_PrepareForConnection.ToArray(typeof(WeakReference));
foreach(WeakReference wr in w)
{
if(wr.IsAlive==true)
{
((Delegate_OnResult_PrepareForConnection)wr.Target)((System.String )Args[0].DataValue, (System.String )Args[1].DataValue, (System.Int32 )Args[2].DataValue, (Enum_A_ARG_TYPE_Direction )Args[3].DataValue, (System.Int32 )Args[4].DataValue, (System.Int32 )Args[5].DataValue, (System.Int32 )Args[6].DataValue, null, Handle);
}
else
{
WeakList_PrepareForConnection.Remove(wr);
}
}
}
开发者ID:Scannow,项目名称:SWYH,代码行数:40,代码来源:CpConnectionManager.cs
示例20: SetRecordQualityMode
public int SetRecordQualityMode(System.UInt32 InstanceID, Enum_CurrentRecordQualityMode NewRecordQualityMode)
{
UPnPArgument[] args = new UPnPArgument[2];
args[0] = new UPnPArgument("InstanceID", InstanceID);
switch(NewRecordQualityMode)
{
case Enum_CurrentRecordQualityMode._0_EP:
args[1] = new UPnPArgument("NewRecordQualityMode", "0:EP");
break;
case Enum_CurrentRecordQualityMode._1_LP:
args[1] = new UPnPArgument("NewRecordQualityMode", "1:LP");
break;
case Enum_CurrentRecordQualityMode._2_SP:
args[1] = new UPnPArgument("NewRecordQualityMode", "2:SP");
break;
case Enum_CurrentRecordQualityMode._0_BASIC:
args[1] = new UPnPArgument("NewRecordQualityMode", "0:BASIC");
break;
case Enum_CurrentRecordQualityMode._1_MEDIUM:
args[1] = new UPnPArgument("NewRecordQualityMode", "1:MEDIUM");
break;
case Enum_CurrentRecordQualityMode._2_HIGH:
args[1] = new UPnPArgument("NewRecordQualityMode", "2:HIGH");
break;
case Enum_CurrentRecordQualityMode.NOT_IMPLEMENTED:
args[1] = new UPnPArgument("NewRecordQualityMode", "NOT_IMPLEMENTED");
break;
case Enum_CurrentRecordQualityMode._VENDOR_DEFINED_:
args[1] = new UPnPArgument("NewRecordQualityMode", " vendor-defined ");
break;
default:
args[1] = new UPnPArgument("NewRecordQualityMode", GetUnspecifiedValue("Enum_CurrentRecordQualityMode"));
break;
}
return(_S.InvokeAsync("SetRecordQualityMode", args, new UPnPService.UPnPServiceInvokeHandler(Sink_SetRecordQualityMode), new UPnPService.UPnPServiceInvokeErrorHandler(Error_Sink_SetRecordQualityMode)));
}
开发者ID:Scannow,项目名称:SWYH,代码行数:36,代码来源:CpAVTransport.cs
注:本文中的UPnPArgument类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论