1
2
3 import skypekit
4 import warnings
5 module_id2classes = {}
407 module_id2classes[10] = ContactGroup
1427 module_id2classes[2] = Contact
1971 module_id2classes[1] = ContactSearch
1974 """
1975 Conversation participant class. Instances of this class represent contacts when in the context of conversations. Amongst others, this class has a Ring method for requesting live status with the target contact. This class also holds typing indicator property and access rights for the contact in context of public conversations.
1976
1977 """
1978 event_handlers = {}
1979 propid2label = {}
1984 return "Participant %s" % (self.object_id, )
1985 @staticmethod
1987 """ convert a property name to the enum of the property """
1988 return getattr(Participant, "P_"+propname.upper())
1989 module_id = 19
1991 """ notifies from a property change """
1992
1993 pass
1994 RANK = {1:'CREATOR', 'CREATOR':1, 2:'ADMIN', 'ADMIN':2, 3:'SPEAKER', 'SPEAKER':3, 4:'WRITER', 'WRITER':4, 5:'SPECTATOR', 'SPECTATOR':5, 6:'APPLICANT', 'APPLICANT':6, 7:'RETIRED', 'RETIRED':7, 8:'OUTLAW', 'OUTLAW':8}
1995 """
1996 Recognized values for the P_RANK property. The P_RANK controls participant's privileges in the conversation. See Participant::CanSetRankTo and Participant::SetRankTo methods.
1997
1998 - CREATOR - Creator of the chat. There can be only one participant with this type per conversation. Other participants cannot be promoted to Creator rank.
1999
2000 - ADMIN - Participant who has administrator privileges
2001
2002 - SPEAKER - Participant who can speak and write
2003
2004 - WRITER - Participant who can write but not speak
2005
2006 - SPECTATOR - Participant who can read but not write/speak
2007
2008 - APPLICANT - Participant who is applying to join the conversation. Member cannot be demoted to applicants once they have been accepted.
2009
2010 - RETIRED - Participant who has eft or has been kicked from the conversation
2011
2012 - OUTLAW - Participant who has been banned from the chat
2013
2014 """
2015 TEXT_STATUS = {0:'TEXT_UNKNOWN', 'TEXT_UNKNOWN':0, 1:'TEXT_NA', 'TEXT_NA':1, 2:'READING', 'READING':2, 3:'WRITING', 'WRITING':3, 4:'WRITING_AS_ANGRY', 'WRITING_AS_ANGRY':4, 5:'WRITING_AS_CAT', 'WRITING_AS_CAT':5}
2016 """
2017 Recognized values for the P_TEXT_STATUS property. The P_TEXT_STATUS property has two uses. Firstly, you can use it to implement typing indicators in your UI, to notify the local user that an incoming chat message from this Participant is imminent.
2018
2019 To set the P_TEXT_STATUS value, so that remote client UIs can display the local user's typing indicator in their UI, use Conversation::SetMyTextStatusTo method.
2020
2021 Transmission of P_TEXT_STATUS updates to remote participants of conversations is controlled via SETUPKEY_DISABLE_CHAT_ACTIVITY_INDICATION setup key.
2022
2023 Secondly, the TEXT_NA value enables you to detect participants who are running clients with no chat capability.
2024
2025 - TEXT_UNKNOWN - Fallback state in case the text status is not (yet) deternmined.
2026
2027 - TEXT_NA - Text status is not applicable as the participant is using a Skype client that does not support chat (for example: voice-only USB phones).
2028
2029 - READING - Participant is currently not typing.
2030
2031 - WRITING - Participant is currently typing.
2032
2033 - WRITING_AS_ANGRY - This state should be set when following two conditions are true:
2034
2035 - interval between keypresses are less than 20 ms;
2036
2037 - at least one of the keys adjacent to current key are pressed down.
2038
2039 - WRITING_AS_CAT - The "Cat on keyboard detection" algorthm in Skype is implemented in the UI level, and as such is not present in the SkypeKit API. Should you wish to implement similar algorthm in your own UI, you can get the basic logic from the PawSense FAQ - http://www.bitboost.com/pawsense/pawsense-faq.html
2040
2041 """
2042 VOICE_STATUS = {
2043 0:'VOICE_UNKNOWN',
2044 1:'VOICE_NA',
2045 2:'VOICE_AVAILABLE',
2046 3:'VOICE_CONNECTING',
2047 4:'RINGING',
2048 5:'EARLY_MEDIA',
2049 6:'LISTENING',
2050 7:'SPEAKING',
2051 8:'VOICE_ON_HOLD',
2052 9:'VOICE_STOPPED',
2053 'VOICE_UNKNOWN'
2054
2055
2056 :0,
2057 'VOICE_NA'
2058
2059
2060 :1,
2061 'VOICE_AVAILABLE'
2062
2063
2064 :2,
2065 'VOICE_CONNECTING'
2066
2067
2068 :3,
2069 'RINGING'
2070
2071
2072 :4,
2073 'EARLY_MEDIA'
2074
2075
2076 :5,
2077 'LISTENING'
2078
2079
2080 :6,
2081 'SPEAKING'
2082
2083
2084 :7,
2085 'VOICE_ON_HOLD'
2086
2087
2088 :8,
2089 'VOICE_STOPPED'
2090
2091
2092 :9
2093 }
2094 """
2095 Recognized values for the P_VOICE_STATUS property.
2096
2097 - VOICE_UNKNOWN - Participant voice status is not (yet) determined.
2098
2099 - VOICE_NA - Participant is using a Skype client with no audio capability.
2100
2101 - VOICE_AVAILABLE - Participant is using a Skype client that supports audio.
2102
2103 - VOICE_CONNECTING - Participant is in process of joining current live session. This is a transitional state.
2104
2105 - RINGING - Participant has been invited to join the live session but has not yet accepted.
2106
2107 - EARLY_MEDIA - Participant is in process of joining current live session. This is another transitional state.
2108
2109 - LISTENING - Participant has joined the current live session but is currently not transmitting audio.
2110
2111 - SPEAKING - Participant has joined the current live session and is transmitting audio. The UI can either use this state to display appropriate "speaking" notification, or alternatively use Participant::P_SOUND_LEVEL if you want your speaking indicator to also reflect audio volume coming from the Participant.
2112
2113 - VOICE_ON_HOLD - Participant has joined the current live session but the audio is currently on hold.
2114
2115 - VOICE_STOPPED - Participant will be placed in this state for some seconds after live session has finished. This is another transitional state.
2116
2117 """
2118 VIDEO_STATUS = {0:'VIDEO_UNKNOWN', 'VIDEO_UNKNOWN':0, 1:'VIDEO_NA', 'VIDEO_NA':1, 2:'VIDEO_AVAILABLE', 'VIDEO_AVAILABLE':2, 3:'VIDEO_CONNECTING', 'VIDEO_CONNECTING':3, 4:'STREAMING', 'STREAMING':4, 5:'VIDEO_ON_HOLD', 'VIDEO_ON_HOLD':5}
2119 """
2120 Recognized values for the P_VIDEO_STATUS property. This property applies to Participant's video send capability, not capability to receive video.
2121
2122 - VIDEO_UNKNOWN - Video status is not (yet) determined.
2123
2124 - VIDEO_NA - Indicates that this Participant does not have video available..
2125
2126 - VIDEO_AVAILABLE - Indicates that video is available for this participant. When the Participant::P_VIDEO_STATUS obtains this state, it is possible to retrieve the Video object, using Participant::GetVideo method. Further operations, such as starting or stopping the video send/receive will then go through the Video object.
2127
2128 - VIDEO_CONNECTING - Transitional state indicating that the Participant is attempting to initiate video send.
2129
2130 - STREAMING - Indicates that the participant is currently sending video.
2131
2132 - VIDEO_ON_HOLD - Indicates that the participant video send is currently paused.
2133
2134 """
2135 DTMF = {
2136 0 :'DTMF_0',
2137 1 :'DTMF_1',
2138 2 :'DTMF_2',
2139 3 :'DTMF_3',
2140 4 :'DTMF_4',
2141 5 :'DTMF_5',
2142 6 :'DTMF_6',
2143 7 :'DTMF_7',
2144 8 :'DTMF_8',
2145 9 :'DTMF_9',
2146 10:'DTMF_STAR',
2147 11:'DTMF_POUND',
2148 'DTMF_0'
2149
2150
2151 : 0,
2152 'DTMF_1'
2153
2154
2155 : 1,
2156 'DTMF_2'
2157
2158
2159 : 2,
2160 'DTMF_3'
2161
2162
2163 : 3,
2164 'DTMF_4'
2165
2166
2167 : 4,
2168 'DTMF_5'
2169
2170
2171 : 5,
2172 'DTMF_6'
2173
2174
2175 : 6,
2176 'DTMF_7'
2177
2178
2179 : 7,
2180 'DTMF_8'
2181
2182
2183 : 8,
2184 'DTMF_9'
2185
2186
2187 : 9,
2188 'DTMF_STAR'
2189
2190
2191 :10,
2192 'DTMF_POUND'
2193
2194
2195 :11
2196 }
2197 """
2198 - DTMF_0
2199 - DTMF_1
2200 - DTMF_2
2201 - DTMF_3
2202 - DTMF_4
2203 - DTMF_5
2204 - DTMF_6
2205 - DTMF_7
2206 - DTMF_8
2207 - DTMF_9
2208 - DTMF_STAR
2209 - DTMF_POUND
2210 """
2211
2213 """
2214 [ALL] ID of corresponding conversation. Here and below, [ALL] tag indicates that the property has meaning and is set in context of all participants in the conversation. [OTHERS] tag has meaning only for participants who are not the local user.
2215
2216 """
2217 return module_id2classes[18](self._sk_property("ZG\242\007]\023",
2218 930, True), self.transport)
2219 convo_id = property(_sk_get_convo_id)
2220 propid2label[930] = "convo_id"
2221 P_CONVO_ID = 930
2223 """
2224 [ALL] skypename OR pstn_number OR namespace:identity
2225 """
2226 return self._sk_property("ZG\243\007]\023", 931, True)
2227 identity = property(_sk_get_identity)
2228 propid2label[931] = "identity"
2229 P_IDENTITY = 931
2235 rank = property(_sk_get_rank)
2236 propid2label[932] = "rank"
2237 P_RANK = 932
2239 """
2240 Not set (should be: requested Participant::RANK, higher than the current one)
2241 """
2242 return skypekit.enumof(Participant.RANK, self._sk_property("ZG\245\007]\023", 933, True))
2243 requested_rank = property(_sk_get_requested_rank)
2244 propid2label[933] = "requested_rank"
2245 P_REQUESTED_RANK = 933
2247 """
2248 [ALL] the typing indicator
2249 """
2250 return skypekit.enumof(Participant.TEXT_STATUS, self._sk_property("ZG\246\007]\023", 934, True))
2251 text_status = property(_sk_get_text_status)
2252 propid2label[934] = "text_status"
2253 P_TEXT_STATUS = 934
2259 voice_status = property(_sk_get_voice_status)
2260 propid2label[935] = "voice_status"
2261 P_VOICE_STATUS = 935
2267 video_status = property(_sk_get_video_status)
2268 propid2label[936] = "video_status"
2269 P_VIDEO_STATUS = 936
2271 """
2272 [ALL] identity that was used to establish current live session with that participant (can be different from participant identity)
2273 """
2274 return self._sk_property("ZG\257\007]\023", 943, False)
2275 live_identity = property(_sk_get_live_identity)
2276 propid2label[943] = "live_identity"
2277 P_LIVE_IDENTITY = 943
2279 """
2280 [OTHERS] 'price_per_minute_float currency' - eg '0.01 EUR'. Note that this property obtains value only after the participant goes into live state. It cannot be used to display call rates before the call starts.
2281
2282 """
2283 return self._sk_property("ZG\252\007]\023", 938, True)
2284 live_price_for_me = property(_sk_get_live_price_for_me)
2285 propid2label[938] = "live_price_for_me"
2286 P_LIVE_PRICE_FOR_ME = 938
2288 """
2289 [OTHERS] list of identities where the live session is being forwarded (if they are disclosed), space separated
2290 """
2291 return self._sk_property("ZG\264\007]\023", 948, True)
2292 live_fwd_identities = property(_sk_get_live_fwd_identities)
2293 propid2label[948] = "live_fwd_identities"
2294 P_LIVE_FWD_IDENTITIES = 948
2296 """
2297 [ALL] time of joining the live session
2298 """
2299 return self._sk_property("ZG\253\007]\023", 939, True)
2300 live_start_timestamp = property(_sk_get_live_start_timestamp)
2301 propid2label[939] = "live_start_timestamp"
2302 P_LIVE_START_TIMESTAMP = 939
2304 """
2305 [ALL] current 'loudness' level when SPEAKING (0..10)
2306 """
2307 return self._sk_property("ZG\255\007]\023", 941, True)
2308 sound_level = property(_sk_get_sound_level)
2309 propid2label[941] = "sound_level"
2310 P_SOUND_LEVEL = 941
2312 """
2313 [OTHERS] call (audio and video) debug info
2314 """
2315 return self._sk_property("ZG\256\007]\023", 942, False)
2316 debuginfo = property(_sk_get_debuginfo)
2317 propid2label[942] = "debuginfo"
2318 P_DEBUGINFO = 942
2320 """
2321 [OTHERS]
2322 """
2323 return self._sk_property("ZG\263\007]\023", 947, True)
2324 last_voice_error = property(_sk_get_last_voice_error)
2325 propid2label[947] = "last_voice_error"
2326 P_LAST_VOICE_ERROR = 947
2328 """
2329 [ALL] space separated tokens values: CPU_INUSE CPU_SLOW CPU_HIGH HIGH_ECHO HIGH_NOISE MUTED_INPUT LOW_INPUT MUTED_INPUT_ACTIVITY FW_STRONG FW_BAD NOT_UDP CALL_BW_LOW RECORD_ERROR + values in video debug info
2330 """
2331 return self._sk_property("ZG\265\007]\023", 949, True)
2332 quality_problems = property(_sk_get_quality_problems)
2333 propid2label[949] = "quality_problems"
2334 P_QUALITY_PROBLEMS = 949
2336 """
2337 [ALL] participant type during livesession as specified in IDENTITYTYPE
2338 """
2339 return skypekit.enumof(Skype.IDENTITYTYPE, self._sk_property("ZG\266\007]\023", 950, True))
2340 live_type = property(_sk_get_live_type)
2341 propid2label[950] = "live_type"
2342 P_LIVE_TYPE = 950
2344 """
2345 [OTHERS] participant livesession country code - used for emergency calls only atm
2346 """
2347 return self._sk_property("ZG\267\007]\023", 951, False)
2348 live_country = property(_sk_get_live_country)
2349 propid2label[951] = "live_country"
2350 P_LIVE_COUNTRY = 951
2352 """
2353 [OTHERS] Transferor identity (transferee side)
2354
2355 """
2356 return self._sk_property("ZG\270\007]\023", 952, True)
2357 transferred_by = property(_sk_get_transferred_by)
2358 propid2label[952] = "transferred_by"
2359 P_TRANSFERRED_BY = 952
2361 """
2362 [OTHERS] Identity of recipient of transfer (transferor side, caller side)
2363
2364 """
2365 return self._sk_property("ZG\271\007]\023", 953, True)
2366 transferred_to = property(_sk_get_transferred_to)
2367 propid2label[953] = "transferred_to"
2368 P_TRANSFERRED_TO = 953
2370 """
2371 [ALL] Identity of the user who added this participant to the conversation, type: Sid::String
2372
2373 """
2374 return self._sk_property("ZG\272\007]\023", 954, True)
2375 adder = property(_sk_get_adder)
2376 propid2label[954] = "adder"
2377 P_ADDER = 954
2378
2383 """
2384 Checks whether the current user can set this Participant's conversation privileges to the specified RANK. This enables you to gray out or disable in your UI all the unavailable options for Participant::SetRankTo method.
2385
2386
2387 B{Arguments:}
2388 - B{rank} - Participant::RANK value to check for.
2389
2390
2391 B{Return values:}
2392 - B{result} - Returns true if local user can set participant's rank to the value given in rank argument.
2393
2394 """
2395 l_request = skypekit.XCallRequest("ZR\023\001", 19, 1)
2396 l_request.add_parm('O', 0, self)
2397 l_request.add_parm('e', 1, Participant.RANK[rank])
2398 l_response = self.transport.xcall(l_request)
2399 l_result = l_response.get(1, False)
2400 return l_result
2401 - def SetRankTo(
2402 self,
2403 rank
2404 ):
2405 """
2406 Sets Participant's conversation privileges to the given RANK
2407
2408
2409 B{Arguments:}
2410 - B{rank} - Target Participant::RANK value.
2411
2412 """
2413 l_request = skypekit.XCallRequest("ZR\023\002", 19, 2)
2414 l_request.add_parm('O', 0, self)
2415 l_request.add_parm('e', 1, Participant.RANK[rank])
2416 self.transport.xcall(l_request)
2417 - def Ring(
2418 self,
2419 identity_to_use = "",
2420 video_call = False,
2421 nrof_redials = 0,
2422 redial_period = 0,
2423 auto_start_vm = False,
2424 origin = ""
2425 ):
2426 """
2427 Initiates live conversation attempt with Participant.
2428
2429
2430 B{Arguments:}
2431 - B{identity_to_use} - Ring an alternate identity, such as a PSTN number.
2432
2433 - B{video_call} - Enable video.
2434
2435 - B{nrof_redials} - Unused.
2436
2437 - B{redial_period} - Unused.
2438
2439 - B{auto_start_vm} - Unused. On dialog, if falling on VM, greeting and recording will be automatically started.
2440
2441 - B{origin} - When call is initiated from web link, must contain the URI that was used
2442 """
2443 l_request = skypekit.XCallRequest("ZR\023\003", 19, 3)
2444 l_request.add_parm('O', 0, self)
2445 l_request.add_parm('S', 1, identity_to_use)
2446 l_request.add_parm('b', 2, video_call)
2447 l_request.add_parm('u', 3, nrof_redials)
2448 l_request.add_parm('u', 4, redial_period)
2449 l_request.add_parm('b', 5, auto_start_vm)
2450 l_request.add_parm('S', 6, origin)
2451 self.transport.xcall(l_request)
2453 """
2454 Rings this participant, using P_LIVE_IDENTITY property if set.
2455
2456 """
2457 l_request = skypekit.XCallRequest("ZR\023\010", 19, 8)
2458 l_request.add_parm('O', 0, self)
2459 self.transport.xcall(l_request)
2464 """
2465 Sets LIVE_IDENTITY property, an alternate identity to use when ringing, such as a PSTN.
2466
2467
2468 B{Arguments:}
2469 - B{identity_to_use} - Empty string will reset it to default, i.e IDENTITY property value
2470
2471 """
2472 l_request = skypekit.XCallRequest("ZR\023\007", 19, 7)
2473 l_request.add_parm('O', 0, self)
2474 l_request.add_parm('S', 1, identity_to_use)
2475 self.transport.xcall(l_request)
2477 """
2478 Retrieves a reference to the Video object that corresponds to the Participant. It can be either local video - you can check if this participant's name (P_IDENTITY property) matches the name of the currently logged in account (P_SKYPENAME property) or incoming video from a remote participant.
2479
2480 Note that for GetVideo to be successful, the video has to be available for that participant. This can be checked for by examining Participant VIDEO_STATUS property - once it becomes VIDEO_AVAILABLE - you can use GetVideo to obtain the Video object.
2481
2482
2483 B{Return values:}
2484 - B{video} - Returns reference to a constructed video object.
2485
2486 """
2487 l_request = skypekit.XCallRequest("ZR\023\004", 19, 4)
2488 l_request.add_parm('O', 0, self)
2489 l_response = self.transport.xcall(l_request)
2490 l_result = module_id2classes[11](l_response.get(1), self.transport)
2491 return l_result
2493 """
2494 Removes this participant from the current live session. Note that this does not remove the participant from conversation (for this, use Participant::Retire). It only removes participant from live state.
2495
2496 """
2497 l_request = skypekit.XCallRequest("ZR\023\005", 19, 5)
2498 l_request.add_parm('O', 0, self)
2499 self.transport.xcall(l_request)
2501 """
2502 Forcibly removes this participant from conversation. This method is for removing other people from conversations (for example: as administrative punishment for flooding conversation with spam messages). For local user to leave a conversation, use Conversation::RetireFrom instead.
2503
2504 """
2505 l_request = skypekit.XCallRequest("ZR\023\006", 19, 6)
2506 l_request.add_parm('O', 0, self)
2507 self.transport.xcall(l_request)
2512 """
2513 This event gets fired on receiving a DTMF signal sent by Participant. Note that this event will only fire if the Participant is also using a Skype client. Skype audio library does not monitor incoming voice streams for dial tones. DTMF events are propagated to remote participants via data channel. Incoming DTMF tones transmitted from, for example, mobile phones, will not cause this event to fire. In case of incoming DTMF signals from Skype clients, DTMF tones are also inserted into the audio stream. You don't have to inject those into local audio playback yourself.
2514
2515
2516 B{Return values:}
2517 - B{dtmf} - Returns Participant::DTMF value.
2518
2519 """
2520 pass
2521 event_handlers[1] = "_sk_on_incoming_dtmf"
2527 module_id2classes[19] = Participant
2530 """
2531 The Conversation class encapsulates all types of communication possible with Skype client. Instant messaging, calls, video calls, file transfers, SMS, screen sharing - all take place within the context of a Conversation. Contacts are represented in Conversation as Participant objects. This also applies to contacts of PSTN type. All events in a conversation are represented as Message objects.
2532
2533 """
2534 event_handlers = {}
2535 propid2label = {}
2540 return "Conversation %s" % (self.object_id, )
2541 @staticmethod
2543 """ convert a property name to the enum of the property """
2544 return getattr(Conversation, "P_"+propname.upper())
2545 module_id = 18
2547 """ notifies from a property change """
2548
2549 pass
2550 TYPE = {1:'DIALOG', 'DIALOG':1, 2:'CONFERENCE', 'CONFERENCE':2, 3:'TERMINATED_CONFERENCE', 'TERMINATED_CONFERENCE':3, 4:'LEGACY_VOICE_CONFERENCE', 'LEGACY_VOICE_CONFERENCE':4, 5:'LEGACY_SHAREDGROUP', 'LEGACY_SHAREDGROUP':5}
2551 """
2552 - DIALOG - 1:1 conversations, there is a one dialog per identity
2553 - CONFERENCE - equivalent of a multichat
2554 - TERMINATED_CONFERENCE - a conference that has been terminated (disbanded chat)
2555 - LEGACY_VOICE_CONFERENCE - voice-only conference, when host is using a legacy non-conversation client
2556 - LEGACY_SHAREDGROUP - chat used for legacy shared groups, can be ignored
2557 """
2558 MY_STATUS = {
2559 1 :'CONNECTING',
2560 2 :'RETRY_CONNECTING',
2561 3 :'DOWNLOADING_MESSAGES',
2562 4 :'QUEUED_TO_ENTER',
2563 5 :'APPLICANT',
2564 6 :'APPLICATION_DENIED',
2565 7 :'INVALID_ACCESS_TOKEN',
2566 8 :'CONSUMER',
2567 9 :'RETIRED_FORCEFULLY',
2568 10:'RETIRED_VOLUNTARILY',
2569 'CONNECTING'
2570
2571
2572 : 1,
2573 'RETRY_CONNECTING'
2574
2575
2576 : 2,
2577 'DOWNLOADING_MESSAGES'
2578
2579 : 3,
2580 'QUEUED_TO_ENTER'
2581
2582
2583 : 4,
2584 'APPLICANT'
2585
2586
2587 : 5,
2588 'APPLICATION_DENIED'
2589
2590
2591 : 6,
2592 'INVALID_ACCESS_TOKEN'
2593
2594 : 7,
2595 'CONSUMER'
2596
2597
2598 : 8,
2599 'RETIRED_FORCEFULLY'
2600
2601
2602 : 9,
2603 'RETIRED_VOLUNTARILY'
2604
2605 :10
2606 }
2607 """
2608 - CONNECTING - connecting to conference
2609 - RETRY_CONNECTING
2610 - DOWNLOADING_MESSAGES - unused
2611 - QUEUED_TO_ENTER - conference is full for now, being queued
2612 - APPLICANT - I'm applying to join the conference
2613 - APPLICATION_DENIED - My application to join the conference was denied
2614 - INVALID_ACCESS_TOKEN - The password I provided is incorrect
2615 - CONSUMER - I'm part of the conference, I can participate
2616 - RETIRED_FORCEFULLY - I was kicked from the conference
2617 - RETIRED_VOLUNTARILY - I left the conference
2618 """
2619 LOCAL_LIVESTATUS = {
2620 0 :'NONE',
2621 1 :'STARTING',
2622 2 :'RINGING_FOR_ME',
2623 3 :'IM_LIVE',
2624 5 :'ON_HOLD_LOCALLY',
2625 6 :'ON_HOLD_REMOTELY',
2626 7 :'OTHERS_ARE_LIVE',
2627 11:'OTHERS_ARE_LIVE_FULL',
2628 8 :'PLAYING_VOICE_MESSAGE',
2629 9 :'RECORDING_VOICE_MESSAGE',
2630 10:'RECENTLY_LIVE',
2631 12:'TRANSFERRING',
2632 'NONE'
2633
2634
2635 : 0,
2636 'STARTING'
2637
2638
2639 : 1,
2640 'RINGING_FOR_ME'
2641
2642
2643 : 2,
2644 'IM_LIVE'
2645
2646
2647 : 3,
2648 'ON_HOLD_LOCALLY'
2649
2650
2651 : 5,
2652 'ON_HOLD_REMOTELY'
2653
2654
2655 : 6,
2656 'OTHERS_ARE_LIVE'
2657
2658
2659 : 7,
2660 'OTHERS_ARE_LIVE_FULL'
2661
2662 :11,
2663 'PLAYING_VOICE_MESSAGE'
2664
2665 : 8,
2666 'RECORDING_VOICE_MESSAGE'
2667
2668 : 9,
2669 'RECENTLY_LIVE'
2670
2671
2672 :10,
2673 'TRANSFERRING'
2674
2675
2676 :12
2677 }
2678 """
2679 - NONE - there isn't a live session
2680 - STARTING - trying to start or join a live session
2681 - RINGING_FOR_ME - there is a live session ringing
2682 - IM_LIVE - the conference is live for me
2683 - ON_HOLD_LOCALLY - I put the live session on hold
2684 - ON_HOLD_REMOTELY - the live session was put on hold by someone else
2685 - OTHERS_ARE_LIVE - there is a live session on-going, I'm not participating but I could join
2686 - OTHERS_ARE_LIVE_FULL - there is a live session on-going without me, but I can't join because it's full
2687 - PLAYING_VOICE_MESSAGE - playing a voicemail (dialog only)
2688 - RECORDING_VOICE_MESSAGE - recording a voicemail (dialog only)
2689 - RECENTLY_LIVE - a live session just finished, we stay in this state for RECENTLY_LIVE_TIMEOUT setup key
2690 - TRANSFERRING - call is being transferred
2691 """
2692 ALLOWED_ACTIVITY = {1:'SET_META', 'SET_META':1, 2:'ADD_CONSUMERS', 'ADD_CONSUMERS':2, 4:'SPEAK', 'SPEAK':4, 8:'SPEAK_AND_WRITE', 'SPEAK_AND_WRITE':8}
2693 """
2694 values for opt_admin_only_activities property
2695 - SET_META - allowed to set the CONVERSATION_META properties
2696 - ADD_CONSUMERS - allowed to add participants to the conference
2697 - SPEAK - allowed to speak, but not write
2698 - SPEAK_AND_WRITE - allowed to speak and write
2699 """
2700 PARTICIPANTFILTER = {0:'ALL', 'ALL':0, 1:'CONSUMERS', 'CONSUMERS':1, 2:'APPLICANTS', 'APPLICANTS':2, 3:'CONSUMERS_AND_APPLICANTS', 'CONSUMERS_AND_APPLICANTS':3, 4:'MYSELF', 'MYSELF':4, 5:'OTHER_CONSUMERS', 'OTHER_CONSUMERS':5}
2701 """
2702 - ALL - All participants (may included some that are RETIRED or OUTLAW, but not all of them)
2703 - CONSUMERS - Participants that can receive messages, including myself
2704 - APPLICANTS - Only people who are applying to join the conversation
2705 - CONSUMERS_AND_APPLICANTS - Consumers and applicants
2706 - MYSELF - Myself
2707 - OTHER_CONSUMERS - All consumers except myself
2708 """
2709 LIST_TYPE = {0:'ALL_CONVERSATIONS', 'ALL_CONVERSATIONS':0, 1:'INBOX_CONVERSATIONS', 'INBOX_CONVERSATIONS':1, 2:'BOOKMARKED_CONVERSATIONS', 'BOOKMARKED_CONVERSATIONS':2, 3:'LIVE_CONVERSATIONS', 'LIVE_CONVERSATIONS':3, 5:'REALLY_ALL_CONVERSATIONS', 'REALLY_ALL_CONVERSATIONS':5}
2710 """
2711 - ALL_CONVERSATIONS - bookmarked or in_inbox or live or with_meta_info or activity in last 30 days
2712 - INBOX_CONVERSATIONS - only last 6 months conversations are kept there
2713 - BOOKMARKED_CONVERSATIONS - is_bookmarked is set
2714 - LIVE_CONVERSATIONS - local_livestatus is different from NONE
2715 - REALLY_ALL_CONVERSATIONS - all conversations, without any of the limits of ALL_CONVERSATIONS
2716 """
2717
2719 """
2720 contact identity in case of dialogs, chat name in case of conferences
2721 """
2722 return self._sk_property("ZG\314\007]\022", 972, True)
2723 identity = property(_sk_get_identity)
2724 propid2label[972] = "identity"
2725 P_IDENTITY = 972
2731 type = property(_sk_get_type)
2732 propid2label[902] = "type"
2733 P_TYPE = 902
2735 """
2736 host of current live session. none => no session. myself in case of 1:1 calls
2737 """
2738 return self._sk_property("ZG\226\007]\022", 918, True)
2739 live_host = property(_sk_get_live_host)
2740 propid2label[918] = "live_host"
2741 P_LIVE_HOST = 918
2743 """
2744 moment when first participant other than host joined the current or last live session
2745 """
2746 return self._sk_property("ZG\316\007]\022", 974, True)
2747 live_start_timestamp = property(_sk_get_live_start_timestamp)
2748 propid2label[974] = "live_start_timestamp"
2749 P_LIVE_START_TIMESTAMP = 974
2751 """
2752 if live session is muted
2753 """
2754 return self._sk_property("ZG\344\007]\022", 996, True)
2755 live_is_muted = property(_sk_get_live_is_muted)
2756 propid2label[996] = "live_is_muted"
2757 P_LIVE_IS_MUTED = 996
2759 """
2760 '' everything matches, '=' nothing matches, '=string' string matches
2761 """
2762 return self._sk_property("ZG\230\007]\022", 920, True)
2763 alert_string = property(_sk_get_alert_string)
2764 propid2label[920] = "alert_string"
2765 P_ALERT_STRING = 920
2767 """
2768 if conversation is bookmarked/flagged
2769 """
2770 return self._sk_property("ZG\231\007]\022", 921, True)
2771 is_bookmarked = property(_sk_get_is_bookmarked)
2772 propid2label[921] = "is_bookmarked"
2773 P_IS_BOOKMARKED = 921
2775 """
2776 name assigned via GiveDisplayname
2777 """
2778 return self._sk_property("ZG\235\007]\022", 925, True)
2779 given_displayname = property(_sk_get_given_displayname)
2780 propid2label[925] = "given_displayname"
2781 P_GIVEN_DISPLAYNAME = 925
2783 """
2784 resulting display name of the conversation (based on given name, topic, participant list, etc)
2785 """
2786 return self._sk_property("ZG\234\007]\022", 924, True)
2787 displayname = property(_sk_get_displayname)
2788 propid2label[924] = "displayname"
2789 P_DISPLAYNAME = 924
2795 local_livestatus = property(_sk_get_local_livestatus)
2796 propid2label[927] = "local_livestatus"
2797 P_LOCAL_LIVESTATUS = 927
2799 """
2800 timestamp to sort the conversations in inbox by. 0 means not in inbox
2801 """
2802 return self._sk_property("ZG\240\007]\022", 928, True)
2803 inbox_timestamp = property(_sk_get_inbox_timestamp)
2804 propid2label[928] = "inbox_timestamp"
2805 P_INBOX_TIMESTAMP = 928
2807 """
2808 ID of the message that caused INBOX_TIMESTAMP to be set
2809 """
2810 return module_id2classes[9](self._sk_property("ZG\315\007]\022",
2811 973, True), self.transport)
2812 inbox_message_id = property(_sk_get_inbox_message_id)
2813 propid2label[973] = "inbox_message_id"
2814 P_INBOX_MESSAGE_ID = 973
2816 """
2817 number of messages in UNCONSUMED_SUPPRESSED consumption status
2818 """
2819 return self._sk_property("ZG\317\007]\022", 975, True)
2820 unconsumed_suppressed_messages = property(_sk_get_unconsumed_suppressed_messages)
2821 propid2label[975] = "unconsumed_suppressed_messages"
2822 P_UNCONSUMED_SUPPRESSED_MESSAGES = 975
2824 """
2825 number of messages in UNCONSUMED_NORMAL consumption status
2826 """
2827 return self._sk_property("ZG\320\007]\022", 976, True)
2828 unconsumed_normal_messages = property(_sk_get_unconsumed_normal_messages)
2829 propid2label[976] = "unconsumed_normal_messages"
2830 P_UNCONSUMED_NORMAL_MESSAGES = 976
2832 """
2833 DEPRECATED, not set anymore
2834 """
2835 return self._sk_property("ZG\321\007]\022", 977, True)
2836 unconsumed_elevated_messages = property(_sk_get_unconsumed_elevated_messages)
2837 propid2label[977] = "unconsumed_elevated_messages"
2838 P_UNCONSUMED_ELEVATED_MESSAGES = 977
2840 """
2841 if there are unconsumed voice or call messages in the conversation
2842 """
2843 return self._sk_property("ZG\312\007]\022", 970, True)
2844 unconsumed_messages_voice = property(_sk_get_unconsumed_messages_voice)
2845 propid2label[970] = "unconsumed_messages_voice"
2846 P_UNCONSUMED_MESSAGES_VOICE = 970
2848 """
2849 ID of voice message that is being played or recorded in this conversation
2850 """
2851 return module_id2classes[7](self._sk_property("ZG\313\007]\022",
2852 971, True), self.transport)
2853 active_vm_id = property(_sk_get_active_vm_id)
2854 propid2label[971] = "active_vm_id"
2855 P_ACTIVE_VM_ID = 971
2857 """
2858 consumption cutoff timestamp: messages after (but not including) this are considered unconsumed
2859 """
2860 return self._sk_property("ZG\323\007]\022", 979, True)
2861 consumption_horizon = property(_sk_get_consumption_horizon)
2862 propid2label[979] = "consumption_horizon"
2863 P_CONSUMPTION_HORIZON = 979
2865 """
2866 timestamp of last activity in conversation
2867 """
2868 return self._sk_property("ZG\325\007]\022", 981, True)
2869 last_activity_timestamp = property(_sk_get_last_activity_timestamp)
2870 propid2label[981] = "last_activity_timestamp"
2871 P_LAST_ACTIVITY_TIMESTAMP = 981
2873 """
2874 dialog this conference was spawned from
2875 """
2876 return module_id2classes[18](self._sk_property("ZG\223\007]\022",
2877 915, True), self.transport)
2878 spawned_from_convo_id = property(_sk_get_spawned_from_convo_id)
2879 propid2label[915] = "spawned_from_convo_id"
2880 P_SPAWNED_FROM_CONVO_ID = 915
2882 """
2883 identity of conversation creator (doesn't apply to dialogs)
2884 """
2885 return self._sk_property("ZG\207\007]\022", 903, True)
2886 creator = property(_sk_get_creator)
2887 propid2label[903] = "creator"
2888 P_CREATOR = 903
2890 """
2891 timestamp of creation (doesn't apply to dialogs)
2892 """
2893 return self._sk_property("ZG\210\007]\022", 904, True)
2894 creation_timestamp = property(_sk_get_creation_timestamp)
2895 propid2label[904] = "creation_timestamp"
2896 P_CREATION_TIMESTAMP = 904
2898 """
2899 my status in this conversation (connecting, participating, retired, etc) (doesn't apply to dialogs)
2900 """
2901 return skypekit.enumof(Conversation.MY_STATUS, self._sk_property("ZG\227\007]\022", 919, True))
2902 my_status = property(_sk_get_my_status)
2903 propid2label[919] = "my_status"
2904 P_MY_STATUS = 919
2906 """
2907 if it's a public conversation (doesn't apply to dialogs)
2908 """
2909 return self._sk_property("ZG\232\007]\022", 922, True)
2910 opt_joining_enabled = property(_sk_get_opt_joining_enabled)
2911 propid2label[922] = "opt_joining_enabled"
2912 P_OPT_JOINING_ENABLED = 922
2914 """
2915 rank that is auto-assigned at join (doesn't apply to dialogs)
2916 """
2917 return skypekit.enumof(Participant.RANK, self._sk_property("ZG\212\007]\022", 906, True))
2918 opt_entry_level_rank = property(_sk_get_opt_entry_level_rank)
2919 propid2label[906] = "opt_entry_level_rank"
2920 P_OPT_ENTRY_LEVEL_RANK = 906
2922 """
2923 if history visible to new consumers (doesn't apply to dialogs)
2924 """
2925 return self._sk_property("ZG\213\007]\022", 907, True)
2926 opt_disclose_history = property(_sk_get_opt_disclose_history)
2927 propid2label[907] = "opt_disclose_history"
2928 P_OPT_DISCLOSE_HISTORY = 907
2930 """
2931 activities that only ADMIN can do. Bitmap of ALLOWED_ACTIVITY values (doesn't apply to dialogs)
2932 """
2933 return self._sk_property("ZG\215\007]\022", 909, True)
2934 opt_admin_only_activities = property(_sk_get_opt_admin_only_activities)
2935 propid2label[909] = "opt_admin_only_activities"
2936 P_OPT_ADMIN_ONLY_ACTIVITIES = 909
2938 """
2939 public conversation password hint, use SetPassword to set (doesn't apply to dialogs)
2940 """
2941 return self._sk_property("ZG\324\007]\022", 980, True)
2942 passwordhint = property(_sk_get_passwordhint)
2943 propid2label[980] = "passwordhint"
2944 P_PASSWORDHINT = 980
2950 meta_name = property(_sk_get_meta_name)
2951 propid2label[910] = "meta_name"
2952 P_META_NAME = 910
2958 meta_topic = property(_sk_get_meta_topic)
2959 propid2label[911] = "meta_topic"
2960 P_META_TOPIC = 911
2966 meta_guidelines = property(_sk_get_meta_guidelines)
2967 propid2label[913] = "meta_guidelines"
2968 P_META_GUIDELINES = 913
2974 meta_picture = property(_sk_get_meta_picture)
2975 propid2label[914] = "meta_picture"
2976 P_META_PICTURE = 914
2977
2978 SETUPKEY_ENABLE_BIRTHDAY_NOTIFICATION = "Lib/Conversation/EnableBirthday"
2979 SETUPKEY_INBOX_UPDATE_TIMEOUT = "Lib/Conversation/InboxUpdateTimeout"
2980 SETUPKEY_RECENTLY_LIVE_TIMEOUT = "Lib/Conversation/RecentlyLiveTimeout"
2981 SETUPKEY_DISABLE_CHAT = "Lib/Chat/DisableChat"
2982 SETUPKEY_DISABLE_CHAT_HISTORY = "Lib/Message/DisableHistory"
2983 SETUPKEY_CHAT_HISTORY_DAYS = "Lib/Chat/HistoryDays"
2984 SETUPKEY_CHATDB_LIMIT_KB = "Lib/Chat/ChatDBLimitKb"
2985 SETUPKEY_DISABLE_CHAT_ACTIVITY_INDICATION = "Lib/Chat/DisableActivityIndication"
2986 SETUPKEY_CALL_NOANSWER_TIMEOUT = "Lib/Call/NoAnswerTimeout"
2987 SETUPKEY_CALL_SEND_TO_VM = "Lib/Call/SendToVM"
2988 SETUPKEY_CALL_APPLY_CF = "Lib/Call/ApplyCF"
2989 SETUPKEY_CALL_EMERGENCY_COUNTRY = "Lib/Call/EmergencyCountry"
2990 - def SetOption(
2991 self,
2992 prop_key,
2993 value
2994 ):
2995 """
2996 Setter method for Conversation option properties. Option properties are all Conversation properties starting with OPT_ prefix.
2997
2998
2999 B{Arguments:}
3000 - B{prop_key} - Conversation property key, for example: Conversation::OPT_JOINING_ENABLED
3001
3002 - B{value} - New value for the option property.
3003
3004 """
3005 l_request = skypekit.XCallRequest("ZR\022\001", 18, 1)
3006 l_request.add_parm('O', 0, self)
3007 l_request.add_parm('e', 1, prop_key)
3008 l_request.add_parm('u', 2, value)
3009 self.transport.xcall(l_request)
3010 - def SetTopic(
3011 self,
3012 topic,
3013 is_xml = False
3014 ):
3015 """
3016 Setter for Conversation class META_TOPIC. This topic will be set for remote participants as well.
3017
3018
3019 B{Arguments:}
3020 - B{topic} - New conversation topic.
3021
3022 - B{is_xml} - Notifies remote UIs that the new topic contains xml tags.
3023
3024 """
3025 l_request = skypekit.XCallRequest("ZR\022\002", 18, 2)
3026 l_request.add_parm('O', 0, self)
3027 l_request.add_parm('S', 1, topic)
3028 l_request.add_parm('b', 2, is_xml)
3029 self.transport.xcall(l_request)
3030 - def SetGuidelines(
3031 self,
3032 guidelines,
3033 is_xml = False
3034 ):
3035 """
3036 Setter for Conversation META_GUIDELINES. This property will be visible to remote participants of the conversation.
3037
3038
3039 B{Arguments:}
3040 - B{guidelines} - New value for the META_GUIDELINES property.
3041
3042 - B{is_xml} - Set true to notify remote UIs that the new guideline contains XML tags.
3043
3044 """
3045 l_request = skypekit.XCallRequest("ZR\022\003", 18, 3)
3046 l_request.add_parm('O', 0, self)
3047 l_request.add_parm('S', 1, guidelines)
3048 l_request.add_parm('b', 2, is_xml)
3049 self.transport.xcall(l_request)
3054 """
3055 Sets the conversation's avatar to the specified JPEG image, which is propagated to both local and remote participants. Before calling this method, you should use Skype::ValidateAvatar to verify that jpeg references a valid JPEG image.
3056
3057
3058 B{Arguments:}
3059 - B{jpeg} - Conversation avatar binary.
3060
3061 """
3062 l_request = skypekit.XCallRequest("ZR\022\004", 18, 4)
3063 l_request.add_parm('O', 0, self)
3064 l_request.add_parm('B', 1, jpeg)
3065 self.transport.xcall(l_request)
3070 """
3071 When called from dialog conversation, this spawns a new conversation, with existing two dialog participants plus new contact identities given in the identitiesToAdd list. You do not need to add existing dialog participants to the string list. In fact, passing only the existing participants in the identities list will cause the method call to fail (return false), the same as if the list was empty. This method will also return false if the original conversation was not a dialog (contained more than two participants). Also note that this method always creates a new Conversation - even if a conversation with exactly the same participant list existed before.
3072
3073
3074 B{Arguments:}
3075 - B{identities_to_add} - String list of additional participant identities. You do not need to add existing two participants from the original dialog to this list.
3076
3077
3078 B{Return values:}
3079 - B{conference} - Returns the resulting conversation or 0 if the method call failed.
3080
3081 """
3082 l_request = skypekit.XCallRequest("ZR\022\006", 18, 6)
3083 l_request.add_parm('O', 0, self)
3084 l_request.add_parm('S', 1, identities_to_add)
3085 l_response = self.transport.xcall(l_request)
3086 l_result = module_id2classes[18](l_response.get(1), self.transport)
3087 return l_result
3092 """
3093 Takes one or more Contact identities and creates corresponding Participant objects within the context of this Conversation, which must be of type CONFERENCE. If you have an existing dialog conversation, use SpawnConference instead.
3094
3095
3096 B{Arguments:}
3097 - B{identities} - Contact identities to be added to the Conversation.
3098
3099 """
3100 l_request = skypekit.XCallRequest("ZR\022\007", 18, 7)
3101 l_request.add_parm('O', 0, self)
3102 l_request.add_parm('S', 1, identities)
3103 self.transport.xcall(l_request)
3104 - def Assimilate(
3105 self,
3106 other_conversation
3107 ):
3108 """
3109 Merges two live conversations. For example, if the user already has a live conversation up - let's call it conversation A. Then a new incoming call occurs - another conversation obtains LOCAL_LIVESTATUS == Conversation::RINGING_FOR_ME, let's call it conversation B. The user wishes to pick up the new incoming call and add it to the existing one. For this you can first call B->JoinLiveSession and then merge two calls with A->Assimilate(B, A). The second argument will return the merged conversation. Note that there are actually three conversation objects involved: A (before merge), B and C (after the merge). Normally it would make sense to have the first conversation (A) as the second argument, so that it gets overwritten with the assimilation result.
3110
3111
3112 B{Arguments:}
3113 - B{other_conversation} - The new conversation to be merged with the one already in live state.
3114
3115
3116 B{Return values:}
3117 - B{conversation} - Returns a 3rd live conversation, result of merging two existing ones.
3118
3119 """
3120 l_request = skypekit.XCallRequest("ZR\022\011", 18, 9)
3121 l_request.add_parm('O', 0, self)
3122 l_request.add_parm('O', 1, other_conversation)
3123 l_response = self.transport.xcall(l_request)
3124 l_result = module_id2classes[18](l_response.get(1), self.transport)
3125 return l_result
3130 """
3131 starts, answers or joins a live session (first one to join becomes LIVE_HOST)
3132
3133 B{Arguments:}
3134 - B{access_token} - if starting a live session, allows to set a custom access token
3135 """
3136 l_request = skypekit.XCallRequest("ZR\022\012", 18, 10)
3137 l_request.add_parm('O', 0, self)
3138 l_request.add_parm('S', 1, access_token)
3139 self.transport.xcall(l_request)
3140 - def RingOthers(
3141 self,
3142 identities = [],
3143 video_call = False,
3144 origin = ""
3145 ):
3146 """
3147 This is an alternative to calling Ring method for each Participant individually. This also works with dialogs (with identities containing only one item).
3148
3149
3150 B{Arguments:}
3151 - B{identities} - List of Participants to ring. Leaving the list empty will result in ringing all participants of at least speaker level.
3152
3153 - B{video_call} - If true, indicates that we want to do a video call (video still needs to be separately enabled)
3154
3155 - B{origin} - When call is initiated from web link, this argument must contain the URI that was used
3156
3157 """
3158 l_request = skypekit.XCallRequest("ZR\022$", 18, 36)
3159 l_request.add_parm('O', 0, self)
3160 l_request.add_parm('S', 1, identities)
3161 l_request.add_parm('b', 2, video_call)
3162 l_request.add_parm('S', 3, origin)
3163 self.transport.xcall(l_request)
3165 """
3166 Sets VOICE_STATUS to LISTENING in the Participant instance associated with us, causing any input from our microphone to be ignored. This is a Conversation class method, rather than Participant class, because this only applies to local participant.
3167
3168 """
3169 l_request = skypekit.XCallRequest("ZR\022\013", 18, 11)
3170 l_request.add_parm('O', 0, self)
3171 self.transport.xcall(l_request)
3173 """
3174 Sets VOICE_STATUS to SPEAKING in the Participant instance associated with us, causing any input from our microphone to be sent to the call host. This is a Conversation class method, rather than Participant class, because this only applies to local participant.
3175
3176 """
3177 l_request = skypekit.XCallRequest("ZR\022\014", 18, 12)
3178 l_request.add_parm('O', 0, self)
3179 self.transport.xcall(l_request)
3181 """
3182 Puts the conversation on hold - Conversation LOCAL_LIVESTATUS changes to ON_HOLD_LOCALLY and to ON_HOLD_REMOTELY for remote participants.
3183
3184 """
3185 l_request = skypekit.XCallRequest("ZR\022\015", 18, 13)
3186 l_request.add_parm('O', 0, self)
3187 self.transport.xcall(l_request)
3189 """
3190 Resumes call from local hold.
3191
3192 """
3193 l_request = skypekit.XCallRequest("ZR\022\016", 18, 14)
3194 l_request.add_parm('O', 0, self)
3195 self.transport.xcall(l_request)
3200 """
3201 Hang up or refuse to answer an incoming call. Set postVoiceAutoresponse to true to enable a caller to leave a voicemail message.
3202
3203
3204 B{Arguments:}
3205 - B{post_voice_autoresponse}
3206 """
3207 l_request = skypekit.XCallRequest("ZR\022\017", 18, 15)
3208 l_request.add_parm('O', 0, self)
3209 l_request.add_parm('b', 1, post_voice_autoresponse)
3210 self.transport.xcall(l_request)
3212 """
3213 Begin recording a voice mail for this conversation's remote participant. Applies to conversations of type DIALOG only.
3214
3215 """
3216 l_request = skypekit.XCallRequest("ZR\022-", 18, 45)
3217 l_request.add_parm('O', 0, self)
3218 self.transport.xcall(l_request)
3224 """
3225 This method is for doing call transfers. NB! Call transfers only work in one-on-one conversations (dialogs). Before attempting call transfer, you should check availability of transfer recipients with Conversation class CanTransferLiveSession method. If the current conversation has a live session up, that session (call) will be transferred to targets specified in the identities list. Note that identities is a string list - all identities in that list will get incoming calls. The first one of them to pick up the call - wins, and rest of the transfer targets will stop ringing.
3226
3227 Let's take a closer look how this works in practice. We have three call participants involved in the process, and two separate conversations. Let there be three callers: Caller A (call originator), Caller B (transferor) and Caller C (recipient of transfer).
3228
3229
3230 - Caller A - calls Caller B; Caller B picks up the call - live conversation C1 is now up with A and B in it.
3231
3232 - After awhile, Caller B initiates call transfers to Caller C (and optionally to Callers D, E, F.. ). LOCAL_LIVESTATUS of C1 will get set to TRANSFERRING for both A and B.
3233
3234 - Caller C picks up the call. Conversation C1 will go off live status. For Caller B, conversation C1 LOCAL_LIVESTATUS will change to RECENTLY_LIVE. Another live conversation - C2 gets spawned, with Caller A and Caller C in it. For caller C, participant object representing caller A will have TRANSFERRED_BY property set to identity of caller A. For Caller B (in now no longer live conversation C1), participant object representing caller A gets its TRANSFERRED_TO property set to identity of caller C.
3235
3236
3237 B{Arguments:}
3238 - B{identities} - String list of transfer target identities. As soon as first one in this list picks up the call, others will stop ringing.
3239
3240 - B{transfer_topic} - Optional conversation topic. This value will get set as META_TOPIC property of the conversation at the transferee end. Note that this is the only case where META_TOPIC field is used in context of dialog conversations. Thus assumption that remote UI will display topic field in case of dialogs may not be 100% correct.
3241
3242 """
3243 l_request = skypekit.XCallRequest("ZR\022(", 18, 40)
3244 l_request.add_parm('O', 0, self)
3245 l_request.add_parm('S', 1, identities)
3246 l_request.add_parm('S', 2, transfer_topic)
3247 self.transport.xcall(l_request)
3252 """
3253 Checks if the identity is available for receiving a transferred live session. If you are going to attempt to go for multiple transfer targets, you should use this check for all the target identities.
3254
3255
3256 B{Arguments:}
3257 - B{identity} - Target identity.
3258
3259
3260 B{Return values:}
3261 - B{result} - Returns true if call transfer to given target is possible.
3262
3263 """
3264 l_request = skypekit.XCallRequest("ZR\022.", 18, 46)
3265 l_request.add_parm('O', 0, self)
3266 l_request.add_parm('S', 1, identity)
3267 l_response = self.transport.xcall(l_request)
3268 l_result = l_response.get(1, False)
3269 return l_result
3270 - def SendDTMF(
3271 self,
3272 dtmf,
3273 length_in_ms = 260
3274 ):
3275 """
3276 Sends DTMF tone to a live conversation.
3277
3278
3279 B{Arguments:}
3280 - B{dtmf} - Outgoing dtmf tone, possible values come from Participant::DTMF enumerator.
3281
3282 - B{length_in_ms} - Duration in milliseconds. Defaults to 260 ms. Note that the DTMF tone can be also cancelled with Conversation::StopSendDTMF method.
3283
3284 """
3285 l_request = skypekit.XCallRequest("ZR\022\020", 18, 16)
3286 l_request.add_parm('O', 0, self)
3287 l_request.add_parm('e', 1, Participant.DTMF[dtmf])
3288 l_request.add_parm('u', 2, length_in_ms)
3289 self.transport.xcall(l_request)
3291 """
3292 Stops the current DTMF tone being played into conversation. For example, use this method to cancel DTMF signals started with Conversation::SendDTMF before the duration given in lengthInMS runs out.
3293
3294 """
3295 l_request = skypekit.XCallRequest("ZR\022\060", 18, 48)
3296 l_request.add_parm('O', 0, self)
3297 self.transport.xcall(l_request)
3298 - def SetMyTextStatusTo(
3299 self,
3300 status
3301 ):
3302 """
3303 Sets local user typing indicator in the Conversation. Remote Participants can display these in their UI.
3304
3305
3306 B{Arguments:}
3307 - B{status} - Typing indicator status value - Participant::TEXT_STATUS
3308
3309 """
3310 l_request = skypekit.XCallRequest("ZR\022\022", 18, 18)
3311 l_request.add_parm('O', 0, self)
3312 l_request.add_parm('e', 1, Participant.TEXT_STATUS[status])
3313 self.transport.xcall(l_request)
3314 - def PostText(
3315 self,
3316 text,
3317 is_xml = False
3318 ):
3319 """
3320 Posts the specified text the conversation, and populates message with a reference to the corresponding Message object (if no error occurred during execution). The isXML argument can be used if the client UI has already taken care of converting message text to xml (for example, your UI might enable users to use bold tags in text messages.)
3321
3322
3323 B{Arguments:}
3324 - B{text} - Text value of the outgoing message (gets set as BODY_XML property of the Message object).
3325
3326 - B{is_xml} - For cases where the text argument was already encoded as xml message.
3327
3328
3329 B{Return values:}
3330 - B{message} - Returns the Message object created as a result of this method (if successful).
3331
3332 """
3333 l_request = skypekit.XCallRequest("ZR\022\023", 18, 19)
3334 l_request.add_parm('O', 0, self)
3335 l_request.add_parm('S', 1, text)
3336 l_request.add_parm('b', 2, is_xml)
3337 l_response = self.transport.xcall(l_request)
3338 l_result = module_id2classes[9](l_response.get(1), self.transport)
3339 return l_result
3344 """
3345 Takes a list of Contacts as an argument and posts the list into the Conversation. The purpose of this feature is to enable sharing contacts between users, without resorting to contact search. Instead, if user A has contacts B and C, he can post contact C into chat with contact B. At this point, Contact B can add contact C to his contact list. From remote side, the posted contacts will appear as messages with type Message::POSTED_CONTACTS appearing in the conversation. The UI should allow adding these contacts from messages with this type into the contact list.
3346
3347 The list of posted contacts can be retrieved with the Message::GetContacts method.
3348
3349 Additionally, the UI then can parse the posted Contact data out of the Message::P_BODY_XML property. The list of contacts is wrapped between <contacts ..> </contacts> tags. Each contact item in the xml has following format:
3350
3351 - t - contact type. "s" - skype contact; "p" - phone number;
3352
3353 - s - skypename, present only in skypename contacts (t="s")
3354
3355 - p - phone number, present only in phone number contacts (t="p")
3356
3357 - f - contact's full name, if available
3358
3359 - d - contact's display name, if available
3360
3361 Note that only the type (t) field is mandatory. Depending on type, either skypename (s) or phone number (p) fields are always present. Full name and display name fields are optional.
3362
3363 Example BODY_XML with skypname contact:
3364 ::
3365
3366 <contacts alt="alt text"><c t="s" s="skypename" f="full name"/></contacts>
3367
3368
3369 Example BODY_XML with PSTN contact:
3370 ::
3371
3372 <contacts alt="alt text"><c t="p" p="+37212345678" d="Some PSTN number"/></contacts>
3373
3374
3375 Example BODY_XML with multiple contacts:
3376 ::
3377
3378 <contacts alt="alt text"><c t="p" p="+37212345678" d="Some PSTN number"/><c t="s" s="someskypename"/></contacts>
3379
3380
3381
3382 B{Arguments:}
3383 - B{contacts} - List of Contact objects, to be posted in the conversation.
3384
3385 """
3386 l_request = skypekit.XCallRequest("ZR\022\024", 18, 20)
3387 l_request.add_parm('O', 0, self)
3388 l_request.add_parm('O', 1, contacts)
3389 self.transport.xcall(l_request)
3390 - def PostFiles(
3391 self,
3392 paths,
3393 body
3394 ):
3395 """
3396 Takes a list of fully-qualified filenames and initiates corresponding file transfers in the conversation. From the remote side, incoming file transfers will appear as a conversation message with type POSTED_FILES. Once such a message is detected, the list of file transfer objects can be retrieved with Message::GetTransfers. At that point, remote participants will need to accept or decline those transfers.
3397
3398
3399 B{Arguments:}
3400 - B{paths} - list of fully-qualified filenames to be transferred
3401
3402 - B{body} - Optional BODY_XML property for POSTED_FILES type messages that show up in remote UI.
3403
3404
3405 B{Return values:}
3406 - B{error_code} - Error code, possible values come from the TRANSFER_SENDFILE_ERROR enumerator. This will be set for the first failed fail. The failed file is identified in the error_file return argument.
3407
3408 - B{error_file} - Filename of the file that triggered error.
3409
3410 """
3411 l_request = skypekit.XCallRequest("ZR\022\025", 18, 21)
3412 l_request.add_parm('O', 0, self)
3413 l_request.add_parm('f', 1, paths)
3414 l_request.add_parm('S', 2, body)
3415 l_response = self.transport.xcall(l_request)
3416 l_result = (skypekit.enumof(Skype.TRANSFER_SENDFILE_ERROR, l_response.get(1))),
3417 l_result += (l_response.get(2, '')),
3418 return l_result
3419 - def PostVoiceMessage(
3420 self,
3421 voicemail,
3422 body
3423 ):
3424 """
3425 Stops the active voicemail recording and sends it (dialog only)
3426
3427 B{Arguments:}
3428 - B{voicemail} - This argument is deprecated as of SDK version 3.2. Instead of manually constructing Voicemail object, you can call Conversation::StartVoiceMessage method to start recording a voicemail in context of a dialog. PostVoiceMessage will stop recording this voicemail and post it in the dialog. If instead of sending Voicemail, the user decides to cancel it, you should use Conversation::LeaveLiveSession method (Voicemail::Cancel is deprecated).
3429
3430 - B{body} - Optional text message that remote UI can display in conversation, to notify the user of a new voicemail.
3431
3432 """
3433 l_request = skypekit.XCallRequest("ZR\022\026", 18, 22)
3434 l_request.add_parm('O', 0, self)
3435 l_request.add_parm('O', 1, voicemail)
3436 l_request.add_parm('S', 2, body)
3437 self.transport.xcall(l_request)
3438 - def PostSMS(
3439 self,
3440 sms,
3441 body
3442 ):
3443 """
3444 Takes an SMS instance created by Skype::CreateOutgoingSms and posts it in the conversation. Note that you will need to set both Sms body text (Sms::SetBody) and recipient list (Sms::SetTargets) before you can post the object.
3445
3446
3447 B{Arguments:}
3448 - B{sms} - SMS object.
3449
3450 - B{body} - This argument is currently ignored. The message text needs to be set with Sms::SetBody method, prior to passing the Sms object to this method
3451
3452 """
3453 l_request = skypekit.XCallRequest("ZR\022\027", 18, 23)
3454 l_request.add_parm('O', 0, self)
3455 l_request.add_parm('O', 1, sms)
3456 l_request.add_parm('S', 2, body)
3457 self.transport.xcall(l_request)
3459 """
3460 Retrieves a binary join blob for joining public conversations, which are always of type CONFERENCE. If called for a dialog, the blob argument will contain the empty string. The best way to create a Public Chat is to first create a fresh conversation with Skype class CreateConference, then minimally apply the public chat options OPT_JOINING_ENABLED and OPT_ENTRY_LEVEL_RANK - options, like this (C++):
3461 ::
3462
3463 C->SetOption(Conversation::OPT_JOINING_ENABLED, true);
3464
3465
3466 When that is done, you can call GetJoinBlob to retrieve the blob string. Use the blob string to generate and post an HTML link whose href attribute looks like this: href="skype:?chat&blob=_BLOB_GOES_HERE" A person running Skype desktop client can click this link to join the conversation and have that conversation opened in his UI. Note that the conversation host (creator) needs to be online for new joiners-via-link to start participating in the Public Chat.
3467
3468 B{Return values:}
3469 - B{blob} - Returns the public conversation join blob.
3470
3471 """
3472 l_request = skypekit.XCallRequest("ZR\022\030", 18, 24)
3473 l_request.add_parm('O', 0, self)
3474 l_response = self.transport.xcall(l_request)
3475 l_result = l_response.get(1, '')
3476 return l_result
3478 """
3479 Tries to join a public conversation (aka public chat). This method is only useful if you have used Skype::GetConversationByBlob method with alsoJoin argument set to false.
3480
3481 """
3482 l_request = skypekit.XCallRequest("ZR\022\031", 18, 25)
3483 l_request.add_parm('O', 0, self)
3484 self.transport.xcall(l_request)
3489 """
3490 Submits password for joining password-protected conversation.
3491
3492
3493 B{Arguments:}
3494 - B{password} - Password string.
3495
3496 """
3497 l_request = skypekit.XCallRequest("ZR\022\032", 18, 26)
3498 l_request.add_parm('O', 0, self)
3499 l_request.add_parm('S', 1, password)
3500 self.transport.xcall(l_request)
3501 - def SetPassword(
3502 self,
3503 password,
3504 hint
3505 ):
3506 """
3507 Sets password protection/new password for the conversation.
3508
3509
3510 B{Arguments:}
3511 - B{password} - New password.
3512
3513 - B{hint} - Password hint.
3514
3515 """
3516 l_request = skypekit.XCallRequest("ZR\022\033", 18, 27)
3517 l_request.add_parm('O', 0, self)
3518 l_request.add_parm('S', 1, password)
3519 l_request.add_parm('S', 2, hint)
3520 self.transport.xcall(l_request)
3522 """
3523 Leaves the conference. Not applicable to dialogs.
3524
3525 """
3526 l_request = skypekit.XCallRequest("ZR\022\034", 18, 28)
3527 l_request.add_parm('O', 0, self)
3528 self.transport.xcall(l_request)
3530 """
3531 Deletes this conversation, which must be of type CONFERENCE - dialogs between local user and any of his contacts are always persistant. Note that this also removes corresponding Message and Participant objects.
3532
3533 """
3534 l_request = skypekit.XCallRequest("ZR\022/", 18, 47)
3535 l_request.add_parm('O', 0, self)
3536 self.transport.xcall(l_request)
3537 - def RenameTo(
3538 self,
3539 name
3540 ):
3541 """
3542 Changes the META_NAME property of the conversation. Note that unlike topic and guidelines, this rename is just local - remote participants can have their own private names for conversations.
3543
3544
3545 B{Arguments:}
3546 - B{name} - New name for the conversation. Passing an empty string in this argument causes the META_NAME to unset.
3547
3548 """
3549 l_request = skypekit.XCallRequest("ZR\022\035", 18, 29)
3550 l_request.add_parm('O', 0, self)
3551 l_request.add_parm('S', 1, name)
3552 self.transport.xcall(l_request)
3557 """
3558 Setter for Conversation class IS_BOOKMARKED.
3559
3560
3561 B{Arguments:}
3562 - B{bookmark} - Set true to set the bookmark, false to remove the bookmark.
3563
3564 """
3565 l_request = skypekit.XCallRequest("ZR\022\036", 18, 30)
3566 l_request.add_parm('O', 0, self)
3567 l_request.add_parm('b', 1, bookmark)
3568 self.transport.xcall(l_request)
3573 """
3574 Setter for Conversation class ALERT_STRING property. The main use of this property is checking bodies of incoming messages in the conversation for the alert string and producing notifications in UI for the user, when appropriate.
3575
3576
3577 B{Arguments:}
3578 - B{alert_string} - Substring to check in BODY_XML property of incoming messages.
3579
3580 """
3581 l_request = skypekit.XCallRequest("ZR\022\037", 18, 31)
3582 l_request.add_parm('O', 0, self)
3583 l_request.add_parm('S', 1, alert_string)
3584 self.transport.xcall(l_request)
3586 """
3587 Removes conversation from Inbox.
3588
3589 """
3590 l_request = skypekit.XCallRequest("ZR\022 ", 18, 32)
3591 l_request.add_parm('O', 0, self)
3592 self.transport.xcall(l_request)
3593 - def AddToInbox(
3594 self,
3595 timestamp = 0
3596 ):
3597 """
3598 Sets Conversation inbox_timestamp property. If the timestamp argument is left empty or is greater than conversation consumption horizon, then the conversation will be restored to the inbox.
3599
3600
3601 B{Arguments:}
3602 - B{timestamp} - If left empty or set to 0, the inbox_timestamp property is set to current time.
3603
3604 """
3605 l_request = skypekit.XCallRequest("ZR\022!", 18, 33)
3606 l_request.add_parm('O', 0, self)
3607 l_request.add_parm('u', 1, timestamp)
3608 self.transport.xcall(l_request)
3614 """
3615 This method can be used to set the consumption (read) status of messages in the conversation. It sets Message::CONSUMPTION_STATUS to Message::CONSUMED for all messages in the conversation, older than the given timestamp. If the second argument is set to true, it also modifies messages more recent than the timestamp, by marking them as unconsumed.
3616
3617
3618 B{Arguments:}
3619 - B{timestamp} - Consumption cutoff timestamp. Setting this to current time will mark all messages in the conversation as consumed.
3620
3621 - B{also_unconsume} - If set to true, this also marks messages newer than the cutoff timestamp as unconsumed. For example, setting timestamp to 0 and also_unconsumed to true, will unconsume all messages in the conversation.
3622
3623 """
3624 l_request = skypekit.XCallRequest("ZR\022\042", 18, 34)
3625 l_request.add_parm('O', 0, self)
3626 l_request.add_parm('u', 1, timestamp)
3627 l_request.add_parm('b', 2, also_unconsume)
3628 self.transport.xcall(l_request)
3630 """
3631 sets consumption horizon to last inbox message id timestamp
3632 """
3633 l_request = skypekit.XCallRequest("ZR\022#", 18, 35)
3634 l_request.add_parm('O', 0, self)
3635 self.transport.xcall(l_request)
3640 """
3641 Checks if the conversation is a member of the given ContactGroup
3642
3643
3644 B{Arguments:}
3645 - B{group} - ContactGroup
3646
3647
3648 B{Return values:}
3649 - B{result} - True if this conversation is a member of the ContactGroup specified by the group argument contains the conversation
3650
3651 """
3652 l_request = skypekit.XCallRequest("ZR\022%", 18, 37)
3653 l_request.add_parm('O', 0, self)
3654 l_request.add_parm('O', 1, group)
3655 l_response = self.transport.xcall(l_request)
3656 l_result = l_response.get(1, False)
3657 return l_result
3662 """
3663 Retrieves the list of this conversation's current participants, which you can optionally request to be filtered. If no Participants pass the filter, an empty list will be returned (the method itself still returns true).
3664
3665
3666 B{Arguments:}
3667 - B{filter} - Conversation::PARTICIPANTFILTER - defaults to Conversation::ALL
3668
3669
3670 B{Return values:}
3671 - B{participants} - List of conversation Participant objects that passed the filter.
3672
3673 """
3674 l_request = skypekit.XCallRequest("ZR\022&", 18, 38)
3675 l_request.add_parm('O', 0, self)
3676 l_request.add_parm('e', 1, Conversation.PARTICIPANTFILTER[filter])
3677 l_response = self.transport.xcall(l_request)
3678 l_result = [module_id2classes[19](oid, self.transport) for oid in l_response.get(1, [])]
3679 return l_result
3684 """
3685 Returns recent messages. The messages are returned in two lists - new messages (unconsumed) and recent message history (context messages). The context message list contains messages that are already above the consumption horizon but are fairly recent, making it likely that displaying them in UI would be good default behaviour.
3686
3687
3688 B{Arguments:}
3689 - B{require_timestamp} - If set to a non-zero value, includes messages no earlier than this timestamp, if not, includes messages from the last 24 hours only
3690
3691
3692 B{Return values:}
3693 - B{context_messages} - Already consumed messages, provided for context
3694 - B{unconsumed_messages} - Unconsumed messages
3695 """
3696 l_request = skypekit.XCallRequest("ZR\022'", 18, 39)
3697 l_request.add_parm('O', 0, self)
3698 l_request.add_parm('u', 1, require_timestamp)
3699 l_response = self.transport.xcall(l_request)
3700 l_result = ([module_id2classes[9](oid, self.transport) for oid in l_response.get(1, [])]),
3701 l_result += ([module_id2classes[9](oid, self.transport) for oid in l_response.get(2, [])]),
3702 return l_result
3708 """
3709 Finds the most recent Message object in the conversation that contains the substring specified by the text argument. If no matching messages are found, this method will return false. The search proceeds backwards in time, starting from the timestamp argument. To continue searching, you can start with timestamp=MAX_UINT, retrieve the TIMESTAMP property of the matching message, decrement it by one, and submit it as timestamp for the next FindMessage call.
3710
3711
3712 B{Arguments:}
3713 - B{text} - Substring to search for.
3714
3715 - B{from_timestamp_up}
3716
3717 B{Return values:}
3718 - B{message} - Returns matching message or 0 if there was no match. As the likelihood of this object being invalid is quite high, you should always check for method return value before you start calling methods of this object.
3719
3720 """
3721 l_request = skypekit.XCallRequest("ZR\022)", 18, 41)
3722 l_request.add_parm('O', 0, self)
3723 l_request.add_parm('S', 1, text)
3724 l_request.add_parm('u', 2, from_timestamp_up)
3725 l_response = self.transport.xcall(l_request)
3726 l_result = module_id2classes[9](l_response.get(1), self.transport)
3727 return l_result
3729 """
3730 This callback gets fired when participants join or leave the conversation.
3731
3732 """
3733 pass
3738 event_handlers[1] = "_sk_on_participant_list_change"
3739 - def OnMessage(
3740 self,
3741 message
3742 ):
3743 """
3744 Deprecated: Use the other OnMessage
3745
3746 B{Return values:}
3747 - B{message}
3748 """
3749 pass
3750 event_handlers[2] = "_sk_on_message"
3752 """ internal event dispatcher for OnMessage
3753 """
3754 l_cleanparms = module_id2classes[9](parms.get(1), self.transport)
3755 self.OnMessage(l_cleanparms)
3760 """
3761 This callback gets fired when a new Conversation is created using SpawnConference.
3762
3763
3764 B{Return values:}
3765 - B{spawned} - Conversation object that got created.
3766
3767 """
3768 pass
3769 event_handlers[3] = "_sk_on_spawn_conference"
3775 module_id2classes[18] = Conversation
3776
3777 -class Message(skypekit.Object):
3778 """
3779 Events in a conversation context are expressed as Messages. It is therefore useful to think of Message objects as events, rather than specifically text chat messages.
3780
3781 Message member functions all return a Boolean indicating the success (true) or failure (false) of processing the request itself (transport, runtime availability, and so forth) - not the success or failure of its associated functionality. For example, Message::Edit returns true if it was able to make a determination, and its result parameter reflects whether this Message can be edited. Similarly, Message::Edit returns false if it was unable to make a determination, and the value of its result parameter is undefined.
3782
3783 Message member functions that are specific to a Message TYPE return false if this Message is not of that type. For example, Message::GetVoiceMessage will return false if this Message's type is not POSTED_VOICE_MESSAGE.
3784
3785 The actual meaning of a Message can be determined by its P_TYPE property. The meanings of most other Message properties depend on the value of P_TYPE. For example, let's take P_BODY_XML property.
3786
3787 Following messages have a text entered by the user as a body. It may contain emoticons, URLs, etc.
3788
3789 - POSTED_TEXT
3790
3791 - POSTED_EMOTE
3792
3793 - SET_METADATA
3794
3795 - REQUESTED_AUTH
3796
3797 Following messages have a custom XML format for the body (see the specific section on these message types for details):
3798
3799 - POSTED_CONTACTS
3800
3801 - POSTED_VOICE_MESSAGE
3802
3803 - POSTED_FILES
3804
3805 - POSTED_SMS
3806
3807 - STARTED_LIVESESSION and ENDED_LIVESESSION (same format)
3808
3809 Following messages do not use the body property:
3810
3811 - SPAWNED_CONFERENCE
3812
3813 - ADDED_CONSUMERS
3814
3815 - ADDED_APPLICANTS
3816
3817 - RETIRED_OTHERS
3818
3819 - RETIRED
3820
3821 - SET_RANK
3822
3823 - HAS_BIRTHDAY
3824
3825 - GRANTED_AUTH
3826
3827 - BLOCKED
3828
3829 Messages such as POSTED_TEXT use a small subset of a HTML-like markup to control the visual representation of the text. This markup is used by POSTED_TEXT and POSTED_EMOTE, but also for the conversation topic (CONVERSATION_META_TOPIC property and the body of the SET_METADATA message) and for authorization requests.
3830
3831 Having chat messages in XML format means that all formatting is indicated by XML tags. This includes emoticons and URls. The big advantage is that it makes the parsing of the message by the UI much easier. The UI does not need to do emoticons or URL detection, this is already done and it only needs to look for the XML tags.
3832
3833 For text messages, it is possible for the UI to simply ignore (meaning strip) the XML and the message will be understandable fine, it will only have lost some formatting.
3834
3835 But it is obviously nicer to display at least the most commonly used tags.
3836
3837 To strip the XML:
3838
3839 - if they have the alt="sometext" attribute set, return sometext as the output of that tag and ignore the rest of tag and all nested sub tags
3840
3841 - if no alt="" attribute set, use tag content as output - <sometag>hereissomething</sometag> is output as hereissomething
3842
3843 - if no alt="" and no tag content, ignore the tag altogether (return nothing)
3844 Skype for Windows supports displaying many XML tags, but only a sub-set is regularly used and should be supported by the UI for a good experience. These are the ones described here.
3845 Animated emoticons
3846 Emoticons are encoded with the "ss" tag. The element content is the plain text representation. It has a "type" attribute indicating the emoticons canonical name. Example:
3847 ::
3848
3849 Hi <ss type="smile">:-)</ss>
3850
3851
3852 Flag emoticons
3853 Flag emoticons are little flags. They are encoded with the "flag" tag. The element contents is the plain text representation and it has a "country" attribute which is a 2-letter ISO-3166 country code. The user can enter a flag using "(flag:XX)", where XX is a valid ISO country code. Example:
3854 ::
3855
3856 I am in <flag country="cc">CC</flag>
3857
3858
3859 Links
3860 If the library detects a URL, it will encode it using the html "a" tag, with the "href" attribute indicating the URL. The plain text representation is what the user originally typed. Example:
3861 ::
3862
3863 I am in <a href="http://wwww.skype.com">www.skype.com</a>
3864
3865
3866 Alert matches
3867 When a conversation is configured to display only alerts if specific words are present in the message (see "/alertson [text to match]" command), if a message matches the alert, it will be marked with the <alertmatch> tag. This allows the UI to highlight the word matching. Example:
3868 ::
3869
3870 Maybe <alertmatch>Vincent</alertmatch> knows the answer
3871
3872
3873 Bold, italic, etc
3874 Skype for Windows also supports displaying bold and italic text, using the "b" and "i" tags.
3875
3876 Encoding messages
3877 When sending a chat message via PostText(), there is the possibility to indicate if the library should do the XML encoding, or if the message has already been encoded. Usually, the UI can let library do the encoding. This is the case when the message does not contain any specific formatting. It may contain emoticons or URls, which will be detected by the library encoder and converted into XML tags.
3878 If the message has some more complex encoding, such as a quote or some bold text, it is up to the UI to encode the message.
3879
3880 """
3881 event_handlers = {}
3882 propid2label = {}
3887 return "Message %s" % (self.object_id, )
3888 @staticmethod
3890 """ convert a property name to the enum of the property """
3891 return getattr(Message, "P_"+propname.upper())
3892 module_id = 9
3894 """ notifies from a property change """
3895
3896 pass
3897 TYPE = {
3898 2
3899 :'SET_METADATA',
3900 4
3901 :'SPAWNED_CONFERENCE',
3902 10 :'ADDED_CONSUMERS',
3903 11 :'ADDED_APPLICANTS',
3904 12 :'RETIRED_OTHERS',
3905 13 :'RETIRED',
3906 21 :'SET_RANK',
3907 30 :'STARTED_LIVESESSION',
3908 39 :'ENDED_LIVESESSION',
3909 50 :'REQUESTED_AUTH',
3910 51 :'GRANTED_AUTH',
3911 53 :'BLOCKED',
3912 61 :'POSTED_TEXT',
3913 60 :'POSTED_EMOTE',
3914 63 :'POSTED_CONTACTS',
3915 64 :'POSTED_SMS',
3916 65 :'POSTED_ALERT',
3917 67 :'POSTED_VOICE_MESSAGE',
3918 68 :'POSTED_FILES',
3919 69 :'POSTED_INVOICE',
3920 110:'HAS_BIRTHDAY',
3921 'SET_METADATA'
3922
3923
3924 : 2,
3925 'SPAWNED_CONFERENCE'
3926
3927
3928 : 4,
3929 'ADDED_CONSUMERS'
3930
3931
3932 : 10,
3933 'ADDED_APPLICANTS'
3934
3935
3936 : 11,
3937 'RETIRED_OTHERS'
3938
3939
3940 : 12,
3941 'RETIRED'
3942
3943
3944 : 13,
3945 'SET_RANK'
3946
3947
3948 : 21,
3949 'STARTED_LIVESESSION'
3950
3951 : 30,
3952 'ENDED_LIVESESSION'
3953
3954
3955 : 39,
3956 'REQUESTED_AUTH'
3957
3958
3959 : 50,
3960 'GRANTED_AUTH'
3961
3962
3963 : 51,
3964 'BLOCKED'
3965
3966
3967 : 53,
3968 'POSTED_TEXT'
3969
3970
3971 : 61,
3972 'POSTED_EMOTE'
3973
3974
3975 : 60,
3976 'POSTED_CONTACTS'
3977
3978
3979 : 63,
3980 'POSTED_SMS'
3981
3982
3983 : 64,
3984 'POSTED_ALERT'
3985
3986
3987 : 65,
3988 'POSTED_VOICE_MESSAGE'
3989
3990 : 67,
3991 'POSTED_FILES'
3992
3993
3994 : 68,
3995 'POSTED_INVOICE'
3996
3997
3998 : 69,
3999 'HAS_BIRTHDAY'
4000
4001
4002 :110
4003 }
4004 """
4005 The P_TYPE property determines the actual meaning of the Message object. Only Messages of POSTED_TEXT type contain actual text messages. The meaning and content of the rest of the message properties are largely dependant of the value of the Message::P_TYPE.
4006
4007 - SET_METADATA - Conference metadata were changed
4008 - SPAWNED_CONFERENCE - A conference was spawned from this dialog
4009 - ADDED_CONSUMERS - Some users were added to the conference
4010 - ADDED_APPLICANTS - Some users are applying to be added to the conference
4011 - RETIRED_OTHERS - User was kicked from the conference
4012 - RETIRED - User left the conference
4013 - SET_RANK - Changed the rank of a user in the Conversation (multichat administration)
4014
4015 - STARTED_LIVESESSION - A live session started
4016 - ENDED_LIVESESSION - A live session ended
4017 - REQUESTED_AUTH - User requested authorization
4018 - GRANTED_AUTH - User was granted authorization. Notification message that user is now an authorized contact (of the local user).
4019
4020 - BLOCKED - User was blocked
4021 - POSTED_TEXT - A text message
4022 - POSTED_EMOTE - An emote ('John Doe is laughing', cf /me chat command)
4023 - POSTED_CONTACTS - The message represents (a set of) contact card(s) posted in the conversation. One message can contain more than one contact cards. The contacts can be retrieved from the message by parsing them out from the P_BODY_XML property. For more information, see Conversation::PostContacts
4024
4025 - POSTED_SMS - The message represents an SMS object that was posted in the Conversation. See Conversation::PostSMS for more details. The Sms object itself can be retrieved from the Message with Message::GetSms The message BODY_XML contains a set of SMS properties, such as status, failurereason, targets, price and timestamp.
4026
4027 - POSTED_ALERT - Deprecated, never sent
4028 - POSTED_VOICE_MESSAGE - A voicemail
4029 - POSTED_FILES - The message represents a (list of) file transfers that were posted in the Conversation with Conversation::PostFiles. Transfer objects can be retrieved from the Message with Message::GetTransfers
4030
4031 - POSTED_INVOICE - Currently unused.
4032
4033 - HAS_BIRTHDAY - The message represents a Contact birthday notification.
4034
4035 """
4036 SENDING_STATUS = {1:'SENDING', 'SENDING':1, 2:'SENT', 'SENT':2, 3:'FAILED_TO_SEND', 'FAILED_TO_SEND':3}
4037 """
4038 - SENDING - Message has not been delivered to at least one of the participants
4039
4040 - SENT - Message has been delivered to at least one other participant
4041
4042 - FAILED_TO_SEND - Message could not be delivered (for SMS this reflects the actual SMS, not the chat message)
4043
4044 """
4045 CONSUMPTION_STATUS = {0:'CONSUMED', 'CONSUMED':0, 1:'UNCONSUMED_SUPPRESSED', 'UNCONSUMED_SUPPRESSED':1, 2:'UNCONSUMED_NORMAL', 'UNCONSUMED_NORMAL':2, 3:'UNCONSUMED_ELEVATED', 'UNCONSUMED_ELEVATED':3}
4046 """
4047 Indicates if a message has been consumed (meaning read) or not
4048 - CONSUMED - Message has been read. Note that this is a read-only property. Consumption status of individual messages can not be set selectively. Message consumption status is determined at the conversation level, based conversation consumption horizon and individual message timestamps. Conversation consumption horizon can be updated with Conversation::SetConsumedHorizon method.
4049
4050 - UNCONSUMED_SUPPRESSED - Do not notify the user that they have this unread message
4051
4052 - UNCONSUMED_NORMAL - Notify the user that they have this unread message
4053
4054 - UNCONSUMED_ELEVATED - This message consumption state is marked as DEPRECATED
4055
4056 """
4057 SET_METADATA_KEY = {3640:'SET_META_NAME', 'SET_META_NAME':3640, 3644:'SET_META_TOPIC', 'SET_META_TOPIC':3644, 3652:'SET_META_GUIDELINES', 'SET_META_GUIDELINES':3652, 3658:'SET_META_PICTURE', 'SET_META_PICTURE':3658}
4058 """
4059 For messages of type SET_METADATA that alert participants to changes to the associated Conversation's metadata, indicates which metadata property changed and its P_BODY_XML property contains the changed data. Your UI is expected to detect messages with PARAM_KEY set and to update its visual representation of Conversation accordingly.
4060 You can use the associated Conversation's properties and methods to obtain the updated metadata rather than parse the message body XML, for example, Conversation::P_META_PICTURE and Conversation::Conversation::GetPropMetaPicture.
4061
4062 - SET_META_NAME - Notification message that conversation name has changed.
4063
4064 - SET_META_TOPIC - Notification message that conversation topic has changed.
4065
4066 - SET_META_GUIDELINES - Notification message that conversation guidelines have changed.
4067
4068 - SET_META_PICTURE - Notification message that conversation picture has changed.
4069
4070 """
4071 LEAVEREASON = {2:'USER_INCAPABLE', 'USER_INCAPABLE':2, 3:'ADDER_MUST_BE_FRIEND', 'ADDER_MUST_BE_FRIEND':3, 4:'ADDER_MUST_BE_AUTHORIZED', 'ADDER_MUST_BE_AUTHORIZED':4, 5:'DECLINE_ADD', 'DECLINE_ADD':5, 6:'UNSUBSCRIBE', 'UNSUBSCRIBE':6}
4072 """
4073 Indicates the reason a user could not join or left a Conversation. SkypeKit automatically sets "could not join"-related values. "Left voluntarily"-related values are set as a result of explicit user actions.
4074
4075 - USER_INCAPABLE - User cannot chat (user is currently logged in with a client that has chat disabled - see Contact::CAPABILITY.CAPABILITY_TEXT)
4076
4077 - ADDER_MUST_BE_FRIEND - Attempt to add local user to a conversation by an unknown contact
4078
4079 - ADDER_MUST_BE_AUTHORIZED - Attempt to add local user to a conversation by an unauthorized contact
4080
4081 - DECLINE_ADD - Local user declined an "invitation" to join a chat
4082
4083 - UNSUBSCRIBE - User decided to end participation in an on-going multi-chat
4084
4085 """
4086
4088 """
4089 DB ID of corresponding conversation
4090 """
4091 return module_id2classes[18](self._sk_property("ZG\300\007]\011",
4092 960, True), self.transport)
4093 convo_id = property(_sk_get_convo_id)
4094 propid2label[960] = "convo_id"
4095 P_CONVO_ID = 960
4097 """
4098 GUID of the Conversation. The GUID is a "global ID" - these values are shared accross Skype client instances and accross all the participants of the conversation.
4099
4100 """
4101 return self._sk_property("ZGx]\011", 120, True)
4102 convo_guid = property(_sk_get_convo_guid)
4103 propid2label[120] = "convo_guid"
4104 P_CONVO_GUID = 120
4106 """
4107 Identity of the sender. While this is almost always the same as SKYPENAME property of the Contact, in some rare cases it can also be a phone number - for example, incoming voicemail notification Messages (message type = POSTED_VOICE_MESSAGE).
4108
4109 """
4110 return self._sk_property("ZGz]\011", 122, True)
4111 author = property(_sk_get_author)
4112 propid2label[122] = "author"
4113 P_AUTHOR = 122
4115 """
4116 displayname of the sender at the time of posting
4117 """
4118 return self._sk_property("ZG{]\011", 123, True)
4119 author_displayname = property(_sk_get_author_displayname)
4120 propid2label[123] = "author_displayname"
4121 P_AUTHOR_DISPLAYNAME = 123
4123 """
4124 Unlike the message id, the GUID is the same on all instances and for all participants.
4125
4126 """
4127 return self._sk_property("ZG\230\006]\011", 792, True)
4128 guid = property(_sk_get_guid)
4129 propid2label[792] = "guid"
4130 P_GUID = 792
4132 """
4133 This property gets set when a conference is spawned from dialog Conversation. In that case recent message history from the original dialog is copied to the target conversation. For all the copied messages, the ORIGINALLY_MEANT_FOR property will be set to identity of the remote participant of the original dialog.
4134
4135 """
4136 return self._sk_property("ZG\226\006]\011", 790, True)
4137 originally_meant_for = property(_sk_get_originally_meant_for)
4138 propid2label[790] = "originally_meant_for"
4139 P_ORIGINALLY_MEANT_FOR = 790
4141 """
4142 UNIX timestamp (sent time, adjusted for local clock)
4143 """
4144 return self._sk_property("ZGy]\011", 121, True)
4145 timestamp = property(_sk_get_timestamp)
4146 propid2label[121] = "timestamp"
4147 P_TIMESTAMP = 121
4150 type = property(_sk_get_type)
4151 propid2label[961] = "type"
4152 P_TYPE = 961
4155 sending_status = property(_sk_get_sending_status)
4156 propid2label[962] = "sending_status"
4157 P_SENDING_STATUS = 962
4160 consumption_status = property(_sk_get_consumption_status)
4161 propid2label[968] = "consumption_status"
4162 P_CONSUMPTION_STATUS = 968
4164 """
4165 Identity of the author that last edited this message. NULL if message has not been edited
4166
4167 """
4168 return self._sk_property("ZG\336\001]\011", 222, True)
4169 edited_by = property(_sk_get_edited_by)
4170 propid2label[222] = "edited_by"
4171 P_EDITED_BY = 222
4173 """
4174 UNIX timestamp of last edit
4175 """
4176 return self._sk_property("ZG\337\001]\011", 223, True)
4177 edit_timestamp = property(_sk_get_edit_timestamp)
4178 propid2label[223] = "edit_timestamp"
4179 P_EDIT_TIMESTAMP = 223
4181 """
4182 Message type-specific parameter. See Message::SET_METADATA_KEY for more information.
4183
4184 """
4185 return self._sk_property("ZG\303\007]\011", 963, True)
4186 param_key = property(_sk_get_param_key)
4187 propid2label[963] = "param_key"
4188 P_PARAM_KEY = 963
4190 """
4191 Message type-specific parameter
4192
4193 """
4194 return self._sk_property("ZG\304\007]\011", 964, True)
4195 param_value = property(_sk_get_param_value)
4196 propid2label[964] = "param_value"
4197 P_PARAM_VALUE = 964
4198 - def _sk_get_body_xml(self):
4199 """
4200 Message type-specific parameter
4201
4202 """
4203 return self._sk_property("ZG\177]\011", 127, True)
4204 body_xml = property(_sk_get_body_xml)
4205 propid2label[127] = "body_xml"
4206 P_BODY_XML = 127
4208 """
4209 Message type-specific parameter. Depending of Message type, this property contains:
4210
4211 - STARTED_LIVESESSION - list of participants in the cal;
4212
4213 - ENDED_LIVESESSION - list of participants in the call;
4214
4215 - POSTED_SMS - list of recipients of the message;
4216
4217 - SPAWNED_CONFERENCE - the list of identities that were added;
4218
4219 - ADDED_CONSUMERS - the list of identities that were added;
4220
4221 - RETIRED_OTHERS - the skypename of the participant who was kicked;
4222
4223 - SET_RANK - the skypename of the participant whose rank was changed;
4224
4225 - REQUESTED_AUTH - Message::P_AUTHOR and Message::P_IDENTITIES are set to the users receiving and requesting the authorization, depending if the message was received or sent;
4226
4227 - GRANTED_AUTH - the skypename of the user we granted authorization;
4228
4229 - BLOCKED - the skypename of the user who was blocked;
4230
4231 - HAS_BIRTHDAY - skypename of current logged in user.
4232
4233 """
4234 return self._sk_property("ZG}]\011", 125, True)
4235 identities = property(_sk_get_identities)
4236 propid2label[125] = "identities"
4237 P_IDENTITIES = 125
4239 """
4240 Message type-specific parameter. Possible values for STARTED/ENDED_LIVESESSION (only set for dialogs):
4241
4242 - no_answer
4243
4244 - manual
4245
4246 - busy
4247
4248 - connection_dropped
4249
4250 - no_skypeout_subscription;
4251
4252 - insufficient_funds
4253
4254 - internet_connection_lost
4255
4256 - skypeout_account_blocked
4257
4258 - pstn_could_not_connect_to_skype_proxy
4259
4260 - pstn_invalid_number
4261
4262 - pstn_number_forbidden
4263
4264 - pstn_call_timed_out
4265
4266 - pstn_busy
4267
4268 - pstn_call_terminated
4269
4270 - pstn_network_error
4271
4272 - number_unavailable
4273
4274 - pstn_call_rejected
4275
4276 - pstn_misc_error
4277
4278 - internal_error
4279
4280 - unable_to_connect
4281
4282 - connection_dropped
4283
4284 - recording_failed
4285
4286 - playback_error
4287
4288 - legacy_error
4289
4290 - blocked_by_privacy_settings
4291
4292 - error
4293
4294 - transfer_failed
4295
4296 - transfer_insufficient_funds
4297
4298 - blocked_by_us
4299
4300 - emergency_call_denied
4301
4302 This information is now available as an enum in LEAVEREASON
4303
4304 """
4305 return self._sk_property("ZG\306\007]\011", 966, True)
4306 reason = property(_sk_get_reason)
4307 propid2label[966] = "reason"
4308 P_REASON = 966
4314 leavereason = property(_sk_get_leavereason)
4315 propid2label[126] = "leavereason"
4316 P_LEAVEREASON = 126
4318 """
4319 Number of people who received this message (including local user)
4320
4321 """
4322 return self._sk_property("ZG\326\007]\011", 982, True)
4323 participant_count = property(_sk_get_participant_count)
4324 propid2label[982] = "participant_count"
4325 P_PARTICIPANT_COUNT = 982
4326
4328 """
4329 For Message types having a body, determines whether that body is editable by the user.
4330
4331
4332 B{Return values:}
4333 - B{result}
4334 """
4335 l_request = skypekit.XCallRequest("ZR\011\001", 9, 1)
4336 l_request.add_parm('O', 0, self)
4337 l_response = self.transport.xcall(l_request)
4338 l_result = l_response.get(1, False)
4339 return l_result
4340 - def Edit(
4341 self,
4342 new_text,
4343 is_xml = False
4344 ):
4345 """
4346 For Message types that include a body and are editable:
4347
4348 - alters BODY_XML of the message object
4349
4350 - sets EDITED_BY and EDIT_TIMESTAMP properties
4351
4352 - propagates the changes to remote users.
4353
4354
4355 B{Arguments:}
4356 - B{new_text} - New value of the message BODY_XML property.
4357
4358 - B{is_xml} - Specify isXML as true if the message body is formatted as XML; omit it or specify it as false if the message body is plain text.
4359
4360 """
4361 l_request = skypekit.XCallRequest("ZR\011\002", 9, 2)
4362 l_request.add_parm('O', 0, self)
4363 l_request.add_parm('S', 1, new_text)
4364 l_request.add_parm('b', 2, is_xml)
4365 self.transport.xcall(l_request)
4380 """
4381 For messages of type POSTED_FILES, parses the body XML and creates a list of Transfer instances.
4382
4383
4384 B{Return values:}
4385 - B{transfers}
4386 """
4387 l_request = skypekit.XCallRequest("ZR\011\004", 9, 4)
4388 l_request.add_parm('O', 0, self)
4389 l_response = self.transport.xcall(l_request)
4390 l_result = [module_id2classes[6](oid, self.transport) for oid in l_response.get(1, [])]
4391 return l_result
4393 """
4394 For messages of type POSTED_VOICE_MESSAGE, parses the body XML and creates a Voicemail instance.
4395
4396
4397 B{Return values:}
4398 - B{voicemail}
4399 """
4400 l_request = skypekit.XCallRequest("ZR\011\005", 9, 5)
4401 l_request.add_parm('O', 0, self)
4402 l_response = self.transport.xcall(l_request)
4403 l_result = module_id2classes[7](l_response.get(1), self.transport)
4404 return l_result
4406 """
4407 For messages of type POSTED_SMS, parses the body XML and creates an SMS instances
4408
4409
4410 B{Return values:}
4411 - B{sms}
4412 """
4413 l_request = skypekit.XCallRequest("ZR\011\006", 9, 6)
4414 l_request.add_parm('O', 0, self)
4415 l_response = self.transport.xcall(l_request)
4416 l_result = module_id2classes[12](l_response.get(1), self.transport)
4417 return l_result
4419 """
4420 Deletes this message from the local database. These deletions do not propagate to the other Skype instances that the user may have on other computers. Nor do they affect other participants that have the same message. This method is specifically from removing Message objects from the database - not for removing Messages from conversations. To remove a Message from a conversation, use Message::Edit method to replace the existing body text with an empty string.
4421
4422 """
4423 l_request = skypekit.XCallRequest("ZR\011\010", 9, 8)
4424 l_request.add_parm('O', 0, self)
4425 self.transport.xcall(l_request)
4426 module_id2classes[9] = Message
4427
4428 -class Video(skypekit.Object):
4429 """
4430 This class contains basic video control functionality for live conversations with video. Basically, Video objects represent specific Participant's video state in a live Conversation. The Video class can represent both local (outgoing) and remote (incoming) video streams. Note that as of SkypeKit SDK version 3.2, this class no longer handles video rendering in the UI. Currently available SkypeKit runtimes do not support multi-party video. The API however is designed with future compatibility in mind, so the Video class is attached to Participant class rather than Conversation class. Once multi-party video will become available for SkypeKit, the logic should go like this:
4431
4432 Let there be 4-way live conversation C and participants P1, P2, P3 and P4. P1 is the local user. Remote participants P2 and P3 are capable of sending video. Remote user P4 is not capable of sending video. You would then end up with 4 video objects: V1, V2, V3 and V0.
4433
4434
4435 - C->P1->V1-> outgoing video stream
4436
4437 - C->P2->V2-> incoming video stream 1
4438
4439 - C->P3->V3-> incoming video stream 2
4440
4441 - C->P4-> no video object as participant P4 does not advertise supporting video
4442
4443 - V0-> local webcam preview - this is not attached to any particular conversation, however the corresponding video object can be retrieved with Skype::GetPreviewVideo method.
4444
4445 As getting from a live conversation to running video streams involves three classes, it can be somewhat less than obvious. The basic state transition logic goes like this:
4446
4447 You start out with a Conversation, that suddenly becomes live
4448
4449 CONVERSATION::LOCAL_LIVESTATUS = IM_LIVE
4450 At this point you have access to participant list of that conversation. The next step will be to catch Partcipant property changes for PARTICIPANT::VIDEO_STATUS to see if any of the people in conversation have Video available. Note that you should not make assumptions on when this availability happens. Remote users may switch their video on-off as they please.
4451
4452 PARTICIPANT::VIDEO_STATUS = VIDEO_AVAILABLE
4453 If you get to VIDEO_AVAILABLE (not necessarily for all Participants), you can retrieve Video object, with Participant::GetVideo method.
4454
4455 Now you will need to handle Video::STATUS property changes. In case of successful video call, the sequence of Video::STATUS and Participant::VIDEO_STATUS changes for each Participant and Video object should look like this:
4456
4457
4458 - Video::STATUS = AVAILABLE
4459
4460 - Video::STATUS = STARTING
4461
4462 - Video::STATUS = CHECKING_SUBSCRIPTION
4463
4464 - Video::STATUS = STARTING
4465
4466 Participant::VIDEO_STATUS = VIDEO_CONNECTING
4467
4468 - Video::STATUS = RUNNING
4469
4470 - Participant::VIDEO_STATUS = STREAMING
4471 Both Video::STATUS == RUNNING and Participant::VIDEO_STATUS == STREAMING are indicative that the video for that particular participant is up and running, and your UI should update itself accordingly.
4472
4473 NB! Note that it is not enough to check for Video::STATUS property updates. By the time you obtain the Video object in your client, it may already it may already have progressed to a further status. You should always check the status property immediately after obtaining the Video object.
4474
4475 """
4476 event_handlers = {}
4477 propid2label = {}
4482 return "Video %s" % (self.object_id, )
4483 @staticmethod
4485 """ convert a property name to the enum of the property """
4486 return getattr(Video, "P_"+propname.upper())
4487 module_id = 11
4489 """ notifies from a property change """
4490
4491 pass
4492 STATUS = {
4493 0 :'NOT_AVAILABLE',
4494 1 :'AVAILABLE',
4495 2 :'STARTING',
4496 3 :'REJECTED',
4497 4 :'RUNNING',
4498 5 :'STOPPING',
4499 6 :'PAUSED',
4500 7 :'NOT_STARTED',
4501 8 :'HINT_IS_VIDEOCALL_RECEIVED',
4502 9 :'UNKNOWN',
4503 10:'RENDERING',
4504 11:'CHECKING_SUBSCRIPTION',
4505 12:'SWITCHING_DEVICE',
4506 'NOT_AVAILABLE'
4507
4508
4509 : 0,
4510 'AVAILABLE'
4511
4512
4513 : 1,
4514 'STARTING'
4515
4516
4517 : 2,
4518 'REJECTED'
4519
4520
4521 : 3,
4522 'RUNNING'
4523
4524
4525 : 4,
4526 'STOPPING'
4527
4528
4529 : 5,
4530 'PAUSED'
4531
4532
4533 : 6,
4534 'NOT_STARTED'
4535
4536
4537 : 7,
4538 'HINT_IS_VIDEOCALL_RECEIVED'
4539
4540 : 8,
4541 'UNKNOWN'
4542
4543
4544 : 9,
4545 'RENDERING'
4546
4547
4548 :10,
4549 'CHECKING_SUBSCRIPTION'
4550
4551 :11,
4552 'SWITCHING_DEVICE'
4553
4554
4555 :12
4556 }
4557 """
4558 - NOT_AVAILABLE
4559 - AVAILABLE
4560 - STARTING
4561 - REJECTED
4562 - RUNNING
4563 - STOPPING
4564 - PAUSED
4565 - NOT_STARTED
4566 - HINT_IS_VIDEOCALL_RECEIVED
4567 - UNKNOWN
4568 - RENDERING
4569 - CHECKING_SUBSCRIPTION
4570 - SWITCHING_DEVICE
4571 """
4572 MEDIATYPE = {1:'MEDIA_SCREENSHARING', 'MEDIA_SCREENSHARING':1, 0:'MEDIA_VIDEO', 'MEDIA_VIDEO':0}
4573 """
4574 - MEDIA_SCREENSHARING
4575 - MEDIA_VIDEO
4576 """
4577 VIDEO_DEVICE_CAPABILITY = {0:'VIDEOCAP_HQ_CAPABLE', 'VIDEOCAP_HQ_CAPABLE':0, 1:'VIDEOCAP_HQ_CERTIFIED', 'VIDEOCAP_HQ_CERTIFIED':1, 2:'VIDEOCAP_REQ_DRIVERUPDATE', 'VIDEOCAP_REQ_DRIVERUPDATE':2, 3:'VIDEOCAP_USB_HIGHSPEED', 'VIDEOCAP_USB_HIGHSPEED':3}
4578 """
4579 - VIDEOCAP_HQ_CAPABLE
4580 - VIDEOCAP_HQ_CERTIFIED
4581 - VIDEOCAP_REQ_DRIVERUPDATE
4582 - VIDEOCAP_USB_HIGHSPEED
4583 """
4584
4586 """
4587 Video::STATUS
4588 """
4589 return skypekit.enumof(Video.STATUS, self._sk_property("ZG\202\001]\013", 130, True))
4590 status = property(_sk_get_status)
4591 propid2label[130] = "status"
4592 P_STATUS = 130
4594 """
4595 'errorcode errortext'
4596 """
4597 return self._sk_property("ZG\203\001]\013", 131, True)
4598 error = property(_sk_get_error)
4599 propid2label[131] = "error"
4600 P_ERROR = 131
4602 """
4603 space-separated string of tokens
4604 """
4605 return self._sk_property("ZG\204\001]\013", 132, True)
4606 debuginfo = property(_sk_get_debuginfo)
4607 propid2label[132] = "debuginfo"
4608 P_DEBUGINFO = 132
4610 """
4611 This property does not currently work, always containing an empty string. For desktop video, you can get the frame dimensions from the video frame buffers API instead - the buffer struct retrieved with ipc.getFrame() or ipc.getNewFrame() has width and height fields, which you can then use in your UI. With RTP video solutions, you already have the frame sizes in your videohost code. Communicating these to the UI process is currently up to you.
4612
4613 """
4614 return self._sk_property("ZG\205\001]\013", 133, True)
4615 dimensions = property(_sk_get_dimensions)
4616 propid2label[133] = "dimensions"
4617 P_DIMENSIONS = 133
4624 media_type = property(_sk_get_media_type)
4625 propid2label[134] = "media_type"
4626 P_MEDIA_TYPE = 134
4628 """
4629 conference id to be able to identify remote/local video in the same call
4630 """
4631 return self._sk_property("ZG\320\010]\013", 1104, True)
4632 convo_id = property(_sk_get_convo_id)
4633 propid2label[1104] = "convo_id"
4634 P_CONVO_ID = 1104
4636 """
4637 device path used by video object
4638 """
4639 return self._sk_property("ZG\321\010]\013", 1105, True)
4640 device_path = property(_sk_get_device_path)
4641 propid2label[1105] = "device_path"
4642 P_DEVICE_PATH = 1105
4643
4644 SETUPKEY_VIDEO_DEVICE = "Lib/Video/Device"
4645 SETUPKEY_VIDEO_DEVICE_PATH = "Lib/Video/DevicePath"
4646 SETUPKEY_VIDEO_AUTOSEND = "Lib/Video/AutoSend"
4647 SETUPKEY_VIDEO_DISABLE = "*Lib/Video/Disable"
4648 SETUPKEY_VIDEO_RECVPOLICY = "Lib/Video/RecvPolicy"
4649 SETUPKEY_VIDEO_ADVERTPOLICY = "Lib/Video/AdvertPolicy"
4650 - def SetScreen(
4651 self,
4652 windowh
4653 ):
4654 """
4655 No description available.
4656
4657 B{Arguments:}
4658 - B{windowh}
4659 """
4660 l_request = skypekit.XCallRequest("ZR\013\001", 11, 1)
4661 l_request.add_parm('O', 0, self)
4662 l_request.add_parm('u', 1, windowh)
4663 self.transport.xcall(l_request)
4665 """
4666 This method starts either video send or video receive, depending on whether the video object is sender or receiver. In case of desktop video, the receiver side needs to instantiate a renderer object and associate it with the receiveing video (Video::SetRemoteRendererId).
4667
4668 """
4669 l_request = skypekit.XCallRequest("ZR\013\002", 11, 2)
4670 l_request.add_parm('O', 0, self)
4671 self.transport.xcall(l_request)
4673 """
4674 This method stops either video send or video receive, depending on whether the video object is sender or receiver. In case of desktop video, the receiver side needs to dis-associate the video object from the renderer, by calling Video::SetRemoteRendererId(0).
4675
4676 """
4677 l_request = skypekit.XCallRequest("ZR\013\003", 11, 3)
4678 l_request.add_parm('O', 0, self)
4679 self.transport.xcall(l_request)
4681 """
4682 No description available.
4683
4684 B{Return values:}
4685 - B{ret}
4686 - B{request_id}
4687 """
4688 l_request = skypekit.XCallRequest("ZR\013\013", 11, 11)
4689 l_request.add_parm('O', 0, self)
4690 l_response = self.transport.xcall(l_request)
4691 l_result = (l_response.get(1, False)),
4692 l_result += (l_response.get(2, 0)),
4693 return l_result
4702 """
4703 No description available.
4704
4705 B{Return values:}
4706 - B{request_id}
4707 - B{is_successful}
4708 - B{image}
4709 - B{width}
4710 - B{height}
4711 """
4712 pass
4713 event_handlers[2] = "_sk_on_capture_request_completed"
4715 """ internal event dispatcher for OnCaptureRequestCompleted
4716 """
4717 l_cleanparms = (parms.get(1, 0)),
4718 l_cleanparms += (parms.get(2, False)),
4719 l_cleanparms += (parms.get(3, '')),
4720 l_cleanparms += (parms.get(4, 0)),
4721 l_cleanparms += (parms.get(5, 0)),
4722 self.OnCaptureRequestCompleted(*l_cleanparms)
4723 - def SetScreenCaptureRectangle(
4724 self,
4725 x0,
4726 y0,
4727 width,
4728 height,
4729 monitor_number = 0,
4730 window_handle = 0
4731 ):
4732 """
4733 This method has no known effect in current version.
4734
4735
4736 B{Arguments:}
4737 - B{x0}
4738 - B{y0}
4739 - B{width}
4740 - B{height}
4741 - B{monitor_number}
4742 - B{window_handle}
4743 """
4744 l_request = skypekit.XCallRequest("ZR\013\005", 11, 5)
4745 l_request.add_parm('O', 0, self)
4746 l_request.add_parm('i', 1, x0)
4747 l_request.add_parm('i', 2, y0)
4748 l_request.add_parm('u', 3, width)
4749 l_request.add_parm('u', 4, height)
4750 l_request.add_parm('i', 5, monitor_number)
4751 l_request.add_parm('u', 6, window_handle)
4752 self.transport.xcall(l_request)
4760 """
4761 No description available.
4762
4763 B{Arguments:}
4764 - B{x0}
4765 - B{y0}
4766 - B{width}
4767 - B{height}
4768 """
4769 l_request = skypekit.XCallRequest("ZR\013\006", 11, 6)
4770 l_request.add_parm('O', 0, self)
4771 l_request.add_parm('i', 1, x0)
4772 l_request.add_parm('i', 2, y0)
4773 l_request.add_parm('u', 3, width)
4774 l_request.add_parm('u', 4, height)
4775 self.transport.xcall(l_request)
4776 - def SelectVideoSource(
4777 self,
4778 media_type,
4779 webcam_name = "",
4780 device_path = "",
4781 update_setup = False
4782 ):
4783 """
4784 This method has no effect in current version.
4785
4786
4787 B{Arguments:}
4788 - B{media_type}
4789 - B{webcam_name}
4790 - B{device_path}
4791 - B{update_setup}
4792 """
4793 l_request = skypekit.XCallRequest("ZR\013\007", 11, 7)
4794 l_request.add_parm('O', 0, self)
4795 l_request.add_parm('e', 1, Video.MEDIATYPE[media_type])
4796 l_request.add_parm('S', 2, webcam_name)
4797 l_request.add_parm('S', 3, device_path)
4798 l_request.add_parm('b', 4, update_setup)
4799 self.transport.xcall(l_request)
4801 """
4802 No description available.
4803
4804 B{Return values:}
4805 - B{mediatype}
4806 - B{device_name}
4807 - B{device_path}
4808 """
4809 l_request = skypekit.XCallRequest("ZR\013\012", 11, 10)
4810 l_request.add_parm('O', 0, self)
4811 l_response = self.transport.xcall(l_request)
4812 l_result = (skypekit.enumof(Video.MEDIATYPE, l_response.get(1))),
4813 l_result += (l_response.get(2, '')),
4814 l_result += (l_response.get(3, '')),
4815 return l_result
4822 """
4823 called when the video stops
4824
4825 B{Return values:}
4826 - B{image}
4827 - B{width}
4828 - B{height}
4829 """
4830 pass
4831 event_handlers[1] = "_sk_on_last_frame_capture"
4833 """ internal event dispatcher for OnLastFrameCapture
4834 """
4835 l_cleanparms = (parms.get(1, '')),
4836 l_cleanparms += (parms.get(2, 0)),
4837 l_cleanparms += (parms.get(3, 0)),
4838 self.OnLastFrameCapture(*l_cleanparms)
4839 module_id2classes[11] = Video
4842 """
4843 Wrapper class that includes voicemail-specific methods and properties. In the Skype Conversation API, Voicemail is actually something of a misnomer for what would be more accurately called Voice Message.
4844
4845 The traditional Voicemail use case involves recording a voice message when an incoming call does not get answered in a pre-determined amount of time. In the Skype Conversation API, voicemail does not depend on a call going unanswered - you can post a voice message asynchronously into any dialog conversation at any time.
4846
4847 In fact, a high-level action flow directing unanswered incoming live sessions to voicemail is not something provided by the Conversation API - implementation of this use case is largely up to your UI.
4848
4849 The fact that your UI must retrieve incoming Voicemails by monitoring changes to a Conversation instance's Messages illustrates this conceptual difference between traditional voicemail and voice messages. The message type Message::POSTED_VOICE_MESSAGE indicates that a Message instance should be handled as a voice message instead of by displaying its body text in the Conversation UI. Message::GetVoiceMessage enables you to retrieve the associated Voicemail instance; Voicemail::StartPlayback enables you to listen to the message audio.
4850
4851 To put it another way, the object chain goes like this:
4852 ::
4853
4854 Contact->Conversation->Message->Voicemail
4855
4856
4857 There are three basic types of Voicemail objects:
4858
4859 - INCOMING - received voice messages that can be retrieved from Message objects;
4860
4861 - OUTGOING - outbound voice messages that can be created with Conversation::StartVoiceMessage;
4862
4863 - GREETING - voice messages that represent auto-answer greetings, either recorded by the user (CUSTOM_GREETING) or included as part of SkypeKit (DEFAULT_GREETING). This is the audio that gets played back to sender of the voice message before he can start recording his voice message.
4864
4865 Before trying to send out a voicemail, you should ensure that target Contact has the capability to receive them. Use Contact::GetCapabilityStatus to check for Contact::CAPABILITY_CAN_BE_SENT_VM.
4866
4867 Recording and Sending a Voice Message
4868
4869 The first step is to obtain a dialog Conversation with the target Contact. In that conversation, you can initiate the outgoing voice message with Conversation::StartVoiceMessage
4870
4871 Note that this call does not return an actual Voicemail object. To catch when an object gets created, you will need to check Conversation::P_ACTIVE_VM_ID property updates.
4872
4873 After invoking Conversation::StartVoiceMessage, SkypeKit instantiates a Voicemail instance for the target Contact's greeting (with type CUSTOM_GREETING or DEFAULT_GREETING). At this point, the Conversation::P_ACTIVE_VM_ID property update fires, newVM contains a reference to the greeting, and playback of the greeting for the sender starts automatically.
4874
4875 Once the greeting playback finishes, SkypeKit instantiates a second Voicemail instance for the outgoing voice message. At this point, the Conversation::P_ACTIVE_VM_ID property update fires again, newVM now contains a reference to the outgoing message, and recording starts automatically. If you want to include notification and/or error handling for whether this message was sent successfully, you should make a copy of newVM now.
4876
4877 Once the user finishes (or abandons) recording of their message, they want to either send the message or to cancel it. To send the message, use Conversation::PostVoiceMessage; to cancel the message, use Conversation::LeaveLiveSession.
4878
4879 Both of these actions results in the Conversation::P_ACTIVE_VM_ID property update firing for a third time, setting the value to NULL. However, the Voicemail object will actually continue its existence past this point. Saving a reference to the message's Voicemail object when you start recording it enables you to keep receiving Voicemail property updates. This in turn enables your UI to check whether voice message send succeeded or failed.
4880
4881 The relevant terminal state Voicemail::P_STATUS property values are:
4882
4883 - Voicemail::CANCELLED - recording and/or sending of this message was cancelled
4884
4885 - Voicemail::UPLOADED - message sent
4886
4887 - Voicemail::FAILED - message could not be sent
4888
4889 Receiving and Playing Back a Voice Message
4890
4891 On the remote side, the Voicemail appears as a Message object of type Message::POSTED_VOICE_MESSAGE. The message's author property contains the Skype Name of the Voicemail originator, and its BodyXml property contains the message length and title text in following format:
4892
4893 ::
4894
4895 <voicemail alt="Sent voicemail to people in this conversation."><message length="5" ></message></voicemail>
4896
4897
4898 Receiver side UI can then retrieve the Voicemail object from the message with Message::GetVoiceMessage and
4899 start local playback with Message::StartPlayback.
4900
4901 """
4902 event_handlers = {}
4903 propid2label = {}
4908 return "Voicemail %s" % (self.object_id, )
4909 @staticmethod
4911 """ convert a property name to the enum of the property """
4912 return getattr(Voicemail, "P_"+propname.upper())
4913 module_id = 7
4915 """ notifies from a property change """
4916
4917 pass
4918 TYPE = {1:'INCOMING', 'INCOMING':1, 4:'DEFAULT_GREETING', 'DEFAULT_GREETING':4, 2:'CUSTOM_GREETING', 'CUSTOM_GREETING':2, 3:'OUTGOING', 'OUTGOING':3}
4919 """
4920 - INCOMING
4921 - DEFAULT_GREETING
4922 - CUSTOM_GREETING
4923 - OUTGOING
4924 """
4925 STATUS = {
4926 1 :'NOTDOWNLOADED',
4927 2 :'DOWNLOADING',
4928 3 :'UNPLAYED',
4929 4 :'BUFFERING',
4930 5 :'PLAYING',
4931 6 :'PLAYED',
4932 7 :'BLANK',
4933 8 :'RECORDING',
4934 9 :'RECORDED',
4935 10:'UPLOADING',
4936 11:'UPLOADED',
4937 12:'DELETING',
4938 13:'FAILED',
4939 14:'DELETING_FAILED',
4940 15:'CHECKING',
4941 16:'CANCELLED',
4942 'NOTDOWNLOADED'
4943
4944
4945 : 1,
4946 'DOWNLOADING'
4947
4948
4949 : 2,
4950 'UNPLAYED'
4951
4952
4953 : 3,
4954 'BUFFERING'
4955
4956
4957 : 4,
4958 'PLAYING'
4959
4960
4961 : 5,
4962 'PLAYED'
4963
4964
4965 : 6,
4966 'BLANK'
4967
4968
4969 : 7,
4970 'RECORDING'
4971
4972
4973 : 8,
4974 'RECORDED'
4975
4976
4977 : 9,
4978 'UPLOADING'
4979
4980
4981 :10,
4982 'UPLOADED'
4983
4984
4985 :11,
4986 'DELETING'
4987
4988
4989 :12,
4990 'FAILED'
4991
4992
4993 :13,
4994 'DELETING_FAILED'
4995
4996
4997 :14,
4998 'CHECKING'
4999
5000
5001 :15,
5002 'CANCELLED'
5003
5004
5005 :16
5006 }
5007 """
5008 - NOTDOWNLOADED
5009 - DOWNLOADING
5010 - UNPLAYED
5011 - BUFFERING
5012 - PLAYING
5013 - PLAYED
5014 - BLANK
5015 - RECORDING
5016 - RECORDED
5017 - UPLOADING
5018 - UPLOADED
5019 - DELETING
5020 - FAILED
5021 - DELETING_FAILED
5022 - CHECKING
5023 - CANCELLED
5024 """
5025 FAILUREREASON = {
5026 1 :'MISC_ERROR',
5027 2 :'CONNECT_ERROR',
5028 3 :'NO_VOICEMAIL_CAPABILITY',
5029 4 :'NO_SUCH_VOICEMAIL',
5030 5 :'FILE_READ_ERROR',
5031 6 :'FILE_WRITE_ERROR',
5032 7 :'RECORDING_ERROR',
5033 8 :'PLAYBACK_ERROR',
5034 9 :'NO_PERMISSION',
5035 10:'RECEIVER_DISABLED_VOICEMAIL',
5036 11:'SENDER_NOT_AUTHORIZED',
5037 12:'SENDER_BLOCKED',
5038 'MISC_ERROR'
5039
5040
5041 : 1,
5042 'CONNECT_ERROR'
5043
5044
5045 : 2,
5046 'NO_VOICEMAIL_CAPABILITY'
5047
5048 : 3,
5049 'NO_SUCH_VOICEMAIL'
5050
5051
5052 : 4,
5053 'FILE_READ_ERROR'
5054
5055
5056 : 5,
5057 'FILE_WRITE_ERROR'
5058
5059
5060 : 6,
5061 'RECORDING_ERROR'
5062
5063
5064 : 7,
5065 'PLAYBACK_ERROR'
5066
5067
5068 : 8,
5069 'NO_PERMISSION'
5070
5071
5072 : 9,
5073 'RECEIVER_DISABLED_VOICEMAIL'
5074
5075 :10,
5076 'SENDER_NOT_AUTHORIZED'
5077
5078 :11,
5079 'SENDER_BLOCKED'
5080
5081
5082 :12
5083 }
5084 """
5085 - MISC_ERROR
5086 - CONNECT_ERROR
5087 - NO_VOICEMAIL_CAPABILITY
5088 - NO_SUCH_VOICEMAIL
5089 - FILE_READ_ERROR
5090 - FILE_WRITE_ERROR
5091 - RECORDING_ERROR
5092 - PLAYBACK_ERROR
5093 - NO_PERMISSION
5094 - RECEIVER_DISABLED_VOICEMAIL - receiver turned off voicemail
5095 - SENDER_NOT_AUTHORIZED - receiver has not authorized you and privacy is not set to anyone
5096 - SENDER_BLOCKED - receiver blocked sender
5097 """
5098
5101 type = property(_sk_get_type)
5102 propid2label[100] = "type"
5103 P_TYPE = 100
5105 """
5106 registered username of the other party
5107 """
5108 return self._sk_property("ZGe]\007", 101, True)
5109 partner_handle = property(_sk_get_partner_handle)
5110 propid2label[101] = "partner_handle"
5111 P_PARTNER_HANDLE = 101
5113 """
5114 user's display name of the other party
5115 """
5116 return self._sk_property("ZGf]\007", 102, True)
5117 partner_dispname = property(_sk_get_partner_dispname)
5118 propid2label[102] = "partner_dispname"
5119 P_PARTNER_DISPNAME = 102
5122 status = property(_sk_get_status)
5123 propid2label[103] = "status"
5124 P_STATUS = 103
5127 failurereason = property(_sk_get_failurereason)
5128 propid2label[104] = "failurereason"
5129 P_FAILUREREASON = 104
5131 """
5132 subject line
5133 """
5134 return self._sk_property("ZGi]\007", 105, True)
5135 subject = property(_sk_get_subject)
5136 propid2label[105] = "subject"
5137 P_SUBJECT = 105
5139 """
5140 timestamp of creation
5141 """
5142 return self._sk_property("ZGj]\007", 106, True)
5143 timestamp = property(_sk_get_timestamp)
5144 propid2label[106] = "timestamp"
5145 P_TIMESTAMP = 106
5147 """
5148 duration in seconds
5149 """
5150 return self._sk_property("ZGk]\007", 107, True)
5151 duration = property(_sk_get_duration)
5152 propid2label[107] = "duration"
5153 P_DURATION = 107
5155 """
5156 max allowed duration in seconds
5157 """
5158 return self._sk_property("ZGl]\007", 108, True)
5159 allowed_duration = property(_sk_get_allowed_duration)
5160 propid2label[108] = "allowed_duration"
5161 P_ALLOWED_DURATION = 108
5163 """
5164 VM playback progress in seconds
5165 """
5166 return self._sk_property("ZGm]\007", 109, True)
5167 playback_progress = property(_sk_get_playback_progress)
5168 propid2label[109] = "playback_progress"
5169 P_PLAYBACK_PROGRESS = 109
5171 """
5172 CONVERSATION_ID of corresponding conversation
5173 """
5174 return module_id2classes[18](self._sk_property("ZG\276\006]\007",
5175 830, True), self.transport)
5176 convo_id = property(_sk_get_convo_id)
5177 propid2label[830] = "convo_id"
5178 P_CONVO_ID = 830
5180 """
5181 GUID of the message that the VM is tied to
5182 """
5183 return self._sk_property("ZG\277\006]\007", 831, True)
5184 chatmsg_guid = property(_sk_get_chatmsg_guid)
5185 propid2label[831] = "chatmsg_guid"
5186 P_CHATMSG_GUID = 831
5187
5189 """
5190 Start recording your own auto-answer greeting message (leave message after the beep...) only. Recording of outgoing Voicemail messages start automatically (using Conversation::StartVoiceMessage) after playback of the remote side greeting message has finished.
5191
5192 """
5193 l_request = skypekit.XCallRequest("ZR\007\003", 7, 3)
5194 l_request.add_parm('O', 0, self)
5195 self.transport.xcall(l_request)
5197 """
5198 Stop recording of your own auto-answer greeting message only. To stop recording of and send an outgoing Voicemail, use Conversation::PostVoiceMessage.
5199
5200 """
5201 l_request = skypekit.XCallRequest("ZR\007\004", 7, 4)
5202 l_request.add_parm('O', 0, self)
5203 self.transport.xcall(l_request)
5205 """
5206 Initiates playback of a voice message
5207
5208 """
5209 l_request = skypekit.XCallRequest("ZR\007\005", 7, 5)
5210 l_request.add_parm('O', 0, self)
5211 self.transport.xcall(l_request)
5213 """
5214 Terminates playback of a voice message
5215
5216 """
5217 l_request = skypekit.XCallRequest("ZR\007\006", 7, 6)
5218 l_request.add_parm('O', 0, self)
5219 self.transport.xcall(l_request)
5221 """
5222 first from server, and then the local copy
5223 """
5224 l_request = skypekit.XCallRequest("ZR\007\007", 7, 7)
5225 l_request.add_parm('O', 0, self)
5226 self.transport.xcall(l_request)
5228 """
5229 Canceling recording of your own auto-answer greeting message. To stop recording of and cancel an outgoing Voicemail, use Conversation::LeaveLiveSession.
5230
5231 """
5232 l_request = skypekit.XCallRequest("ZR\007\010", 7, 8)
5233 l_request.add_parm('O', 0, self)
5234 self.transport.xcall(l_request)
5236 """
5237 check if we can send voicemail (unauth,blocked,no priv etc cases). only OUTGOING
5238
5239 B{Return values:}
5240 - B{result}
5241 """
5242 l_request = skypekit.XCallRequest("ZR\007\015", 7, 13)
5243 l_request.add_parm('O', 0, self)
5244 l_response = self.transport.xcall(l_request)
5245 l_result = l_response.get(1, False)
5246 return l_result
5247 module_id2classes[7] = Voicemail
5248
5249 -class Sms(skypekit.Object):
5250 """
5251 Wrapper class that includes SMS-specific properties and methods, such as P_BODY and GetTargetPrice. Instantiate SMS instances using Skype::CreateOutgoingSms; post SMS messages to a Conversation using Conversation::PostSMS.
5252
5253 Each SMS can have multiple targets (normalized phone numbers). Note that in a Conversation context, every SMS instance has a corresponding Message instance. Once you've posted an SMS, you can retrieve its corresponding Message instance using Sms::GetPropChatmsgId. That Message instance's P_BODY_XML property contains the SMS message data, such as price, target phone number(s), failure codes, and so forth, which you can parsed out and display in the UI. To put it another way, the object chain goes like this:
5254
5255 ::
5256
5257 Conversation->Message->SMS
5258
5259
5260 Note that SkypeKit SDK supports outgoing SMS messages only. SkypeKit clients, even when logged in with accounts that have SkypeIn numbers, cannot receive SMS messages.
5261
5262 """
5263 event_handlers = {}
5264 propid2label = {}
5269 return "Sms %s" % (self.object_id, )
5270 @staticmethod
5272 """ convert a property name to the enum of the property """
5273 return getattr(Sms, "P_"+propname.upper())
5274 module_id = 12
5276 """ notifies from a property change """
5277
5278 pass
5279 TYPE = {2:'OUTGOING', 'OUTGOING':2, 3:'CONFIRMATION_CODE_REQUEST', 'CONFIRMATION_CODE_REQUEST':3, 4:'CONFIRMATION_CODE_SUBMIT', 'CONFIRMATION_CODE_SUBMIT':4}
5280 """
5281 - OUTGOING
5282 - CONFIRMATION_CODE_REQUEST
5283 - CONFIRMATION_CODE_SUBMIT
5284 """
5285 STATUS = {3:'COMPOSING', 'COMPOSING':3, 4:'SENDING_TO_SERVER', 'SENDING_TO_SERVER':4, 5:'SENT_TO_SERVER', 'SENT_TO_SERVER':5, 6:'DELIVERED', 'DELIVERED':6, 7:'SOME_TARGETS_FAILED', 'SOME_TARGETS_FAILED':7, 8:'FAILED', 'FAILED':8}
5286 """
5287 - COMPOSING
5288 - SENDING_TO_SERVER
5289 - SENT_TO_SERVER
5290 - DELIVERED
5291 - SOME_TARGETS_FAILED
5292 - FAILED
5293 """
5294 FAILUREREASON = {
5295 1:'MISC_ERROR',
5296 2:'SERVER_CONNECT_FAILED',
5297 3:'NO_SMS_CAPABILITY',
5298 4:'INSUFFICIENT_FUNDS',
5299 5:'INVALID_CONFIRMATION_CODE',
5300 6:'USER_BLOCKED',
5301 7:'IP_BLOCKED',
5302 8:'NODE_BLOCKED',
5303 9:'NO_SENDERID_CAPABILITY',
5304 'MISC_ERROR'
5305
5306
5307 :1,
5308 'SERVER_CONNECT_FAILED'
5309
5310 :2,
5311 'NO_SMS_CAPABILITY'
5312
5313
5314 :3,
5315 'INSUFFICIENT_FUNDS'
5316
5317
5318 :4,
5319 'INVALID_CONFIRMATION_CODE'
5320
5321 :5,
5322 'USER_BLOCKED'
5323
5324
5325 :6,
5326 'IP_BLOCKED'
5327
5328
5329 :7,
5330 'NODE_BLOCKED'
5331
5332
5333 :8,
5334 'NO_SENDERID_CAPABILITY'
5335
5336 :9
5337 }
5338 """
5339 - MISC_ERROR
5340 - SERVER_CONNECT_FAILED
5341 - NO_SMS_CAPABILITY
5342 - INSUFFICIENT_FUNDS
5343 - INVALID_CONFIRMATION_CODE
5344 - USER_BLOCKED
5345 - IP_BLOCKED
5346 - NODE_BLOCKED
5347 - NO_SENDERID_CAPABILITY
5348 """
5349 TARGETSTATUS = {1:'TARGET_ANALYZING', 'TARGET_ANALYZING':1, 2:'TARGET_UNDEFINED', 'TARGET_UNDEFINED':2, 3:'TARGET_ACCEPTABLE', 'TARGET_ACCEPTABLE':3, 4:'TARGET_NOT_ROUTABLE', 'TARGET_NOT_ROUTABLE':4, 5:'TARGET_DELIVERY_PENDING', 'TARGET_DELIVERY_PENDING':5, 6:'TARGET_DELIVERY_SUCCESSFUL', 'TARGET_DELIVERY_SUCCESSFUL':6, 7:'TARGET_DELIVERY_FAILED', 'TARGET_DELIVERY_FAILED':7}
5350 """
5351 - TARGET_ANALYZING
5352 - TARGET_UNDEFINED
5353 - TARGET_ACCEPTABLE
5354 - TARGET_NOT_ROUTABLE
5355 - TARGET_DELIVERY_PENDING
5356 - TARGET_DELIVERY_SUCCESSFUL
5357 - TARGET_DELIVERY_FAILED
5358 """
5359 SETBODYRESULT = {0:'BODY_INVALID', 'BODY_INVALID':0, 1:'BODY_TRUNCATED', 'BODY_TRUNCATED':1, 2:'BODY_OK', 'BODY_OK':2, 3:'BODY_LASTCHAR_IGNORED', 'BODY_LASTCHAR_IGNORED':3}
5360 """
5361 - BODY_INVALID - body not set. message status wrong or invalid, or body not valid utf8 string
5362 - BODY_TRUNCATED - body too long. set, but truncated. charsUntilNextChunk contains maxChunks value
5363 - BODY_OK - body was set OK
5364 - BODY_LASTCHAR_IGNORED - last unicode char was ignored, as some of the text would be deleted due to conversion
5365 """
5366 CONFIRM_TYPE = {1:'ID_SMS', 'ID_SMS':1, 2:'ID_MOBILE', 'ID_MOBILE':2, 3:'ID_SKYPEIN', 'ID_SKYPEIN':3}
5367 """
5368 - ID_SMS - Confirm mobile number as SMS sender number
5369 - ID_MOBILE - Confirm mobile number as CLI for SkypeOut calls
5370 - ID_SKYPEIN - unused currently
5371 """
5372
5375 type = property(_sk_get_type)
5376 propid2label[190] = "type"
5377 P_TYPE = 190
5380 status = property(_sk_get_status)
5381 propid2label[191] = "status"
5382 P_STATUS = 191
5384 """
5385 Set asynchronously and meaningful only after invoking Conversation::PostSMS and detecting Sms::STATUS of SOME_TARGETS_FAILED or FAILED.
5386
5387 """
5388 return skypekit.enumof(Sms.FAILUREREASON, self._sk_property("ZG\300\001]\014", 192, True))
5389 failurereason = property(_sk_get_failurereason)
5390 propid2label[192] = "failurereason"
5391 P_FAILUREREASON = 192
5393 """
5394 set to 1 when status goes to FAILED. use MarkSeen() to clear
5395 """
5396 return self._sk_property("ZG0]\014", 48, True)
5397 is_failed_unseen = property(_sk_get_is_failed_unseen)
5398 propid2label[48] = "is_failed_unseen"
5399 P_IS_FAILED_UNSEEN = 48
5401 """
5402 unix timestamp of message submission
5403 """
5404 return self._sk_property("ZG\306\001]\014", 198, True)
5405 timestamp = property(_sk_get_timestamp)
5406 propid2label[198] = "timestamp"
5407 P_TIMESTAMP = 198
5409 """
5410 The total price of sending this SMS message (sum of the individual prices to send to each recipient). Defaults to -1 on instantiation and incremented by the price for each recipient once that recipient's status reflects TARGET_ACCEPTABLE. Use Sms::GetTargetPrice to retrieve individual target prices.
5411
5412 A value of MAX_UINT indicates that SkypeKit is actively querying and/or updating the value. Note that P_PRICE is an integer value. Calculate the actual price (in units specified by P_PRICE_CURRENCY) using P_PRICE_PRECISION as:
5413
5414 ::
5415
5416 actualPrice = price / 10^pricePrecision;
5417
5418
5419 """
5420 return self._sk_property("ZG\301\001]\014", 193, True)
5421 price = property(_sk_get_price)
5422 propid2label[193] = "price"
5423 P_PRICE = 193
5425 """
5426 The decimal precision of the SMS price values, both individual and total. For example, a value of 2 indicates that you should divide the price (represented as an integer) by 100 (10^2) to obtain the actual price.
5427
5428 """
5429 return self._sk_property("ZG1]\014", 49, True)
5430 price_precision = property(_sk_get_price_precision)
5431 propid2label[49] = "price_precision"
5432 P_PRICE_PRECISION = 49
5434 """
5435 should be same as account currency at the time of composing/sending
5436 """
5437 return self._sk_property("ZG\302\001]\014", 194, True)
5438 price_currency = property(_sk_get_price_currency)
5439 propid2label[194] = "price_currency"
5440 P_PRICE_CURRENCY = 194
5442 """
5443 number that should receive the replies
5444 """
5445 return self._sk_property("ZG\307\001]\014", 199, True)
5446 reply_to_number = property(_sk_get_reply_to_number)
5447 propid2label[199] = "reply_to_number"
5448 P_REPLY_TO_NUMBER = 199
5450 """
5451 space-separated normalised pstn numbers
5452 """
5453 return self._sk_property("ZG\303\001]\014", 195, True)
5454 target_numbers = property(_sk_get_target_numbers)
5455 propid2label[195] = "target_numbers"
5456 P_TARGET_NUMBERS = 195
5458 """
5459 binary blob. track with OnPropertyChange(), access with GetTargetStatus(target)
5460 """
5461 return self._sk_property("ZG\304\001]\014", 196, True)
5462 target_statuses = property(_sk_get_target_statuses)
5463 propid2label[196] = "target_statuses"
5464 P_TARGET_STATUSES = 196
5465 - def _sk_get_body(self):
5466 """
5467 actual payload
5468 """
5469 return self._sk_property("ZG\305\001]\014", 197, True)
5470 body = property(_sk_get_body)
5471 propid2label[197] = "body"
5472 P_BODY = 197
5474 """
5475 reference to Message
5476 """
5477 return module_id2classes[9](self._sk_property("ZG\310\006]\014",
5478 840, True), self.transport)
5479 chatmsg_id = property(_sk_get_chatmsg_id)
5480 propid2label[840] = "chatmsg_id"
5481 P_CHATMSG_ID = 840
5482
5487 """
5488 Retrieves the send status of this SMS to a particular recipient (P_TARGET_STATUSES) either prior to or after invoking Conversation::PostSMS.
5489
5490
5491 B{Arguments:}
5492 - B{target} - The normalized phone number of the target recipient.
5493
5494
5495 B{Return values:}
5496 - B{status} - The send status of the target recipient, for example, TARGET_ANALYZING, TARGET_DELIVERY_PENDING, TARGET_DELIVERY_SUCCESSFUL, TARGET_DELIVERY_FAILED, and so forth. TARGET_UNDEFINED implies that the specified target is not a recipient of this SMS.
5497
5498 """
5499 l_request = skypekit.XCallRequest("ZR\014\004", 12, 4)
5500 l_request.add_parm('O', 0, self)
5501 l_request.add_parm('S', 1, target)
5502 l_response = self.transport.xcall(l_request)
5503 l_result = skypekit.enumof(Sms.TARGETSTATUS, l_response.get(1))
5504 return l_result
5509 """
5510 Retrieves the amount of Skype credit necessary to send the SMS to a particular recipient. Defaults to -1 on instantiation and set only when that recipient's status reflects TARGET_ACCEPTABLE. Use Sms::GetPropPrice to retrieve the total cost of this SMS.
5511
5512 Note that the target price is an integer value. Calculate the actual price (in units specified by P_PRICE_CURRENCY) using P_PRICE_PRECISION as:
5513 ::
5514
5515 actualTargetPrice = targetPrice / 10^pricePrecision;
5516
5517
5518
5519 B{Arguments:}
5520 - B{target} - The normalized phone number of the target recipient.
5521
5522
5523 B{Return values:}
5524 - B{price} - The price of sending this SMS message to the target recipient.
5525
5526 """
5527 l_request = skypekit.XCallRequest("ZR\014\015", 12, 13)
5528 l_request.add_parm('O', 0, self)
5529 l_request.add_parm('S', 1, target)
5530 l_response = self.transport.xcall(l_request)
5531 l_result = l_response.get(1, 0)
5532 return l_result
5537 """
5538 Sets the recipient(s) of this SMS. Note that each invocation replaces the target list and re-calculates all prices - they are not additive!
5539
5540
5541 B{Arguments:}
5542 - B{numbers} - Normalized phone number(s) of the intended recipient(s).
5543
5544
5545 B{Return values:}
5546 - B{success} - Set to true if the target list appears to contain valid, normalized telephone numbers. Note that this check is not very reliable. Actual target validity checking occurs asynchronously in the background, and manifests itself as a series of Sms::P_TARGET_STATUSES property change events.
5547
5548 """
5549 l_request = skypekit.XCallRequest("ZR\014\006", 12, 6)
5550 l_request.add_parm('O', 0, self)
5551 l_request.add_parm('S', 1, numbers)
5552 l_response = self.transport.xcall(l_request)
5553 l_result = l_response.get(1, False)
5554 return l_result
5555 - def SetBody(
5556 self,
5557 text
5558 ):
5559 """
5560 -The- method for setting the body text of this SMS. While Conversation::PostSMS does have a body argument, that argument is currently unused.
5561
5562
5563 B{Arguments:}
5564 - B{text} - Message body text.
5565
5566
5567 B{Return values:}
5568 - B{result} - Whether the Message body was successfully set and if not, why not.
5569
5570 - B{chunks} - The Message body as a list of individual chunks.
5571
5572 - B{chars_until_next_chunk} - Number of available characters until creation of the next chunk becomes necessary.
5573
5574 """
5575 l_request = skypekit.XCallRequest("ZR\014\007", 12, 7)
5576 l_request.add_parm('O', 0, self)
5577 l_request.add_parm('S', 1, text)
5578 l_response = self.transport.xcall(l_request)
5579 l_result = (skypekit.enumof(Sms.SETBODYRESULT, l_response.get(1))),
5580 l_result += (l_response.get(2, [])),
5581 l_result += (l_response.get(3, 0)),
5582 return l_result
5583 - def GetBodyChunks(self):
5584 """
5585 Retrieves string list of SMS text chunks in first argument, while the second argument contains the number of available characters until creation of the next chunk becomes necessary.
5586
5587
5588 B{Return values:}
5589 - B{text_chunks} - List of text chunk strings
5590
5591 - B{chars_until_next_chunk} - Number of available characters until creation of the next chunk becomes necessary.
5592
5593 """
5594 l_request = skypekit.XCallRequest("ZR\014\010", 12, 8)
5595 l_request.add_parm('O', 0, self)
5596 l_response = self.transport.xcall(l_request)
5597 l_result = (l_response.get(1, [])),
5598 l_result += (l_response.get(2, 0)),
5599 return l_result
5600 module_id2classes[12] = Sms
5603 """
5604 Transfer in this context refers to transferring (sending/receiving) files among Skype Contacts, not transferring a call to another Skype or PSTN Contact. This class includes file transfer-specific properties and methods, such as FILESIZE, BYTESPERSECOND, Pause and Resume. Recipients of these file transfers must explicitly accept (or decline) any incoming transfer. Transfer instances represent files being sent and received within a Conversation context. Each Transfer instance represents a single file transfer - if a conversation has multiple remote participants, a separate Transfer instance must be instantiated for each remote participant (a Transfer instance is not instantiated for the sender).
5605
5606 Transfer instances cannot be instantiated directly. Instead, you initiate a file transfer by invoking Conversation::PostFiles. This instantiates a Message instance of type POSTED_FILES, which is added to the Conversation for all the participants (including the sender). The Transfer instance is associated with
5607 this Message instance, and the Message::P_BODY_XML looks like this:
5608
5609 ::
5610
5611 Some text<files alt=""><file size="2336020" index="0">test.zip</file></files>
5612
5613
5614 To put it another way, the object chain goes like this:
5615 ::
5616
5617 Conversation->Message->Transfer
5618
5619
5620 The first part of the message (before the files section) comes from the Conversation::PostFiles body argument. For each file in the message, a file section is provided with three fields:
5621
5622 - file size in bytes
5623
5624 - index - more or less arbitrary order in which the transfers should be displayed in the UI
5625
5626 - file name.
5627
5628 For practical purposes, the Message::P_BODY_XML property is not all that useful in this context. The Transfer instances, however, contain the state and progress feedback for your UI. You retrieve these Transfer instances using Message::GetTransfers method. Since the sender can post multiple files to
5629 a Conversation using the same Message, Message:GetTransfers retrieves a list of Transfer instances - one per file per recipient.
5630
5631 You can determine the direction of particular Transfer instance by querying Transfer::P_TYPE (INCOMING/OUTGOING).
5632
5633 You can implement a progress indicator by monitoring Transfer::P_BYTESTRANSFERRED. Note that when testing this on your local network, you will most likely catch these property change events at the beginning and the end of the transfer only - which does not look like too useful. However, for non-local network transfers where the transfer speeds are in the neighborhood of 200-300 KB per second, you should consider implementing progress feedback as being mandatory and expect to catch multiple property change events for all but the smallest files.
5634
5635 Another property of interest is Transfer::P_STATUS. The normal transfer status sequence during successful outgoing transfer is this:
5636
5637 - TRANSFER STATUS -> NEW
5638
5639 - TRANSFER STATUS -> WAITING_FOR_ACCEPT
5640
5641 - TRANSFER STATUS -> CONNECTING
5642
5643 - TRANSFER STATUS -> TRANSFERRING
5644
5645 - TRANSFER STATUS -> CONNECTING
5646
5647 - TRANSFER STATUS -> COMPLETED
5648
5649 The list of all terminal Transfer statuses is:
5650
5651 - COMPLETED
5652
5653 - FAILED
5654
5655 - CANCELLED
5656
5657 - CANCELLED_BY_REMOTE
5658
5659 In-progress transfers can be canceled with Transfer::Cancel and paused/resumed with Transfer::Pause and Transfer::Resume. For transfers that complete with a status of FAILED, your UI should provide feedback based on the value of Transfer::P_FAILUREREASON.
5660
5661 Incoming transfers, once accepted, overwrite existing files with the same name. Before accepting an incoming file transfer,
5662 your UI should prompt the recipient to:
5663
5664 - accept or decline the file
5665
5666 - if accepted, specify the directory of here to save the file (with a pre-filled default)
5667
5668 - if accepted and a file having the same name already exists at the specified destination, your UI should prompt for confirmation to overwrite and provide a way to alter the file name before accepting it
5669
5670 Similarly, your UI should verify the existence of outgoing files prior to invoking Conversation::PostFiles.
5671
5672 Note that you should provide both Conversation::PostFiles and Transfer::Accept methods fully-qualified paths. Otherwise, the paths will be assumed to be relative to the path of SkypeKit runtime, since the methods are actually executed in the runtime context.
5673
5674 """
5675 event_handlers = {}
5676 propid2label = {}
5681 return "Transfer %s" % (self.object_id, )
5682 @staticmethod
5684 """ convert a property name to the enum of the property """
5685 return getattr(Transfer, "P_"+propname.upper())
5686 module_id = 6
5688 """ notifies from a property change """
5689
5690 pass
5691 TYPE = {1:'INCOMING', 'INCOMING':1, 2:'OUTGOING', 'OUTGOING':2}
5692 """
5693 - INCOMING
5694 - OUTGOING
5695 """
5696 STATUS = {
5697 0 :'NEW',
5698 1 :'CONNECTING',
5699 2 :'WAITING_FOR_ACCEPT',
5700 3 :'TRANSFERRING',
5701 4 :'TRANSFERRING_OVER_RELAY',
5702 5 :'PAUSED',
5703 6 :'REMOTELY_PAUSED',
5704 7 :'CANCELLED',
5705 8 :'COMPLETED',
5706 9 :'FAILED',
5707 10:'PLACEHOLDER',
5708 11:'OFFER_FROM_OTHER_INSTANCE',
5709 12:'CANCELLED_BY_REMOTE',
5710 'NEW'
5711
5712
5713 : 0,
5714 'CONNECTING'
5715
5716
5717 : 1,
5718 'WAITING_FOR_ACCEPT'
5719
5720
5721 : 2,
5722 'TRANSFERRING'
5723
5724
5725 : 3,
5726 'TRANSFERRING_OVER_RELAY'
5727
5728 : 4,
5729 'PAUSED'
5730
5731
5732 : 5,
5733 'REMOTELY_PAUSED'
5734
5735
5736 : 6,
5737 'CANCELLED'
5738
5739
5740 : 7,
5741 'COMPLETED'
5742
5743
5744 : 8,
5745 'FAILED'
5746
5747
5748 : 9,
5749 'PLACEHOLDER'
5750
5751
5752 :10,
5753 'OFFER_FROM_OTHER_INSTANCE'
5754
5755 :11,
5756 'CANCELLED_BY_REMOTE'
5757
5758 :12
5759 }
5760 """
5761 Recognized values for the P_STATUS property. Reflects current state of this Transfer.
5762
5763 - NEW - The file has either not been posted (sent) (OUTGOING), or not accepted (received) (INCOMING).
5764
5765 - CONNECTING - A temporary state that transitions either into TRANSFERRING (relayed or direct) or to FAILED. For unknown reasons, outgoing transfers tend go into this state twice - immediately before the actual data transfer starts and immediately after it ends.
5766
5767 - WAITING_FOR_ACCEPT - The files have been posted but the recipient has not yet accepted (or has declined) the transfer.
5768
5769 - TRANSFERRING - The transfer has been accepted and file data is being sent/received. Periodic updates of P_BYTESTRANSFERRED property should occur.
5770
5771 - TRANSFERRING_OVER_RELAY - The transfer has been accepted and file data is being sent/received but is going over at least one relay. Since relayed transfers tend to be significantly slower than direct transfers, you might want to differentiate the two in your UI and notify the user that relayed transfer typically take significantly longer to finish.
5772
5773 - PAUSED - The local user (either the sender or a receiver) has paused the transfer.
5774
5775 - REMOTELY_PAUSED - A remote user has paused the transfer. For senders, a receiver has paused the transfer; for receivers, the sender has paused the transfer.
5776
5777 - CANCELLED - Local side (either sender or receiver) has canceled the transfer. This is a final state of the STATE property.
5778
5779 - COMPLETED - File transfer has completed. This is a terminal state.
5780
5781 - FAILED - File transfer has failed. This is a terminal state. UI should provide feedback, based on value of P_FAILUREREASON.
5782
5783 - PLACEHOLDER - Transfer whose existence has been hinted by corresponding chat message, but which is yet to arrive.
5784
5785 - OFFER_FROM_OTHER_INSTANCE - Outgoing transfer object from another instance of the same account as current local login, running on another system. Hinted through chat message - only implies an offer was made; not necessarily accepted, failed, or completed.
5786
5787 - CANCELLED_BY_REMOTE - Remote side (either sender or receiver) has canceled the transfer. This is a final state of the STATE property.
5788
5789 """
5790 FAILUREREASON = {
5791 1 :'SENDER_NOT_AUTHORISED',
5792 2 :'REMOTELY_CANCELLED',
5793 3 :'FAILED_READ',
5794 4 :'FAILED_REMOTE_READ',
5795 5 :'FAILED_WRITE',
5796 6 :'FAILED_REMOTE_WRITE',
5797 7 :'REMOTE_DOES_NOT_SUPPORT_FT',
5798 8 :'REMOTE_OFFLINE_FOR_TOO_LONG',
5799 9 :'TOO_MANY_PARALLEL',
5800 10:'PLACEHOLDER_TIMEOUT',
5801 'SENDER_NOT_AUTHORISED'
5802
5803 : 1,
5804 'REMOTELY_CANCELLED'
5805
5806
5807 : 2,
5808 'FAILED_READ'
5809
5810
5811 : 3,
5812 'FAILED_REMOTE_READ'
5813
5814
5815 : 4,
5816 'FAILED_WRITE'
5817
5818
5819 : 5,
5820 'FAILED_REMOTE_WRITE'
5821
5822 : 6,
5823 'REMOTE_DOES_NOT_SUPPORT_FT'
5824
5825 : 7,
5826 'REMOTE_OFFLINE_FOR_TOO_LONG'
5827
5828 : 8,
5829 'TOO_MANY_PARALLEL'
5830
5831
5832 : 9,
5833 'PLACEHOLDER_TIMEOUT'
5834
5835 :10
5836 }
5837 """
5838 - SENDER_NOT_AUTHORISED
5839 - REMOTELY_CANCELLED
5840 - FAILED_READ
5841 - FAILED_REMOTE_READ
5842 - FAILED_WRITE
5843 - FAILED_REMOTE_WRITE
5844 - REMOTE_DOES_NOT_SUPPORT_FT
5845 - REMOTE_OFFLINE_FOR_TOO_LONG
5846 - TOO_MANY_PARALLEL
5847 - PLACEHOLDER_TIMEOUT
5848 """
5849
5851 """
5852 INCOMING / OUTGOING
5853
5854 """
5855 return skypekit.enumof(Transfer.TYPE, self._sk_property("ZGP]\006", 80, True))
5856 type = property(_sk_get_type)
5857 propid2label[80] = "type"
5858 P_TYPE = 80
5860 """
5861 Skype Name of the remote party of the file transfer. If a file is posted in a conversation with more than one participant, Transfer objects are created for each of them - so a transfer is always to one single remote target.
5862
5863 """
5864 return self._sk_property("ZGQ]\006", 81, True)
5865 partner_handle = property(_sk_get_partner_handle)
5866 propid2label[81] = "partner_handle"
5867 P_PARTNER_HANDLE = 81
5869 """
5870 Display name of the remote participant.
5871
5872 """
5873 return self._sk_property("ZGR]\006", 82, True)
5874 partner_dispname = property(_sk_get_partner_dispname)
5875 propid2label[82] = "partner_dispname"
5876 P_PARTNER_DISPNAME = 82
5878 """
5879 Current state of the transfer
5880
5881 """
5882 return skypekit.enumof(Transfer.STATUS, self._sk_property("ZGS]\006", 83, True))
5883 status = property(_sk_get_status)
5884 propid2label[83] = "status"
5885 P_STATUS = 83
5892 failurereason = property(_sk_get_failurereason)
5893 propid2label[84] = "failurereason"
5894 P_FAILUREREASON = 84
5896 """
5897 UNIX timestamp of when this Transfer instance was instantiated, not when the transfer process actually started (was accepted from receiver side). Do not use this property when calculate the data transfer speed! Instead, monitor changes to P_BYTESPERSECOND.
5898
5899 """
5900 return self._sk_property("ZGU]\006", 85, True)
5901 starttime = property(_sk_get_starttime)
5902 propid2label[85] = "starttime"
5903 P_STARTTIME = 85
5905 """
5906 UNIX timestamp of when this Transfer COMPLETED or FAILED. This property is never set if the receiving side (local or remote) canceled the transfer.
5907
5908 """
5909 return self._sk_property("ZGV]\006", 86, True)
5910 finishtime = property(_sk_get_finishtime)
5911 propid2label[86] = "finishtime"
5912 P_FINISHTIME = 86
5914 """
5915 The path -and- filename of the file being transfered (typically fully qualified). For the receiver, SkypeKit sets this property upon acceptance of the incoming transfer. If not fully qualified, the path is assumed to be relative to the path of the SkypeKit runtime.
5916
5917 """
5918 return self._sk_property("ZGW]\006", 87, True)
5919 filepath = property(_sk_get_filepath)
5920 propid2label[87] = "filepath"
5921 P_FILEPATH = 87
5923 """
5924 The filename -only- of the file being transfered. The receiver side can use this property to pre-populate relevant UI components while prompting the user to accept the incoming transfer.
5925
5926 """
5927 return self._sk_property("ZGX]\006", 88, True)
5928 filename = property(_sk_get_filename)
5929 propid2label[88] = "filename"
5930 P_FILENAME = 88
5932 """
5933 The size of the file being transferred in bytes. Depending on the magnitude of this value, your UI might want to display the size in terms of kilobytes or even megabytes.
5934
5935 """
5936 return self._sk_property("ZGY]\006", 89, True)
5937 filesize = property(_sk_get_filesize)
5938 propid2label[89] = "filesize"
5939 P_FILESIZE = 89
5941 """
5942 The number of bytes already transferred. Calculate the percentage of the file transferred so far as:
5943 ::
5944
5945 P_BYTESTRANSFERRED / (P_FILESIZE / 100);
5946
5947
5948 Use float variables to avoid problems with files smaller than 100 bytes!
5949
5950 """
5951 return self._sk_property("ZGZ]\006", 90, True)
5952 bytestransferred = property(_sk_get_bytestransferred)
5953 propid2label[90] = "bytestransferred"
5954 P_BYTESTRANSFERRED = 90
5956 """
5957 Current data transfer speed in bytes per second. Typically, your UI will want to display this value as kilobytes per second (KBps).
5958
5959 """
5960 return self._sk_property("ZG[]\006", 91, True)
5961 bytespersecond = property(_sk_get_bytespersecond)
5962 propid2label[91] = "bytespersecond"
5963 P_BYTESPERSECOND = 91
5965 """
5966 The "global ID" of this Transfer's associated Message instance. GUIDs are shared across Skype client instances and across all users that can see this Message.
5967
5968 """
5969 return self._sk_property("ZG\134]\006", 92, True)
5970 chatmsg_guid = property(_sk_get_chatmsg_guid)
5971 propid2label[92] = "chatmsg_guid"
5972 P_CHATMSG_GUID = 92
5974 """
5975 A more or less arbitrary index for ordering multiple file transfers within the UI.
5976
5977 """
5978 return self._sk_property("ZG]]\006", 93, True)
5979 chatmsg_index = property(_sk_get_chatmsg_index)
5980 propid2label[93] = "chatmsg_index"
5981 P_CHATMSG_INDEX = 93
5983 """
5984 The "global ID" of this Transfer's associated Conversation (as chained through its associated Message). GUIDs are shared across Skype client instances and across all users that can see this Conversation.
5985
5986 Note that currently SkypeKit sets this property for INCOMING file transfers only and returns 0 (zero) for all sending side transfers. This is a known bug.
5987
5988 """
5989 return module_id2classes[18](self._sk_property("ZGb]\006",
5990 98, True), self.transport)
5991 convo_id = property(_sk_get_convo_id)
5992 propid2label[98] = "convo_id"
5993 P_CONVO_ID = 98
5994
5995 - def Accept(
5996 self,
5997 filename_with_path
5998 ):
5999 """
6000 Accepts an incoming file transfer and saves it to specified file on the local file system. If the specified file exists, SkypeKit will silently overwrite it. Your UI should prompting the user for confirmation in this case and provide a means for canceling the file transfer or specifying a different target file.
6001
6002
6003 B{Arguments:}
6004 - B{filename_with_path} - Where on the local file system to save the file being transferred. Note that you should specify the path as being fully-qualified. Otherwise, SkypeKit will be assume it to be relative to the SkypeKit runtime path, since the method is actually executed in the runtime context.
6005
6006
6007 B{Return values:}
6008 - B{success} - Set to true if the specified target file was successfully created on the local file system -and- the initial write(s) succeeded. However, the transfer itself can subsequently fail before completion due to its being canceled (either locally or remotely), network failure, local file system space/write issues, and so forth.
6009
6010 """
6011 l_request = skypekit.XCallRequest("ZR\006\003", 6, 3)
6012 l_request.add_parm('O', 0, self)
6013 l_request.add_parm('f', 1, filename_with_path)
6014 l_response = self.transport.xcall(l_request)
6015 l_result = l_response.get(1, False)
6016 return l_result
6018 """
6019 Temporarily pauses an in-progress incoming or outgoing file transfer. For incoming transfers, only this affects the sender and the invoking recipient only. For outgoing transfers, this affects the sender and all recipients.
6020
6021 """
6022 l_request = skypekit.XCallRequest("ZR\006\004", 6, 4)
6023 l_request.add_parm('O', 0, self)
6024 self.transport.xcall(l_request)
6026 """
6027 Resumes a previously paused file transfer.
6028
6029 """
6030 l_request = skypekit.XCallRequest("ZR\006\005", 6, 5)
6031 l_request.add_parm('O', 0, self)
6032 self.transport.xcall(l_request)
6034 """
6035 Cancels an in-progress file transfer. Transfer::STATUS will transition to CANCELLED for incoming file transfers and to CANCELLED_BY_REMOTE for outgoing transfers.
6036
6037 """
6038 l_request = skypekit.XCallRequest("ZR\006\006", 6, 6)
6039 l_request.add_parm('O', 0, self)
6040 self.transport.xcall(l_request)
6041 module_id2classes[6] = Transfer
6042
6043 -class Account(skypekit.Object):
6044 """
6045 Represents a local account. Encapsulates methods for Skype account creation, login and logout as well as account profile setting properties. NB! Unlike all the other SkypeKit classes, most of the Account class properties are actually read-write. In fact, there are two sorts of Account's read-write properties: server-side properties and local properties. Different setter methods need to be used for those two kinds.
6046
6047 The subset of server-side properties consists of all the policy properties (everything with _POLICY suffix) that are all of type int and can be set with SetServersideIntProperty method. There is currently only one server-side string property - OFFLINE_CALLFORWARD which can be set with SetServersideStrProperty setter.
6048
6049 The set of writeable account profile properties (local profile) is as follows;
6050
6051 - P_FULLNAME,
6052
6053 - P_BIRTHDAY,
6054
6055 - P_GENDER,
6056
6057 - P_LANGUAGES,
6058
6059 - P_COUNTRY,
6060
6061 - P_PROVINCE,
6062
6063 - P_CITY,
6064
6065 - P_PHONE_HOME,
6066
6067 - P_PHONE_OFFICE,
6068
6069 - P_PHONE_MOBILE,
6070
6071 - P_EMAILS,
6072
6073 - P_HOMEPAGE,
6074
6075 - P_ABOUT,
6076
6077 - P_MOOD_TEXT,
6078
6079 - P_TIMEZONE,
6080
6081 - P_AVATAR_IMAGE,
6082
6083 - P_RICH_MOOD_TEXT
6084
6085 These can be set with SetIntProperty, SetStrProperty and SetBinProperty setter methods. Note that there are special methods for changing account online status (availability) and enabling/disabling auto-login - SetAvailability and SetSavePwd.
6086
6087 Note that to set Account properties, you that Account needs to be logged in. Generally, assumption is that the first thing you do with an Account object after you retrieve it with Skype::GetAccount is login, with exception of creating a new account.
6088
6089 The Account class has no default constructor and creating an Account instance is not the same as creating a Skype account. To create a Skype account:
6090
6091
6092 - obtain an Account instance by invoking Skype::GetAccount. This automatically sets P_SKYPENAME.
6093
6094 - set any additional profile-related properties. Skype recommends that you minimally set the following:
6095
6096 - their email address so that they can retrieve a lost password (P_EMAILS)
6097
6098 - the user's full name (P_FULLNAME)
6099
6100 - at least one phone number (P_PHONE_HOME, P_PHONE_HOME, P_PHONE_OFFICE)
6101
6102 - invoke Account::Register to actually create the account
6103
6104 """
6105 event_handlers = {}
6106 propid2label = {}
6111 return "Account %s" % (self.object_id, )
6112 @staticmethod
6114 """ convert a property name to the enum of the property """
6115 return getattr(Account, "P_"+propname.upper())
6116 module_id = 5
6118 """ notifies from a property change """
6119
6120 pass
6121 STATUS = {1:'LOGGED_OUT', 'LOGGED_OUT':1, 2:'LOGGED_OUT_AND_PWD_SAVED', 'LOGGED_OUT_AND_PWD_SAVED':2, 3:'CONNECTING_TO_P2P', 'CONNECTING_TO_P2P':3, 4:'CONNECTING_TO_SERVER', 'CONNECTING_TO_SERVER':4, 5:'LOGGING_IN', 'LOGGING_IN':5, 6:'INITIALIZING', 'INITIALIZING':6, 7:'LOGGED_IN', 'LOGGED_IN':7, 8:'LOGGING_OUT', 'LOGGING_OUT':8}
6122 """
6123 - LOGGED_OUT
6124 - LOGGED_OUT_AND_PWD_SAVED - the account is logged out, but password is not needed for re-login
6125 - CONNECTING_TO_P2P - connecting to P2P network
6126 - CONNECTING_TO_SERVER - connecting to login server
6127 - LOGGING_IN - waiting for response from server
6128 - INITIALIZING - response OK. initialising account-specific lib structures
6129 - LOGGED_IN - alright, we're good to go!
6130 - LOGGING_OUT - Logout() has been called but not processed yet
6131 """
6132 CBLSYNCSTATUS = {0:'CBL_INITIALIZING', 'CBL_INITIALIZING':0, 1:'CBL_INITIAL_SYNC_PENDING', 'CBL_INITIAL_SYNC_PENDING':1, 2:'CBL_SYNC_PENDING', 'CBL_SYNC_PENDING':2, 3:'CBL_SYNC_IN_PROGRESS', 'CBL_SYNC_IN_PROGRESS':3, 4:'CBL_IN_SYNC', 'CBL_IN_SYNC':4, 5:'CBL_SYNC_FAILED', 'CBL_SYNC_FAILED':5, 6:'CBL_REMOTE_SYNC_PENDING', 'CBL_REMOTE_SYNC_PENDING':6}
6133 """
6134 Recognized values for the P_CBLSYNCSTATUS property. CBL stands for Central Buddy List. In principle, this property and its states can be ignored by most UI developers. However, it can help to optimize UI buildup and behaviour, particularly in case of limited resources (such as mobile devices).
6135
6136 CBL is used to backup your contact list, contact groups, and profile information, and also used to synchronize this information with other Skype instances of your account (i.e. on another device). CBL sync can occur both during login and during normal operation. Note that CBL synchronization does not take place immediately after an Account property is changed. A delay between the first property change and CBL sync initiation enables the client to accumulate changes and do the synchronization in bulk.
6137
6138 Clients with limited resources might want to wait for CBL_IN_SYNC status before generating their UI's contact list representation. Otherwise it might be forced to redraw the contact list multiple times, as new updates get retrieved from the server-side. Similarly, applications that modify an account's mood message might want to know when the P_MOOD_TEXT or P_RICH_MOOD_TEXT property is synchronized to the server. Note that this sync is only for CBL and other logged in instances of the same account - other contacts will receive the mood message update directly.
6139
6140 - CBL_INITIALIZING - status is not clear (yet)
6141 - CBL_INITIAL_SYNC_PENDING - first sync with empty profile
6142 - CBL_SYNC_PENDING - Account properties are considered to be out of sync with CBL - attempt at synchronization is imminent. You might wish to wait with updating UI components that display the data that is about to change anyway.
6143 - CBL_SYNC_IN_PROGRESS - CBL synchronization is currently taking place.
6144 - CBL_IN_SYNC - Account properties are up-to-date.
6145 - CBL_SYNC_FAILED - CBL sync has. Another attempt will be made after several minutes. If a second attempt also fails, subsequent attempts at synchronization will be made at ever increasing intervals.
6146 - CBL_REMOTE_SYNC_PENDING - we have received a hint that there is a remote data change in CBL
6147 """
6148 LOGOUTREASON = {
6149 1 :'LOGOUT_CALLED',
6150 2 :'HTTPS_PROXY_AUTH_FAILED',
6151 3 :'SOCKS_PROXY_AUTH_FAILED',
6152 4 :'P2P_CONNECT_FAILED',
6153 5 :'SERVER_CONNECT_FAILED',
6154 6 :'SERVER_OVERLOADED',
6155 7 :'DB_IN_USE',
6156 8 :'INVALID_SKYPENAME',
6157 9 :'INVALID_EMAIL',
6158 10:'UNACCEPTABLE_PASSWORD',
6159 11:'SKYPENAME_TAKEN',
6160 12:'REJECTED_AS_UNDERAGE',
6161 13:'NO_SUCH_IDENTITY',
6162 14:'INCORRECT_PASSWORD',
6163 15:'TOO_MANY_LOGIN_ATTEMPTS',
6164 16:'PASSWORD_HAS_CHANGED',
6165 17:'PERIODIC_UIC_UPDATE_FAILED',
6166 18:'DB_DISK_FULL',
6167 19:'DB_IO_ERROR',
6168 20:'DB_CORRUPT',
6169 21:'DB_FAILURE',
6170 22:'INVALID_APP_ID',
6171 23:'APP_ID_FAILURE',
6172 24:'UNSUPPORTED_VERSION',
6173 'LOGOUT_CALLED'
6174
6175
6176 : 1,
6177 'HTTPS_PROXY_AUTH_FAILED'
6178
6179 : 2,
6180 'SOCKS_PROXY_AUTH_FAILED'
6181
6182 : 3,
6183 'P2P_CONNECT_FAILED'
6184
6185
6186 : 4,
6187 'SERVER_CONNECT_FAILED'
6188
6189 : 5,
6190 'SERVER_OVERLOADED'
6191
6192
6193 : 6,
6194 'DB_IN_USE'
6195
6196
6197 : 7,
6198 'INVALID_SKYPENAME'
6199
6200
6201 : 8,
6202 'INVALID_EMAIL'
6203
6204
6205 : 9,
6206 'UNACCEPTABLE_PASSWORD'
6207
6208 :10,
6209 'SKYPENAME_TAKEN'
6210
6211
6212 :11,
6213 'REJECTED_AS_UNDERAGE'
6214
6215 :12,
6216 'NO_SUCH_IDENTITY'
6217
6218
6219 :13,
6220 'INCORRECT_PASSWORD'
6221
6222
6223 :14,
6224 'TOO_MANY_LOGIN_ATTEMPTS'
6225
6226 :15,
6227 'PASSWORD_HAS_CHANGED'
6228
6229 :16,
6230 'PERIODIC_UIC_UPDATE_FAILED'
6231
6232 :17,
6233 'DB_DISK_FULL'
6234
6235
6236 :18,
6237 'DB_IO_ERROR'
6238
6239
6240 :19,
6241 'DB_CORRUPT'
6242
6243
6244 :20,
6245 'DB_FAILURE'
6246
6247
6248 :21,
6249 'INVALID_APP_ID'
6250
6251
6252 :22,
6253 'APP_ID_FAILURE'
6254
6255
6256 :23,
6257 'UNSUPPORTED_VERSION'
6258
6259 :24
6260 }
6261 """
6262 Recognized values for the Account::P_LOGOUTREASON. Note that this property should only be examined when Account::P_STATUS is LOGGED_OUT or LOGGED_OUT_AND_PWD_SAVED. That is, you should not monitor changes to this property in Account::OnChange callback, other than after already having checked that P_STATUS property has appropriate value. The reason for this is that the LOGOUTREASON does not get reset before the next login attempt. For example: if a user tried to log in with a wrong password, the LOGOUTREASON gets set to INCORRECT_PASSWORD. Now, if the user tries to log in again, and yet again submits an incorrect password, the value of the LOGOUTREASON does not change anymore, because it already is set to INCORRECT_PASSWORD. Consequently, Account::OnChange will not fire in this case.
6263
6264 - LOGOUT_CALLED - manual logout (or unknown reason from previous session)
6265 - HTTPS_PROXY_AUTH_FAILED - sync errors at login/registration
6266 - SOCKS_PROXY_AUTH_FAILED - sync errors at login/registration
6267 - P2P_CONNECT_FAILED - sync errors at login/registration
6268 - SERVER_CONNECT_FAILED - sync errors at login/registration
6269 - SERVER_OVERLOADED - sync errors at login/registration
6270 - DB_IN_USE - sync errors at login/registration
6271 - INVALID_SKYPENAME - sync errors at registration
6272 - INVALID_EMAIL - sync errors at registration
6273 - UNACCEPTABLE_PASSWORD - sync errors at registration
6274 - SKYPENAME_TAKEN - sync errors at registration
6275 - REJECTED_AS_UNDERAGE - sync errors at registration
6276 - NO_SUCH_IDENTITY - sync errors at login
6277 - INCORRECT_PASSWORD - sync errors at login
6278 - TOO_MANY_LOGIN_ATTEMPTS - sync errors at login
6279 - PASSWORD_HAS_CHANGED - async errors (can happen anytime while logged in)
6280 - PERIODIC_UIC_UPDATE_FAILED - async errors (can happen anytime while logged in)
6281 - DB_DISK_FULL - async errors (can happen anytime while logged in)
6282 - DB_IO_ERROR - async errors (can happen anytime while logged in)
6283 - DB_CORRUPT - async errors (can happen anytime while logged in)
6284 - DB_FAILURE - deprecated (superceded by more detailed DB_* errors)
6285 - INVALID_APP_ID - platform sdk
6286 - APP_ID_FAILURE - platform sdk
6287 - UNSUPPORTED_VERSION - forced upgrade/discontinuation
6288 """
6289 PWDCHANGESTATUS = {0:'PWD_OK', 'PWD_OK':0, 1:'PWD_CHANGING', 'PWD_CHANGING':1, 2:'PWD_INVALID_OLD_PASSWORD', 'PWD_INVALID_OLD_PASSWORD':2, 3:'PWD_SERVER_CONNECT_FAILED', 'PWD_SERVER_CONNECT_FAILED':3, 4:'PWD_OK_BUT_CHANGE_SUGGESTED', 'PWD_OK_BUT_CHANGE_SUGGESTED':4, 5:'PWD_MUST_DIFFER_FROM_OLD', 'PWD_MUST_DIFFER_FROM_OLD':5, 6:'PWD_INVALID_NEW_PWD', 'PWD_INVALID_NEW_PWD':6, 7:'PWD_MUST_LOG_IN_TO_CHANGE', 'PWD_MUST_LOG_IN_TO_CHANGE':7}
6290 """
6291 Recognized values for the P_PWDCHANGESTATUS property that provides information on whether a password change succeeded or failed, giving detailed failure reason. After successful return from the Change Password method, clients should monitor the P_PWDCHANGESTATUS property changes.
6292
6293 - PWD_CHANGING - consider displaying an "in progress" indicator and continue polling
6294
6295 - PWD_OK - consider displaying an updated indicator and stop polling
6296
6297 - PWD_OK_BUT_CHANGE_SUGGESTED - consider displaying an updated indicator, along with a recommendation to change again to a stronger password.
6298
6299 - PWD_OK - Password change succeeded.
6300
6301 - PWD_CHANGING - Password change is in progress.
6302
6303 - PWD_INVALID_OLD_PASSWORD - Old password was incorrect.
6304
6305 - PWD_SERVER_CONNECT_FAILED - Failed to verify password because of no connection to server.
6306
6307 - PWD_OK_BUT_CHANGE_SUGGESTED - Password was set but server didn't like it much.
6308
6309 - PWD_MUST_DIFFER_FROM_OLD - New password was exactly the same as old one.
6310
6311 - PWD_INVALID_NEW_PWD - The new password was unacceptable. (too short, too simple, etc.)
6312
6313 - PWD_MUST_LOG_IN_TO_CHANGE - Account was currently not logged in.
6314
6315 """
6316 COMMITSTATUS = {1:'COMMITTED', 'COMMITTED':1, 2:'COMMITTING_TO_SERVER', 'COMMITTING_TO_SERVER':2, 3:'COMMIT_FAILED', 'COMMIT_FAILED':3}
6317 """
6318 The list of possible values of Account class COMMITSTATUS property. Note that this property and its values have nothing to do with (automatic) CBL synchronization. Rather, the COMMITSTATUS reflects commit status to account's server side properties initiated with calls to Account class SetServersideIntProperty and Account class SetServersideStrProperty methods. After those methods, your client UI may want to wait until the COMMITSTATUS becomes COMMITTING_TO_SERVER followed by COMMITTED and inform the user if the value becomes COMMIT_FAILED. SetServerside<type>Property methods are used for writing privacy policy related and call forwarding related Account properties to the server. Unlike CBL synchronization, those updates are executed immediately.
6319
6320 - COMMITTED - No pending updates to the server.
6321
6322 - COMMITTING_TO_SERVER - Update to the server in progress.
6323
6324 - COMMIT_FAILED - Server update has failed.
6325
6326 """
6327 CHATPOLICY = {0:'EVERYONE_CAN_ADD', 'EVERYONE_CAN_ADD':0, 2:'BUDDIES_OR_AUTHORIZED_CAN_ADD', 'BUDDIES_OR_AUTHORIZED_CAN_ADD':2}
6328 """
6329 Recognized values for the P_CHAT_POLICY property that controls whether non-authorized users can initiate text chat with the currently logged in account. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntProperty
6330
6331 - EVERYONE_CAN_ADD - Unauthorized contacts can initiate text chat.
6332
6333 - BUDDIES_OR_AUTHORIZED_CAN_ADD - Only authorized contacts can initiate chat (default policy).
6334
6335 """
6336 SKYPECALLPOLICY = {0:'EVERYONE_CAN_CALL', 'EVERYONE_CAN_CALL':0, 2:'BUDDIES_OR_AUTHORIZED_CAN_CALL', 'BUDDIES_OR_AUTHORIZED_CAN_CALL':2}
6337 """
6338 Recognized values for the P_SKYPECALLPOLICY property that controls acceptance of incoming Skype calls. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side.
6339
6340 - EVERYONE_CAN_CALL - Skype calls accepted from unauthorized contacts.
6341 - BUDDIES_OR_AUTHORIZED_CAN_CALL - Skype calls not accepted from unauthorized contacts.
6342 """
6343 PSTNCALLPOLICY = {0:'ALL_NUMBERS_CAN_CALL', 'ALL_NUMBERS_CAN_CALL':0, 1:'DISCLOSED_NUMBERS_CAN_CALL', 'DISCLOSED_NUMBERS_CAN_CALL':1, 2:'BUDDY_NUMBERS_CAN_CALL', 'BUDDY_NUMBERS_CAN_CALL':2}
6344 """
6345 Recognized values for the P_PSTNCALLPOLICY property that controls whether (and from whom) this account accepts incoming PSTN calls. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntProperty
6346
6347 - ALL_NUMBERS_CAN_CALL - All incoming PSTN calls are accepted.
6348 - DISCLOSED_NUMBERS_CAN_CALL - Only PSTN calls that report caller ID are accepted.
6349 - BUDDY_NUMBERS_CAN_CALL - Only calls from PSTN numbers found in local contact list are accepted.
6350 """
6351 AVATARPOLICY = {0:'BUDDIES_OR_AUTHORIZED_CAN_SEE', 'BUDDIES_OR_AUTHORIZED_CAN_SEE':0, 2:'EVERYONE_CAN_SEE', 'EVERYONE_CAN_SEE':2}
6352 """
6353 Recognized values for the P_AVATAR_POLICY property that controls whether remote contacts can view local account's avatar image. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side.
6354 Note that setting account's AVATAR_POLICY to BUDDIES_OR_AUTHORIZED_CAN_SEE does not guarantee that remote users will be able to immediately retrieve the avatar picture via corresponding Contact object. Avatar changes propagate between clients only when direct sessions between clients are established. Direct sessions are established during live sessions or whilst online contacts are engaged in chat.
6355
6356 - BUDDIES_OR_AUTHORIZED_CAN_SEE - Only authorized remote users can see this user's avatar image
6357 - EVERYONE_CAN_SEE - Everyone can see this user's avatar image, once the contact/account avatar property has been synchronized during a direct session. The avatar image may also become viewable on some Skype Web-based services.
6358 """
6359 BUDDYCOUNTPOLICY = {0:'DISCLOSE_TO_AUTHORIZED', 'DISCLOSE_TO_AUTHORIZED':0, 1:'DISCLOSE_TO_NOONE', 'DISCLOSE_TO_NOONE':1}
6360 """
6361 Recognized values for the P_BUDDYCOUNT_POLICY property that controls whether the number of this user's authorized contacts is visible to other users, either through Account::GetPropNrofAuthedBuddies or Contact::GetPropNrofAuthedBuddies when those instances reference this user. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntProperty, like this:
6362 account->SetServersideIntProperty(Account::P_BUDDYCOUNT_POLICY, Account::DISCLOSE_TO_AUTHORIZED);
6363 account->SetServersideIntProperty(Account::P_BUDDYCOUNT_POLICY, Account::DISCLOSE_TO_NOONE );
6364
6365 - DISCLOSE_TO_AUTHORIZED - Authorized remote users can retrieve the number of this user's authorized contacts (Contact::P_NROF_AUTHED_BUDDIES)
6366 - DISCLOSE_TO_NOONE - No remote user - regardless their authorization status - can retrieve the number of this user's authorized contacts. Account::GetPropNrofAuthedBuddies and Contact::GetPropNrofAuthedBuddies will always return 0
6367 """
6368 TIMEZONEPOLICY = {0:'TZ_AUTOMATIC', 'TZ_AUTOMATIC':0, 1:'TZ_MANUAL', 'TZ_MANUAL':1, 2:'TZ_UNDISCLOSED', 'TZ_UNDISCLOSED':2}
6369 """
6370 Recognized values for the P_TIMEZONEPOLICY property that sets the rules for timezone offset so remote clients can determine your local time. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side.
6371 - TZ_AUTOMATIC - Account's timezone setting is determined automatically.
6372
6373 - TZ_MANUAL - Account's timezone setting is set manually.
6374
6375 - TZ_UNDISCLOSED - Remote users will have no idea what your local time is.
6376
6377 """
6378 WEBPRESENCEPOLICY = {0:'WEBPRESENCE_DISABLED', 'WEBPRESENCE_DISABLED':0, 1:'WEBPRESENCE_ENABLED', 'WEBPRESENCE_ENABLED':1}
6379 """
6380 Recognized values for the P_WEBPRESENCEPOLICY property that controls whether your online status (presence) can be seen using the "Skype buttons" ( http://www.skype.com/share/buttons/ ) embedded in web pages. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side.
6381
6382 - WEBPRESENCE_DISABLED - Disable displaying online status on web for this account.
6383 - WEBPRESENCE_ENABLED - Enable displaying online status on web for this account.
6384 """
6385 PHONENUMBERSPOLICY = {0:'PHONENUMBERS_VISIBLE_FOR_BUDDIES', 'PHONENUMBERS_VISIBLE_FOR_BUDDIES':0, 1:'PHONENUMBERS_VISIBLE_FOR_EVERYONE', 'PHONENUMBERS_VISIBLE_FOR_EVERYONE':1}
6386 """
6387 Recognized values for the P_PHONENUMBERSPOLICY property that controls whether unauthorized remote users can see associated phone numbers in their UI (for reference, see the different phone number tabs in Windows desktop Client contact view). Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntProperty
6388
6389 - PHONENUMBERS_VISIBLE_FOR_BUDDIES - Only authorized contacts can see the phone numbers.
6390 - PHONENUMBERS_VISIBLE_FOR_EVERYONE - Everyone can see the phone numbers.
6391 """
6392 VOICEMAILPOLICY = {0:'VOICEMAIL_ENABLED', 'VOICEMAIL_ENABLED':0, 1:'VOICEMAIL_DISABLED', 'VOICEMAIL_DISABLED':1}
6393 """
6394 Recognized values for the P_VOICEMAILPOLICY property that controls acceptance of incoming voicemail messages. Note that since this set of values is associated with a server-side property, you must set that property using Account::SetServersideIntPropertyserver-side.
6395
6396 - VOICEMAIL_ENABLED - Incoming voicemails enabled.
6397 - VOICEMAIL_DISABLED - Incoming voicemails disabled.
6398 """
6399 CAPABILITYSTATUS = {0:'NO_CAPABILITY', 'NO_CAPABILITY':0, 1:'CAPABILITY_EXISTS', 'CAPABILITY_EXISTS':1, 2:'FIRST_EXPIRY_WARNING', 'FIRST_EXPIRY_WARNING':2, 3:'SECOND_EXPIRY_WARNING', 'SECOND_EXPIRY_WARNING':3, 4:'FINAL_EXPIRY_WARNING', 'FINAL_EXPIRY_WARNING':4}
6400 """
6401 Account capabability statuses are possible values of Contact class CAPABILITY enumerator, when that enumerator is used in context of account. Compared to Contact class CAPABILITYSTATUS enums, Account class CAPABILITYSTATUS has additional items for subscription expiration warnings.
6402
6403 - NO_CAPABILITY - Capability is not supported by the currently logged in SkypeKit client.
6404 - CAPABILITY_EXISTS - Capability is supported by the currently logged in SkypeKit client.
6405
6406 - FIRST_EXPIRY_WARNING - Support for this capability ends this month (within 30 days)
6407
6408 - SECOND_EXPIRY_WARNING - Support for this capability ends this week (within 7 days)
6409
6410 - FINAL_EXPIRY_WARNING - Support for this capability ends today
6411
6412 """
6413
6419 status = property(_sk_get_status)
6420 propid2label[70] = "status"
6421 P_STATUS = 70
6427 pwdchangestatus = property(_sk_get_pwdchangestatus)
6428 propid2label[71] = "pwdchangestatus"
6429 P_PWDCHANGESTATUS = 71
6431 """
6432 This property should only be examined when Account::P_STATUS is LOGGED_OUT or LOGGED_OUT_AND_PWD_SAVED. That is, you should not monitor changes to this property in Account::OnChange callback, other than after already having checked that P_STATUS property has appropriate value. The reason for this is that the LOGOUTREASON does not get reset before the next login attempt. For example: if a user tried to log in with a wrong password, the LOGOUTREASON gets set to INCORRECT_PASSWORD. Now, if the user tries to log in again, and yet again submits an incorrect password, the value of the LOGOUTREASON does not change anymore, because it already is set to INCORRECT_PASSWORD. Consequently, Account::OnChange will not fire in this case.
6433
6434 """
6435 return skypekit.enumof(Account.LOGOUTREASON, self._sk_property("ZGI]\005", 73, True))
6436 logoutreason = property(_sk_get_logoutreason)
6437 propid2label[73] = "logoutreason"
6438 P_LOGOUTREASON = 73
6444 commitstatus = property(_sk_get_commitstatus)
6445 propid2label[78] = "commitstatus"
6446 P_COMMITSTATUS = 78
6448 """
6449 suggested skypename. present if logoutreason==SKYPENAME_TAKEN
6450 """
6451 return self._sk_property("ZGH]\005", 72, True)
6452 suggested_skypename = property(_sk_get_suggested_skypename)
6453 propid2label[72] = "suggested_skypename"
6454 P_SUGGESTED_SKYPENAME = 72
6456 """
6457 'EUR', 'USD', etc.
6458 """
6459 return self._sk_property("ZGJ]\005", 74, True)
6460 skypeout_balance_currency = property(_sk_get_skypeout_balance_currency)
6461 propid2label[74] = "skypeout_balance_currency"
6462 P_SKYPEOUT_BALANCE_CURRENCY = 74
6464 """
6465 balance in 'cents'
6466 """
6467 return self._sk_property("ZGK]\005", 75, True)
6468 skypeout_balance = property(_sk_get_skypeout_balance)
6469 propid2label[75] = "skypeout_balance"
6470 P_SKYPEOUT_BALANCE = 75
6472 """
6473 decimal points in ACCOUNT_SKYPEOUT_BALANCE
6474 """
6475 return self._sk_property("ZG\244\006]\005", 804, True)
6476 skypeout_precision = property(_sk_get_skypeout_precision)
6477 propid2label[804] = "skypeout_precision"
6478 P_SKYPEOUT_PRECISION = 804
6480 """
6481 space-separated list of skypein numbers
6482 """
6483 return self._sk_property("ZGL]\005", 76, True)
6484 skypein_numbers = property(_sk_get_skypein_numbers)
6485 propid2label[76] = "skypein_numbers"
6486 P_SKYPEIN_NUMBERS = 76
6492 cblsyncstatus = property(_sk_get_cblsyncstatus)
6493 propid2label[79] = "cblsyncstatus"
6494 P_CBLSYNCSTATUS = 79
6496 """
6497 space-separated list of 'begSecond,endSecond,identity' tokens
6498 """
6499 return self._sk_property("ZGM]\005", 77, True)
6500 offline_callforward = property(_sk_get_offline_callforward)
6501 propid2label[77] = "offline_callforward"
6502 P_OFFLINE_CALLFORWARD = 77
6504 """
6505 Server-side account property, use SetServerside*Property() to set
6506 """
6507 return skypekit.enumof(Account.CHATPOLICY, self._sk_property("ZG\240\001]\005", 160, True))
6508 chat_policy = property(_sk_get_chat_policy)
6509 propid2label[160] = "chat_policy"
6510 P_CHAT_POLICY = 160
6512 """
6513 Server-side account property, use SetServerside*Property() to set
6514 """
6515 return skypekit.enumof(Account.SKYPECALLPOLICY, self._sk_property("ZG\241\001]\005", 161, True))
6516 skype_call_policy = property(_sk_get_skype_call_policy)
6517 propid2label[161] = "skype_call_policy"
6518 P_SKYPE_CALL_POLICY = 161
6520 """
6521 Server-side account property, use SetServerside*Property() to set
6522 """
6523 return skypekit.enumof(Account.PSTNCALLPOLICY, self._sk_property("ZG\242\001]\005", 162, True))
6524 pstn_call_policy = property(_sk_get_pstn_call_policy)
6525 propid2label[162] = "pstn_call_policy"
6526 P_PSTN_CALL_POLICY = 162
6528 """
6529 Server-side account property, use SetServerside*Property() to set
6530 """
6531 return skypekit.enumof(Account.AVATARPOLICY, self._sk_property("ZG\243\001]\005", 163, True))
6532 avatar_policy = property(_sk_get_avatar_policy)
6533 propid2label[163] = "avatar_policy"
6534 P_AVATAR_POLICY = 163
6536 """
6537 Server-side account property, use SetServerside*Property() to set
6538 """
6539 return skypekit.enumof(Account.BUDDYCOUNTPOLICY, self._sk_property("ZG\244\001]\005", 164, True))
6540 buddycount_policy = property(_sk_get_buddycount_policy)
6541 propid2label[164] = "buddycount_policy"
6542 P_BUDDYCOUNT_POLICY = 164
6544 """
6545 Server-side account property, use SetServerside*Property() to set
6546 """
6547 return skypekit.enumof(Account.TIMEZONEPOLICY, self._sk_property("ZG\245\001]\005", 165, True))
6548 timezone_policy = property(_sk_get_timezone_policy)
6549 propid2label[165] = "timezone_policy"
6550 P_TIMEZONE_POLICY = 165
6552 """
6553 Server-side account property, use SetServerside*Property() to set
6554 """
6555 return skypekit.enumof(Account.WEBPRESENCEPOLICY, self._sk_property("ZG\246\001]\005", 166, True))
6556 webpresence_policy = property(_sk_get_webpresence_policy)
6557 propid2label[166] = "webpresence_policy"
6558 P_WEBPRESENCE_POLICY = 166
6564 phonenumbers_policy = property(_sk_get_phonenumbers_policy)
6565 propid2label[168] = "phonenumbers_policy"
6566 P_PHONENUMBERS_POLICY = 168
6568 """
6569 Server-side account property, use SetServerside*Property() to set
6570 """
6571 return skypekit.enumof(Account.VOICEMAILPOLICY, self._sk_property("ZG\251\001]\005", 169, True))
6572 voicemail_policy = property(_sk_get_voicemail_policy)
6573 propid2label[169] = "voicemail_policy"
6574 P_VOICEMAIL_POLICY = 169
6576 """
6577 Alerts: opted out partner id's, space separated
6578 """
6579 return self._sk_property("ZG\205\006]\005", 773, True)
6580 partner_optedout = property(_sk_get_partner_optedout)
6581 propid2label[773] = "partner_optedout"
6582 P_PARTNER_OPTEDOUT = 773
6584 """
6585 service information if the user is a paid service provider
6586 """
6587 return self._sk_property("ZG\240\006]\005", 800, True)
6588 service_provider_info = property(_sk_get_service_provider_info)
6589 propid2label[800] = "service_provider_info"
6590 P_SERVICE_PROVIDER_INFO = 800
6592 """
6593 NB! Unlike your common UNIX timestamps, the registration_timestamp is special, as it counts MINUTES rather than seconds, from Epoch (January 1, 1970)
6594
6595 """
6596 return self._sk_property("ZG\241\006]\005", 801, True)
6597 registration_timestamp = property(_sk_get_registration_timestamp)
6598 propid2label[801] = "registration_timestamp"
6599 P_REGISTRATION_TIMESTAMP = 801
6601 """
6602 number of times this user is logged in from other computers
6603 """
6604 return self._sk_property("ZG\242\006]\005", 802, True)
6605 nr_of_other_instances = property(_sk_get_nr_of_other_instances)
6606 propid2label[802] = "nr_of_other_instances"
6607 P_NR_OF_OTHER_INSTANCES = 802
6609 return self._sk_property("ZG\004]\005", 4, True)
6610 skypename = property(_sk_get_skypename)
6611 propid2label[4] = "skypename"
6612 P_SKYPENAME = 4
6614 return self._sk_property("ZG\005]\005", 5, True)
6615 fullname = property(_sk_get_fullname)
6616 propid2label[5] = "fullname"
6617 P_FULLNAME = 5
6619 """
6620 YYYYMMDD
6621 """
6622 return self._sk_property("ZG\007]\005", 7, True)
6623 birthday = property(_sk_get_birthday)
6624 propid2label[7] = "birthday"
6625 P_BIRTHDAY = 7
6627 """
6628 1-male, 2-female
6629 """
6630 return self._sk_property("ZG\010]\005", 8, True)
6631 gender = property(_sk_get_gender)
6632 propid2label[8] = "gender"
6633 P_GENDER = 8
6635 """
6636 ISO language codes, space-separated
6637 """
6638 return self._sk_property("ZG\011]\005", 9, True)
6639 languages = property(_sk_get_languages)
6640 propid2label[9] = "languages"
6641 P_LANGUAGES = 9
6643 """
6644 ISO country code
6645 """
6646 return self._sk_property("ZG\012]\005", 10, True)
6647 country = property(_sk_get_country)
6648 propid2label[10] = "country"
6649 P_COUNTRY = 10
6651 return self._sk_property("ZG\013]\005", 11, True)
6652 province = property(_sk_get_province)
6653 propid2label[11] = "province"
6654 P_PROVINCE = 11
6656 return self._sk_property("ZG\014]\005", 12, True)
6657 city = property(_sk_get_city)
6658 propid2label[12] = "city"
6659 P_CITY = 12
6661 """
6662 NB! string not integer
6663 """
6664 return self._sk_property("ZG\015]\005", 13, True)
6665 phone_home = property(_sk_get_phone_home)
6666 propid2label[13] = "phone_home"
6667 P_PHONE_HOME = 13
6669 return self._sk_property("ZG\016]\005", 14, True)
6670 phone_office = property(_sk_get_phone_office)
6671 propid2label[14] = "phone_office"
6672 P_PHONE_OFFICE = 14
6674 return self._sk_property("ZG\017]\005", 15, True)
6675 phone_mobile = property(_sk_get_phone_mobile)
6676 propid2label[15] = "phone_mobile"
6677 P_PHONE_MOBILE = 15
6679 """
6680 This is a string property, that contains space-separated list of email addresses. When surfacing this property in your UI, you will need to take into account that there may be more than one email addresses in this property (i.e. split the value at spaces and display them as list). Similarly, when modifying this property with SetStrProperty method, your editor should allow editing of component email addresses separately and add them all up again, before submitting back to the account.
6681
6682 """
6683 return self._sk_property("ZG\020]\005", 16, True)
6684 emails = property(_sk_get_emails)
6685 propid2label[16] = "emails"
6686 P_EMAILS = 16
6687 - def _sk_get_homepage(self):
6688 return self._sk_property("ZG\021]\005", 17, True)
6689 homepage = property(_sk_get_homepage)
6690 propid2label[17] = "homepage"
6691 P_HOMEPAGE = 17
6693 """
6694 arbitrary introductory text
6695 """
6696 return self._sk_property("ZG\022]\005", 18, True)
6697 about = property(_sk_get_about)
6698 propid2label[18] = "about"
6699 P_ABOUT = 18
6701 """
6702 UNIX timestamp of last profile change
6703 """
6704 return self._sk_property("ZG\023]\005", 19, True)
6705 profile_timestamp = property(_sk_get_profile_timestamp)
6706 propid2label[19] = "profile_timestamp"
6707 P_PROFILE_TIMESTAMP = 19
6709 """
6710 Personal mood text (visible to authorised users only). Max length 300 bytes.
6711
6712 """
6713 return self._sk_property("ZG\032]\005", 26, True)
6714 mood_text = property(_sk_get_mood_text)
6715 propid2label[26] = "mood_text"
6716 P_MOOD_TEXT = 26
6718 """
6719 24*3600+diff_to_UTC_in_seconds. nb! changes with DST
6720 """
6721 return self._sk_property("ZG\033]\005", 27, True)
6722 timezone = property(_sk_get_timezone)
6723 propid2label[27] = "timezone"
6724 P_TIMEZONE = 27
6726 """
6727 Count of this user's authorized contacts.
6728
6729 """
6730 return self._sk_property("ZG\034]\005", 28, True)
6731 nrof_authed_buddies = property(_sk_get_nrof_authed_buddies)
6732 propid2label[28] = "nrof_authed_buddies"
6733 P_NROF_AUTHED_BUDDIES = 28
6739 availability = property(_sk_get_availability)
6740 propid2label[34] = "availability"
6741 P_AVAILABILITY = 34
6743 """
6744 Account avatar picture can be set with Account::SetBinProperty method. The contact avatar picture is limited to max 96x96 pixels and 32000 bytes. If the submitted avatar picture exceeds either of these size limits, it is the responsibility of your client to scale the image down to appropriate size.
6745
6746 The avatar pictures have to be in JPG format. A SkypeKit client can enable the user to set the Account avatar in other picture formats, in which case the picture should be converted to JPG before submitting it.
6747
6748 In any case, the avatar picture should be pre-validated with the Skype::ValidateAvatar method.
6749
6750 """
6751 return self._sk_property("ZG%]\005", 37, True)
6752 avatar_image = property(_sk_get_avatar_image)
6753 propid2label[37] = "avatar_image"
6754 P_AVATAR_IMAGE = 37
6756 """
6757 UNIX timestamp of when current avatar was set
6758 """
6759 return self._sk_property("ZG\266\001]\005", 182, True)
6760 avatar_timestamp = property(_sk_get_avatar_timestamp)
6761 propid2label[182] = "avatar_timestamp"
6762 P_AVATAR_TIMESTAMP = 182
6764 """
6765 UNIX timestamp of when current mood was set
6766 """
6767 return self._sk_property("ZG\267\001]\005", 183, True)
6768 mood_timestamp = property(_sk_get_mood_timestamp)
6769 propid2label[183] = "mood_timestamp"
6770 P_MOOD_TIMESTAMP = 183
6772 """
6773 XML version of CONTACT_MOOD_TEXT. Max length 1000 bytes.
6774
6775 """
6776 return self._sk_property("ZG\315\001]\005", 205, True)
6777 rich_mood_text = property(_sk_get_rich_mood_text)
6778 propid2label[205] = "rich_mood_text"
6779 P_RICH_MOOD_TEXT = 205
6780
6782 """
6783 No description available.
6784
6785 B{Return values:}
6786 - B{status} - Current value of this account's P_STATUS property
6787 - B{progress} - This argument returns 0.
6788
6789 """
6790 l_request = skypekit.XCallRequest("ZR\005\001", 5, 1)
6791 l_request.add_parm('O', 0, self)
6792 l_response = self.transport.xcall(l_request)
6793 l_result = (skypekit.enumof(Account.STATUS, l_response.get(1))),
6794 l_result += (l_response.get(2, 0)),
6795 return l_result
6796 - def Login(
6797 self,
6798 set_availability_to = "UNKNOWN"
6799 ):
6800 """
6801 Login an auto-login enabled account (P_STATUS is LOGGED_OUT_AND_PWD_SAVED) and optionally set the availability, for example login in as Contact::DO_NOT_DISTURB. To find out whether there is an auto-login enabled account available, you can use Skype::GetDefaultAccountName to retrieve the skypename of that account. You can then get an Account instance for login by invoking Skype::GetAccount.
6802
6803 If no accounts with stored login credentials are available (GetDefaultAccountName returns an empty string), then you will have to prompt the user for account name and password and then use LoginWithPassword. Account name field in the UI can be pre-populated with strings retrieved with Skype::GetExistingAccounts
6804
6805
6806 B{Arguments:}
6807 - B{set_availability_to} - force this account's initial online status to the specified Contact::AVAILABILITY value.
6808 """
6809 l_request = skypekit.XCallRequest("ZR\005\005", 5, 5)
6810 l_request.add_parm('O', 0, self)
6811 l_request.add_parm('e', 1, Contact.AVAILABILITY[set_availability_to])
6812 self.transport.xcall(l_request)
6813 - def LoginWithPassword(
6814 self,
6815 password,
6816 save_pwd = False,
6817 save_data_locally = True
6818 ):
6819 """
6820
6821 Login in an account by specifying its password. To retrieve an account instance for login, invoke Skype::GetAccount.
6822
6823
6824 B{Arguments:}
6825 - B{password} - Password string (plaintext) for this account, which should be pre-validated (Skype::ValidatePassword)
6826
6827 - B{save_pwd} -
6828
6829 - true: Saves the password, ensuring that auto-login is enabled.
6830
6831 - false (default): Does not save the password, and so the user might not be able to effect auto-login until they explicitly invoke Account::SetPasswordSaved(true).
6832 - B{save_data_locally} - For internal use only.
6833 """
6834 l_request = skypekit.XCallRequest("ZR\005\006", 5, 6)
6835 l_request.add_parm('O', 0, self)
6836 l_request.add_parm('S', 1, password)
6837 l_request.add_parm('b', 2, save_pwd)
6838 l_request.add_parm('b', 3, save_data_locally)
6839 self.transport.xcall(l_request)
6840 - def Register(
6841 self,
6842 password,
6843 save_pwd = False,
6844 save_data_locally = True,
6845 email = "",
6846 allow_spam = False
6847 ):
6848 """
6849 This command can be used to create a new Skype account, based on the Account object. When successful, this command will also log in with the newly created account. If the new account registration was not successful, Account status property will change to LOGGED_OUT. A common reason for registration failures is that the an account with that name already exists. In that case, Account LOGOUT_REASON will be set to SKYPENAME_TAKEN. Also, Account SUGGESTED_SKYPENAME property will be set to a list of similar but still available skypenames that could be used instead. The property will contain up to 5 semicolon-separated alternative skypenames. In if no suggested skypenames were available, then this property will contain an empty string.
6850 NB! You should pre-validate your P_SKYPENAME value and any email string (Skype::ValidateProfileString) prior to invoking this method.
6851
6852
6853 B{Arguments:}
6854 - B{password} - Password string (plaintext) for this account, which should be pre-validated (Skype::ValidatePassword)
6855 - B{save_pwd} -
6856
6857 - true: Saves the password and enables auto-login.
6858
6859 - false (default): Does not save the password, and the user needs to be prompted for password on the next login attempt.
6860 - B{save_data_locally} - For internal use only.
6861 - B{email} - An email address for retrieving lost passwords and receiving news and information from Skype.
6862 - B{allow_spam} - enable/disable news and information from Skype being sent to account's e-mail.
6863 """
6864 l_request = skypekit.XCallRequest("ZR\005\007", 5, 7)
6865 l_request.add_parm('O', 0, self)
6866 l_request.add_parm('S', 1, password)
6867 l_request.add_parm('b', 2, save_pwd)
6868 l_request.add_parm('b', 3, save_data_locally)
6869 l_request.add_parm('S', 4, email)
6870 l_request.add_parm('b', 5, allow_spam)
6871 self.transport.xcall(l_request)
6872 - def Logout(
6873 self,
6874 clear_saved_pwd = False
6875 ):
6876 """
6877 Logs out current account. Note that calling this on client application exit is optional.
6878
6879
6880 B{Arguments:}
6881 - B{clear_saved_pwd} -
6882
6883 - true: Clears any saved password use with auto-login and so disables auto-login until you explicitly invoke Account::SetPasswordSaved(true).
6884
6885 - false (default): Does not clear any saved password and so does not affect existing auto-login behavior.
6886 """
6887 l_request = skypekit.XCallRequest("ZR\005\010", 5, 8)
6888 l_request.add_parm('O', 0, self)
6889 l_request.add_parm('b', 1, clear_saved_pwd)
6890 self.transport.xcall(l_request)
6891 - def ChangePassword(
6892 self,
6893 old_password,
6894 new_password,
6895 save_pwd = False
6896 ):
6897 """
6898 Changes this account's password. Returns false if the change failed. NB! You should pre-validate your password strings (Skype::ValidatePassword) and ensure that they are different prior to invoking this method.
6899
6900
6901 B{Arguments:}
6902 - B{old_password} - "Current password string (plaintext) for this account
6903 - B{new_password} - New password string (plaintext) for this account
6904 - B{save_pwd} -
6905
6906 - true: Saves the new password and enables auto-login.
6907
6908 - false (default): Clears any existing saved password and so the user cannot effect auto-login until they explicitly invoke Account::SetPasswordSaved(true)
6909 """
6910 l_request = skypekit.XCallRequest("ZR\005\013", 5, 11)
6911 l_request.add_parm('O', 0, self)
6912 l_request.add_parm('S', 1, old_password)
6913 l_request.add_parm('S', 2, new_password)
6914 l_request.add_parm('b', 3, save_pwd)
6915 self.transport.xcall(l_request)
6920 """
6921 save or clear credentials for auto-login whilst already logged in
6922
6923 B{Arguments:}
6924 - B{save_pwd}
6925 """
6926 l_request = skypekit.XCallRequest("ZR\005\031", 5, 25)
6927 l_request.add_parm('O', 0, self)
6928 l_request.add_parm('b', 1, save_pwd)
6929 self.transport.xcall(l_request)
6935 """
6936 Setter for integer (and enum) server-side properties. For a list of writeable server-side properties, see the detailed description of the Account class.
6937
6938
6939 B{Arguments:}
6940 - B{prop_key}
6941 - B{value}
6942 """
6943 l_request = skypekit.XCallRequest("ZR\005\014", 5, 12)
6944 l_request.add_parm('O', 0, self)
6945 l_request.add_parm('e', 1, prop_key)
6946 l_request.add_parm('u', 2, value)
6947 self.transport.xcall(l_request)
6953 """
6954 Setter for String server-side properties. For a list of writeable server-side properties, see the detailed description of the Account class.
6955
6956
6957 B{Arguments:}
6958 - B{prop_key}
6959 - B{value}
6960 """
6961 l_request = skypekit.XCallRequest("ZR\005\015", 5, 13)
6962 l_request.add_parm('O', 0, self)
6963 l_request.add_parm('e', 1, prop_key)
6964 l_request.add_parm('S', 2, value)
6965 self.transport.xcall(l_request)
6967 """
6968 Cancels an attempt to commit a server-side P_XXX_POLICY or the P_OFFLINE_CALLFORWARD server-side property. Invoking this cancellation only makes sense whilst the P_COMMITTSTATUS is in COMMITTING_TO_SERVER state.
6969
6970 """
6971 l_request = skypekit.XCallRequest("ZR\005\017", 5, 15)
6972 l_request.add_parm('O', 0, self)
6973 self.transport.xcall(l_request)
6979 """
6980 Setter for integer properties. For a list of writeable account profile properties, see the detailed description of the Account class.
6981
6982
6983 B{Arguments:}
6984 - B{prop_key}
6985 - B{value}
6986 """
6987 l_request = skypekit.XCallRequest("ZR\005\020", 5, 16)
6988 l_request.add_parm('O', 0, self)
6989 l_request.add_parm('e', 1, prop_key)
6990 l_request.add_parm('u', 2, value)
6991 self.transport.xcall(l_request)
6997 """
6998 Setter for String properties. For a list of writeable account profile properties, see the detailed description of the Account class. NB! You should pre-validate your about and mood message strings (Skype::ValidateProfileString) prior to invoking this method.
6999
7000
7001 B{Arguments:}
7002 - B{prop_key}
7003 - B{value}
7004 """
7005 l_request = skypekit.XCallRequest("ZR\005\021", 5, 17)
7006 l_request.add_parm('O', 0, self)
7007 l_request.add_parm('e', 1, prop_key)
7008 l_request.add_parm('S', 2, value)
7009 self.transport.xcall(l_request)
7015 """
7016 Setter for BLOB properties, such as its avatar image. For a list of writeable account profile properties, see the detailed description of the Account class. NB! You should pre-validate your avatar image (Skype::ValidateAvatar) prior to invoking this method.
7017
7018
7019 B{Arguments:}
7020 - B{prop_key}
7021 - B{value}
7022 """
7023 l_request = skypekit.XCallRequest("ZR\005\022", 5, 18)
7024 l_request.add_parm('O', 0, self)
7025 l_request.add_parm('e', 1, prop_key)
7026 l_request.add_parm('B', 2, value)
7027 self.transport.xcall(l_request)
7032 """
7033 Sets online status of the currently logged in account to one of the values from Contact class AVAILABILITY enumerator.
7034
7035
7036 B{Arguments:}
7037 - B{availability} - only subset of all contact availabilities allowed
7038 """
7039 l_request = skypekit.XCallRequest("ZR\005\023", 5, 19)
7040 l_request.add_parm('O', 0, self)
7041 l_request.add_parm('e', 1, Contact.AVAILABILITY[availability])
7042 self.transport.xcall(l_request)
7047 """
7048 Transitions the availability of this account's associated user, who is assumed to be logged in.
7049
7050
7051 B{Arguments:}
7052 - B{standby} -
7053
7054 - true: Saves the user's current availability, then sets it to CONTACT::AVAILABILITY.OFFLINE
7055
7056 - false: Reconnects the user and restores their previous availability
7057 """
7058 l_request = skypekit.XCallRequest("ZR\005\012", 5, 10)
7059 l_request.add_parm('O', 0, self)
7060 l_request.add_parm('b', 1, standby)
7061 self.transport.xcall(l_request)
7066 """
7067 Returns state of a given account capability. Takes Contact class CAPABILITY property as input argument and returns its state and expiration timestamp where appropriate. For example (C++ wrapper, with other wrappers the syntax may vary but the idea is the same) MyAccount.GetCapabilityStatus(Contact::CAPABILITY_SKYPEOUT, Cap, T); will return Account::CAPABILITY_EXISTS if local account has SkypeOut enabled.
7068
7069
7070 B{Arguments:}
7071 - B{capability}
7072
7073 B{Return values:}
7074 - B{status}
7075 - B{expiry_timestamp}
7076 """
7077 l_request = skypekit.XCallRequest("ZR\005\025", 5, 21)
7078 l_request.add_parm('O', 0, self)
7079 l_request.add_parm('e', 1, Contact.CAPABILITY[capability])
7080 l_response = self.transport.xcall(l_request)
7081 l_result = (skypekit.enumof(Account.CAPABILITYSTATUS, l_response.get(1))),
7082 l_result += (l_response.get(2, 0)),
7083 return l_result
7085 """
7086 Response is empty when called with an inactive or invalid account
7087
7088 B{Return values:}
7089 - B{skypename_hash}
7090 """
7091 l_request = skypekit.XCallRequest("ZR\005\026", 5, 22)
7092 l_request.add_parm('O', 0, self)
7093 l_response = self.transport.xcall(l_request)
7094 l_result = l_response.get(1, '')
7095 return l_result
7097 """
7098 returns verified-by-Skype e-mail for this account if exists and verifiable
7099
7100 B{Return values:}
7101 - B{email}
7102 """
7103 l_request = skypekit.XCallRequest("ZR\005\002", 5, 2)
7104 l_request.add_parm('O', 0, self)
7105 l_response = self.transport.xcall(l_request)
7106 l_result = l_response.get(1, '')
7107 return l_result
7109 """
7110 returns verified-by-Skype company for this account if exists and verifiable
7111
7112 B{Return values:}
7113 - B{company}
7114 """
7115 l_request = skypekit.XCallRequest("ZR\005\003", 5, 3)
7116 l_request.add_parm('O', 0, self)
7117 l_response = self.transport.xcall(l_request)
7118 l_result = l_response.get(1, '')
7119 return l_result
7121 """
7122 Deletes all account data stored locally. Does not remove any account data from the server!
7123
7124 """
7125 l_request = skypekit.XCallRequest("ZR\005\030", 5, 24)
7126 l_request.add_parm('O', 0, self)
7127 self.transport.xcall(l_request)
7129 """ get multiple properties from self """
7130 self.multiget("ZG\004,\005,\032,\020,\015,\016,\017,\007,\010,\011,\012,\013,\014,\021,\022,\033]\005")
7131 module_id2classes[5] = Account
7133 """
7134 The main class that exposes Skype-related functionality to your application. Currently the SDK only supports one Skype class instance per runtime. Note that most of the Skype class methods will fail until you have successfully logged in with an account. For more information on constructing a Skype object and the login sequence, see first tutorial example.
7135
7136 """
7137 module_id = 0
7138 event_handlers = {}
7140 self.object_id = 0
7141 self.transport = transport
7142 transport.set_root(self)
7143 ''' Stop background operations (background threads). Might take some time.
7144 '''
7146 self.transport.stop()
7148 warnings.warn("use stop() instead of Stop()", DeprecationWarning, stacklevel=2)
7149 self.stop()
7151 """
7152 No description available.
7153
7154 B{Return values:}
7155 - B{started}
7156 """
7157 l_request = skypekit.XCallRequest("ZR\000\221\001", 0, 145)
7158 l_response = self.transport.xcall(l_request)
7159 l_result = l_response.get(1, False)
7160 return l_result
7161 SETUPKEY_DB_STORAGE_QUOTA_KB = "*Lib/DbManager/StorageQuotaKb"
7163 """
7164 returns the runtime version as a string
7165
7166 B{Return values:}
7167 - B{version}
7168 """
7169 l_request = skypekit.XCallRequest("ZR\000\034", 0, 28)
7170 l_response = self.transport.xcall(l_request)
7171 l_result = l_response.get(1, '')
7172 return l_result
7228 event_handlers[1] = "_sk_on_new_custom_contact_group"
7298 IDENTITYTYPE = {
7299 0:'UNRECOGNIZED',
7300 1:'SKYPE',
7301 2:'SKYPE_MYSELF',
7302 3:'SKYPE_UNDISCLOSED',
7303 4:'PSTN',
7304 5:'PSTN_EMERGENCY',
7305 6:'PSTN_FREE',
7306 7:'PSTN_UNDISCLOSED',
7307 8:'CONFERENCE',
7308 9:'EXTERNAL',
7309 'UNRECOGNIZED'
7310
7311
7312 :0,
7313 'SKYPE'
7314
7315
7316 :1,
7317 'SKYPE_MYSELF'
7318
7319
7320 :2,
7321 'SKYPE_UNDISCLOSED'
7322
7323
7324 :3,
7325 'PSTN'
7326
7327
7328 :4,
7329 'PSTN_EMERGENCY'
7330
7331
7332 :5,
7333 'PSTN_FREE'
7334
7335
7336 :6,
7337 'PSTN_UNDISCLOSED'
7338
7339
7340 :7,
7341 'CONFERENCE'
7342
7343
7344 :8,
7345 'EXTERNAL'
7346
7347
7348 :9
7349 }
7350 """
7351 - UNRECOGNIZED
7352 - SKYPE
7353 - SKYPE_MYSELF
7354 - SKYPE_UNDISCLOSED
7355 - PSTN
7356 - PSTN_EMERGENCY
7357 - PSTN_FREE
7358 - PSTN_UNDISCLOSED
7359 - CONFERENCE
7360 - EXTERNAL
7361 """
7366 """
7367 This takes skypename or a phone number string as argument and returns corresponding identity type (SKYPE, SKYPE_MYSELF, PSTN, etc.)
7368
7369
7370 B{Arguments:}
7371 - B{identity}
7372
7373 B{Return values:}
7374 - B{type_}
7375 """
7376 l_request = skypekit.XCallRequest("ZR\000\023", 0, 19)
7377 l_request.add_parm('S', 1, identity)
7378 l_response = self.transport.xcall(l_request)
7379 l_result = skypekit.enumof(Skype.IDENTITYTYPE, l_response.get(1))
7380 return l_result
7381 NORMALIZERESULT = {0:'IDENTITY_OK', 'IDENTITY_OK':0, 1:'IDENTITY_EMPTY', 'IDENTITY_EMPTY':1, 2:'IDENTITY_TOO_LONG', 'IDENTITY_TOO_LONG':2, 3:'IDENTITY_CONTAINS_INVALID_CHAR', 'IDENTITY_CONTAINS_INVALID_CHAR':3, 4:'PSTN_NUMBER_TOO_SHORT', 'PSTN_NUMBER_TOO_SHORT':4, 5:'PSTN_NUMBER_HAS_INVALID_PREFIX', 'PSTN_NUMBER_HAS_INVALID_PREFIX':5, 6:'SKYPENAME_STARTS_WITH_NONALPHA', 'SKYPENAME_STARTS_WITH_NONALPHA':6, 7:'SKYPENAME_SHORTER_THAN_6_CHARS', 'SKYPENAME_SHORTER_THAN_6_CHARS':7}
7382 """
7383 - IDENTITY_OK
7384 - IDENTITY_EMPTY
7385 - IDENTITY_TOO_LONG
7386 - IDENTITY_CONTAINS_INVALID_CHAR
7387 - PSTN_NUMBER_TOO_SHORT
7388 - PSTN_NUMBER_HAS_INVALID_PREFIX - identity looks like pstn number but does not start with +/00/011
7389 - SKYPENAME_STARTS_WITH_NONALPHA
7390 - SKYPENAME_SHORTER_THAN_6_CHARS - returned only when isNewSkypeName
7391 """
7397 """
7398 compares two identities to see if they match
7399
7400 B{Arguments:}
7401 - B{identity_a}
7402 - B{identity_b}
7403
7404 B{Return values:}
7405 - B{result}
7406 """
7407 l_request = skypekit.XCallRequest("ZR\000X", 0, 88)
7408 l_request.add_parm('S', 1, identity_a)
7409 l_request.add_parm('S', 2, identity_b)
7410 l_response = self.transport.xcall(l_request)
7411 l_result = l_response.get(1, False)
7412 return l_result
7413 - def NormalizeIdentity(
7414 self,
7415 original,
7416 is_new_skype_name = False
7417 ):
7418 """
7419 This method is deprecated. Use ValidateProfileString method instead.
7420
7421
7422 B{Arguments:}
7423 - B{original}
7424 - B{is_new_skype_name}
7425
7426 B{Return values:}
7427 - B{result}
7428 - B{normalized}
7429 """
7430 l_request = skypekit.XCallRequest("ZR\000\011", 0, 9)
7431 l_request.add_parm('S', 1, original)
7432 l_request.add_parm('b', 2, is_new_skype_name)
7433 l_response = self.transport.xcall(l_request)
7434 l_result = (skypekit.enumof(Skype.NORMALIZERESULT, l_response.get(1))),
7435 l_result += (l_response.get(2, '')),
7436 return l_result
7442 """
7443 NormalizePSTNWithCountry checks if the phone number starts with + if it doesn't, it prefixes the output with +XXX (where XXX is the country code). It also converts letters to numbers based on the standard phone keypad, so that the phone number string 212CALLME1 with country code 372 (Estonia) would be normalized to +3722122255631. If the method cannot normalize the phone number (because it's too long, too short, etc.), it returns an error code in &result.
7444
7445
7446 B{Arguments:}
7447 - B{original}
7448 - B{country_prefix}
7449
7450 B{Return values:}
7451 - B{result}
7452 - B{normalized}
7453 """
7454 l_request = skypekit.XCallRequest("ZR\000\315\001", 0, 205)
7455 l_request.add_parm('S', 1, original)
7456 l_request.add_parm('u', 2, country_prefix)
7457 l_response = self.transport.xcall(l_request)
7458 l_result = (skypekit.enumof(Skype.NORMALIZERESULT, l_response.get(1))),
7459 l_result += (l_response.get(2, '')),
7460 return l_result
7472 event_handlers[2] = "_sk_on_contact_online_appearance"
7489 event_handlers[3] = "_sk_on_contact_gone_offline"
7496 """
7497 list of (min,max) pairs
7498
7499 B{Return values:}
7500 - B{range_list}
7501 """
7502 l_request = skypekit.XCallRequest("ZR\000M", 0, 77)
7503 l_response = self.transport.xcall(l_request)
7504 l_result = l_response.get(1, [])
7505 return l_result
7541 """
7542 searches skypenames and aliases. returns 0 or 1 results. false if not valid
7543
7544 B{Arguments:}
7545 - B{identity}
7546
7547 B{Return values:}
7548 - B{search}
7549 """
7550 l_request = skypekit.XCallRequest("ZR\000\014", 0, 12)
7551 l_request.add_parm('S', 1, identity)
7552 l_response = self.transport.xcall(l_request)
7553 l_result = module_id2classes[1](l_response.get(1), self.transport)
7554 return l_result
7555 TRANSFER_SENDFILE_ERROR = {0:'TRANSFER_OPEN_SUCCESS', 'TRANSFER_OPEN_SUCCESS':0, 1:'TRANSFER_BAD_FILENAME', 'TRANSFER_BAD_FILENAME':1, 2:'TRANSFER_OPEN_FAILED', 'TRANSFER_OPEN_FAILED':2, 3:'TRANSFER_TOO_MANY_PARALLEL', 'TRANSFER_TOO_MANY_PARALLEL':3}
7556 """
7557 sync failure reasons when starting a transfer
7558 - TRANSFER_OPEN_SUCCESS
7559 - TRANSFER_BAD_FILENAME
7560 - TRANSFER_OPEN_FAILED
7561 - TRANSFER_TOO_MANY_PARALLEL
7562 """
7564 """ get multiple properties from objects """
7565 self.transport.multiget("ZG\247\007,\246\007,\250\007,\244\007,\266\007,\252\007,\243\007]\023", objects)
7567 """ get multiple properties from objects """
7568 self.transport.multiget("ZG\234\007,\320\007,\240\007]\022", objects)
7570 """
7571 Creates a new empty conversation object and returns a reference to it.
7572
7573
7574 B{Return values:}
7575 - B{conference}
7576 """
7577 l_request = skypekit.XCallRequest("ZR\000\015", 0, 13)
7578 l_response = self.transport.xcall(l_request)
7579 l_result = module_id2classes[18](l_response.get(1), self.transport)
7580 return l_result
7585 """
7586 Returns reference tp conversation object by conversation ID string (equivalent of old chat ID). NB! ID here is that of conversation, rather than skypename of dialog partner. If you want to retrieve a conversation object with any particular person, then Skype class GetConversationByParticipants method is what you are looking for.
7587
7588
7589 B{Arguments:}
7590 - B{convo_identity}
7591
7592 B{Return values:}
7593 - B{conversation}
7594 """
7595 l_request = skypekit.XCallRequest("ZR\000\017", 0, 15)
7596 l_request.add_parm('S', 1, convo_identity)
7597 l_response = self.transport.xcall(l_request)
7598 l_result = module_id2classes[18](l_response.get(1), self.transport)
7599 return l_result
7600 - def GetConversationByParticipants(
7601 self,
7602 participant_identities,
7603 create_if_non_existing = False,
7604 ignore_bookmarked_or_named = False
7605 ):
7606 """
7607 myself not included
7608
7609 B{Arguments:}
7610 - B{participant_identities}
7611 - B{create_if_non_existing}
7612 - B{ignore_bookmarked_or_named}
7613
7614 B{Return values:}
7615 - B{conversation}
7616 """
7617 l_request = skypekit.XCallRequest("ZR\000\020", 0, 16)
7618 l_request.add_parm('S', 1, participant_identities)
7619 l_request.add_parm('b', 2, create_if_non_existing)
7620 l_request.add_parm('b', 3, ignore_bookmarked_or_named)
7621 l_response = self.transport.xcall(l_request)
7622 l_result = module_id2classes[18](l_response.get(1), self.transport)
7623 return l_result
7629 """
7630 Retrieves a Conversation object by Public Conversation BLOB. Public conversation blobs are globally unique conversation IDs that provide a method for joining conversation without explicitly being added to the conversation by someone already in it. Programmatically, a Conversation BLOB can be retrieved with Conversation::GetJoinBlob method. In Skype desktop clients, the BLOB can be retrieved by typing "/get uri" in a conversation. The conversation can then be joined by people who have somehow received that BLOB.
7631
7632
7633 B{Arguments:}
7634 - B{join_blob} - The BLOB string.
7635
7636 - B{also_join} - If set to true, automatically joins current user into the Conversation.
7637
7638
7639 B{Return values:}
7640 - B{conversation} - Returns Conversation object if successful.
7641
7642 """
7643 l_request = skypekit.XCallRequest("ZR\000\021", 0, 17)
7644 l_request.add_parm('S', 1, join_blob)
7645 l_request.add_parm('b', 2, also_join)
7646 l_response = self.transport.xcall(l_request)
7647 l_result = module_id2classes[18](l_response.get(1), self.transport)
7648 return l_result
7653 """
7654 Returns a list of Conversation objects by Conversation::LIST_TYPE filter.
7655
7656
7657 B{Arguments:}
7658 - B{type_} - Filter.
7659
7660
7661 B{Return values:}
7662 - B{conversations} - List of conversations matching the filter.
7663
7664 """
7665 l_request = skypekit.XCallRequest("ZR\000\022", 0, 18)
7666 l_request.add_parm('e', 1, Conversation.LIST_TYPE[type_])
7667 l_response = self.transport.xcall(l_request)
7668 l_result = [module_id2classes[18](oid, self.transport) for oid in l_response.get(1, [])]
7669 return l_result
7676 """
7677 This event gets fired when a Conversation item is added or removed from the list specified in the type argument. The primary use of this event is to detect creation of new Conversation objects. It can also be used for detecting occurance of live sessions - by monitoring added = true in Conversation::LIVE_CONVERSATIONS. Note that this method is not entirely sufficient for detecting live session termination (added = false and type = Conversation::LIVE_CONVERSATIONS). When the live session goes down, the default behaviour is that the Conversation object remains in the LIVE_CONVERSATIONS list for approximately 10 seconds. When another live session comes up within the same Conversation, the OnConversationListChange event will not fire - because the conversation was already in that list. There are two ways of getting around that. Firstly you can have all the conversations referenced at all times and then monitor Conversation::P_LOCAL_LIVESTATUS property changes, in which case you can pick up incoming live sessions from there. Alternatively, you can remove the delay between live session termination and conversation's removal from the LIVE_CONVERSATIONS list. This delay is controlled by the SETUPKEY_RECENTLY_LIVE_TIMEOUT setup key. To remove the delay, use Skype::SetInt(SETUPKEY_RECENTLY_LIVE_TIMEOUT, 0). Note that this setup key is account-based. You will need to have an account logged in in order to modify its value.
7678
7679
7680 B{Return values:}
7681 - B{conversation} - Conversation object that was added or removed to a list specified in the type argument.
7682
7683 - B{type_} - Specifies the list, into which the conversation was added or removed from.
7684
7685 - B{added} - Specifies whether the conversation was added or removed. For ALL_CONVERSATIONS list, the removed event is only fired when the conversation is actually deleted.
7686
7687 """
7688 pass
7689 event_handlers[4] = "_sk_on_conversation_list_change"
7698 """ get multiple properties from objects """
7699 self.transport.multiget("ZG\300\007,{,\301\007,\177,y]\011", objects)
7704 """
7705 Retrieves a Message object by the P_GUID property (globally unique ID, same for all the participants of the conversation, in which this message occured).
7706
7707
7708 B{Arguments:}
7709 - B{guid} - Globally unique ID of the message.
7710
7711
7712 B{Return values:}
7713 - B{message} - Returns a Message object if a match was found.
7714
7715 """
7716 l_request = skypekit.XCallRequest("ZR\000\025", 0, 21)
7717 l_request.add_parm('B', 1, guid)
7718 l_response = self.transport.xcall(l_request)
7719 l_result = module_id2classes[9](l_response.get(1), self.transport)
7720 return l_result
7728 """
7729 Returns all messages of the given type, the most recent POSTED_EMOTE or POSTED_TEXT of each conversation.
7730
7731 B{Arguments:}
7732 - B{type_} - Type of messages requested
7733 - B{latest_per_conv_only} - Whether to return only the most recent message per conversation
7734 - B{from_timestamp_inc} - Starting timestamp for reqested range, inclusive
7735 - B{to_timestamp_exc} - Ending timestamp for requested range, exclusive
7736
7737 B{Return values:}
7738 - B{messages}
7739 """
7740 l_request = skypekit.XCallRequest("ZR\000\210\001", 0, 136)
7741 l_request.add_parm('e', 1, Message.TYPE[type_])
7742 l_request.add_parm('b', 2, latest_per_conv_only)
7743 l_request.add_parm('u', 3, from_timestamp_inc)
7744 l_request.add_parm('u', 4, to_timestamp_exc)
7745 l_response = self.transport.xcall(l_request)
7746 l_result = [module_id2classes[9](oid, self.transport) for oid in l_response.get(1, [])]
7747 return l_result
7748 - def OnMessage(
7749 self,
7750 message,
7751 changes_inbox_timestamp,
7752 supersedes_history_message,
7753 conversation
7754 ):
7755 """
7756 No description available.
7757
7758 B{Return values:}
7759 - B{message}
7760 - B{changes_inbox_timestamp} - if changesInboxTimestamp==true is a hint that tray alert should probably be displayed
7761 - B{supersedes_history_message} - DEPRECATED, not set anymore
7762 - B{conversation}
7763 """
7764 pass
7765 event_handlers[5] = "_sk_on_message"
7767 """ internal event dispatcher for OnMessage
7768 """
7769 l_cleanparms = (module_id2classes[9](parms.get(1), self.transport)),
7770 l_cleanparms += (parms.get(2, False)),
7771 l_cleanparms += (module_id2classes[9](parms.get(3), self.transport)),
7772 l_cleanparms += (module_id2classes[18](parms.get(4), self.transport)),
7773 self.OnMessage(*l_cleanparms)
7774 l_cleanparms[3].OnMessage(l_cleanparms[0])
7776 """
7777 This method returns a table in form of two string lists of equal length and an uint argument that returns the count of items i both lists. The first list contains video recording device handles and the second list descriptive names of those devices. NB! This method requires videortphost to be running, otherwise it will return empty lists.
7778
7779
7780 B{Return values:}
7781 - B{device_names}
7782 - B{device_paths}
7783 - B{count}
7784 """
7785 l_request = skypekit.XCallRequest("ZR\000P", 0, 80)
7786 l_response = self.transport.xcall(l_request)
7787 l_result = (l_response.get(1, [])),
7788 l_result += (l_response.get(2, [])),
7789 l_result += (l_response.get(3, 0)),
7790 return l_result
7797 """
7798 Queries whether the given video device has a specific Video::VIDEO_DEVICE_CAPABILITY. Use Skype::GetAvailableVideoDevices method to retrieve sstring lists with available deviceName and devicePath values.
7799
7800
7801 B{Arguments:}
7802 - B{device_name} - Human readable device name.
7803
7804 - B{device_path} - Device ID.
7805
7806 - B{cap} - Any of the Video::VIDEO_DEVICE_CAPABILITY values.
7807
7808 """
7809 l_request = skypekit.XCallRequest("ZR\000!", 0, 33)
7810 l_request.add_parm('S', 1, device_name)
7811 l_request.add_parm('S', 2, device_path)
7812 l_request.add_parm('e', 3, Video.VIDEO_DEVICE_CAPABILITY[cap])
7813 self.transport.xcall(l_request)
7819 """
7820 No description available.
7821
7822 B{Arguments:}
7823 - B{device_name}
7824 - B{device_path}
7825 """
7826 l_request = skypekit.XCallRequest("ZR\000\042", 0, 34)
7827 l_request.add_parm('S', 1, device_name)
7828 l_request.add_parm('S', 2, device_path)
7829 self.transport.xcall(l_request)
7830 - def GetPreviewVideo(
7831 self,
7832 type_,
7833 device_name = "",
7834 device_path = ""
7835 ):
7836 """
7837 No description available.
7838
7839 B{Arguments:}
7840 - B{type_}
7841 - B{device_name} - name and path to be used only with media type VIDEO
7842 - B{device_path}
7843
7844 B{Return values:}
7845 - B{video}
7846 """
7847 l_request = skypekit.XCallRequest("ZR\000#", 0, 35)
7848 l_request.add_parm('e', 1, Video.MEDIATYPE[type_])
7849 l_request.add_parm('S', 2, device_name)
7850 l_request.add_parm('S', 3, device_path)
7851 l_response = self.transport.xcall(l_request)
7852 l_result = module_id2classes[11](l_response.get(1), self.transport)
7853 return l_result
7858 """
7859 Avaible to Video Engines using the Video RTP API
7860
7861 B{Arguments:}
7862 - B{command}
7863
7864 B{Return values:}
7865 - B{response}
7866 """
7867 l_request = skypekit.XCallRequest("ZR\000;", 0, 59)
7868 l_request.add_parm('S', 1, command)
7869 l_response = self.transport.xcall(l_request)
7870 l_result = l_response.get(1, '')
7871 return l_result
7873 """
7874 This callback gets fired when there are changes in the system video device list (USB webcam gets plugged in or is detached.)
7875
7876 """
7877 pass
7882 event_handlers[7] = "_sk_on_available_video_device_list_change"
7887 """
7888 No description available.
7889
7890 B{Arguments:}
7891 - B{skype_name}
7892
7893 B{Return values:}
7894 - B{greeting}
7895 """
7896 l_request = skypekit.XCallRequest("ZR\000-", 0, 45)
7897 l_request.add_parm('S', 1, skype_name)
7898 l_response = self.transport.xcall(l_request)
7899 l_result = module_id2classes[7](l_response.get(1), self.transport)
7900 return l_result
7901 SETUPKEY_DISABLED_CODECS = "*Lib/Audio/DisableCodecs"
7902 SETUPKEY_DISABLE_AEC = "*Lib/Audio/DisableAEC"
7903 SETUPKEY_DISABLE_NOISE_SUPPRESSOR = "*Lib/Audio/DisableNS"
7904 SETUPKEY_DISABLE_AGC = "*Lib/Audio/DisableAGC"
7905 SETUPKEY_DISABLE_DIGITAL_NEAR_END_AGC = "*Lib/Audio/DisableDigitalNearEndAGC"
7906 SETUPKEY_DISABLE_DIGITAL_FAR_END_AGC = "*Lib/Audio/DisableDigitalFarEndAGC"
7907 SETUPKEY_BEAMFORMER_MIC_SPACING = "*Lib/Audio/BeamformerMicSpacing"
7908 SETUPKEY_DISABLE_AUDIO_DEVICE_PROBING = "*Lib/QualityMonitor/DisableAudioDeviceProbing"
7909 PREPARESOUNDRESULT = {0:'PREPARESOUND_SUCCESS', 'PREPARESOUND_SUCCESS':0, 1:'PREPARESOUND_MISC_ERROR', 'PREPARESOUND_MISC_ERROR':1, 2:'PREPARESOUND_FILE_NOT_FOUND', 'PREPARESOUND_FILE_NOT_FOUND':2, 3:'PREPARESOUND_FILE_TOO_BIG', 'PREPARESOUND_FILE_TOO_BIG':3, 4:'PREPARESOUND_FILE_READ_ERROR', 'PREPARESOUND_FILE_READ_ERROR':4, 5:'PREPARESOUND_UNSUPPORTED_FILE_FORMAT', 'PREPARESOUND_UNSUPPORTED_FILE_FORMAT':5, 6:'PREPARESOUND_PLAYBACK_NOT_SUPPORTED', 'PREPARESOUND_PLAYBACK_NOT_SUPPORTED':6}
7910 """
7911 - PREPARESOUND_SUCCESS
7912 - PREPARESOUND_MISC_ERROR
7913 - PREPARESOUND_FILE_NOT_FOUND
7914 - PREPARESOUND_FILE_TOO_BIG
7915 - PREPARESOUND_FILE_READ_ERROR
7916 - PREPARESOUND_UNSUPPORTED_FILE_FORMAT
7917 - PREPARESOUND_PLAYBACK_NOT_SUPPORTED
7918 """
7919 AUDIODEVICE_CAPABILITIES = {
7920 1
7921 :'HAS_VIDEO_CAPTURE',
7922 2
7923 :'HAS_USB_INTERFACE',
7924 4
7925 :'POSSIBLY_HEADSET',
7926 8
7927 :'HAS_AUDIO_CAPTURE',
7928 16
7929 :'HAS_AUDIO_RENDERING',
7930 32
7931 :'HAS_LOWBANDWIDTH_CAPTURE',
7932 64
7933 :'IS_WEBCAM',
7934 128 :'IS_HEADSET',
7935 256 :'POSSIBLY_WEBCAM',
7936 2048:'HAS_VIDEO_RENDERING',
7937 4096:'HAS_BLUETOOTH_INTERFACE',
7938 'HAS_VIDEO_CAPTURE'
7939
7940
7941 : 1,
7942 'HAS_USB_INTERFACE'
7943
7944
7945 : 2,
7946 'POSSIBLY_HEADSET'
7947
7948
7949 : 4,
7950 'HAS_AUDIO_CAPTURE'
7951
7952
7953 : 8,
7954 'HAS_AUDIO_RENDERING'
7955
7956 : 16,
7957 'HAS_LOWBANDWIDTH_CAPTURE'
7958
7959 : 32,
7960 'IS_WEBCAM'
7961
7962
7963 : 64,
7964 'IS_HEADSET'
7965
7966
7967 : 128,
7968 'POSSIBLY_WEBCAM'
7969
7970
7971 : 256,
7972 'HAS_VIDEO_RENDERING'
7973
7974 :2048,
7975 'HAS_BLUETOOTH_INTERFACE'
7976
7977 :4096
7978 }
7979 """
7980 - HAS_VIDEO_CAPTURE
7981 - HAS_USB_INTERFACE
7982 - POSSIBLY_HEADSET
7983 - HAS_AUDIO_CAPTURE
7984 - HAS_AUDIO_RENDERING
7985 - HAS_LOWBANDWIDTH_CAPTURE
7986 - IS_WEBCAM
7987 - IS_HEADSET
7988 - POSSIBLY_WEBCAM
7989 - HAS_VIDEO_RENDERING
7990 - HAS_BLUETOOTH_INTERFACE
7991 """
7992 - def PlayStart(
7993 self,
7994 soundid,
7995 sound,
7996 loop,
7997 use_call_out_device = False
7998 ):
7999 """
8000 Takes audio data that comes from the sound argument and mixes it into playback or notification device, depending on the value passed in the useCallOutDevice argument. The sound argument contains the audio data in in follwing format: first 4 bytes of the binary contain the sample rate, followed by 16 bit (mono) samples. The soundid argument is an arbitrary ID that you can pass in and then later use as an argument for Skype class PlayStop method. To mix the audio into playback device stream, set useCallOutDevice to true, to mic it into notification stream, set useCallOutDevice to false.
8001
8002
8003 B{Arguments:}
8004 - B{soundid}
8005 - B{sound}
8006 - B{loop}
8007 - B{use_call_out_device}
8008 """
8009 l_request = skypekit.XCallRequest("ZR\000\060", 0, 48)
8010 l_request.add_parm('u', 1, soundid)
8011 l_request.add_parm('B', 2, sound)
8012 l_request.add_parm('b', 3, loop)
8013 l_request.add_parm('b', 4, use_call_out_device)
8014 self.transport.xcall(l_request)
8015 - def PlayStartFromFile(
8016 self,
8017 soundid,
8018 datafile,
8019 loop,
8020 use_call_out_device = False
8021 ):
8022 """
8023 No description available.
8024
8025 B{Arguments:}
8026 - B{soundid}
8027 - B{datafile}
8028 - B{loop}
8029 - B{use_call_out_device}
8030
8031 B{Return values:}
8032 - B{result}
8033 """
8034 l_request = skypekit.XCallRequest("ZR\000\324\001", 0, 212)
8035 l_request.add_parm('u', 1, soundid)
8036 l_request.add_parm('f', 2, datafile)
8037 l_request.add_parm('b', 3, loop)
8038 l_request.add_parm('b', 4, use_call_out_device)
8039 l_response = self.transport.xcall(l_request)
8040 l_result = skypekit.enumof(Skype.PREPARESOUNDRESULT, l_response.get(1))
8041 return l_result
8042 - def PlayStop(
8043 self,
8044 soundid
8045 ):
8046 """
8047 Stops playback of the soundfile. The argument is the same ID you passed in the Skype class StartPlayback method.
8048
8049
8050 B{Arguments:}
8051 - B{soundid}
8052 """
8053 l_request = skypekit.XCallRequest("ZR\000\061", 0, 49)
8054 l_request.add_parm('u', 1, soundid)
8055 self.transport.xcall(l_request)
8060 """
8061 No description available.
8062
8063 B{Arguments:}
8064 - B{record_and_playback_data}
8065 """
8066 l_request = skypekit.XCallRequest("ZR\000\062", 0, 50)
8067 l_request.add_parm('b', 1, record_and_playback_data)
8068 self.transport.xcall(l_request)
8070 """
8071 No description available.
8072 """
8073 l_request = skypekit.XCallRequest("ZR\000\063", 0, 51)
8074 self.transport.xcall(l_request)
8076 """
8077 This method returns a table in form of three string lists of equal lengths. The first list contains audio output device handles ('hw:0,0', 'hw:0,1', etc.) The second list contains descriptive names of those devices (Ensoniq AudioPCI etc.) The third list contains device product IDs. Note that the values in these lists depend on which audio engine you are running (SAL, PCM, RTP).
8078
8079
8080 B{Return values:}
8081 - B{handle_list}
8082 - B{name_list}
8083 - B{product_id_list}
8084 """
8085 l_request = skypekit.XCallRequest("ZR\000\065", 0, 53)
8086 l_response = self.transport.xcall(l_request)
8087 l_result = (l_response.get(1, [])),
8088 l_result += (l_response.get(2, [])),
8089 l_result += (l_response.get(3, [])),
8090 return l_result
8092 """
8093 This method returns a table in form of three string lists of equal length. The first list contains audio recording device handles ('hw:0,0', 'hw:0,1', etc.) The second list contains descriptive names of those devices (Ensoniq AudioPCI etc.) The third list contains device product IDs. Note that the values in these lists depend on which audio engine you are running (SAL, PCM, RTP).
8094
8095
8096 B{Return values:}
8097 - B{handle_list}
8098 - B{name_list}
8099 - B{product_id_list}
8100 """
8101 l_request = skypekit.XCallRequest("ZR\000\066", 0, 54)
8102 l_response = self.transport.xcall(l_request)
8103 l_result = (l_response.get(1, [])),
8104 l_result += (l_response.get(2, [])),
8105 l_result += (l_response.get(3, [])),
8106 return l_result
8107 - def SelectSoundDevices(
8108 self,
8109 call_in_device,
8110 call_out_device,
8111 wave_out_device
8112 ):
8113 """
8114 Sets audio devices given in arguments as active audio devices. This command selects all three devices - microphone, playback and the notification channel. Valid input values for this method come from the first string list you get back from Skype class GetAvailableOutputDevices (handleList).
8115
8116
8117 B{Arguments:}
8118 - B{call_in_device}
8119 - B{call_out_device}
8120 - B{wave_out_device}
8121 """
8122 l_request = skypekit.XCallRequest("ZR\000\067", 0, 55)
8123 l_request.add_parm('S', 1, call_in_device)
8124 l_request.add_parm('S', 2, call_out_device)
8125 l_request.add_parm('S', 3, wave_out_device)
8126 self.transport.xcall(l_request)
8131 """
8132 The uint argument returns AUDIODEVICE_CAPABILITIES (declared in Skype class)
8133
8134
8135 B{Arguments:}
8136 - B{device_handle}
8137
8138 B{Return values:}
8139 - B{interface_string}
8140 - B{capabilities} - bit set of AUDIODEVICE_CAPABILITIES
8141 """
8142 l_request = skypekit.XCallRequest("ZR\000\070", 0, 56)
8143 l_request.add_parm('S', 1, device_handle)
8144 l_response = self.transport.xcall(l_request)
8145 l_result = (l_response.get(1, '')),
8146 l_result += (l_response.get(2, 0)),
8147 return l_result
8149 """
8150 Returns current audio stream volume for both playback and microphone streams. Useful for displaying visual audio indicators in you UI. See also Skype class OnNrgLevelsChange callback that gets fired each time the these values are changed.
8151
8152
8153 B{Return values:}
8154 - B{mic_level}
8155 - B{speaker_level}
8156 """
8157 l_request = skypekit.XCallRequest("ZR\000\071", 0, 57)
8158 l_response = self.transport.xcall(l_request)
8159 l_result = (l_response.get(1, 0)),
8160 l_result += (l_response.get(2, 0)),
8161 return l_result
8166 """
8167 NB! This command only works if its implemented in external audiohost (RTP or PCM host). The command can be is used for passing custom commands from client UI to the audio implementation.
8168
8169
8170 B{Arguments:}
8171 - B{command}
8172
8173 B{Return values:}
8174 - B{response}
8175 """
8176 l_request = skypekit.XCallRequest("ZR\000:", 0, 58)
8177 l_request.add_parm('S', 1, command)
8178 l_response = self.transport.xcall(l_request)
8179 l_result = l_response.get(1, '')
8180 return l_result
8182 """
8183 Returns value of audio playback volume setting (0..100).
8184
8185
8186 B{Return values:}
8187 - B{volume}
8188 """
8189 l_request = skypekit.XCallRequest("ZR\000<", 0, 60)
8190 l_response = self.transport.xcall(l_request)
8191 l_result = l_response.get(1, 0)
8192 return l_result
8197 """
8198 This method is for setting speaker volume. It will set the level for Skype digital gain control. Skype audio library will not control gain of audio device itself.
8199
8200
8201 B{Arguments:}
8202 - B{volume}
8203 """
8204 l_request = skypekit.XCallRequest("ZR\000=", 0, 61)
8205 l_request.add_parm('u', 1, volume)
8206 self.transport.xcall(l_request)
8208 """
8209 Returns value of microphone volume setting (0..100). It will return the analog gain of audio device set by Skype AGC. For real-time microphone volume, use GetNrgLevels method or OnNrgLevelsChange callback (both are methods of Skype class).
8210
8211
8212 B{Return values:}
8213 - B{mic_volume}
8214 """
8215 l_request = skypekit.XCallRequest("ZR\000>", 0, 62)
8216 l_response = self.transport.xcall(l_request)
8217 l_result = l_response.get(1, 0)
8218 return l_result
8223 """
8224 This method is for setting the microphone volume level. This does not work when Skype AGC (Automatic Gain Control) is enabled, which it is by default. It is currently impossible to disable AGC, so for now this method is here for purpose of future compatibility.
8225
8226
8227 B{Arguments:}
8228 - B{volume}
8229 """
8230 l_request = skypekit.XCallRequest("ZR\000?", 0, 63)
8231 l_request.add_parm('u', 1, volume)
8232 self.transport.xcall(l_request)
8234 """
8235 Returns true in &muted argument if the currently selected playback device is muted.
8236
8237
8238 B{Return values:}
8239 - B{muted}
8240 """
8241 l_request = skypekit.XCallRequest("ZR\000@", 0, 64)
8242 l_response = self.transport.xcall(l_request)
8243 l_result = l_response.get(1, False)
8244 return l_result
8246 """
8247 Returns true in &muted argument if the currently selected microphone is muted.
8248
8249
8250 B{Return values:}
8251 - B{muted}
8252 """
8253 l_request = skypekit.XCallRequest("ZR\000\101", 0, 65)
8254 l_response = self.transport.xcall(l_request)
8255 l_result = l_response.get(1, False)
8256 return l_result
8261 """
8262 Sets currently selected playback device mute status according to argument.
8263
8264
8265 B{Arguments:}
8266 - B{mute}
8267 """
8268 l_request = skypekit.XCallRequest("ZR\000\102", 0, 66)
8269 l_request.add_parm('b', 1, mute)
8270 self.transport.xcall(l_request)
8275 """
8276 Sets currently selected microphone mute status according to argument.
8277
8278
8279 B{Arguments:}
8280 - B{mute}
8281 """
8282 l_request = skypekit.XCallRequest("ZR\000\103", 0, 67)
8283 l_request.add_parm('b', 1, mute)
8284 self.transport.xcall(l_request)
8286 """
8287 This callback gets fired when there are changes in the system audio device list (USB headset gets plugged in or is detached.)
8288
8289 """
8290 pass
8295 event_handlers[10] = "_sk_on_available_device_list_change"
8297 """
8298 This callback gets fired when the audio strength changes in either playback or recording audio streams. Useful for providing visual indicators of audio activity in your UI.
8299
8300 """
8301 pass
8303 """ internal event dispatcher for OnNrgLevelsChange
8304 """
8305 self.OnNrgLevelsChange()
8306 event_handlers[11] = "_sk_on_nrg_levels_change"
8307 OPERATING_MEDIA = {0:'OM_UNKNOWN', 'OM_UNKNOWN':0, 1:'OM_FREE', 'OM_FREE':1, 2:'OM_FREE_WIRELESS', 'OM_FREE_WIRELESS':2, 3:'OM_3G', 'OM_3G':3, 4:'OM_4G', 'OM_4G':4}
8308 """
8309 - OM_UNKNOWN
8310 - OM_FREE
8311 - OM_FREE_WIRELESS
8312 - OM_3G
8313 - OM_4G
8314 """
8339 """
8340 creates an CONFIRMATION_CODE_REQUEST SMS message
8341
8342 B{Arguments:}
8343 - B{type_}
8344 - B{number}
8345
8346 B{Return values:}
8347 - B{sms}
8348 """
8349 l_request = skypekit.XCallRequest("ZR\000\035", 0, 29)
8350 l_request.add_parm('e', 1, Sms.CONFIRM_TYPE[type_])
8351 l_request.add_parm('S', 2, number)
8352 l_response = self.transport.xcall(l_request)
8353 l_result = module_id2classes[12](l_response.get(1), self.transport)
8354 return l_result
8360 """
8361 creates an CONFIRMATION_CODE_REQUEST SMS message
8362
8363 B{Arguments:}
8364 - B{number}
8365 - B{code}
8366
8367 B{Return values:}
8368 - B{sms}
8369 """
8370 l_request = skypekit.XCallRequest("ZR\000\036", 0, 30)
8371 l_request.add_parm('S', 1, number)
8372 l_request.add_parm('S', 2, code)
8373 l_response = self.transport.xcall(l_request)
8374 l_result = module_id2classes[12](l_response.get(1), self.transport)
8375 return l_result
8377 """
8378 creates an OUTGOING/COMPOSING SMS message
8379
8380 B{Return values:}
8381 - B{sms}
8382 """
8383 l_request = skypekit.XCallRequest("ZR\000\106", 0, 70)
8384 l_response = self.transport.xcall(l_request)
8385 l_result = module_id2classes[12](l_response.get(1), self.transport)
8386 return l_result
8387 SETUPKEY_FT_AUTOACCEPT = "Lib/FileTransfer/AutoAccept"
8388 SETUPKEY_FT_SAVEPATH = "Lib/FileTransfer/SavePath"
8389 SETUPKEY_FT_INCOMING_LIMIT = "Lib/FileTransfer/IncomingLimit"
8390 SETUPKEY_IDLE_TIME_FOR_AWAY = "Lib/Account/IdleTimeForAway"
8391 SETUPKEY_IDLE_TIME_FOR_NA = "Lib/Account/IdleTimeForNA"
8392 - def GetAccount(
8393 self,
8394 identity
8395 ):
8396 """
8397 Retrieves an Account object by Skype name (identity). This should normally be one of the first method calls after Skype object initialization. Nearly all the other methods require successful account login in order to work properly. The list of accounts that have been used on the local machine/database can be retrieved with Skype::GetExistingAccounts method. If a matching identity is not found, a new Account object is created. This object can then be used to populate requred fields and then use Account::Register method for new account creation. This method returns false on error.
8398
8399
8400 B{Arguments:}
8401 - B{identity} - Account skypename.
8402
8403
8404 B{Return values:}
8405 - B{account} - Returns account object if successful.
8406
8407 """
8408 l_request = skypekit.XCallRequest("ZR\000s", 0, 115)
8409 l_request.add_parm('S', 1, identity)
8410 l_response = self.transport.xcall(l_request)
8411 l_result = module_id2classes[5](l_response.get(1), self.transport)
8412 return l_result
8414 """
8415 Returns a list of possible profiles used before on this machine
8416
8417 B{Return values:}
8418 - B{account_name_list}
8419 """
8420 l_request = skypekit.XCallRequest("ZR\000q", 0, 113)
8421 l_response = self.transport.xcall(l_request)
8422 l_result = l_response.get(1, [])
8423 return l_result
8425 """
8426 return most recently used account that has pwd saved. empty string if none
8427
8428 B{Return values:}
8429 - B{account}
8430 """
8431 l_request = skypekit.XCallRequest("ZR\000r", 0, 114)
8432 l_response = self.transport.xcall(l_request)
8433 l_result = l_response.get(1, '')
8434 return l_result
8439 """
8440 suggest a nice skypename to go with given fullname
8441
8442 B{Arguments:}
8443 - B{fullname}
8444
8445 B{Return values:}
8446 - B{suggested_name}
8447 """
8448 l_request = skypekit.XCallRequest("ZR\000t", 0, 116)
8449 l_request.add_parm('S', 1, fullname)
8450 l_response = self.transport.xcall(l_request)
8451 l_result = l_response.get(1, '')
8452 return l_result
8453 VALIDATERESULT = {
8454 0 :'NOT_VALIDATED',
8455 1 :'VALIDATED_OK',
8456 2 :'TOO_SHORT',
8457 3 :'TOO_LONG',
8458 4 :'CONTAINS_INVALID_CHAR',
8459 5 :'CONTAINS_SPACE',
8460 6 :'SAME_AS_USERNAME',
8461 7 :'INVALID_FORMAT',
8462 8 :'CONTAINS_INVALID_WORD',
8463 9 :'TOO_SIMPLE',
8464 10:'STARTS_WITH_INVALID_CHAR',
8465 'NOT_VALIDATED'
8466
8467
8468 : 0,
8469 'VALIDATED_OK'
8470
8471
8472 : 1,
8473 'TOO_SHORT'
8474
8475
8476 : 2,
8477 'TOO_LONG'
8478
8479
8480 : 3,
8481 'CONTAINS_INVALID_CHAR'
8482
8483 : 4,
8484 'CONTAINS_SPACE'
8485
8486
8487 : 5,
8488 'SAME_AS_USERNAME'
8489
8490
8491 : 6,
8492 'INVALID_FORMAT'
8493
8494
8495 : 7,
8496 'CONTAINS_INVALID_WORD'
8497
8498 : 8,
8499 'TOO_SIMPLE'
8500
8501
8502 : 9,
8503 'STARTS_WITH_INVALID_CHAR'
8504
8505 :10
8506 }
8507 """
8508 A value of this type can be returned by one of the following methods (of Skype class): ValidateAvatar, ValidateProfileString, ValidatePassword.
8509
8510 - NOT_VALIDATED - Given property could not be validated. The length of the field was within limits and the value is assumed to be Ok. Your client should treat this value as equivalent to VALIDATED_OK.
8511
8512 - VALIDATED_OK - Avatar or profile string validation succeeded.
8513
8514 - TOO_SHORT - Password is too short.
8515
8516 - TOO_LONG - The value exceeds max size limit for the given property.
8517
8518 - CONTAINS_INVALID_CHAR - Value contains illegal characters.
8519
8520 - CONTAINS_SPACE - Value contains whitespace.
8521
8522 - SAME_AS_USERNAME - Password cannot be the same as skypename.
8523
8524 - INVALID_FORMAT - Value has invalid format.
8525
8526 - CONTAINS_INVALID_WORD - Value contains invalid word.
8527
8528 - TOO_SIMPLE - Password is too simple.
8529
8530 - STARTS_WITH_INVALID_CHAR - Value starts with an invalid character.
8531
8532 """
8537 """
8538 No description available.
8539
8540 B{Arguments:}
8541 - B{value}
8542
8543 B{Return values:}
8544 - B{result}
8545 - B{free_bytes_left}
8546 """
8547 l_request = skypekit.XCallRequest("ZR\000w", 0, 119)
8548 l_request.add_parm('B', 1, value)
8549 l_response = self.transport.xcall(l_request)
8550 l_result = (skypekit.enumof(Skype.VALIDATERESULT, l_response.get(1))),
8551 l_result += (l_response.get(2, 0)),
8552 return l_result
8553 - def ValidateProfileString(
8554 self,
8555 prop_key,
8556 str_value,
8557 for_registration = False
8558 ):
8559 """
8560 This method should be used for validating skypenames before registering new accounts, if the propKey is set to SKYPENAME (Contact class) and forRegistration argument is set to true. If the forRegistration argument is false, only string length check is applied. It is also useful to probe, what the size limits are, for each string property (e.g. 300 characters for moodmessage)
8561
8562
8563 B{Arguments:}
8564 - B{prop_key}
8565 - B{str_value}
8566 - B{for_registration}
8567
8568 B{Return values:}
8569 - B{result}
8570 - B{free_bytes_left}
8571 """
8572 l_request = skypekit.XCallRequest("ZR\000f", 0, 102)
8573 l_request.add_parm('e', 1, prop_key)
8574 l_request.add_parm('S', 2, str_value)
8575 l_request.add_parm('b', 3, for_registration)
8576 l_response = self.transport.xcall(l_request)
8577 l_result = (skypekit.enumof(Skype.VALIDATERESULT, l_response.get(1))),
8578 l_result += (l_response.get(2, 0)),
8579 return l_result
8585 """
8586 This method is for pre-validating account passwords before account creation or password change. The result will return either VALIDATED_OK or one of many possible reasons the password is unacceptable (too short, too simple, etc.)
8587
8588
8589 B{Arguments:}
8590 - B{username}
8591 - B{password}
8592
8593 B{Return values:}
8594 - B{result}
8595 """
8596 l_request = skypekit.XCallRequest("ZR\000G", 0, 71)
8597 l_request.add_parm('S', 1, username)
8598 l_request.add_parm('S', 2, password)
8599 l_response = self.transport.xcall(l_request)
8600 l_result = skypekit.enumof(Skype.VALIDATERESULT, l_response.get(1))
8601 return l_result
8602 SETUPKEY_PORT = "*Lib/Connection/Port"
8603 SETUPKEY_HTTPS_PROXY_ENABLE = "*Lib/Connection/HttpsProxy/Enable"
8604 SETUPKEY_HTTPS_PROXY_ADDR = "*Lib/Connection/HttpsProxy/Addr"
8605 SETUPKEY_HTTPS_PROXY_USER = "*Lib/Connection/HttpsProxy/User"
8606 SETUPKEY_HTTPS_PROXY_PWD = "*Lib/Connection/HttpsProxy/Pwd"
8607 SETUPKEY_SOCKS_PROXY_ENABLE = "*Lib/Connection/SocksProxy/Enable"
8608 SETUPKEY_SOCKS_PROXY_ADDR = "*Lib/Connection/SocksProxy/Addr"
8609 SETUPKEY_SOCKS_PROXY_USER = "*Lib/Connection/SocksProxy/User"
8610 SETUPKEY_SOCKS_PROXY_PWD = "*Lib/Connection/SocksProxy/Pwd"
8611 SETUPKEY_LOCALADDRESS = "*Lib/Connection/LocalAddress"
8612 SETUPKEY_DISABLE_PORT80 = "*Lib/Connection/DisablePort80"
8613 SETUPKEY_DISABLE_UDP = "*Lib/Connection/DisableUDP"
8614 PROXYTYPE = {0:'HTTPS_PROXY', 'HTTPS_PROXY':0, 1:'SOCKS_PROXY', 'SOCKS_PROXY':1}
8615 """
8616 - HTTPS_PROXY
8617 - SOCKS_PROXY
8618 """
8623 """
8624 No description available.
8625
8626 B{Return values:}
8627 - B{type_}
8628 """
8629 pass
8630 event_handlers[12] = "_sk_on_proxy_auth_failure"
8636 - def GetStr(
8637 self,
8638 key
8639 ):
8640 """
8641 This is used for retrieving local setup keys of type string. For more information, see Defines section in the skype-embedded_2.h
8642
8643
8644 B{Arguments:}
8645 - B{key}
8646
8647 B{Return values:}
8648 - B{value}
8649 """
8650 l_request = skypekit.XCallRequest("ZR\000x", 0, 120)
8651 l_request.add_parm('S', 1, key)
8652 l_response = self.transport.xcall(l_request)
8653 l_result = l_response.get(1, '')
8654 return l_result
8655 - def GetInt(
8656 self,
8657 key
8658 ):
8659 """
8660 This is used for retrieving local setup keys of type int. For more information, see Defines section in the skype-embedded_2.h
8661
8662
8663 B{Arguments:}
8664 - B{key}
8665
8666 B{Return values:}
8667 - B{value}
8668 """
8669 l_request = skypekit.XCallRequest("ZR\000y", 0, 121)
8670 l_request.add_parm('S', 1, key)
8671 l_response = self.transport.xcall(l_request)
8672 l_result = l_response.get(1, 0)
8673 return l_result
8674 - def GetBin(
8675 self,
8676 key
8677 ):
8678 """
8679 This is used for retrieving local setup keys of type binary. For more information, see Defines section in the skype-embedded_2.h
8680
8681
8682 B{Arguments:}
8683 - B{key}
8684
8685 B{Return values:}
8686 - B{value}
8687 """
8688 l_request = skypekit.XCallRequest("ZR\000z", 0, 122)
8689 l_request.add_parm('S', 1, key)
8690 l_response = self.transport.xcall(l_request)
8691 l_result = l_response.get(1, '')
8692 return l_result
8693 - def SetStr(
8694 self,
8695 key,
8696 value
8697 ):
8698 """
8699 This is used for setting local setup keys of type string. For more information, see Defines section in the skype-embedded_2.h
8700
8701
8702 B{Arguments:}
8703 - B{key}
8704 - B{value}
8705 """
8706 l_request = skypekit.XCallRequest("ZR\000{", 0, 123)
8707 l_request.add_parm('S', 1, key)
8708 l_request.add_parm('S', 2, value)
8709 self.transport.xcall(l_request)
8710 - def SetInt(
8711 self,
8712 key,
8713 value
8714 ):
8715 """
8716 This is used for setting local setup keys of type int. For more information, see Defines section in the skype-embedded_2.h
8717
8718
8719 B{Arguments:}
8720 - B{key}
8721 - B{value}
8722 """
8723 l_request = skypekit.XCallRequest("ZR\000|", 0, 124)
8724 l_request.add_parm('S', 1, key)
8725 l_request.add_parm('i', 2, value)
8726 self.transport.xcall(l_request)
8727 - def SetBin(
8728 self,
8729 key,
8730 value
8731 ):
8732 """
8733 This is used for setting local setup keys of type binary. For more information, see Defines section in the skype-embedded_2.h
8734
8735
8736 B{Arguments:}
8737 - B{key}
8738 - B{value}
8739 """
8740 l_request = skypekit.XCallRequest("ZR\000}", 0, 125)
8741 l_request.add_parm('S', 1, key)
8742 l_request.add_parm('B', 2, value)
8743 self.transport.xcall(l_request)
8748 """
8749 Returns true if the given setup key is defined in local setup. For more information, see Defines section in the skype-embedded_2.h
8750
8751
8752 B{Arguments:}
8753 - B{key}
8754
8755 B{Return values:}
8756 - B{value}
8757 """
8758 l_request = skypekit.XCallRequest("ZR\000~", 0, 126)
8759 l_request.add_parm('S', 1, key)
8760 l_response = self.transport.xcall(l_request)
8761 l_result = l_response.get(1, False)
8762 return l_result
8763 - def Delete(
8764 self,
8765 key
8766 ):
8767 """
8768 No description available.
8769
8770 B{Arguments:}
8771 - B{key}
8772 """
8773 l_request = skypekit.XCallRequest("ZR\000\177", 0, 127)
8774 l_request.add_parm('S', 1, key)
8775 self.transport.xcall(l_request)
8780 """
8781 No description available.
8782
8783 B{Arguments:}
8784 - B{key}
8785
8786 B{Return values:}
8787 - B{value}
8788 """
8789 l_request = skypekit.XCallRequest("ZR\000\200\001", 0, 128)
8790 l_request.add_parm('S', 1, key)
8791 l_response = self.transport.xcall(l_request)
8792 l_result = l_response.get(1, [])
8793 return l_result
8795 """
8796 Returns two string lists. First of them will contain list of two-letter language codes (ISO 639-1) The second list contains names of corresponding languages.
8797
8798
8799 B{Return values:}
8800 - B{language_code_list}
8801 - B{language_name_list} - assumes UI has set correct language
8802 """
8803 l_request = skypekit.XCallRequest("ZR\000\317\001", 0, 207)
8804 l_response = self.transport.xcall(l_request)
8805 l_result = (l_response.get(1, [])),
8806 l_result += (l_response.get(2, [])),
8807 return l_result
8809 """
8810 Returns three string lists and one int array, containing 2-letter country code, country name, dialing prefix and example dial string (not available for all items). This method does currently return 0 for South Georgia and the South Sandwich Islands.
8811
8812
8813 B{Return values:}
8814 - B{country_code_list}
8815 - B{country_name_list} - assumes UI has set correct language
8816 - B{country_prefix_list}
8817 - B{country_dial_example_list}
8818 """
8819 l_request = skypekit.XCallRequest("ZR\000\320\001", 0, 208)
8820 l_response = self.transport.xcall(l_request)
8821 l_result = (l_response.get(1, [])),
8822 l_result += (l_response.get(2, [])),
8823 l_result += (l_response.get(3, [])),
8824 l_result += (l_response.get(4, [])),
8825 return l_result
8830 """
8831 Returns 2-letter country code based on PSTN number. The input argument has to be without + in from of it - '37212345678' will return 'ee' while '+37212345678' will return an empty string.
8832
8833
8834 B{Arguments:}
8835 - B{number}
8836
8837 B{Return values:}
8838 - B{country_code}
8839 """
8840 l_request = skypekit.XCallRequest("ZR\000\323\001", 0, 211)
8841 l_request.add_parm('S', 1, number)
8842 l_response = self.transport.xcall(l_request)
8843 l_result = l_response.get(1, '')
8844 return l_result
8849 """
8850 App2AppCreate method constructs a local instance of an App2App application. App2App applications are not abstracted in the SkypeKit API as a separate class. Rather, they can be created with App2AppCreate, supplying their name as ID, and then connected to remote parties using App2AppConnect method.
8851
8852 App2App portion of the SkypeKit API enables you to implement arbitrary data exchange protocols between Skype clients. Basically, if you are ever tempted to use conversation chat messages for something other than actual human-readable chat - you should consider using your own custom App2App protocol instead.
8853
8854 The downside of App2App is that all the participants need to be running a client that supports the same App2App application. Although, it is possible to have one side using a custom SkypeKit client and another side using Skype desktop client - App2App is supported in both, in case of desktop client via Public API - you are still limited to remote side running something that can recognize your protocol and react to connection attempts from your side.
8855
8856 To establish connection between each other, all participants need to create their local instances of the application (with the same ID, and then connect to each other. More than one App2App applications can be active in a local client at the same time. Also, more than two clients can be connected with the same application.
8857
8858 Once connection is established, you can choose between two communication methods - datagrams and stream read/write methods. Overall, there are not much principal difference between the two. Datagram packet size is limited to 1500 bytes and stream packet size to 32 KB of payload data. Implementation-wise, datagrams are probably somewhat easier to deal with.
8859
8860
8861 B{Arguments:}
8862 - B{appname} - Application ID. This ID is used by the rest of the App2App commands to differentiate between applications, should there be more than one app2app applications running on the local system.
8863
8864
8865 B{Return values:}
8866 - B{result} - Returns true if the app creation was successful. Returns false when an application with the same name already exists in the local system.
8867
8868 """
8869 l_request = skypekit.XCallRequest("ZR\000\327\001", 0, 215)
8870 l_request.add_parm('S', 1, appname)
8871 l_response = self.transport.xcall(l_request)
8872 l_result = l_response.get(1, False)
8873 return l_result
8878 """
8879 Disconnects and deletes the App2App application.
8880
8881
8882 B{Arguments:}
8883 - B{appname} - application ID.
8884
8885
8886 B{Return values:}
8887 - B{result} - Returns true if the deletion was successful (application with such ID actually existed)
8888
8889 """
8890 l_request = skypekit.XCallRequest("ZR\000\330\001", 0, 216)
8891 l_request.add_parm('S', 1, appname)
8892 l_response = self.transport.xcall(l_request)
8893 l_result = l_response.get(1, False)
8894 return l_result
8900 """
8901 The App2AppConnect connect result does not mean the connection was immediately established. It will return Ok even if the remote party was offline. The actual connection will be established when both parties have fired App2AppConnect with the same application name, at eachother. At that point, OnApp2AppStreamListChange event will fire for both local and remote party (with listType argument set to ALL_STREAMS) and you can start exchanging data, using either App2App datagrams or App2AppRead App2AppWrite methods.
8902
8903
8904 B{Arguments:}
8905 - B{appname} - Application ID. This needs to match with application ID connecting from the remote side.
8906
8907 - B{skypename} - Skype Name of the remote party.
8908
8909
8910 B{Return values:}
8911 - B{result} - NB! This argument will return true even if the remote party has not yet connected (or is not even online yet) - it merely indicates that the connect command was successfuly processed in runtime. The actual connection success will be indicated when the OnApp2AppStreamListChange event fires, i.e. when App2App stream will be established between connecting parties.
8912
8913 """
8914 l_request = skypekit.XCallRequest("ZR\000\331\001", 0, 217)
8915 l_request.add_parm('S', 1, appname)
8916 l_request.add_parm('S', 2, skypename)
8917 l_response = self.transport.xcall(l_request)
8918 l_result = l_response.get(1, False)
8919 return l_result
8925 """
8926 Disconnects an App2App stream. This is different from App2AppDelete command in that it enables you to disconnect remote parties selectively - in case there are more than two participants in the App2App stream pool.
8927
8928
8929 B{Arguments:}
8930 - B{appname} - application ID
8931
8932 - B{stream} - stream ID.
8933
8934
8935 B{Return values:}
8936 - B{result} - returns true when the stream disconnect was successful.
8937
8938 """
8939 l_request = skypekit.XCallRequest("ZR\000\332\001", 0, 218)
8940 l_request.add_parm('S', 1, appname)
8941 l_request.add_parm('S', 2, stream)
8942 l_response = self.transport.xcall(l_request)
8943 l_result = l_response.get(1, False)
8944 return l_result
8945 - def App2AppWrite(
8946 self,
8947 appname,
8948 stream,
8949 data
8950 ):
8951 """
8952 Sends a stream packet to the remote party specified in the stream argument. The max size of stream write packet is 32KB. After calling this method, OnApp2AppStreamListChange will fire for both parties. In local ssytem with listType set to SENDING_STREAMS and on remote system with listType set to RECEIVED_STREAMS. This event can be used to read received packets out of the stream.
8953
8954
8955 B{Arguments:}
8956 - B{appname} - application ID
8957
8958 - B{stream} - stream ID
8959
8960 - B{data} - packet payload
8961
8962
8963 B{Return values:}
8964 - B{result} - returns true if the call was successful. Note that this does indicate the packet was actually received by remote party.
8965
8966 """
8967 l_request = skypekit.XCallRequest("ZR\000\333\001", 0, 219)
8968 l_request.add_parm('S', 1, appname)
8969 l_request.add_parm('S', 2, stream)
8970 l_request.add_parm('B', 3, data)
8971 l_response = self.transport.xcall(l_request)
8972 l_result = l_response.get(1, False)
8973 return l_result
8974 - def App2AppDatagram(
8975 self,
8976 appname,
8977 stream,
8978 data
8979 ):
8980 """
8981 Sends a datagram to the remote party specified in the stream argument. The max size of datagram payload is 1500 bytes.
8982
8983
8984 B{Arguments:}
8985 - B{appname} - application ID - from App2AppCreate
8986
8987 - B{stream} - stream ID - either from App2AppGetStreamsList or from OnApp2AppStreamListChange
8988 - B{data} - datagram payload (max 1500 bytes)
8989
8990 B{Return values:}
8991 - B{result} - returns true on method success. Note that this does mean the remote party has actually received your datagram - that sort of feedback, should you want it, is up to you to implement in your custom protocol.
8992 """
8993 l_request = skypekit.XCallRequest("ZR\000\334\001", 0, 220)
8994 l_request.add_parm('S', 1, appname)
8995 l_request.add_parm('S', 2, stream)
8996 l_request.add_parm('B', 3, data)
8997 l_response = self.transport.xcall(l_request)
8998 l_result = l_response.get(1, False)
8999 return l_result
9000 - def App2AppRead(
9001 self,
9002 appname,
9003 stream
9004 ):
9005 """
9006 Reads data from the specified stream. This method should be called from the OnApp2AppStreamListChange event callback, when this callback gets fired with listType argument set to RECEIVED_STREAMS.
9007
9008
9009 B{Arguments:}
9010 - B{appname} - application ID
9011
9012 - B{stream} - stream ID
9013
9014
9015 B{Return values:}
9016 - B{result} - returns true on method success. Note that this does mean the remote party has actually received your packet - that sort of feedback, should you want it, is up to you to implement in your custom protocol.
9017
9018 - B{data} - stream packet payload
9019
9020 """
9021 l_request = skypekit.XCallRequest("ZR\000\335\001", 0, 221)
9022 l_request.add_parm('S', 1, appname)
9023 l_request.add_parm('S', 2, stream)
9024 l_response = self.transport.xcall(l_request)
9025 l_result = (l_response.get(1, False)),
9026 l_result += (l_response.get(2, '')),
9027 return l_result
9032 """
9033 App2AppGetConnectableUsers returns a list of currently online contacts. It does not return a list of contacts who have an app2app application running. There is currently no way of querying whether an application has been launched on the remote side - other than trying to connect to the remote side and waiting for timeout. NB! if you use App2AppGetConnectableUsers immediately after login - then the online presence of your contact list has not yet updated itself - so this method will most likely return either an empty list or a list with echo123 in it.
9034
9035
9036 B{Arguments:}
9037 - B{appname} - application ID
9038
9039
9040 B{Return values:}
9041 - B{result} - returns true on method success
9042
9043 - B{users} - stringlist with Skype Names of connectable users
9044
9045 """
9046 l_request = skypekit.XCallRequest("ZR\000\336\001", 0, 222)
9047 l_request.add_parm('S', 1, appname)
9048 l_response = self.transport.xcall(l_request)
9049 l_result = (l_response.get(1, False)),
9050 l_result += (l_response.get(2, [])),
9051 return l_result
9052 APP2APP_STREAMS = {0:'ALL_STREAMS', 'ALL_STREAMS':0, 1:'SENDING_STREAMS', 'SENDING_STREAMS':1, 2:'RECEIVED_STREAMS', 'RECEIVED_STREAMS':2}
9053 """
9054 - ALL_STREAMS
9055 - SENDING_STREAMS
9056 - RECEIVED_STREAMS
9057 """
9063 """
9064 Takes application ID and list type filter and returns a stringlist with streamID's that pass the filter.
9065
9066
9067 B{Arguments:}
9068 - B{appname} - application ID
9069
9070 - B{list_type} - list type filter
9071
9072
9073 B{Return values:}
9074 - B{result} - results true if the method call was successful
9075
9076 - B{streams} - string list with stream IDs
9077
9078 - B{received_sizes} - For RECEIVED_STREAMS, contains the number of bytes in each stream waiting to be read
9079 """
9080 l_request = skypekit.XCallRequest("ZR\000\337\001", 0, 223)
9081 l_request.add_parm('S', 1, appname)
9082 l_request.add_parm('e', 2, Skype.APP2APP_STREAMS[list_type])
9083 l_response = self.transport.xcall(l_request)
9084 l_result = (l_response.get(1, False)),
9085 l_result += (l_response.get(2, [])),
9086 l_result += (l_response.get(3, [])),
9087 return l_result
9094 """
9095 This event gets fired on incoming app2app datagram.
9096
9097
9098 B{Return values:}
9099 - B{appname} - App2app application ID.
9100
9101 - B{stream} - App2app stream ID - see OnApp2AppStreamListChange event for obtaining stream IDs.
9102
9103 - B{data} - Datagram payload - limited to 1500 bytes.
9104
9105 """
9106 pass
9107 event_handlers[6] = "_sk_on_app2app_datagram"
9109 """ internal event dispatcher for OnApp2AppDatagram
9110 """
9111 l_cleanparms = (parms.get(1, '')),
9112 l_cleanparms += (parms.get(2, '')),
9113 l_cleanparms += (parms.get(3, '')),
9114 self.OnApp2AppDatagram(*l_cleanparms)
9122 """
9123 In context of datagrams, this event will fire when:
9124
9125 - Connection is established between two app2app applications. That is, when both parties have an app up with the same name and -both- used App2AppConnect In that case, both parties get this event, with listType ALL_STREAMS
9126
9127 - When a datagram is sent, the sender will get this event with listType SENDING_STREAMS Receiver of the datagram will get OnApp2AppDatagram event instead.
9128
9129 - When the remote party drops app2app connection, the local user will get OnApp2AppStreamListChange with listType ALL_STREAMS and streams.size() zero.
9130 In context of stream reads/writes, this event will fire for both the sender (listType == SENDING_STREAMS)and the receiver (listType == RECEIVED_STREAMS). For receiver side, this is the place to put your reading code - App2AppRead.
9131
9132
9133 B{Return values:}
9134 - B{appname} - application ID - the name you supplied in App2AppCreate.
9135
9136 - B{list_type} - application list type (read/write/all)
9137
9138 - B{streams} - SEStringlist with affected stream IDs.
9139
9140 - B{received_sizes} - For RECEIVED_STREAMS, contains the number of bytes in each stream waiting to be read
9141 """
9142 pass
9143 event_handlers[8] = "_sk_on_app2app_stream_list_change"
9145 """ internal event dispatcher for OnApp2AppStreamListChange
9146 """
9147 l_cleanparms = (parms.get(1, '')),
9148 l_cleanparms += (Skype.APP2APP_STREAMS[parms.get(2)]),
9149 l_cleanparms += (parms.get(3, [])),
9150 l_cleanparms += (parms.get(4, [])),
9151 self.OnApp2AppStreamListChange(*l_cleanparms)
9152
9153 -def GetSkype(apptoken, has_event_thread=True, host='127.0.0.1', port=8963, logtransport=False, secure=True):
9154 setup = "SkypeKit/SubscribedProperties=10:155,10:154,10:151,10:152,10:153,2:202,2:4,2:6,2:5,2:7,2:8,2:9,2:10,2:11,2:12,2:13,2:14,2:15,2:16,2:17,2:18,2:37,2:26,2:205,2:27,2:36,2:19,2:28,2:29,2:182,2:183,2:20,2:25,2:35,2:34,2:21,2:22,2:23,2:33,2:180,2:39,2:41,2:184,2:185,2:186,2:187,2:188,2:189,2:42,1:200,19:930,19:931,19:932,19:933,19:934,19:935,19:936,19:943,19:938,19:948,19:939,19:941,19:942,19:947,19:949,19:950,19:951,19:952,19:953,19:954,18:972,18:902,18:918,18:974,18:996,18:920,18:921,18:925,18:924,18:927,18:928,18:973,18:975,18:976,18:977,18:970,18:971,18:979,18:981,18:915,18:903,18:904,18:919,18:922,18:906,18:907,18:909,18:980,18:910,18:911,18:913,18:914,9:960,9:120,9:122,9:123,9:792,9:790,9:121,9:961,9:962,9:968,9:222,9:223,9:963,9:964,9:127,9:125,9:966,9:126,9:982,11:130,11:131,11:132,11:133,11:134,11:1104,11:1105,7:100,7:101,7:102,7:103,7:104,7:105,7:106,7:107,7:108,7:109,7:830,7:831,12:190,12:191,12:192,12:48,12:198,12:193,12:49,12:194,12:199,12:195,12:196,12:197,12:840,6:80,6:81,6:82,6:83,6:84,6:85,6:86,6:87,6:88,6:89,6:90,6:91,6:92,6:93,6:98,5:70,5:71,5:73,5:78,5:72,5:74,5:75,5:804,5:76,5:79,5:77,5:160,5:161,5:162,5:163,5:164,5:165,5:166,5:168,5:169,5:773,5:800,5:801,5:802,5:4,5:5,5:7,5:8,5:9,5:10,5:11,5:12,5:13,5:14,5:15,5:16,5:17,5:18,5:19,5:26,5:27,5:28,5:34,5:37,5:182,5:183,5:205\nSkypeKit/SubscribedEvents=10:1,10:2,0:1,0:2,0:3,1:1,19:1,18:1,18:2,18:3,0:4,0:5,11:2,11:1,0:7,0:10,0:11,0:12,0:6,0:8\n"
9155 return Skype(skypekit.SkypeKit(apptoken, module_id2classes, has_event_thread, host, port, logtransport, secure, setup))
9156