Class: Skype::Profile
Constant Summary
collapse
- OBJECT_NAME =
"PROFILE"
Instance Attribute Summary
#property2callback, #property2symbol
Class Method Summary
collapse
Instance Method Summary
collapse
inherited, #to_s
#delNotify, #notified, #notify, #setNotify
#def_parser, #notice
#invoke_alter, #invoke_echo, #invoke_get, #invoke_one, #invoke_set
Constructor Details
#initialize(id = nil) ⇒ Profile
Returns a new instance of Profile.
5
6
7
|
# File 'lib/skype/profile.rb', line 5
def initialize(id=nil)
super nil
end
|
Class Method Details
.new ⇒ Object
9
10
11
|
# File 'lib/skype/profile.rb', line 9
def self.new
super nil
end
|
.notified(msg) ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/skype/profile.rb', line 13
def self.notified msg
if msg =~ /^([^ ]+) (.*)$/m
property = P2M[$1]
value = V2O[property] ? V2O[property].call($2) : $2
instance = new
instance.notified instance, property,value
end
end
|
Instance Method Details
#get_about ⇒ Object
Also known as:
getAbout
88
|
# File 'lib/skype/profile.rb', line 88
def get_about() invoke_get("ABOUT") end
|
#get_birthday ⇒ Object
Also known as:
getBirthday
44
|
# File 'lib/skype/profile.rb', line 44
def get_birthday() parse :birthday, invoke_get("BIRTHDAY") end
|
#get_call_apply_cf ⇒ Object
Also known as:
getCallApplyCF
104
|
# File 'lib/skype/profile.rb', line 104
def get_call_apply_cf() parse :call_apply_cf, invoke_get("CALL_APPLY_CF") end
|
#get_call_forward_rules ⇒ Object
Also known as:
getCallForwardRules
112
|
# File 'lib/skype/profile.rb', line 112
def get_call_forward_rules() parse :call_forward_rules, invoke_get("CALL_FORWARD_RULES") end
|
#get_call_noanswer_timeout ⇒ Object
Also known as:
getCallNoanswerTimeout
108
|
# File 'lib/skype/profile.rb', line 108
def get_call_noanswer_timeout() parse :call_noanswer_timeout, invoke_get("CALL_NOANSWER_TIMEOUT") end
|
#get_call_send_to_vm ⇒ Object
Also known as:
getCallSendToVM
123
|
# File 'lib/skype/profile.rb', line 123
def get_call_send_to_vm() parse :call_send_to_vm, invoke_get("CALL_SEND_TO_VM") end
|
#get_city ⇒ Object
Also known as:
getCity
68
|
# File 'lib/skype/profile.rb', line 68
def get_city() invoke_get("CITY") end
|
#get_country ⇒ Object
Also known as:
getCountry
56
|
# File 'lib/skype/profile.rb', line 56
def get_country() parse :country, invoke_get("COUNTRY") end
|
#get_fullname ⇒ Object
Also known as:
getFullname
40
|
# File 'lib/skype/profile.rb', line 40
def get_fullname() invoke_get("FULLNAME") end
|
#get_homepage ⇒ Object
Also known as:
getHomepage
84
|
# File 'lib/skype/profile.rb', line 84
def get_homepage() invoke_get("HOMEPAGE") end
|
#get_ip_country ⇒ Object
Also known as:
getIPCountry
60
|
# File 'lib/skype/profile.rb', line 60
def get_ip_country() invoke_get("IPCOUNTRY") end
|
#get_languages ⇒ Object
Also known as:
getLanguages
52
|
# File 'lib/skype/profile.rb', line 52
def get_languages() parse :languages, invoke_get("LANGUAGES") end
|
#get_mood_text ⇒ Object
Also known as:
getMoodText
92
|
# File 'lib/skype/profile.rb', line 92
def get_mood_text() invoke_get("MOOD_TEXT") end
|
#get_phone_home ⇒ Object
Also known as:
getPhoneHome
72
|
# File 'lib/skype/profile.rb', line 72
def get_phone_home() invoke_get("PHONE_HOME") end
|
#get_phone_mobile ⇒ Object
Also known as:
getPhoneMobile
80
|
# File 'lib/skype/profile.rb', line 80
def get_phone_mobile() invoke_get("PHONE_MOBILE") end
|
#get_phone_office ⇒ Object
Also known as:
getPhoneOffice
76
|
# File 'lib/skype/profile.rb', line 76
def get_phone_office() invoke_get("PHONE_OFFICE") end
|
#get_province ⇒ Object
Also known as:
getProvince
64
|
# File 'lib/skype/profile.rb', line 64
def get_province() invoke_get("PROVINCE") end
|
#get_pstn_balance ⇒ Object
Also known as:
getPSTNBalance
32
|
# File 'lib/skype/profile.rb', line 32
def get_pstn_balance() parse :pstn_balance, invoke_get("PSTN_BALANCE") end
|
#get_pstn_balance_currency ⇒ Object
Also known as:
getPSTNBalanceCurrency
36
|
# File 'lib/skype/profile.rb', line 36
def get_pstn_balance_currency() invoke_get("PSTN_BALANCE_CURRENCY") end
|
#get_rich_mood_text ⇒ Object
Also known as:
getRichMoodText
96
|
# File 'lib/skype/profile.rb', line 96
def get_rich_mood_text() invoke_get("RICH_MOOD_TEXT") end
|
#get_sex ⇒ Object
Also known as:
getSex
48
|
# File 'lib/skype/profile.rb', line 48
def get_sex() invoke_get("SEX") end
|
#get_sms_validated_numbers ⇒ Object
Also known as:
getSMSValidatedNumbers
127
|
# File 'lib/skype/profile.rb', line 127
def get_sms_validated_numbers() parse :sms_validated_numbers, invoke_get("SMS_VALIDATED_NUMBERS") end
|
#get_timezone ⇒ Object
Also known as:
getTimezone
100
|
# File 'lib/skype/profile.rb', line 100
def get_timezone() parse :timezone, invoke_get("TIMEZONE") end
|
#setAbout(text) ⇒ Object
Also known as:
set_about
152
|
# File 'lib/skype/profile.rb', line 152
def setAbout(text) invoke_set('ABOUT', text); end
|
#setBirthday(dateOrYear = nil, month = nil, day = nil) ⇒ Object
Also known as:
set_birthday
132
133
134
135
136
137
138
139
|
# File 'lib/skype/profile.rb', line 132
def setBirthday(dateOrYear=nil, month=nil, day=nil)
if dateOrYear.nil?
val = ''
else
val = dateOrYear.class == Date ? dateOrYear.strftime('%Y%m%d') : sprintf("%04d%02d%02d",dateOrYear,month,day)
end
invoke_set('BIRTHDAY', val)
end
|
#setCallApplyCF(flag) ⇒ Object
Also known as:
set_call_apply_cf
156
157
158
|
# File 'lib/skype/profile.rb', line 156
def setCallApplyCF(flag)
invoke_set('CALL_APPLY_CF', flag._str)
end
|
#setCallForwardRules(*rules) ⇒ Object
Also known as:
set_call_forward_rules
160
161
162
163
164
165
166
167
168
169
170
|
# File 'lib/skype/profile.rb', line 160
def setCallForwardRules(*rules)
if rules[0] == nil
invoke_set('CALL_FORWARD_RULES', '')
else
rules.map! do |rule|
rule.join ','
end
rules = rules.join ' '
invoke_set('CALL_FORWARD_RULES', rules)
end
end
|
#setCallNoanswerTimeout(sec) ⇒ Object
Also known as:
set_call_noanswer_timeout
159
|
# File 'lib/skype/profile.rb', line 159
def setCallNoanswerTimeout(sec) invoke_set('CALL_NOANSWER_TIMEOUT', sec); end
|
#setCallSendToVM(flag) ⇒ Object
Also known as:
set_call_send_to_vm
171
172
173
|
# File 'lib/skype/profile.rb', line 171
def setCallSendToVM(flag)
invoke_set('CALL_SEND_TO_VM', flag._str)
end
|
#setCity(city) ⇒ Object
Also known as:
set_city
147
|
# File 'lib/skype/profile.rb', line 147
def setCity(city) invoke_set('CITY', city); end
|
#setCountry(iso) ⇒ Object
Also known as:
set_country
144
|
# File 'lib/skype/profile.rb', line 144
def setCountry(iso) invoke_set('COUNTRY', iso); end
|
#setFullname(name) ⇒ Object
Also known as:
set_fullname
131
|
# File 'lib/skype/profile.rb', line 131
def setFullname(name) invoke_set('FULLNAME', name); end
|
#setHomepage(url) ⇒ Object
Also known as:
set_homepage
151
|
# File 'lib/skype/profile.rb', line 151
def setHomepage(url) invoke_set('HOMEPAGE', url); end
|
#setLanguages(*langs) ⇒ Object
Also known as:
set_languages
141
142
143
|
# File 'lib/skype/profile.rb', line 141
def setLanguages(*langs)
invoke_set('LANGUAGES', langs.join(' '))
end
|
#setMoodText(text) ⇒ Object
Also known as:
set_mood_text
153
|
# File 'lib/skype/profile.rb', line 153
def setMoodText(text) invoke_set('MOOD_TEXT', text); end
|
#setPhoneHome(numbers) ⇒ Object
Also known as:
set_phone_home
148
|
# File 'lib/skype/profile.rb', line 148
def setPhoneHome(numbers) invoke_set('PHONE_HOME', numbers); end
|
#setPhoneMobile(numbers) ⇒ Object
Also known as:
set_phone_mobile
150
|
# File 'lib/skype/profile.rb', line 150
def setPhoneMobile(numbers) invoke_set('PHONE_MOBILE', numbers); end
|
#setPhoneOffice(numbers) ⇒ Object
Also known as:
set_phone_office
149
|
# File 'lib/skype/profile.rb', line 149
def setPhoneOffice(numbers) invoke_set('PHONE_OFFICE', numbers); end
|
#setProvince(province) ⇒ Object
Also known as:
set_province
def setIpcountry(val) invoke_set(‘IPCOUNTRY’, val); end
146
|
# File 'lib/skype/profile.rb', line 146
def setProvince(province) invoke_set('PROVINCE', province); end
|
#setRichMoodText(text) ⇒ Object
Also known as:
set_rich_mood_text
154
|
# File 'lib/skype/profile.rb', line 154
def setRichMoodText(text) invoke_set('RICH_MOOD_TEXT', text); end
|
#setSex(sex) ⇒ Object
Also known as:
set_sex
140
|
# File 'lib/skype/profile.rb', line 140
def setSex(sex) invoke_set('SEX', sex); end
|
#setTimezone(timezone) ⇒ Object
Also known as:
set_timezone
155
|
# File 'lib/skype/profile.rb', line 155
def setTimezone(timezone) invoke_set('TIMEZONE', timezone); end
|