Sha256: 567bdcc09492e4b629d4296402f3e4882a4c66c31fe5d43eb67d0047002ff4ca

Contents?: true

Size: 1.42 KB

Versions: 22

Compression:

Stored size: 1.42 KB

Contents

module VirtualBox
  module COM
    # Base class for a COM interface implementer. Any child of this class is
    # responsible for properly handling the various method and propery calls
    # of a given {AbstractInterface} and making them do actual work.
    #
    # This abstraction is necessary to change the behavior of calls between
    # Windows (COM) and Unix (XPCOM), which have different calling conventions.
    class AbstractImplementer
      attr_reader :interface
      attr_reader :lib

      # Initializes an implementer for the given {AbstractInterface}. The
      # implementor's other methods, such as {read_property} or
      # {call_function} are responsible for executing the said action on
      # the interface.
      #
      # @param [AbstractInterface] interface
      def initialize(interface, lib)
        @interface = interface
        @lib = lib
      end

      # Read a property of the interface.
      #
      # @param [Symbol] name The propery name
      def read_property(name, opts)
      end

      # Writes a property of the interface.
      #
      # @param [Symbol] name The property name
      # @param [Object] value The value to set
      def write_property(name, value, opts)
      end

      # Calls a function on the interface.
      #
      # @param [Symbol] name The function name
      # @param [Array] args The arguments to the function
      def call_function(name, args, opts)
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
virtualbox-0.9.2 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.9.1 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.9.0 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.8.6 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.8.5 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.8.4 lib/virtualbox/com/abstract_implementer.rb
velir_virtualbox-0.8.4 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.8.3 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.8.2 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.8.1 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.8.0 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.7.9 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.7.8 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.7.7 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.7.6 lib/virtualbox/com/abstract_implementer.rb
bbrowning-virtualbox-0.7.6.dev lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.7.5 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.7.4 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.7.3 lib/virtualbox/com/abstract_implementer.rb
virtualbox-0.7.2 lib/virtualbox/com/abstract_implementer.rb