Class: Qt::DBusReply

Inherits:
Object show all
Defined in:
lib/Qt/qtruby4.rb

Instance Method Summary collapse

Constructor Details

#initialize(reply) ⇒ DBusReply

Returns a new instance of DBusReply.



804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
# File 'lib/Qt/qtruby4.rb', line 804

def initialize(reply)
	@error = Qt::DBusError.new(reply)

	if @error.valid?
		@data = Qt::Variant.new
		return
	end

	if reply.arguments.length >= 1
		@data = reply.arguments[0]
		return
	end
	
	# error
	@error = Qt::DBusError.new(	Qt::DBusError::InvalidSignature, 
								"Unexpected reply signature" )
	@data = Qt::Variant.new      # clear it
end

Instance Method Details

#errorObject



835
836
837
# File 'lib/Qt/qtruby4.rb', line 835

def error
	return @error
end

#isValidObject



823
824
825
# File 'lib/Qt/qtruby4.rb', line 823

def isValid
	return !@error.isValid
end

#valid?Boolean

Returns:



827
828
829
# File 'lib/Qt/qtruby4.rb', line 827

def valid?
	return !@error.isValid
end

#valueObject



831
832
833
# File 'lib/Qt/qtruby4.rb', line 831

def value
	return @data.value
end