Module: SkypeAPI
- Extended by:
- AbstractObject::Get, AbstractObject::Invokers, AbstractObject::Notify, AbstractObject::Parser
- Defined in:
- lib/skypeapi.rb,
lib/skypeapi/sms.rb,
lib/skypeapi/call.rb,
lib/skypeapi/chat.rb,
lib/skypeapi/user.rb,
lib/skypeapi/error.rb,
lib/skypeapi/event.rb,
lib/skypeapi/group.rb,
lib/skypeapi/object.rb,
lib/skypeapi/os/etc.rb,
lib/skypeapi/os/mac.rb,
lib/skypeapi/message.rb,
lib/skypeapi/profile.rb,
lib/skypeapi/version.rb,
lib/skypeapi/menuitem.rb,
lib/skypeapi/os/linux.rb,
lib/skypeapi/voicemail.rb,
lib/skypeapi/chatmember.rb,
lib/skypeapi/os/windows.rb,
lib/skypeapi/application.rb,
lib/skypeapi/chatmessage.rb,
lib/skypeapi/os/notifier.rb,
lib/skypeapi/filetransfer.rb,
lib/skypeapi/sharefunctions.rb,
lib/skypeapi/os/window_event_queue.rb,
lib/skypeapi/os/window_messagehandler.rb
Defined Under Namespace
Modules: OS, ShareFunctions, VERSION
Classes: AbstractObject, Application, Call, Chat, ChatMember, ChatMessage, Error, Event, FileTransfer, Group, MenuItem, Message, Profile, SMS, User, VoiceMail
Class Attribute Summary collapse
#property2callback, #property2symbol
Class Method Summary
collapse
-
.app(id) ⇒ Object
-
.BTNPressed(key) ⇒ Object
(also: btnp_presse)
-
.BTNReleased(key) ⇒ Object
(also: btn_released)
-
.call(id) ⇒ Object
-
.chat(id) ⇒ Object
def profile() SkypeAPI::Profile.new nil ; end.
-
.chatMember(id) ⇒ Object
-
.chatMessage(id) ⇒ Object
-
.clearCallHistory(type, handle = '') ⇒ Object
(also: clear_call_history)
-
.clearChatHistory ⇒ Object
(also: clear_chat_history)
-
.clearVoiceMailHistory ⇒ Object
(also: clear_voice_mail_history)
-
.event(id) ⇒ Object
-
.fileTransfer(id) ⇒ Object
-
.focus ⇒ Object
-
.get_aec ⇒ Object
(also: getAEC)
-
.get_agc ⇒ Object
(also: getAGC)
-
.get_audio_in ⇒ Object
(also: getAudioIn)
-
.get_audio_out ⇒ Object
(also: getAudioOut)
-
.get_auto_away ⇒ Object
(also: getAutoAway)
-
.get_avatar(filePath, num = 1) ⇒ Object
(also: getAvatar)
-
.get_connstatus ⇒ Object
(also: getConnstatus)
-
.get_contacts_focused ⇒ Object
(also: getContactsFocused)
-
.get_current_user_handle ⇒ Object
(also: getCurrentUserHandle)
-
.get_mute ⇒ Object
(also: getMute)
-
.get_pc_speaker ⇒ Object
(also: getPCSpeaker)
-
.get_predictive_dialer_country ⇒ Object
(also: getPredictiveDialerCountry)
-
.get_privilege(privilege) ⇒ Object
(also: getPrivilege)
privilege SkypeOut | SkypeIn | VoiceMail.
-
.get_ringer ⇒ Object
(also: getRinger)
-
.get_ringtone(id = 1) ⇒ Object
(also: getRingtone)
-
.get_ringtone_status(id = 1) ⇒ Object
(also: getRingtoneStatus)
-
.get_silent_mode ⇒ Object
(also: getSilentMode)
-
.get_skype_version ⇒ Object
(also: getSkypeVersion)
-
.get_ui_language ⇒ Object
(also: getUILanguage)
-
.get_user_status ⇒ Object
(also: getUserStatus)
-
.get_video_in ⇒ Object
(also: getVideoIn)
-
.get_wallpaper ⇒ Object
(also: getWallPaper)
-
.get_window_state ⇒ Object
(also: getWindowState)
-
.group(id) ⇒ Object
-
.init(os = RUBY_PLATFORM.downcase) ⇒ Object
-
.menuItem(id) ⇒ Object
-
.minimize ⇒ Object
-
.new ⇒ Object
-
.notified(msg) ⇒ Object
-
.objectsInit ⇒ Object
-
.open(prop, *value) ⇒ Object
-
.openAddAFriend(user = '') ⇒ Object
(also: open_add_a_friend)
-
.openAuthorization(user) ⇒ Object
(also: open_authorization)
-
.openBlockedUsers ⇒ Object
(also: open_blocked_users)
-
.openCallHistory ⇒ Object
(also: open_call_history)
-
.openChat(chat) ⇒ Object
(also: open_chat)
-
.openConference ⇒ Object
(also: open_conference)
-
.openContacts ⇒ Object
(also: open_contancts)
-
.openDialPad ⇒ Object
(also: open_dial_pad)
-
.openFileTransfer(path = nil, *users) ⇒ Object
(also: open_file_trasfer)
-
.openGettingStarted ⇒ Object
(also: open_getting_started)
-
.openIM(user, msg = '') ⇒ Object
(also: open_im)
-
.openImportContacts ⇒ Object
(also: open_import_contacts)
-
.openLiveTab ⇒ Object
(also: open_live_tab)
-
.openOptions(page = '') ⇒ Object
(also: open_options)
-
.openProfile ⇒ Object
(also: open_profile)
-
.openSearch ⇒ Object
(also: open_search)
-
.openSendContacts(*users) ⇒ Object
(also: open_send_contancts)
-
.openUserInfo(user) ⇒ Object
(also: open_user_info)
-
.openVideoTest(id = '') ⇒ Object
(also: open_video_test)
-
.openVoiceMail(id) ⇒ Object
(also: open_voice_mail)
-
.os ⇒ Object
-
.ping ⇒ Object
-
.reset_idle_timer ⇒ Object
(also: resetIdleTimer)
-
.search(prop, preffix = prop, val = '') ⇒ Object
-
.searchActiveCalls ⇒ Object
(also: search_active_calls)
-
.searchActiveChats ⇒ Object
(also: search_active_chats)
-
.searchActiveFileTransfers ⇒ Object
(also: search_active_file_transfers)
-
.searchBookMarkedChats ⇒ Object
(also: search_book_marked_chats)
-
.searchCalls(target) ⇒ Object
(also: search_calls)
-
.searchChatMessages(target = '') ⇒ Object
(also: search_chat_messages)
-
.searchChats ⇒ Object
(also: search_chats)
-
.searchFileTransfers ⇒ Object
(also: search_file_transfers)
-
.searchFriends ⇒ Object
(also: search_friends)
-
.searchGroups(type = '') ⇒ Object
(also: search_groups)
-
.searchMessages(target = '') ⇒ Object
(also: search_messages)
-
.searchMissedCalls ⇒ Object
(also: search_missed_calls)
-
.searchMissedChatMessages ⇒ Object
(also: search_missed_chat_messages)
-
.searchMissedChats ⇒ Object
(also: search_missed_chats)
-
.searchMissedMessages ⇒ Object
(also: search_missed_messages)
-
.searchMissedSMSs ⇒ Object
(also: search_missed_smss)
-
.searchMissedVoiceMails ⇒ Object
(also: search_missed_voice_mails)
-
.searchRecentChats ⇒ Object
(also: search_recent_chats)
-
.searchSMSs ⇒ Object
(also: search_smss)
-
.searchUsers(target) ⇒ Object
(also: search_users)
-
.searchUsersWaitingMyAuthorization ⇒ Object
(also: search_users_waiting_my_authorization)
-
.searchVoiceMails ⇒ Object
(also: search_voice_mails)
-
.set_aec(flag) ⇒ Object
(also: setAEC)
-
.set_agc(flag) ⇒ Object
(also: setAGC)
-
.set_audio_in(device) ⇒ Object
(also: setAudioIn)
-
.set_audio_out(device) ⇒ Object
(also: setAudioOut)
-
.set_auto_away(flag) ⇒ Object
(also: setAutoAway)
-
.set_avatar(filePath, idx = "", num = 1) ⇒ Object
(also: setAvatar)
-
.set_mute(flag) ⇒ Object
(also: setMute)
-
.set_pc_speaker(flag) ⇒ Object
(also: setPCSpeaker)
-
.set_ringer(device) ⇒ Object
(also: setRinger)
-
.set_ringtone(filePath, idx = "", id = 1) ⇒ Object
(also: setRingtone)
-
.set_ringtone_status(flag, id = 1) ⇒ Object
(also: setRingtoneStatus)
-
.set_silent_mode(flag) ⇒ Object
(also: setSilentMode)
-
.set_ui_language(lang) ⇒ Object
(also: setUILanguage)
-
.set_user_status(status) ⇒ Object
(also: setUserStatus)
-
.set_video_in(device) ⇒ Object
(also: setVideoIn)
-
.set_wallpaper(filePath) ⇒ Object
(also: setWallpaper)
-
.set_window_state(state) ⇒ Object
(also: setWindowState)
-
.sms(id) ⇒ Object
-
.user(id) ⇒ Object
-
.voiceMail(id) ⇒ Object
def message(id) SkypeAPI::Message.new(id) ; end.
delNotify, notified, notify, setNotify
def_parser, notice
invoke_alter, invoke_echo, invoke_get, invoke_one, invoke_set
Class Attribute Details
.property2callback ⇒ Object
Returns the value of attribute property2callback.
168
169
170
|
# File 'lib/skypeapi.rb', line 168
def property2callback
@property2callback
end
|
.property2symbol ⇒ Object
Returns the value of attribute property2symbol.
168
169
170
|
# File 'lib/skypeapi.rb', line 168
def property2symbol
@property2symbol
end
|
Class Method Details
.BTNPressed(key) ⇒ Object
Also known as:
btnp_presse
423
424
425
|
# File 'lib/skypeapi.rb', line 423
def BTNPressed key
invoke_echo "BTN_PRESSED #{key}"
end
|
.BTNReleased(key) ⇒ Object
Also known as:
btn_released
428
429
430
|
# File 'lib/skypeapi.rb', line 428
def BTNReleased key
invoke_echo "BTN_RELEASED #{key}"
end
|
.call(id) ⇒ Object
135
|
# File 'lib/skypeapi.rb', line 135
def call(id) SkypeAPI::Call.new(id) ; end
|
.chat(id) ⇒ Object
def profile() SkypeAPI::Profile.new nil ; end
141
|
# File 'lib/skypeapi.rb', line 141
def chat(id) SkypeAPI::Chat.new(id) ; end
|
.chatMessage(id) ⇒ Object
.clearCallHistory(type, handle = '') ⇒ Object
Also known as:
clear_call_history
631
632
633
|
# File 'lib/skypeapi.rb', line 631
def clearCallHistory(type, handle='')
invoke("CLEAR CALLHISTORY #{type} #{handle}") == "CLEAR CALLHISTORY #{type} #{handle}".rstrip
end
|
.clearChatHistory ⇒ Object
Also known as:
clear_chat_history
627
|
# File 'lib/skypeapi.rb', line 627
def clearChatHistory() invoke('CLEAR CHATHISTORY') == 'CLEAR CHATHISTORY' ; end
|
.clearVoiceMailHistory ⇒ Object
Also known as:
clear_voice_mail_history
629
|
# File 'lib/skypeapi.rb', line 629
def clearVoiceMailHistory() invoke('CLEAR VOICEMAILHISTORY') == 'CLEAR VOICEMAILHISTORY' ; end
|
.event(id) ⇒ Object
159
|
# File 'lib/skypeapi.rb', line 159
def event(id) SkypeAPI::Event.new(id) ; end
|
.fileTransfer(id) ⇒ Object
.focus ⇒ Object
303
|
# File 'lib/skypeapi.rb', line 303
def focus() invoke('FOCUS') == 'FOCUS' end
|
.get_aec ⇒ Object
Also known as:
getAEC
271
|
# File 'lib/skypeapi.rb', line 271
def get_aec() parse :aec, invoke_get("AEC") end
|
.get_agc ⇒ Object
Also known as:
getAGC
264
|
# File 'lib/skypeapi.rb', line 264
def get_agc() parse :agc, invoke_get("AGC") end
|
.get_audio_in ⇒ Object
Also known as:
getAudioIn
201
|
# File 'lib/skypeapi.rb', line 201
def get_audio_in() invoke_get("AUDIO_IN") end
|
.get_audio_out ⇒ Object
Also known as:
getAudioOut
208
|
# File 'lib/skypeapi.rb', line 208
def get_audio_out() invoke_get("AUDIO_OUT") end
|
.get_auto_away ⇒ Object
Also known as:
getAutoAway
283
|
# File 'lib/skypeapi.rb', line 283
def get_auto_away() parse :auto_away, invoke_get("AUTOAWAY") end
|
.get_avatar(filePath, num = 1) ⇒ Object
Also known as:
getAvatar
229
|
# File 'lib/skypeapi.rb', line 229
def get_avatar(filePath, num=1) invoke_get("AVATAR #{num} #{filePath}") end
|
.get_connstatus ⇒ Object
Also known as:
getConnstatus
197
|
# File 'lib/skypeapi.rb', line 197
def get_connstatus() invoke_get("CONNSTATUS") end
|
433
|
# File 'lib/skypeapi.rb', line 433
def get_contacts_focused() parse :contacts_focused, invoke_get("CONTACTS_FOCUSED") end
|
.get_current_user_handle ⇒ Object
Also known as:
getCurrentUserHandle
177
|
# File 'lib/skypeapi.rb', line 177
def get_current_user_handle() invoke_get("CURRENTUSERHANDLE") end
|
.get_mute ⇒ Object
Also known as:
getMute
222
|
# File 'lib/skypeapi.rb', line 222
def get_mute() parse :mute, invoke_get("MUTE") end
|
.get_pc_speaker ⇒ Object
Also known as:
getPCSpeaker
257
|
# File 'lib/skypeapi.rb', line 257
def get_pc_speaker() parse :pc_speaker, invoke_get('PCSPEAKER') end
|
.get_predictive_dialer_country ⇒ Object
Also known as:
getPredictiveDialerCountry
193
|
# File 'lib/skypeapi.rb', line 193
def get_predictive_dialer_country() invoke_get("PREDICTIVE_DIALER_COUNTRY") end
|
.get_privilege(privilege) ⇒ Object
Also known as:
getPrivilege
privilege SkypeOut | SkypeIn | VoiceMail
186
|
# File 'lib/skypeapi.rb', line 186
def get_privilege(privilege) parse :privilege, invoke_get("PRIVILEGE #{privilege}") end
|
.get_ringer ⇒ Object
Also known as:
getRinger
215
|
# File 'lib/skypeapi.rb', line 215
def get_ringer() invoke_get("RINGER") end
|
.get_ringtone(id = 1) ⇒ Object
Also known as:
getRingtone
237
|
# File 'lib/skypeapi.rb', line 237
def get_ringtone(id=1) invoke_get("RINGTONE #{id}") end
|
.get_ringtone_status(id = 1) ⇒ Object
Also known as:
getRingtoneStatus
244
245
246
247
|
# File 'lib/skypeapi.rb', line 244
def get_ringtone_status(id=1)
invoke("GET RINGTONE #{id} STATUS") =~ /RINGTONE #{id} ((ON)|(OFF))/
$2._flag
end
|
.get_silent_mode ⇒ Object
Also known as:
getSilentMode
451
|
# File 'lib/skypeapi.rb', line 451
def get_silent_mode() parse :silent_mode, invoke_get("SILENT_MODE") end
|
.get_skype_version ⇒ Object
Also known as:
getSkypeVersion
173
|
# File 'lib/skypeapi.rb', line 173
def get_skype_version() invoke_get("SKYPEVERSION") end
|
.get_ui_language ⇒ Object
Also known as:
getUILanguage
437
|
# File 'lib/skypeapi.rb', line 437
def get_ui_language() invoke_get("UI_LANGUAGE") end
|
.get_user_status ⇒ Object
Also known as:
getUserStatus
181
|
# File 'lib/skypeapi.rb', line 181
def get_user_status() invoke_get("USERSTATUS") end
|
.get_video_in ⇒ Object
Also known as:
getVideoIn
290
|
# File 'lib/skypeapi.rb', line 290
def get_video_in() invoke_get("VIDEO_IN") end
|
.get_wallpaper ⇒ Object
Also known as:
getWallPaper
444
|
# File 'lib/skypeapi.rb', line 444
def get_wallpaper() invoke_get("WALLPAPER") end
|
.get_window_state ⇒ Object
Also known as:
getWindowState
307
|
# File 'lib/skypeapi.rb', line 307
def get_window_state() invoke_get("WINDOWSTATE") end
|
.group(id) ⇒ Object
155
|
# File 'lib/skypeapi.rb', line 155
def group(id) SkypeAPI::Group.new(id) ; end
|
.init(os = RUBY_PLATFORM.downcase) ⇒ Object
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/skypeapi.rb', line 37
def init os=RUBY_PLATFORM.downcase
unless @inited
case os
when /(mswin(?!ce))|(mingw)|(cygwin)|(bccwin)/
require 'skypeapi/os/windows.rb'
@os = SkypeAPI::OS::Windows.new
when /(mac)|(darwin)/
require 'skypeapi/os/mac.rb'
@os = SkypeAPI::OS::Mac.new
when /(linux)/
require 'skypeapi/os/linux.rb'
@os = SkypeAPI::OS::Linux.new
else
raise SkypeAPI::NotImplementError.new("#{os} is unknown or not support OS")
end
self.class.extend Forwardable
self.class.def_delegators(:@os,
:invoke,
:add_event,
:del_event,
:get_event,
:exist_event?,
:attach,
:attach_wait,
:polling,
:start_messageloop,
:messgeloop,
:close
)
class << self
alias addEvent add_event
alias setEvent add_event
alias delEvent del_event
alias getEvent get_event
alias existEvent? exist_event?
alias attachWait attach_wait
end
@notify = Hash.new
@notifier = SkypeAPI::OS::Notifier.new
@os.set_notify_selector @notifier.method(:fire)
@notifier.add nil, method(:notified)
objectsInit
else
end
end
|
.minimize ⇒ Object
305
|
# File 'lib/skypeapi.rb', line 305
def minimize() invoke('MINIMIZE') == 'MINIMIZE' end
|
.new ⇒ Object
90
91
92
93
|
# File 'lib/skypeapi.rb', line 90
def new
init
self
end
|
.notified(msg) ⇒ Object
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# File 'lib/skypeapi.rb', line 99
def notified msg
skypeProperty = nil
propertyReg = '(?:' + [
'CONTACTS FOCUSED',
'RINGTONE 1 STATUS',
'RINGTONE 1',
'[^ ]+'
].join(')|(?:') + ')'
if msg =~ /^(#{propertyReg}) (.+)$/m
skypeProperty = $1; value = $2
property = @property2symbol[skypeProperty].to_s.downcase.to_sym if @property2symbol[skypeProperty].class == Symbol
value = @property2callback[skypeProperty].call value if @property2callback[skypeProperty]
if @notify[nil]
@notify[nil][nil].call property, value if @notify[nil][nil]
@notify[nil][value].call property if @notify[nil][value]
end
if @notify[property]
@notify[property][nil].call value if @notify[property][nil]
@notify[property][value].call if @notify[property][value]
end
end
end
|
.objectsInit ⇒ Object
126
127
128
129
130
131
|
# File 'lib/skypeapi.rb', line 126
def objectsInit
[SkypeAPI::User,SkypeAPI::Profile,SkypeAPI::Call,SkypeAPI::Message,SkypeAPI::Chat,SkypeAPI::ChatMessage,SkypeAPI::ChatMember,SkypeAPI::VoiceMail,SkypeAPI::SMS,SkypeAPI::Application,SkypeAPI::Group,SkypeAPI::FileTransfer,SkypeAPI::Event,SkypeAPI::MenuItem].each do |klass|
@notifier.add /^#{klass::OBJECT_NAME} (.+)$/m, klass.method(:notified)
end
end
|
.open(prop, *value) ⇒ Object
314
315
316
317
318
319
320
321
|
# File 'lib/skypeapi.rb', line 314
def open prop, *value
begin
"OPEN #{prop} #{value.join(' ')}".rstrip == invoke("OPEN #{prop} #{value.join(' ')}".rstrip)
rescue => e
e.backtrace.shift
raise e
end
end
|
.openAddAFriend(user = '') ⇒ Object
Also known as:
open_add_a_friend
333
334
335
|
# File 'lib/skypeapi.rb', line 333
def openAddAFriend user=''
open 'ADDAFRIEND', user.to_s
end
|
.openAuthorization(user) ⇒ Object
Also known as:
open_authorization
418
419
420
|
# File 'lib/skypeapi.rb', line 418
def openAuthorization user
open 'AUTHORIZATION', user
end
|
.openBlockedUsers ⇒ Object
Also known as:
open_blocked_users
403
404
405
|
# File 'lib/skypeapi.rb', line 403
def openBlockedUsers
open 'BLOCKEDUSERS'
end
|
.openCallHistory ⇒ Object
Also known as:
open_call_history
383
384
385
|
# File 'lib/skypeapi.rb', line 383
def openCallHistory
open 'CALLHISTORY'
end
|
.openChat(chat) ⇒ Object
Also known as:
open_chat
343
344
345
|
# File 'lib/skypeapi.rb', line 343
def openChat chat
open 'CHAT', chat
end
|
.openConference ⇒ Object
Also known as:
open_conference
368
369
370
|
# File 'lib/skypeapi.rb', line 368
def openConference
open 'CONFERENCE'
end
|
388
389
390
|
# File 'lib/skypeapi.rb', line 388
def openContacts
open 'CONTACTS'
end
|
.openDialPad ⇒ Object
Also known as:
open_dial_pad
393
394
395
|
# File 'lib/skypeapi.rb', line 393
def openDialPad
open 'DIALPAD'
end
|
.openFileTransfer(path = nil, *users) ⇒ Object
Also known as:
open_file_trasfer
348
349
350
|
# File 'lib/skypeapi.rb', line 348
def openFileTransfer path=nil, *users
open 'FILETRANSFER', "#{users.join(', ')}",path ? "IN #{path}" : ''
end
|
.openGettingStarted ⇒ Object
Also known as:
open_getting_started
413
414
415
|
# File 'lib/skypeapi.rb', line 413
def openGettingStarted
open 'GETTINGSTARTED'
end
|
.openIM(user, msg = '') ⇒ Object
Also known as:
open_im
338
339
340
|
# File 'lib/skypeapi.rb', line 338
def openIM user, msg=''
open 'IM', user.to_s, msg
end
|
408
409
410
|
# File 'lib/skypeapi.rb', line 408
def openImportContacts
open 'IMPORTCONTACTS'
end
|
.openLiveTab ⇒ Object
Also known as:
open_live_tab
353
354
355
|
# File 'lib/skypeapi.rb', line 353
def openLiveTab
open 'LIVETAB'
end
|
.openOptions(page = '') ⇒ Object
Also known as:
open_options
378
379
380
|
# File 'lib/skypeapi.rb', line 378
def openOptions page=''
open 'OPTIONS', page
end
|
.openProfile ⇒ Object
Also known as:
open_profile
358
359
360
|
# File 'lib/skypeapi.rb', line 358
def openProfile
open 'PROFILE'
end
|
.openSearch ⇒ Object
Also known as:
open_search
373
374
375
|
# File 'lib/skypeapi.rb', line 373
def openSearch
open 'SEARCH'
end
|
398
399
400
|
# File 'lib/skypeapi.rb', line 398
def openSendContacts *users
open 'SENDCONTACTS', users.join(' ')
end
|
.openUserInfo(user) ⇒ Object
Also known as:
open_user_info
363
364
365
|
# File 'lib/skypeapi.rb', line 363
def openUserInfo user
open 'USERINFO', user.to_s
end
|
.openVideoTest(id = '') ⇒ Object
Also known as:
open_video_test
323
324
325
|
# File 'lib/skypeapi.rb', line 323
def openVideoTest id=''
open 'VIDEOTEST', id
end
|
.openVoiceMail(id) ⇒ Object
Also known as:
open_voice_mail
328
329
330
|
# File 'lib/skypeapi.rb', line 328
def openVoiceMail id
open 'VOICEMAIL', id
end
|
.os ⇒ Object
95
96
97
|
# File 'lib/skypeapi.rb', line 95
def os
@os
end
|
.ping ⇒ Object
297
298
299
|
# File 'lib/skypeapi.rb', line 297
def ping
invoke("PING") == "PONG"
end
|
.reset_idle_timer ⇒ Object
Also known as:
resetIdleTimer
279
|
# File 'lib/skypeapi.rb', line 279
def reset_idle_timer() invoke("RESETIDLETIMER") == "RESETIDLETIMER" end
|
.search(prop, preffix = prop, val = '') ⇒ Object
460
461
462
463
464
465
466
467
468
|
# File 'lib/skypeapi.rb', line 460
def search prop, preffix=prop, val=''
ret = invoke "SEARCH #{prop} #{val}"
ret =~ /^#{preffix} (.+)$/
if $1
$1.split(', ')
else
[]
end
end
|
.searchActiveCalls ⇒ Object
Also known as:
search_active_calls
488
489
490
491
492
|
# File 'lib/skypeapi.rb', line 488
def searchActiveCalls
search('ACTIVECALLS','CALLS').map do |id|
call(id)
end
end
|
.searchActiveChats ⇒ Object
Also known as:
search_active_chats
542
543
544
545
546
|
# File 'lib/skypeapi.rb', line 542
def searchActiveChats
search('ACTIVECHATS','CHATS').map do |id|
chat id
end
end
|
.searchActiveFileTransfers ⇒ Object
Also known as:
search_active_file_transfers
596
597
598
599
600
|
# File 'lib/skypeapi.rb', line 596
def searchActiveFileTransfers
search('ACTIVEFILETRANSFERS','FILETRANSFERS').map do |id|
fileTransfer id
end
end
|
.searchBookMarkedChats ⇒ Object
Also known as:
search_book_marked_chats
560
561
562
563
564
|
# File 'lib/skypeapi.rb', line 560
def searchBookMarkedChats
search('BOOKMARKEDCHATS','CHATS').map do |id|
chat id
end
end
|
.searchCalls(target) ⇒ Object
Also known as:
search_calls
482
483
484
485
486
|
# File 'lib/skypeapi.rb', line 482
def searchCalls target
search('CALLS','CALLS',target).map do |id|
call(id)
end
end
|
.searchChatMessages(target = '') ⇒ Object
Also known as:
search_chat_messages
566
567
568
569
570
|
# File 'lib/skypeapi.rb', line 566
def searchChatMessages target=''
search('CHATMESSAGES','CHATMESSAGES', target).map do |id|
chatMessage id
end
end
|
.searchChats ⇒ Object
Also known as:
search_chats
536
537
538
539
540
|
# File 'lib/skypeapi.rb', line 536
def searchChats
search('CHATS').map do |id|
chat id
end
end
|
.searchFileTransfers ⇒ Object
Also known as:
search_file_transfers
590
591
592
593
594
|
# File 'lib/skypeapi.rb', line 590
def searchFileTransfers
search('FILETRANSFERS').map do |id|
fileTransfer id
end
end
|
.searchFriends ⇒ Object
Also known as:
search_friends
470
471
472
473
474
|
# File 'lib/skypeapi.rb', line 470
def searchFriends
search('FRIENDS','USERS').map do |handle|
user(handle)
end
end
|
.searchGroups(type = '') ⇒ Object
Also known as:
search_groups
584
585
586
587
588
|
# File 'lib/skypeapi.rb', line 584
def searchGroups type=''
search('GROUPS','GROUPS',type).map do |id|
group id
end
end
|
.searchMessages(target = '') ⇒ Object
Also known as:
search_messages
524
525
526
527
528
|
# File 'lib/skypeapi.rb', line 524
def searchMessages(target='')
search('MESSAGES', 'MESSAGES', target).map do |id|
message id
end
end
|
.searchMissedCalls ⇒ Object
Also known as:
search_missed_calls
494
495
496
497
498
|
# File 'lib/skypeapi.rb', line 494
def searchMissedCalls
search('MISSEDCALLS','CALLS').map do |id|
call(id)
end
end
|
.searchMissedChatMessages ⇒ Object
Also known as:
search_missed_chat_messages
572
573
574
575
576
|
# File 'lib/skypeapi.rb', line 572
def searchMissedChatMessages
search('MISSEDCHATMESSAGES','CHATMESSAGES').map do |id|
chatMessage id
end
end
|
.searchMissedChats ⇒ Object
Also known as:
search_missed_chats
548
549
550
551
552
|
# File 'lib/skypeapi.rb', line 548
def searchMissedChats
search('MISSEDCHATS','CHATS').map do |id|
chat id
end
end
|
.searchMissedMessages ⇒ Object
Also known as:
search_missed_messages
530
531
532
533
534
|
# File 'lib/skypeapi.rb', line 530
def searchMissedMessages
search('MISSEDMESSAGES','MESSAGES').map do |id|
message id
end
end
|
.searchMissedSMSs ⇒ Object
Also known as:
search_missed_smss
506
507
508
509
510
|
# File 'lib/skypeapi.rb', line 506
def searchMissedSMSs
search('MISSEDSMSS','SMSS').map do |id|
sms(id)
end
end
|
.searchMissedVoiceMails ⇒ Object
Also known as:
search_missed_voice_mails
518
519
520
521
522
|
# File 'lib/skypeapi.rb', line 518
def searchMissedVoiceMails
search('MISSEDVOICEMAILS','VOICEMAILS').map do |id|
voiceMail id
end
end
|
.searchRecentChats ⇒ Object
Also known as:
search_recent_chats
554
555
556
557
558
|
# File 'lib/skypeapi.rb', line 554
def searchRecentChats
search('RECENTCHATS','CHATS').map do |id|
chat id
end
end
|
.searchSMSs ⇒ Object
Also known as:
search_smss
500
501
502
503
504
|
# File 'lib/skypeapi.rb', line 500
def searchSMSs
search('SMSS').map do |id|
sms(id)
end
end
|
.searchUsers(target) ⇒ Object
Also known as:
search_users
476
477
478
479
480
|
# File 'lib/skypeapi.rb', line 476
def searchUsers target
search('USERS','USERS',target).map do |handle|
user(handle)
end
end
|
.searchUsersWaitingMyAuthorization ⇒ Object
Also known as:
search_users_waiting_my_authorization
578
579
580
581
582
|
# File 'lib/skypeapi.rb', line 578
def searchUsersWaitingMyAuthorization
search('USERSWAITINGMYAUTHORIZATION','USERS').map do |handle|
user handle
end
end
|
.searchVoiceMails ⇒ Object
Also known as:
search_voice_mails
512
513
514
515
516
|
# File 'lib/skypeapi.rb', line 512
def searchVoiceMails
search('VOICEMAILS').map do |id|
voiceMail(id)
end
end
|
.set_aec(flag) ⇒ Object
Also known as:
setAEC
275
|
# File 'lib/skypeapi.rb', line 275
def set_aec(flag) parse :aec, invoke_set("AEC", flag._swi) end
|
.set_agc(flag) ⇒ Object
Also known as:
setAGC
268
|
# File 'lib/skypeapi.rb', line 268
def set_agc(flag) parse :agc, invoke_set("AGC", flag._swi) end
|
.set_audio_in(device) ⇒ Object
Also known as:
setAudioIn
205
|
# File 'lib/skypeapi.rb', line 205
def set_audio_in(device) invoke_set "AUDIO_IN", device end
|
.set_audio_out(device) ⇒ Object
Also known as:
setAudioOut
212
|
# File 'lib/skypeapi.rb', line 212
def set_audio_out(device) invoke_set "AUDIO_OUT", device ; end
|
.set_auto_away(flag) ⇒ Object
Also known as:
setAutoAway
287
|
# File 'lib/skypeapi.rb', line 287
def set_auto_away(flag) parse :auto_away, invoke_set('AUTOAWAY', flag._swi) end
|
.set_avatar(filePath, idx = "", num = 1) ⇒ Object
Also known as:
setAvatar
232
233
234
|
# File 'lib/skypeapi.rb', line 232
def set_avatar(filePath, idx="", num=1)
invoke_set("AVATAR", "#{num} #{filePath}#{idx.empty? ? '' : ':'+idx.to_s}").split(' ')[1..-1].join(' ')
end
|
.set_mute(flag) ⇒ Object
Also known as:
setMute
226
|
# File 'lib/skypeapi.rb', line 226
def set_mute(flag) parse :mute, invoke_set("MUTE", flag._swi) ;end
|
.set_pc_speaker(flag) ⇒ Object
Also known as:
setPCSpeaker
261
|
# File 'lib/skypeapi.rb', line 261
def set_pc_speaker(flag) parse :pc_speaker, invoke_set("PCSPEAKER", flag._swi) ; end
|
.set_ringer(device) ⇒ Object
Also known as:
setRinger
219
|
# File 'lib/skypeapi.rb', line 219
def set_ringer(device) invoke_set("RINGER", device) ; end
|
.set_ringtone(filePath, idx = "", id = 1) ⇒ Object
Also known as:
setRingtone
241
|
# File 'lib/skypeapi.rb', line 241
def set_ringtone(filePath, idx="", id=1) invoke_set("RINGTONE","#{id} #{filePath}:#{idx}") end
|
.set_ringtone_status(flag, id = 1) ⇒ Object
Also known as:
setRingtoneStatus
251
252
253
254
|
# File 'lib/skypeapi.rb', line 251
def set_ringtone_status(flag, id=1)
invoke("SET RINGTONE #{id} STATUS #{flag._swi}") =~ /RINGTONE #{id} ((ON)|(OFF))/
$2._flag
end
|
.set_silent_mode(flag) ⇒ Object
Also known as:
setSilentMode
455
|
# File 'lib/skypeapi.rb', line 455
def set_silent_mode(flag) parse :silent_mode, invoke_set('SILENT_MODE', flag._swi) end
|
.set_ui_language(lang) ⇒ Object
Also known as:
setUILanguage
441
|
# File 'lib/skypeapi.rb', line 441
def set_ui_language(lang) invoke_set("UI_LANGUAGE", lang) end
|
.set_user_status(status) ⇒ Object
Also known as:
setUserStatus
190
|
# File 'lib/skypeapi.rb', line 190
def set_user_status(status) invoke_set("USERSTATUS", status) end
|
.set_video_in(device) ⇒ Object
Also known as:
setVideoIn
294
|
# File 'lib/skypeapi.rb', line 294
def set_video_in(device) invoke_set("VIDEO_IN", device) end
|
.set_wallpaper(filePath) ⇒ Object
Also known as:
setWallpaper
448
|
# File 'lib/skypeapi.rb', line 448
def set_wallpaper(filePath) invoke_set('WALLPAPER', filePath) end
|
.set_window_state(state) ⇒ Object
Also known as:
setWindowState
311
|
# File 'lib/skypeapi.rb', line 311
def set_window_state(state) invoke_set("WINDOWSTATE", state) end
|
.sms(id) ⇒ Object
151
|
# File 'lib/skypeapi.rb', line 151
def sms(id) SkypeAPI::SMS.new(id) ; end
|
.user(id) ⇒ Object
133
|
# File 'lib/skypeapi.rb', line 133
def user(id) SkypeAPI::User.new(id) ; end
|
.voiceMail(id) ⇒ Object
def message(id) SkypeAPI::Message.new(id) ; end