Class: Skype::Message

Inherits:
AbstractObject show all
Defined in:
lib/skype/message.rb

Constant Summary collapse

OBJECT_NAME =
"MESSAGE"
PROPERTY2METHOD =
{
  'TIMESTAMP' => :timestamp,
  'PARTNER_HANDLE' => :partnerHandle,
  'PARTNER_DISPNAME' => :partnerDispname,
  'CONF_ID' => :confIdD,
  'TYPE' => :type,
  'STATUS' => :status,
  'FAILUREREASON' => :failureReason,
  'BODY' => :body,
}

Instance Attribute Summary

Attributes included from AbstractObject::Get

#property2callback, #property2symbol

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractObject

inherited, #initialize, new, notified, #to_s

Methods included from AbstractObject::Notify

#delNotify, #notified, #notify, #setNotify

Methods included from AbstractObject::Get

#def_parser, #notice

Methods included from AbstractObject::Invokers

#invoke_alter, #invoke_echo, #invoke_get, #invoke_one, #invoke_set

Constructor Details

This class inherits a constructor from Skype::AbstractObject

Class Method Details

.create(target, text) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/skype/message.rb', line 16

def self.create target,text
  if defined? target.getHandle
    target = target.getHandle
  elsif target.class == String
  else
    raise target
  end
  res = @skypeApi.invoke_one "MESSAGE #{target} #{text}","MESSAGE"
  if res =~ /^(\d+) STATUS (.+)$/
    return @skypeApi.getMessage($1),"getStatus",$2
  else
    raise #????
  end
end

Instance Method Details

#bodyObject



38
# File 'lib/skype/message.rb', line 38

def body() invoke_get('BODY'); end

#confIdDObject



34
# File 'lib/skype/message.rb', line 34

def confIdD() invoke_get('CONF_ID'); end

#failureReasonObject



37
# File 'lib/skype/message.rb', line 37

def failureReason() invoke_get('FAILUREREASON'); end

#partnerDispnameObject



33
# File 'lib/skype/message.rb', line 33

def partnerDispname() invoke_get('PARTNER_DISPNAME'); end

#partnerHandleObject



32
# File 'lib/skype/message.rb', line 32

def partnerHandle() invoke_get('PARTNER_HANDLE'); end

#statusObject



36
# File 'lib/skype/message.rb', line 36

def status() invoke_get('STATUS'); end

#timestampObject



31
# File 'lib/skype/message.rb', line 31

def timestamp() invoke_get('TIMESTAMP'); end

#typeObject



35
# File 'lib/skype/message.rb', line 35

def type() invoke_get('TYPE'); end