Class: CP2DataStream

Inherits:
Base
  • Object
show all
Includes:
WIN32OLE::VARIANT
Defined in:
lib/ole20110223-013209.rb

Overview

P2DataStream Class

Constant Summary collapse

CLSID =

P2ClientGate_P2DataStream_1

'{914893CB-0864-4FBB-856A-92C3A1D970F8}'
PROGID =
'P2ClientGate.P2DataStream.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

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ CP2DataStream

Returns a new instance of CP2DataStream.



956
957
958
# File 'lib/ole20110223-013209.rb', line 956

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



960
961
962
# File 'lib/ole20110223-013209.rb', line 960

def method_missing(cmd, *args)
  @ole.method_missing(cmd, *args)
end

Instance Attribute Details

#lastargsObject (readonly)

Returns the value of attribute lastargs.



953
954
955
# File 'lib/ole20110223-013209.rb', line 953

def lastargs
  @lastargs
end

#oleObject (readonly)

Returns the value of attribute ole.



954
955
956
# File 'lib/ole20110223-013209.rb', line 954

def ole
  @ole
end

Instance Method Details

#CloseObject

method VOID Close



1029
1030
1031
# File 'lib/ole20110223-013209.rb', line 1029

def Close()
  @ole._invoke(7, [], [])
end

#clsidObject



969
970
971
# File 'lib/ole20110223-013209.rb', line 969

def clsid
  CLSID
end

#DBConnStringObject

property BSTR DBConnString



988
989
990
# File 'lib/ole20110223-013209.rb', line 988

def DBConnString()
  @ole._getproperty(3, [], [])
end

#DBConnString=(val) ⇒ Object

property VOID DBConnString



1013
1014
1015
# File 'lib/ole20110223-013209.rb', line 1013

def DBConnString=(val)
  @ole._setproperty(3, [val], [VT_BSTR])
end

#GetScheme(p_val) ⇒ Object

HRESULT GetScheme

OLE_HANDLE p_val [OUT]


1035
1036
1037
# File 'lib/ole20110223-013209.rb', line 1035

def GetScheme(p_val)
  keep_lastargs @ole._invoke(1610678272, [p_val], [VT_BYREF|VT_BYREF|VT_DISPATCH])
end

#keep_lastargs(return_value) ⇒ Object



964
965
966
967
# File 'lib/ole20110223-013209.rb', line 964

def keep_lastargs(return_value)
  @lastargs = WIN32OLE::ARGV
  return_value
end

#LinkDataBuffer(data_buff) ⇒ Object

HRESULT LinkDataBuffer

IP2DataStreamEvents data_buff [IN]


1041
1042
1043
# File 'lib/ole20110223-013209.rb', line 1041

def LinkDataBuffer(data_buff)
  @ole._invoke(1610678273, [data_buff], [VT_BYREF|VT_DISPATCH])
end

#Open(conn) ⇒ Object

method VOID Open

IP2Connection conn [IN]


1024
1025
1026
# File 'lib/ole20110223-013209.rb', line 1024

def Open(conn)
  @ole._invoke(6, [conn], [VT_BYREF|VT_DISPATCH])
end

#progidObject



973
974
975
# File 'lib/ole20110223-013209.rb', line 973

def progid
  PROGID
end

#StateObject

property TDataStreamState State



998
999
1000
# File 'lib/ole20110223-013209.rb', line 998

def State()
  @ole._getproperty(5, [], [])
end

#StreamDataBegin(stream) ⇒ Object

method VOID StreamDataBegin - EVENT in IP2DataStreamEvents

IP2DataStream stream [IN]


1101
1102
1103
# File 'lib/ole20110223-013209.rb', line 1101

def StreamDataBegin(stream)
  @ole._invoke(8, [stream], [VT_BYREF|VT_DISPATCH])
end

#StreamDataDeleted(stream, table_name, id, rec) ⇒ Object

method VOID StreamDataDeleted - EVENT in IP2DataStreamEvents

IP2DataStream stream [IN]
BSTR table_name [IN]
I8 id [IN]
IP2Record rec [IN]


1074
1075
1076
# File 'lib/ole20110223-013209.rb', line 1074

def StreamDataDeleted(stream, table_name, id, rec)
  @ole._invoke(4, [stream, table_name, id, rec], [VT_BYREF|VT_DISPATCH, VT_BSTR, VT_I8, VT_BYREF|VT_DISPATCH])
end

#StreamDataEnd(stream) ⇒ Object

method VOID StreamDataEnd - EVENT in IP2DataStreamEvents

IP2DataStream stream [IN]


