Class: Skype::OS::Abstruct

Inherits:
Object
  • Object
show all
Defined in:
lib/skype/os/etc.rb

Direct Known Subclasses

Linux, Mac, Windows

Instance Method Summary collapse

Constructor Details

#initialize(app_name) ⇒ Abstruct

Returns a new instance of Abstruct.



7
8
9
10
11
12
13
14
15
# File 'lib/skype/os/etc.rb', line 7

def initialize app_name
  @send_count = 0
  @hook = Hash.new do |h,k|
    h[k] = Array.new
  end
  @attached = false
  @first_attached = true
  @raise_when_detached = false
end

Instance Method Details

#add_hook(sym, block = Proc.new) ⇒ Object



17
18
19
20
# File 'lib/skype/os/etc.rb', line 17

def add_hook sym, block=Proc.new
  @hook[sym].push block
  block
end

#attachObject



81
82
# File 'lib/skype/os/etc.rb', line 81

def attach
end

#attach_waitObject



84
85
# File 'lib/skype/os/etc.rb', line 84

def attach_wait
end

#closeObject



103
104
105
# File 'lib/skype/os/etc.rb', line 103

def close
  
end

#del_hook(sym, block = nil) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/skype/os/etc.rb', line 22

def del_hook sym, block=nil
  unless block
    @hook[sym] = Array.new
  else
    @hook[sym].delete block
  end
end

#exist_hook?(sym) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
33
34
35
36
# File 'lib/skype/os/etc.rb', line 30

def exist_hook? sym
  if @hook[sym].length > 0
    return true
  else
    return false
  end
end

#get_hook(sym) ⇒ Object



38
39
40
# File 'lib/skype/os/etc.rb', line 38

def get_hook sym
  @hook[sym]
end

#invoke(cmd) ⇒ Object



47
48
49
50
51
52
53
54
55
# File 'lib/skype/os/etc.rb', line 47

def invoke cmd
  begin
    check_response(invoke_block(cmd), cmd)
  rescue Skype::Error::API => e
    e.backtrace.shift
    e.backtrace.shift
    raise e
  end
end

#invoke_block(cmd) ⇒ Object



60
61
# File 'lib/skype/os/etc.rb', line 60

def invoke_block cmd
end

#invoke_callback(cmd, callback = Proc.new) ⇒ Object



57
58
# File 'lib/skype/os/etc.rb', line 57

def invoke_callback cmd, callback = Proc.new
end

#message_pollingObject



99
100
101
# File 'lib/skype/os/etc.rb', line 99

def message_polling

end

#messageloopObject



95
96
97
# File 'lib/skype/os/etc.rb', line 95

def messageloop

end

#set_notify_selector(block = Proc.new) ⇒ Object



87
88
89
# File 'lib/skype/os/etc.rb', line 87

def set_notify_selector block=Proc.new
  
end

#start_messageloopObject



91
92
93
# File 'lib/skype/os/etc.rb', line 91

def start_messageloop

end