|
require 'win32ole'
|
|
require 'win32ole/property'
|
|
|
|
#
|
|
module IAcdAutomationServer
|
|
include WIN32OLE::VARIANT
|
|
attr_reader :lastargs
|
|
|
|
# ERROR GetObjectList
|
|
# Returns an array describing the available objects of the specified type
|
|
# I2 arg0 --- ObjectType [IN]
|
|
# VARIANT arg1 --- ObjectsRefArray [OUT]
|
|
def GetObjectList(arg0, arg1)
|
|
ret = _invoke(1, [arg0, arg1], [VT_I2, VT_BYREF|VT_VARIANT])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR GetObject
|
|
# Returns the specified object
|
|
# I2 arg0 --- ObjectType [IN]
|
|
# I4 arg1 --- ObjectKey [IN]
|
|
# VARIANT arg2 --- Object [OUT]
|
|
def GetObject(arg0, arg1, arg2)
|
|
ret = _invoke(2, [arg0, arg1, arg2], [VT_I2, VT_I4, VT_BYREF|VT_VARIANT])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR GetEventHandler
|
|
# Returns the event handler
|
|
# VARIANT arg0 --- Handler [OUT]
|
|
def GetEventHandler(arg0)
|
|
ret = _invoke(3, [arg0], [VT_BYREF|VT_VARIANT])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR Authentify
|
|
# Authentifies the Client
|
|
# BSTR arg0 --- AppId [IN]
|
|
def Authentify(arg0)
|
|
ret = _invoke(4, [arg0], [VT_BYREF|VT_BSTR])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR GetVersion
|
|
# Returns the interface version number
|
|
# I4 arg0 --- VersionNumber [OUT]
|
|
def GetVersion(arg0)
|
|
ret = _invoke(5, [arg0], [VT_BYREF|VT_I4])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
end
|
|
|
|
#
|
|
class Ccs_Application # AcdAutomationServer
|
|
include WIN32OLE::VARIANT
|
|
attr_reader :lastargs
|
|
attr_reader :dispatch
|
|
attr_reader :clsid
|
|
attr_reader :progid
|
|
|
|
def initialize(obj = nil)
|
|
@clsid = "{BAA135B0-F931-11D0-9C14-0060973155F0}"
|
|
@progid = "Ccs.Application"
|
|
if obj.nil?
|
|
@dispatch = WIN32OLE.new @progid
|
|
else
|
|
@dispatch = obj
|
|
end
|
|
end
|
|
|
|
def method_missing(cmd, *arg)
|
|
@dispatch.method_missing(cmd, *arg)
|
|
end
|
|
|
|
# ERROR GetObjectList
|
|
# Returns an array describing the available objects of the specified type
|
|
# I2 arg0 --- ObjectType [IN]
|
|
# VARIANT arg1 --- ObjectsRefArray [OUT]
|
|
def GetObjectList(arg0, arg1)
|
|
ret = @dispatch._invoke(1, [arg0, arg1], [VT_I2, VT_BYREF|VT_VARIANT])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR GetObject
|
|
# Returns the specified object
|
|
# I2 arg0 --- ObjectType [IN]
|
|
# I4 arg1 --- ObjectKey [IN]
|
|
# VARIANT arg2 --- Object [OUT]
|
|
def GetObject(arg0, arg1, arg2)
|
|
ret = @dispatch._invoke(2, [arg0, arg1, arg2], [VT_I2, VT_I4, VT_BYREF|VT_VARIANT])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR GetEventHandler
|
|
# Returns the event handler
|
|
# VARIANT arg0 --- Handler [OUT]
|
|
def GetEventHandler(arg0)
|
|
ret = @dispatch._invoke(3, [arg0], [VT_BYREF|VT_VARIANT])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR Authentify
|
|
# Authentifies the Client
|
|
# BSTR arg0 --- AppId [IN]
|
|
def Authentify(arg0)
|
|
ret = @dispatch._invoke(4, [arg0], [VT_BYREF|VT_BSTR])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR GetVersion
|
|
# Returns the interface version number
|
|
# I4 arg0 --- VersionNumber [OUT]
|
|
def GetVersion(arg0)
|
|
ret = @dispatch._invoke(5, [arg0], [VT_BYREF|VT_I4])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
end
|
|
|
|
#
|
|
module IAcdEvent
|
|
include WIN32OLE::VARIANT
|
|
attr_reader :lastargs
|
|
|
|
# ERROR Connect
|
|
# Connects the client to the Notification Service of the server
|
|
# DISPATCH arg0 --- EventReceiver [IN]
|
|
def Connect(arg0)
|
|
ret = _invoke(1, [arg0], [VT_DISPATCH])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR Disconnect
|
|
# Disconnects the client from the Notification Service of the server
|
|
def Disconnect()
|
|
ret = _invoke(2, [], [])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR SetEventMask
|
|
# Specifies which event will be notified to the client
|
|
# UI4 arg0 --- Mask []
|
|
def SetEventMask(arg0)
|
|
ret = _invoke(3, [arg0], [VT_UI4])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
end
|
|
|
|
#
|
|
module AcdEvent
|
|
include WIN32OLE::VARIANT
|
|
attr_reader :lastargs
|
|
|
|
# ERROR Connect
|
|
# Connects the client to the Notification Service of the server
|
|
# DISPATCH arg0 --- EventReceiver [IN]
|
|
def Connect(arg0)
|
|
ret = _invoke(1, [arg0], [VT_DISPATCH])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR Disconnect
|
|
# Disconnects the client from the Notification Service of the server
|
|
def Disconnect()
|
|
ret = _invoke(2, [], [])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR SetEventMask
|
|
# Specifies which event will be notified to the client
|
|
# UI4 arg0 --- Mask []
|
|
def SetEventMask(arg0)
|
|
ret = _invoke(3, [arg0], [VT_UI4])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
end
|
|
|
|
#
|
|
module IAcdObject
|
|
include WIN32OLE::VARIANT
|
|
attr_reader :lastargs
|
|
|
|
# ERROR GetDataList
|
|
# Retrieves the list of available data from the object
|
|
# VARIANT arg0 --- DataList [OUT]
|
|
def GetDataList(arg0)
|
|
ret = _invoke(1, [arg0], [VT_BYREF|VT_VARIANT])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR GetData
|
|
# Retrieves the specified data from the object
|
|
# I4 arg0 --- DataToGet [IN]
|
|
# VARIANT arg1 --- DataValue [OUT]
|
|
def GetData(arg0, arg1)
|
|
ret = _invoke(2, [arg0, arg1], [VT_I4, VT_BYREF|VT_VARIANT])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR GetInterfaceState
|
|
# Retrieves the state of the interface
|
|
# I4 arg0 --- InterfaceState [OUT]
|
|
def GetInterfaceState(arg0)
|
|
ret = _invoke(3, [arg0], [VT_BYREF|VT_I4])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR Connect
|
|
# Connects the client to the Data Providing Service of the object
|
|
# DISPATCH arg0 --- DataReceiver [IN]
|
|
def Connect(arg0)
|
|
ret = _invoke(4, [arg0], [VT_DISPATCH])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR Disconnect
|
|
# Disconnects the client from the Data Providing Service of the object
|
|
def Disconnect()
|
|
ret = _invoke(5, [], [])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR CanSubscribeToData
|
|
# Checks whether the client can subscribe to the specified data or not
|
|
# I4 arg0 --- DataToExamine [IN]
|
|
# BOOL arg1 --- CanSubscribe [OUT]
|
|
def CanSubscribeToData(arg0, arg1)
|
|
ret = _invoke(6, [arg0, arg1], [VT_I4, VT_BYREF|VT_BOOL])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR SubscribeToData
|
|
# Subscribes the client for the specified data
|
|
# I4 arg0 --- DataToSubscribeTo [IN]
|
|
def SubscribeToData(arg0)
|
|
ret = _invoke(7, [arg0], [VT_I4])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR SuspendSubscriptions
|
|
# Suspends all the client's subscriptions.
|
|
def SuspendSubscriptions()
|
|
ret = _invoke(8, [], [])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR ResumeSubscriptions
|
|
# Resume the client's subscriptions.
|
|
def ResumeSubscriptions()
|
|
ret = _invoke(9, [], [])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR CancelSubscriptionForData
|
|
# Cancels the client's subscription for the specified data
|
|
# I4 arg0 --- DataToUnsubscribe [IN]
|
|
def CancelSubscriptionForData(arg0)
|
|
ret = _invoke(10, [arg0], [VT_I4])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR CancelSubscriptionForAllData
|
|
# Cancels the client's subscription for all the data
|
|
def CancelSubscriptionForAllData()
|
|
ret = _invoke(11, [], [])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
end
|
|
|
|
#
|
|
module AcdObject
|
|
include WIN32OLE::VARIANT
|
|
attr_reader :lastargs
|
|
|
|
# ERROR GetDataList
|
|
# Retrieves the list of available data from the object
|
|
# VARIANT arg0 --- DataList [OUT]
|
|
def GetDataList(arg0)
|
|
ret = _invoke(1, [arg0], [VT_BYREF|VT_VARIANT])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR GetData
|
|
# Retrieves the specified data from the object
|
|
# I4 arg0 --- DataToGet [IN]
|
|
# VARIANT arg1 --- DataValue [OUT]
|
|
def GetData(arg0, arg1)
|
|
ret = _invoke(2, [arg0, arg1], [VT_I4, VT_BYREF|VT_VARIANT])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR GetInterfaceState
|
|
# Retrieves the state of the interface
|
|
# I4 arg0 --- InterfaceState [OUT]
|
|
def GetInterfaceState(arg0)
|
|
ret = _invoke(3, [arg0], [VT_BYREF|VT_I4])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR Connect
|
|
# Connects the client to the Data Providing Service of the object
|
|
# DISPATCH arg0 --- DataReceiver [IN]
|
|
def Connect(arg0)
|
|
ret = _invoke(4, [arg0], [VT_DISPATCH])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR Disconnect
|
|
# Disconnects the client from the Data Providing Service of the object
|
|
def Disconnect()
|
|
ret = _invoke(5, [], [])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR CanSubscribeToData
|
|
# Checks whether the client can subscribe to the specified data or not
|
|
# I4 arg0 --- DataToExamine [IN]
|
|
# BOOL arg1 --- CanSubscribe [OUT]
|
|
def CanSubscribeToData(arg0, arg1)
|
|
ret = _invoke(6, [arg0, arg1], [VT_I4, VT_BYREF|VT_BOOL])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR SubscribeToData
|
|
# Subscribes the client for the specified data
|
|
# I4 arg0 --- DataToSubscribeTo [IN]
|
|
def SubscribeToData(arg0)
|
|
ret = _invoke(7, [arg0], [VT_I4])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR SuspendSubscriptions
|
|
# Suspends all the client's subscriptions.
|
|
def SuspendSubscriptions()
|
|
ret = _invoke(8, [], [])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR ResumeSubscriptions
|
|
# Resume the client's subscriptions.
|
|
def ResumeSubscriptions()
|
|
ret = _invoke(9, [], [])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR CancelSubscriptionForData
|
|
# Cancels the client's subscription for the specified data
|
|
# I4 arg0 --- DataToUnsubscribe [IN]
|
|
def CancelSubscriptionForData(arg0)
|
|
ret = _invoke(10, [arg0], [VT_I4])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
|
|
# ERROR CancelSubscriptionForAllData
|
|
# Cancels the client's subscription for all the data
|
|
def CancelSubscriptionForAllData()
|
|
ret = _invoke(11, [], [])
|
|
@lastargs = WIN32OLE::ARGV
|
|
ret
|
|
end
|
|
end
|