1107
1108
1109
# File 'lib/ole20110223-013209.rb', line 1107

def StreamDataEnd(stream)
  @ole._invoke(9, [stream], [VT_BYREF|VT_DISPATCH])
end

#StreamDataInserted(stream, table_name, rec) ⇒ Object

method VOID StreamDataInserted - EVENT in IP2DataStreamEvents

IP2DataStream stream [IN]
BSTR table_name [IN]
IP2Record rec [IN]


1056
1057
1058
# File 'lib/ole20110223-013209.rb', line 1056

def StreamDataInserted(stream, table_name, rec)
  @ole._invoke(2, [stream, table_name, rec], [VT_BYREF|VT_DISPATCH, VT_BSTR, VT_BYREF|VT_DISPATCH])
end

#StreamDataUpdated(stream, table_name, id, rec) ⇒ Object

method VOID StreamDataUpdated - EVENT in IP2DataStreamEvents

IP2DataStream stream [IN]
BSTR table_name [IN]
I8 id [IN]
IP2Record rec [IN]


1065
1066
1067
# File 'lib/ole20110223-013209.rb', line 1065

def StreamDataUpdated(stream, table_name, id, rec)
  @ole._invoke(3, [stream, table_name, id, rec], [VT_BYREF|VT_DISPATCH, VT_BSTR, VT_I8, VT_BYREF|VT_DISPATCH])
end

#StreamDatumDeleted(stream, table_name, rev) ⇒ Object

method VOID StreamDatumDeleted - EVENT in IP2DataStreamEvents

IP2DataStream stream [IN]
BSTR table_name [IN]
I8 rev [IN]


1082
1083
1084
# File 'lib/ole20110223-013209.rb', line 1082

def StreamDatumDeleted(stream, table_name, rev)
  @ole._invoke(5, [stream, table_name, rev], [VT_BYREF|VT_DISPATCH, VT_BSTR, VT_I8])
end

#StreamDBWillBeDeleted(stream) ⇒ Object

method VOID StreamDBWillBeDeleted - EVENT in IP2DataStreamEvents

IP2DataStream stream [IN]


1088
1089
1090
# File 'lib/ole20110223-013209.rb', line 1088

def StreamDBWillBeDeleted(stream)
  @ole._invoke(6, [stream], [VT_BYREF|VT_DISPATCH])
end

#StreamLifeNumChanged(stream, life_num) ⇒ Object

method VOID StreamLifeNumChanged - EVENT in IP2DataStreamEvents

IP2DataStream stream [IN]
I4 life_num [IN]


1095
1096
1097
# File 'lib/ole20110223-013209.rb', line 1095

def StreamLifeNumChanged(stream, life_num)
  @ole._invoke(7, [stream, life_num], [VT_BYREF|VT_DISPATCH, VT_I4])
end

#StreamNameObject

property BSTR StreamName



983
984
985
# File 'lib/ole20110223-013209.rb', line 983

def StreamName()
  @ole._getproperty(2, [], [])
end

#StreamName=(val) ⇒ Object

property VOID StreamName



1008
1009
1010
# File 'lib/ole20110223-013209.rb', line 1008

def StreamName=(val)
  @ole._setproperty(2, [val], [VT_BSTR])
end

#StreamStateChanged(stream, new_state) ⇒ Object

method VOID StreamStateChanged - EVENT in IP2DataStreamEvents

IP2DataStream stream [IN]
TDataStreamState new_state [IN]


1048
1049
1050
# File 'lib/ole20110223-013209.rb', line 1048

def StreamStateChanged(stream, new_state)
  @ole._invoke(1, [stream, new_state], [VT_BYREF|VT_DISPATCH, VT_DISPATCH])
end

#TableSetObject

property IP2TableSet TableSet



978
979
980
# File 'lib/ole20110223-013209.rb', line 978

def TableSet()
  @ole._getproperty(1, [], [])
end

#TableSet=(val) ⇒ Object

property VOID TableSet



1003
1004
1005
# File 'lib/ole20110223-013209.rb', line 1003

def TableSet=(val)
  @ole._setproperty(1, [val], [VT_BYREF|VT_DISPATCH])
end

#typeObject

TRequestType type: property Type



993
994
995
# File 'lib/ole20110223-013209.rb', line 993

def type()
  @ole._getproperty(4, [], [])
end

#type=(val) ⇒ Object

VOID type: property Type



1018
1019
1020
# File 'lib/ole20110223-013209.rb', line 1018

def type=(val)
  @ole._setproperty(4, [val], [VT_DISPATCH])
end