Class: CP2Connection
- Inherits:
-
Base
- Object
- Base
- CP2Connection
- Includes:
- WIN32OLE::VARIANT
- Defined in:
- lib/ole20110223-013209.rb
Overview
P2Connection Class
Constant Summary collapse
- CLSID =
P2ClientGate_P2Connection_1
'{CCD42082-33E0-49EA-AED3-9FE39978EB56}'
- PROGID =
'P2ClientGate.P2Connection.1'
Constants included from WIN32OLE::VARIANT
WIN32OLE::VARIANT::VT_ARRAY, WIN32OLE::VARIANT::VT_BOOL, WIN32OLE::VARIANT::VT_BSTR, WIN32OLE::VARIANT::VT_BYREF, WIN32OLE::VARIANT::VT_CY, WIN32OLE::VARIANT::VT_DATE, WIN32OLE::VARIANT::VT_DISPATCH, WIN32OLE::VARIANT::VT_EMPTY, WIN32OLE::VARIANT::VT_ERROR, WIN32OLE::VARIANT::VT_I1, WIN32OLE::VARIANT::VT_I2, WIN32OLE::VARIANT::VT_I4, WIN32OLE::VARIANT::VT_I8, WIN32OLE::VARIANT::VT_INT, WIN32OLE::VARIANT::VT_NULL, WIN32OLE::VARIANT::VT_PTR, WIN32OLE::VARIANT::VT_R4, WIN32OLE::VARIANT::VT_R8, WIN32OLE::VARIANT::VT_UI1, WIN32OLE::VARIANT::VT_UI2, WIN32OLE::VARIANT::VT_UI4, WIN32OLE::VARIANT::VT_UI8, WIN32OLE::VARIANT::VT_UINT, WIN32OLE::VARIANT::VT_UNKNOWN, WIN32OLE::VARIANT::VT_USERDEFINED, WIN32OLE::VARIANT::VT_VARIANT
Instance Attribute Summary collapse
-
#lastargs ⇒ Object
readonly
Returns the value of attribute lastargs.
-
#ole ⇒ Object
readonly
Returns the value of attribute ole.
Instance Method Summary collapse
-
#AppName ⇒ Object
property BSTR AppName.
-
#AppName=(val) ⇒ Object
property VOID AppName.
- #clsid ⇒ Object
-
#Connect ⇒ Object
method UI4 Connect.
-
#Connect2(conn_str) ⇒ Object
method UI4 Connect2 BSTR conn_str [IN].
-
#ConnectionStatusChanged(conn, new_status) ⇒ Object
method VOID ConnectionStatusChanged - EVENT in IP2ConnectionEvent IP2Connection conn [IN] TConnectionStatus new_status [IN].
-
#Disconnect ⇒ Object
method VOID Disconnect.
-
#GetConn(p_val) ⇒ Object
HRESULT GetConn OLE_HANDLE p_val [OUT].
-
#GetConnPtr(p_val) ⇒ Object
HRESULT GetConnPtr OLE_HANDLE p_val [OUT].
-
#Host ⇒ Object
property BSTR Host.
-
#Host=(val) ⇒ Object
property VOID Host.
-
#initialize(opts = {}) ⇒ CP2Connection
constructor
A new instance of CP2Connection.
- #keep_lastargs(return_value) ⇒ Object
-
#Login ⇒ Object
method VOID Login.
-
#LoginStr ⇒ Object
property BSTR LoginStr.
-
#LoginStr=(val) ⇒ Object
property VOID LoginStr.
-
#Logout ⇒ Object
method VOID Logout.
- #method_missing(cmd, *args) ⇒ Object
-
#NodeName ⇒ Object
property BSTR NodeName.
-
#Password=(val) ⇒ Object
property VOID Password.
-
#Port ⇒ Object
property UI4 Port.
-
#Port=(val) ⇒ Object
property VOID Port.
-
#ProcessMessage(cookie, poll_timeout) ⇒ Object
method VOID ProcessMessage UI4 cookie [OUT] UI4 poll_timeout [IN].
-
#ProcessMessage2(poll_timeout) ⇒ Object
method UI4 ProcessMessage2 UI4 poll_timeout [IN].
-
#ProcessMessage3(poll_timeout) ⇒ Object
method UI4 ProcessMessage3 UI4 poll_timeout [IN].
- #progid ⇒ Object
-
#RegisterReceiver(new_receiver) ⇒ Object
method UI4 RegisterReceiver IP2MessageReceiver new_receiver [IN].
-
#ResolveService(service) ⇒ Object
method BSTR ResolveService BSTR service [IN].
-
#Status ⇒ Object
property I4 Status.
-
#Timeout ⇒ Object
property UI4 Timeout.
-
#Timeout=(val) ⇒ Object
property VOID Timeout.
-
#UnRegisterReceiver(cookie) ⇒ Object
method VOID UnRegisterReceiver UI4 cookie [IN].
Constructor Details
#initialize(opts = {}) ⇒ CP2Connection
Returns a new instance of CP2Connection.
12 13 14 |
# File 'lib/ole20110223-013209.rb', line 12 def initialize opts = {} super PROGID, opts end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(cmd, *args) ⇒ Object
16 17 18 |
# File 'lib/ole20110223-013209.rb', line 16 def method_missing(cmd, *args) @ole.method_missing(cmd, *args) end |
Instance Attribute Details
#lastargs ⇒ Object (readonly)
Returns the value of attribute lastargs.
9 10 11 |
# File 'lib/ole20110223-013209.rb', line 9 def lastargs @lastargs end |
#ole ⇒ Object (readonly)
Returns the value of attribute ole.
10 11 12 |
# File 'lib/ole20110223-013209.rb', line 10 def ole @ole end |
Instance Method Details
#AppName ⇒ Object
property BSTR AppName
39 40 41 |
# File 'lib/ole20110223-013209.rb', line 39 def AppName() @ole._getproperty(2, [], []) end |
#AppName=(val) ⇒ Object
property VOID AppName
69 70 71 |
# File 'lib/ole20110223-013209.rb', line 69 def AppName=(val) @ole._setproperty(2, [val], [VT_BSTR]) end |
#clsid ⇒ Object
25 26 27 |
# File 'lib/ole20110223-013209.rb', line 25 def clsid CLSID end |
#Connect ⇒ Object
method UI4 Connect
99 100 101 |
# File 'lib/ole20110223-013209.rb', line 99 def Connect() @ole._invoke(9, [], []) end |
#Connect2(conn_str) ⇒ Object
method UI4 Connect2
BSTR conn_str [IN]
151 152 153 |
# File 'lib/ole20110223-013209.rb', line 151 def Connect2(conn_str) @ole._invoke(18, [conn_str], [VT_BSTR]) end |
#ConnectionStatusChanged(conn, new_status) ⇒ Object
method VOID ConnectionStatusChanged - EVENT in IP2ConnectionEvent
IP2Connection conn [IN]
TConnectionStatus new_status [IN]
176 177 178 |
# File 'lib/ole20110223-013209.rb', line 176 def ConnectionStatusChanged(conn, new_status) @ole._invoke(1, [conn, new_status], [VT_BYREF|VT_DISPATCH, VT_DISPATCH]) end |
#Disconnect ⇒ Object
method VOID Disconnect
104 105 106 |
# File 'lib/ole20110223-013209.rb', line 104 def Disconnect() @ole._invoke(10, [], []) end |
#GetConn(p_val) ⇒ Object
HRESULT GetConn
OLE_HANDLE p_val [OUT]
163 164 165 |
# File 'lib/ole20110223-013209.rb', line 163 def GetConn(p_val) keep_lastargs @ole._invoke(1610678272, [p_val], [VT_BYREF|VT_BYREF|VT_DISPATCH]) end |
#GetConnPtr(p_val) ⇒ Object
HRESULT GetConnPtr
OLE_HANDLE p_val [OUT]
169 170 171 |
# File 'lib/ole20110223-013209.rb', line 169 def GetConnPtr(p_val) keep_lastargs @ole._invoke(1610678273, [p_val], [VT_BYREF|VT_BYREF|VT_DISPATCH]) end |
#Host ⇒ Object
property BSTR Host
49 50 51 |
# File 'lib/ole20110223-013209.rb', line 49 def Host() @ole._getproperty(4, [], []) end |
#Host=(val) ⇒ Object
property VOID Host
74 75 76 |
# File 'lib/ole20110223-013209.rb', line 74 def Host=(val) @ole._setproperty(4, [val], [VT_BSTR]) end |
#keep_lastargs(return_value) ⇒ Object
20 21 22 23 |
# File 'lib/ole20110223-013209.rb', line 20 def keep_lastargs(return_value) @lastargs = WIN32OLE::ARGV return_value end |
#Login ⇒ Object
method VOID Login
109 110 111 |
# File 'lib/ole20110223-013209.rb', line 109 def Login() @ole._invoke(11, [], []) end |
#LoginStr ⇒ Object
property BSTR LoginStr
64 65 66 |
# File 'lib/ole20110223-013209.rb', line 64 def LoginStr() @ole._getproperty(8, [], []) end |
#LoginStr=(val) ⇒ Object
property VOID LoginStr
94 95 96 |
# File 'lib/ole20110223-013209.rb', line 94 def LoginStr=(val) @ole._setproperty(8, [val], [VT_BSTR]) end |
#Logout ⇒ Object
method VOID Logout
114 115 116 |
# File 'lib/ole20110223-013209.rb', line 114 def Logout() @ole._invoke(12, [], []) end |
#NodeName ⇒ Object
property BSTR NodeName
44 45 46 |
# File 'lib/ole20110223-013209.rb', line 44 def NodeName() @ole._getproperty(3, [], []) end |
#Password=(val) ⇒ Object
property VOID Password
84 85 86 |
# File 'lib/ole20110223-013209.rb', line 84 def Password=(val) @ole._setproperty(6, [val], [VT_VARIANT]) end |
#Port ⇒ Object
property UI4 Port
54 55 56 |
# File 'lib/ole20110223-013209.rb', line 54 def Port() @ole._getproperty(5, [], []) end |
#Port=(val) ⇒ Object
property VOID Port
79 80 81 |
# File 'lib/ole20110223-013209.rb', line 79 def Port=(val) @ole._setproperty(5, [val], [VT_UI4]) end |
#ProcessMessage(cookie, poll_timeout) ⇒ Object
method VOID ProcessMessage
UI4 [OUT]
UI4 poll_timeout [IN]
121 122 123 |
# File 'lib/ole20110223-013209.rb', line 121 def ProcessMessage(, poll_timeout) keep_lastargs @ole._invoke(13, [, poll_timeout], [VT_BYREF|VT_UI4, VT_UI4]) end |
#ProcessMessage2(poll_timeout) ⇒ Object
method UI4 ProcessMessage2
UI4 poll_timeout [IN]
145 146 147 |
# File 'lib/ole20110223-013209.rb', line 145 def ProcessMessage2(poll_timeout) @ole._invoke(17, [poll_timeout], [VT_UI4]) end |
#ProcessMessage3(poll_timeout) ⇒ Object
method UI4 ProcessMessage3
UI4 poll_timeout [IN]
157 158 159 |
# File 'lib/ole20110223-013209.rb', line 157 def ProcessMessage3(poll_timeout) @ole._invoke(19, [poll_timeout], [VT_UI4]) end |
#progid ⇒ Object
29 30 31 |
# File 'lib/ole20110223-013209.rb', line 29 def progid PROGID end |
#RegisterReceiver(new_receiver) ⇒ Object
method UI4 RegisterReceiver
IP2MessageReceiver new_receiver [IN]
127 128 129 |
# File 'lib/ole20110223-013209.rb', line 127 def RegisterReceiver(new_receiver) @ole._invoke(14, [new_receiver], [VT_BYREF|VT_DISPATCH]) end |
#ResolveService(service) ⇒ Object
method BSTR ResolveService
BSTR service [IN]
139 140 141 |
# File 'lib/ole20110223-013209.rb', line 139 def ResolveService(service) @ole._invoke(16, [service], [VT_BSTR]) end |
#Status ⇒ Object
property I4 Status
34 35 36 |
# File 'lib/ole20110223-013209.rb', line 34 def Status() @ole._getproperty(1, [], []) end |
#Timeout ⇒ Object
property UI4 Timeout
59 60 61 |
# File 'lib/ole20110223-013209.rb', line 59 def Timeout() @ole._getproperty(7, [], []) end |
#Timeout=(val) ⇒ Object
property VOID Timeout
89 90 91 |
# File 'lib/ole20110223-013209.rb', line 89 def Timeout=(val) @ole._setproperty(7, [val], [VT_UI4]) end |
#UnRegisterReceiver(cookie) ⇒ Object
method VOID UnRegisterReceiver
UI4 [IN]
133 134 135 |
# File 'lib/ole20110223-013209.rb', line 133 def UnRegisterReceiver() @ole._invoke(15, [], [VT_UI4]) end |