ESLconnection.cs
4.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
using System;
using System.Runtime.InteropServices;
public class ESLconnection : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal ESLconnection(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(ESLconnection obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~ESLconnection() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
swigCMemOwn = false;
ESLPINVOKE.delete_ESLconnection(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
GC.SuppressFinalize(this);
}
}
public ESLconnection(string host, string port, string user, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_0(host, port, user, password), true) {
}
public ESLconnection(string host, string port, string password) : this(ESLPINVOKE.new_ESLconnection__SWIG_1(host, port, password), true) {
}
public ESLconnection(int socket) : this(ESLPINVOKE.new_ESLconnection__SWIG_2(socket), true) {
}
public int SocketDescriptor() {
int ret = ESLPINVOKE.ESLconnection_SocketDescriptor(swigCPtr);
return ret;
}
public int Connected() {
int ret = ESLPINVOKE.ESLconnection_Connected(swigCPtr);
return ret;
}
public ESLevent GetInfo() {
IntPtr cPtr = ESLPINVOKE.ESLconnection_GetInfo(swigCPtr);
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
public int Send(string cmd) {
int ret = ESLPINVOKE.ESLconnection_Send(swigCPtr, cmd);
return ret;
}
public ESLevent SendRecv(string cmd) {
IntPtr cPtr = ESLPINVOKE.ESLconnection_SendRecv(swigCPtr, cmd);
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
public ESLevent Api(string cmd, string arg) {
IntPtr cPtr = ESLPINVOKE.ESLconnection_Api(swigCPtr, cmd, arg);
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
public ESLevent Bgapi(string cmd, string arg, string job_uuid) {
IntPtr cPtr = ESLPINVOKE.ESLconnection_Bgapi(swigCPtr, cmd, arg, job_uuid);
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
public ESLevent SendEvent(ESLevent send_me) {
IntPtr cPtr = ESLPINVOKE.ESLconnection_SendEvent(swigCPtr, ESLevent.getCPtr(send_me));
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
public ESLevent RecvEvent() {
IntPtr cPtr = ESLPINVOKE.ESLconnection_RecvEvent(swigCPtr);
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
public ESLevent RecvEventTimed(int ms) {
IntPtr cPtr = ESLPINVOKE.ESLconnection_RecvEventTimed(swigCPtr, ms);
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
public ESLevent Filter(string header, string value) {
IntPtr cPtr = ESLPINVOKE.ESLconnection_Filter(swigCPtr, header, value);
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
public int Events(string etype, string value) {
int ret = ESLPINVOKE.ESLconnection_Events(swigCPtr, etype, value);
return ret;
}
public ESLevent Execute(string app, string arg, string uuid) {
IntPtr cPtr = ESLPINVOKE.ESLconnection_Execute(swigCPtr, app, arg, uuid);
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
public ESLevent ExecuteAsync(string app, string arg, string uuid) {
IntPtr cPtr = ESLPINVOKE.ESLconnection_ExecuteAsync(swigCPtr, app, arg, uuid);
ESLevent ret = (cPtr == IntPtr.Zero) ? null : new ESLevent(cPtr, true);
return ret;
}
public int SetAsyncExecute(string val) {
int ret = ESLPINVOKE.ESLconnection_SetAsyncExecute(swigCPtr, val);
return ret;
}
public int SetEventLock(string val) {
int ret = ESLPINVOKE.ESLconnection_SetEventLock(swigCPtr, val);
return ret;
}
public int Disconnect() {
int ret = ESLPINVOKE.ESLconnection_Disconnect(swigCPtr);
return ret;
}
}