1
2
3 import skypekit
4 import warnings
5 module_id2classes = {}
366 module_id2classes[10] = ContactGroup
1261 module_id2classes[2] = Contact
1736 module_id2classes[1] = ContactSearch
1739 """
1740 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.
1741
1742 """
1743 event_handlers = {}
1744 propid2label = {}
1749 return "Participant %s" % (self.object_id, )
1750 @staticmethod
1752 """ convert a property name to the enum of the property """
1753 return getattr(Participant, "P_"+propname.upper())
1754 module_id = 19
1756 """ notifies from a property change """
1757
1758 pass
1759 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}
1760 """
1761 Recognized values for the P_RANK property. The P_RANK controls participant's privileges in the conversation. See Participant::CanSetRankTo and Participant::SetRankTo methods.
1762
1763 - CREATOR - Creator of the chat. There can be only one participant with this type per conversation. Other participants cannot be promoted to Creator rank.
1764
1765 - ADMIN - Participant who has administrator privileges
1766
1767 - SPEAKER - Participant who can speak and write
1768
1769 - WRITER - Participant who can write but not speak
1770
1771 - SPECTATOR - Participant who can read but not write/speak
1772
1773 - APPLICANT - Participant who is applying to join the conversation. Member cannot be demoted to applicants once they have been accepted.
1774
1775 - RETIRED - Participant who has eft or has been kicked from the conversation
1776
1777 - OUTLAW - Participant who has been banned from the chat
1778
1779 """
1780 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}
1781 """
1782 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.
1783
1784 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.
1785
1786 Transmission of P_TEXT_STATUS updates to remote participants of conversations is controlled via SETUPKEY_DISABLE_CHAT_ACTIVITY_INDICATION setup key.
1787
1788 Secondly, the TEXT_NA value enables you to detect participants who are running clients with no chat capability.
1789
1790 - TEXT_UNKNOWN - Fallback state in case the text status is not (yet) deternmined.
1791
1792 - 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).
1793
1794 - READING - Participant is currently not typing.
1795
1796 - WRITING - Participant is currently typing.
1797
1798 - WRITING_AS_ANGRY - This state should be set when following two conditions are true:
1799 - interval between keypresses are less than 20 ms;
1800 - at least one of the keys adjacent to current key are pressed down.
1801
1802 - 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
1803
1804 """
1805 VOICE_STATUS = {
1806 0:'VOICE_UNKNOWN',
1807 1:'VOICE_NA',
1808 2:'VOICE_AVAILABLE',
1809 3:'VOICE_CONNECTING',
1810 4:'RINGING',
1811 5:'EARLY_MEDIA',
1812 6:'LISTENING',
1813 7:'SPEAKING',
1814 8:'VOICE_ON_HOLD',
1815 9:'VOICE_STOPPED',
1816 'VOICE_UNKNOWN' :0,
1817 'VOICE_NA' :1,
1818 'VOICE_AVAILABLE' :2,
1819 'VOICE_CONNECTING' :3,
1820 'RINGING' :4,
1821 'EARLY_MEDIA' :5,
1822 'LISTENING' :6,
1823 'SPEAKING' :7,
1824 'VOICE_ON_HOLD' :8,
1825 'VOICE_STOPPED' :9
1826 }
1827 """
1828 Recognized values for the P_VOICE_STATUS property.
1829
1830 - VOICE_UNKNOWN - Participant voice status is not (yet) determined.
1831
1832 - VOICE_NA - Participant is using a Skype client with no audio capability.
1833
1834 - VOICE_AVAILABLE - Participant is using a Skype client that supports audio.
1835
1836 - VOICE_CONNECTING - Participant is in process of joining current live session. This is a transitional state.
1837
1838 - RINGING - Participant has been invited to join the live session but has not yet accepted.
1839
1840 - EARLY_MEDIA - Participant is in process of joining current live session. This is another transitional state.
1841
1842 - LISTENING - Participant has joined the current live session but is currently not transmitting audio.
1843
1844 - 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.
1845
1846 - VOICE_ON_HOLD - Participant has joined the current live session but the audio is currently on hold.
1847
1848 - VOICE_STOPPED - Participant will be placed in this state for some seconds after live session has finished. This is another transitional state.
1849
1850 """
1851 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}
1852 """
1853 Recognized values for the P_VIDEO_STATUS property. This property applies to Participant's video send capability, not capability to receive video.
1854
1855 - VIDEO_UNKNOWN - Video status is not (yet) determined.
1856
1857 - VIDEO_NA - Indicates that this Participant does not have video available..
1858
1859 - 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.
1860
1861 - VIDEO_CONNECTING - Transitional state indicating that the Participant is attempting to initiate video send.
1862
1863 - STREAMING - Indicates that the participant is currently sending video.
1864
1865 - VIDEO_ON_HOLD - Indicates that the participant video send is currently paused.
1866
1867 """
1868 DTMF = {
1869 0 :'DTMF_0',
1870 1 :'DTMF_1',
1871 2 :'DTMF_2',
1872 3 :'DTMF_3',
1873 4 :'DTMF_4',
1874 5 :'DTMF_5',
1875 6 :'DTMF_6',
1876 7 :'DTMF_7',
1877 8 :'DTMF_8',
1878 9 :'DTMF_9',
1879 10:'DTMF_STAR',
1880 11:'DTMF_POUND',
1881 'DTMF_0' : 0,
1882 'DTMF_1' : 1,
1883 'DTMF_2' : 2,
1884 'DTMF_3' : 3,
1885 'DTMF_4' : 4,
1886 'DTMF_5' : 5,
1887 'DTMF_6' : 6,
1888 'DTMF_7' : 7,
1889 'DTMF_8' : 8,
1890 'DTMF_9' : 9,
1891 'DTMF_STAR' :10,
1892 'DTMF_POUND' :11
1893 }
1894 """
1895 - DTMF_0
1896 - DTMF_1
1897 - DTMF_2
1898 - DTMF_3
1899 - DTMF_4
1900 - DTMF_5
1901 - DTMF_6
1902 - DTMF_7
1903 - DTMF_8
1904 - DTMF_9
1905 - DTMF_STAR
1906 - DTMF_POUND
1907 """
1908
1910 """
1911 [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.
1912
1913 """
1914 return module_id2classes[18](self._sk_property("ZG\242\007]\023", 930, True), self.transport)
1915 convo_id = property(_sk_get_convo_id)
1916 propid2label[930] = "convo_id"
1917 P_CONVO_ID = 930
1919 """
1920 [ALL] skypename OR pstn_number OR namespace:identity
1921 """
1922 return self._sk_property("ZG\243\007]\023", 931, True)
1923 identity = property(_sk_get_identity)
1924 propid2label[931] = "identity"
1925 P_IDENTITY = 931
1931 rank = property(_sk_get_rank)
1932 propid2label[932] = "rank"
1933 P_RANK = 932
1935 """
1936 Not set (should be: requested Participant::RANK, higher than the current one)
1937 """
1938 return skypekit.enumof(Participant.RANK, self._sk_property("ZG\245\007]\023", 933, True))
1939 requested_rank = property(_sk_get_requested_rank)
1940 propid2label[933] = "requested_rank"
1941 P_REQUESTED_RANK = 933
1943 """
1944 [ALL] the typing indicator
1945 """
1946 return skypekit.enumof(Participant.TEXT_STATUS, self._sk_property("ZG\246\007]\023", 934, True))
1947 text_status = property(_sk_get_text_status)
1948 propid2label[934] = "text_status"
1949 P_TEXT_STATUS = 934
1955 voice_status = property(_sk_get_voice_status)
1956 propid2label[935] = "voice_status"
1957 P_VOICE_STATUS = 935
1963 video_status = property(_sk_get_video_status)
1964 propid2label[936] = "video_status"
1965 P_VIDEO_STATUS = 936
1967 """
1968 [ALL] identity that was used to establish current live session with that participant (can be different from participant identity)
1969 """
1970 return self._sk_property("ZG\257\007]\023", 943, False)
1971 live_identity = property(_sk_get_live_identity)
1972 propid2label[943] = "live_identity"
1973 P_LIVE_IDENTITY = 943
1975 """
1976 [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.
1977
1978 """
1979 return self._sk_property("ZG\252\007]\023", 938, True)
1980 live_price_for_me = property(_sk_get_live_price_for_me)
1981 propid2label[938] = "live_price_for_me"
1982 P_LIVE_PRICE_FOR_ME = 938
1984 """
1985 [OTHERS] list of identities where the live session is being forwarded (if they are disclosed), space separated
1986 """
1987 return self._sk_property("ZG\264\007]\023", 948, True)
1988 live_fwd_identities = property(_sk_get_live_fwd_identities)
1989 propid2label[948] = "live_fwd_identities"
1990 P_LIVE_FWD_IDENTITIES = 948
1992 """
1993 [ALL] time of joining the live session
1994 """
1995 return self._sk_property("ZG\253\007]\023", 939, True)
1996 live_start_timestamp = property(_sk_get_live_start_timestamp)
1997 propid2label[939] = "live_start_timestamp"
1998 P_LIVE_START_TIMESTAMP = 939
2000 """
2001 [ALL] current 'loudness' level when SPEAKING (0..10)
2002 """
2003 return self._sk_property("ZG\255\007]\023", 941, True)
2004 sound_level = property(_sk_get_sound_level)
2005 propid2label[941] = "sound_level"
2006 P_SOUND_LEVEL = 941
2008 """
2009 [OTHERS] call (audio and video) debug info
2010 """
2011 return self._sk_property("ZG\256\007]\023", 942, False)
2012 debuginfo = property(_sk_get_debuginfo)
2013 propid2label[942] = "debuginfo"
2014 P_DEBUGINFO = 942
2016 """
2017 [OTHERS] DEPRECATED, use last_leavereason instead
2018 """
2019 return self._sk_property("ZG\263\007]\023", 947, True)
2020 last_voice_error = property(_sk_get_last_voice_error)
2021 propid2label[947] = "last_voice_error"
2022 P_LAST_VOICE_ERROR = 947
2024 """
2025 [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
2026 """
2027 return self._sk_property("ZG\265\007]\023", 949, True)
2028 quality_problems = property(_sk_get_quality_problems)
2029 propid2label[949] = "quality_problems"
2030 P_QUALITY_PROBLEMS = 949
2032 """
2033 [ALL] participant type during livesession as specified in IDENTITYTYPE
2034 """
2035 return skypekit.enumof(Skype.IDENTITYTYPE, self._sk_property("ZG\266\007]\023", 950, True))
2036 live_type = property(_sk_get_live_type)
2037 propid2label[950] = "live_type"
2038 P_LIVE_TYPE = 950
2040 """
2041 [OTHERS] participant livesession country code - used for emergency calls only atm
2042 """
2043 return self._sk_property("ZG\267\007]\023", 951, False)
2044 live_country = property(_sk_get_live_country)
2045 propid2label[951] = "live_country"
2046 P_LIVE_COUNTRY = 951
2048 """
2049 [OTHERS] Transferor identity (transferee side)
2050
2051 """
2052 return self._sk_property("ZG\270\007]\023", 952, True)
2053 transferred_by = property(_sk_get_transferred_by)
2054 propid2label[952] = "transferred_by"
2055 P_TRANSFERRED_BY = 952
2057 """
2058 [OTHERS] Identity of recipient of transfer (transferor side, caller side)
2059
2060 """
2061 return self._sk_property("ZG\271\007]\023", 953, True)
2062 transferred_to = property(_sk_get_transferred_to)
2063 propid2label[953] = "transferred_to"
2064 P_TRANSFERRED_TO = 953
2066 """
2067 [ALL] Identity of the user who added this participant to the conversation, type: Sid::String
2068
2069 """
2070 return self._sk_property("ZG\272\007]\023", 954, True)
2071 adder = property(_sk_get_adder)
2072 propid2label[954] = "adder"
2073 P_ADDER = 954
2075 """
2076 [OTHERS] last reason for leaving conversation or live session. provides an enum alternative to last_voice_error as well as the reason this participant RETIRED, if so
2077 """
2078 return skypekit.enumof(Skype.LEAVE_REASON, self._sk_property("ZG\273\007]\023", 955, True))
2079 last_leavereason = property(_sk_get_last_leavereason)
2080 propid2label[955] = "last_leavereason"
2081 P_LAST_LEAVEREASON = 955
2082
2087 """
2088 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.
2089
2090
2091 B{Arguments:}
2092 - B{rank} - Participant::RANK value to check for.
2093
2094
2095 B{Return values:}
2096 - B{result} - Returns true if local user can set participant's rank to the value given in rank argument.
2097
2098 """
2099 l_request = skypekit.XCallRequest("ZR\023\001", 19, 1)
2100 l_request.add_parm('O', 0, self)
2101 l_request.add_parm('e', 1, Participant.RANK[rank])
2102 l_response = self.transport.xcall(l_request)
2103 l_result = l_response.get(1, False)
2104 return l_result
2105 - def SetRankTo(
2106 self,
2107 rank
2108 ):
2109 """
2110 Sets Participant's conversation privileges to the given RANK
2111
2112
2113 B{Arguments:}
2114 - B{rank} - Target Participant::RANK value.
2115
2116 """
2117 l_request = skypekit.XCallRequest("ZR\023\002", 19, 2)
2118 l_request.add_parm('O', 0, self)
2119 l_request.add_parm('e', 1, Participant.RANK[rank])
2120 self.transport.xcall(l_request)
2121 - def Ring(
2122 self,
2123 identity_to_use = "",
2124 video_call = False,
2125 nrof_redials = 0,
2126 redial_period = 0,
2127 auto_start_vm = False,
2128 origin = ""
2129 ):
2130 """
2131 Initiates live conversation attempt with Participant.
2132
2133
2134 B{Arguments:}
2135 - B{identity_to_use} - Ring an alternate identity, such as a PSTN number.
2136
2137 - B{video_call} - Enable video.
2138
2139 - B{nrof_redials} - Unused.
2140
2141 - B{redial_period} - Unused.
2142
2143 - B{auto_start_vm} - Unused. On dialog, if falling on VM, greeting and recording will be automatically started.
2144
2145 - B{origin} - When call is initiated from web link, must contain the URI that was used
2146 """
2147 l_request = skypekit.XCallRequest("ZR\023\003", 19, 3)
2148 l_request.add_parm('O', 0, self)
2149 l_request.add_parm('S', 1, identity_to_use)
2150 l_request.add_parm('b', 2, video_call)
2151 l_request.add_parm('u', 3, nrof_redials)
2152 l_request.add_parm('u', 4, redial_period)
2153 l_request.add_parm('b', 5, auto_start_vm)
2154 l_request.add_parm('S', 6, origin)
2155 self.transport.xcall(l_request)
2157 """
2158 Rings this participant, using P_LIVE_IDENTITY property if set.
2159
2160 """
2161 l_request = skypekit.XCallRequest("ZR\023\010", 19, 8)
2162 l_request.add_parm('O', 0, self)
2163 self.transport.xcall(l_request)
2168 """
2169 Sets LIVE_IDENTITY property, an alternate identity to use when ringing, such as a PSTN.
2170
2171
2172 B{Arguments:}
2173 - B{identity_to_use} - Empty string will reset it to default, i.e IDENTITY property value
2174
2175 """
2176 l_request = skypekit.XCallRequest("ZR\023\007", 19, 7)
2177 l_request.add_parm('O', 0, self)
2178 l_request.add_parm('S', 1, identity_to_use)
2179 self.transport.xcall(l_request)
2181 """
2182 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.
2183
2184 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.
2185
2186
2187 B{Return values:}
2188 - B{video} - Returns reference to a constructed video object.
2189
2190 """
2191 l_request = skypekit.XCallRequest("ZR\023\004", 19, 4)
2192 l_request.add_parm('O', 0, self)
2193 l_response = self.transport.xcall(l_request)
2194 l_result = module_id2classes[11](l_response.get(1), self.transport)
2195 return l_result
2197 """
2198 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.
2199
2200 """
2201 l_request = skypekit.XCallRequest("ZR\023\005", 19, 5)
2202 l_request.add_parm('O', 0, self)
2203 self.transport.xcall(l_request)
2205 """
2206 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.
2207
2208 """
2209 l_request = skypekit.XCallRequest("ZR\023\006", 19, 6)
2210 l_request.add_parm('O', 0, self)
2211 self.transport.xcall(l_request)
2216 """
2217 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.
2218
2219
2220 B{Return values:}
2221 - B{dtmf} - Returns Participant::DTMF value.
2222
2223 """
2224 pass
2225 event_handlers[1] = "_sk_on_incoming_dtmf"
2230 module_id2classes[19] = Participant
2233 """
2234 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.
2235
2236 """
2237 event_handlers = {}
2238 propid2label = {}
2243 return "Conversation %s" % (self.object_id, )
2244 @staticmethod
2246 """ convert a property name to the enum of the property """
2247 return getattr(Conversation, "P_"+propname.upper())
2248 module_id = 18
2250 """ notifies from a property change """
2251
2252 pass
2253 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}
2254 """
2255 - DIALOG - 1:1 conversations, there is a one dialog per identity
2256 - CONFERENCE - equivalent of a multichat
2257 - TERMINATED_CONFERENCE - a conference that has been terminated (disbanded chat)
2258 - LEGACY_VOICE_CONFERENCE - voice-only conference, when host is using a legacy non-conversation client
2259 - LEGACY_SHAREDGROUP - chat used for legacy shared groups, can be ignored
2260 """
2261 MY_STATUS = {
2262 1 :'CONNECTING',
2263 2 :'RETRY_CONNECTING',
2264 3 :'DOWNLOADING_MESSAGES',
2265 4 :'QUEUED_TO_ENTER',
2266 5 :'APPLICANT',
2267 6 :'APPLICATION_DENIED',
2268 7 :'INVALID_ACCESS_TOKEN',
2269 8 :'CONSUMER',
2270 9 :'RETIRED_FORCEFULLY',
2271 10:'RETIRED_VOLUNTARILY',
2272 'CONNECTING' : 1,
2273 'RETRY_CONNECTING' : 2,
2274 'DOWNLOADING_MESSAGES' : 3,
2275 'QUEUED_TO_ENTER' : 4,
2276 'APPLICANT' : 5,
2277 'APPLICATION_DENIED' : 6,
2278 'INVALID_ACCESS_TOKEN' : 7,
2279 'CONSUMER' : 8,
2280 'RETIRED_FORCEFULLY' : 9,
2281 'RETIRED_VOLUNTARILY' :10
2282 }
2283 """
2284 - CONNECTING - connecting to conference
2285 - RETRY_CONNECTING
2286 - DOWNLOADING_MESSAGES - unused
2287 - QUEUED_TO_ENTER - conference is full for now, being queued
2288 - APPLICANT - I'm applying to join the conference
2289 - APPLICATION_DENIED - My application to join the conference was denied
2290 - INVALID_ACCESS_TOKEN - The password I provided is incorrect
2291 - CONSUMER - I'm part of the conference, I can participate
2292 - RETIRED_FORCEFULLY - I was kicked from the conference
2293 - RETIRED_VOLUNTARILY - I left the conference
2294 """
2295 LOCAL_LIVESTATUS = {
2296 0 :'NONE',
2297 1 :'STARTING',
2298 2 :'RINGING_FOR_ME',
2299 3 :'IM_LIVE',
2300 5 :'ON_HOLD_LOCALLY',
2301 6 :'ON_HOLD_REMOTELY',
2302 7 :'OTHERS_ARE_LIVE',
2303 11:'OTHERS_ARE_LIVE_FULL',
2304 8 :'PLAYING_VOICE_MESSAGE',
2305 9 :'RECORDING_VOICE_MESSAGE',
2306 10:'RECENTLY_LIVE',
2307 12:'TRANSFERRING',
2308 'NONE' : 0,
2309 'STARTING' : 1,
2310 'RINGING_FOR_ME' : 2,
2311 'IM_LIVE' : 3,
2312 'ON_HOLD_LOCALLY' : 5,
2313 'ON_HOLD_REMOTELY' : 6,
2314 'OTHERS_ARE_LIVE' : 7,
2315 'OTHERS_ARE_LIVE_FULL' :11,
2316 'PLAYING_VOICE_MESSAGE' : 8,
2317 'RECORDING_VOICE_MESSAGE' : 9,
2318 'RECENTLY_LIVE' :10,
2319 'TRANSFERRING' :12
2320 }
2321 """
2322 - NONE - there isn't a live session
2323 - STARTING - trying to start or join a live session
2324 - RINGING_FOR_ME - there is a live session ringing
2325 - IM_LIVE - the conference is live for me
2326 - ON_HOLD_LOCALLY - I put the live session on hold
2327 - ON_HOLD_REMOTELY - the live session was put on hold by someone else
2328 - OTHERS_ARE_LIVE - there is a live session on-going, I'm not participating but I could join
2329 - OTHERS_ARE_LIVE_FULL - there is a live session on-going without me, but I can't join because it's full
2330 - PLAYING_VOICE_MESSAGE - playing a voicemail (dialog only)
2331 - RECORDING_VOICE_MESSAGE - recording a voicemail (dialog only)
2332 - RECENTLY_LIVE - a live session just finished, we stay in this state for RECENTLY_LIVE_TIMEOUT setup key
2333 - TRANSFERRING - call is being transferred
2334 """
2335 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}
2336 """
2337 values for opt_admin_only_activities property
2338 - SET_META - allowed to set the CONVERSATION_META properties
2339 - ADD_CONSUMERS - allowed to add participants to the conference
2340 - SPEAK - allowed to speak, but not write
2341 - SPEAK_AND_WRITE - allowed to speak and write
2342 """
2343 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}
2344 """
2345 - ALL - All participants (may included some that are RETIRED or OUTLAW, but not all of them)
2346 - CONSUMERS - Participants that can receive messages, including myself
2347 - APPLICANTS - Only people who are applying to join the conversation
2348 - CONSUMERS_AND_APPLICANTS - Consumers and applicants
2349 - MYSELF - Myself
2350 - OTHER_CONSUMERS - All consumers except myself
2351 """
2352 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}
2353 """
2354 - ALL_CONVERSATIONS - bookmarked or in_inbox or live or with_meta_info or activity in last 30 days
2355 - INBOX_CONVERSATIONS - only last 6 months conversations are kept there
2356 - BOOKMARKED_CONVERSATIONS - is_bookmarked is set
2357 - LIVE_CONVERSATIONS - local_livestatus is different from NONE
2358 - REALLY_ALL_CONVERSATIONS - all conversations, without any of the limits of ALL_CONVERSATIONS
2359 """
2360
2362 """
2363 contact identity in case of dialogs, chat name in case of conferences
2364 """
2365 return self._sk_property("ZG\314\007]\022", 972, True)
2366 identity = property(_sk_get_identity)
2367 propid2label[972] = "identity"
2368 P_IDENTITY = 972
2374 type = property(_sk_get_type)
2375 propid2label[902] = "type"
2376 P_TYPE = 902
2378 """
2379 host of current live session. none => no session. myself in case of 1:1 calls
2380 """
2381 return self._sk_property("ZG\226\007]\022", 918, True)
2382 live_host = property(_sk_get_live_host)
2383 propid2label[918] = "live_host"
2384 P_LIVE_HOST = 918
2386 """
2387 moment when first participant other than host joined the current or last live session
2388 """
2389 return self._sk_property("ZG\316\007]\022", 974, True)
2390 live_start_timestamp = property(_sk_get_live_start_timestamp)
2391 propid2label[974] = "live_start_timestamp"
2392 P_LIVE_START_TIMESTAMP = 974
2394 """
2395 if live session is muted
2396 """
2397 return self._sk_property("ZG\344\007]\022", 996, True)
2398 live_is_muted = property(_sk_get_live_is_muted)
2399 propid2label[996] = "live_is_muted"
2400 P_LIVE_IS_MUTED = 996
2402 """
2403 '' everything matches, '=' nothing matches, '=string' string matches
2404 """
2405 return self._sk_property("ZG\230\007]\022", 920, True)
2406 alert_string = property(_sk_get_alert_string)
2407 propid2label[920] = "alert_string"
2408 P_ALERT_STRING = 920
2410 """
2411 if conversation is bookmarked/flagged
2412 """
2413 return self._sk_property("ZG\231\007]\022", 921, True)
2414 is_bookmarked = property(_sk_get_is_bookmarked)
2415 propid2label[921] = "is_bookmarked"
2416 P_IS_BOOKMARKED = 921
2418 """
2419 local name assigned via Rename
2420 """
2421 return self._sk_property("ZG\235\007]\022", 925, True)
2422 given_displayname = property(_sk_get_given_displayname)
2423 propid2label[925] = "given_displayname"
2424 P_GIVEN_DISPLAYNAME = 925
2426 """
2427 resulting display name of the conversation (based on given name, topic, participant list, etc)
2428 """
2429 return self._sk_property("ZG\234\007]\022", 924, True)
2430 displayname = property(_sk_get_displayname)
2431 propid2label[924] = "displayname"
2432 P_DISPLAYNAME = 924
2438 local_livestatus = property(_sk_get_local_livestatus)
2439 propid2label[927] = "local_livestatus"
2440 P_LOCAL_LIVESTATUS = 927
2442 """
2443 timestamp to sort the conversations in inbox by. 0 means not in inbox
2444 """
2445 return self._sk_property("ZG\240\007]\022", 928, True)
2446 inbox_timestamp = property(_sk_get_inbox_timestamp)
2447 propid2label[928] = "inbox_timestamp"
2448 P_INBOX_TIMESTAMP = 928
2450 """
2451 ID of the message that caused INBOX_TIMESTAMP to be set
2452 """
2453 return module_id2classes[9](self._sk_property("ZG\315\007]\022", 973, True), self.transport)
2454 inbox_message_id = property(_sk_get_inbox_message_id)
2455 propid2label[973] = "inbox_message_id"
2456 P_INBOX_MESSAGE_ID = 973
2458 """
2459 number of messages in UNCONSUMED_SUPPRESSED consumption status
2460 """
2461 return self._sk_property("ZG\317\007]\022", 975, True)
2462 unconsumed_suppressed_messages = property(_sk_get_unconsumed_suppressed_messages)
2463 propid2label[975] = "unconsumed_suppressed_messages"
2464 P_UNCONSUMED_SUPPRESSED_MESSAGES = 975
2466 """
2467 number of messages in UNCONSUMED_NORMAL consumption status
2468 """
2469 return self._sk_property("ZG\320\007]\022", 976, True)
2470 unconsumed_normal_messages = property(_sk_get_unconsumed_normal_messages)
2471 propid2label[976] = "unconsumed_normal_messages"
2472 P_UNCONSUMED_NORMAL_MESSAGES = 976
2474 """
2475 DEPRECATED, not set anymore
2476 """
2477 return self._sk_property("ZG\321\007]\022", 977, True)
2478 unconsumed_elevated_messages = property(_sk_get_unconsumed_elevated_messages)
2479 propid2label[977] = "unconsumed_elevated_messages"
2480 P_UNCONSUMED_ELEVATED_MESSAGES = 977
2482 """
2483 if there are unconsumed voice or call messages in the conversation
2484 """
2485 return self._sk_property("ZG\312\007]\022", 970, True)
2486 unconsumed_messages_voice = property(_sk_get_unconsumed_messages_voice)
2487 propid2label[970] = "unconsumed_messages_voice"
2488 P_UNCONSUMED_MESSAGES_VOICE = 970
2490 """
2491 ID of voice message that is being played or recorded in this conversation
2492 """
2493 return module_id2classes[7](self._sk_property("ZG\313\007]\022", 971, True), self.transport)
2494 active_vm_id = property(_sk_get_active_vm_id)
2495 propid2label[971] = "active_vm_id"
2496 P_ACTIVE_VM_ID = 971
2498 """
2499 consumption cutoff timestamp: messages after (but not including) this are considered unconsumed
2500 """
2501 return self._sk_property("ZG\323\007]\022", 979, True)
2502 consumption_horizon = property(_sk_get_consumption_horizon)
2503 propid2label[979] = "consumption_horizon"
2504 P_CONSUMPTION_HORIZON = 979
2506 """
2507 timestamp of last activity in conversation
2508 """
2509 return self._sk_property("ZG\325\007]\022", 981, True)
2510 last_activity_timestamp = property(_sk_get_last_activity_timestamp)
2511 propid2label[981] = "last_activity_timestamp"
2512 P_LAST_ACTIVITY_TIMESTAMP = 981
2514 """
2515 dialog this conference was spawned from
2516 """
2517 return module_id2classes[18](self._sk_property("ZG\223\007]\022", 915, True), self.transport)
2518 spawned_from_convo_id = property(_sk_get_spawned_from_convo_id)
2519 propid2label[915] = "spawned_from_convo_id"
2520 P_SPAWNED_FROM_CONVO_ID = 915
2522 """
2523 identity of conversation creator (doesn't apply to dialogs)
2524 """
2525 return self._sk_property("ZG\207\007]\022", 903, True)
2526 creator = property(_sk_get_creator)
2527 propid2label[903] = "creator"
2528 P_CREATOR = 903
2530 """
2531 timestamp of creation, tells you how far you can retrieve messages
2532 """
2533 return self._sk_property("ZG\210\007]\022", 904, True)
2534 creation_timestamp = property(_sk_get_creation_timestamp)
2535 propid2label[904] = "creation_timestamp"
2536 P_CREATION_TIMESTAMP = 904
2538 """
2539 my status in this conversation (connecting, participating, retired, etc) (doesn't apply to dialogs)
2540 """
2541 return skypekit.enumof(Conversation.MY_STATUS, self._sk_property("ZG\227\007]\022", 919, True))
2542 my_status = property(_sk_get_my_status)
2543 propid2label[919] = "my_status"
2544 P_MY_STATUS = 919
2546 """
2547 if it's a public conversation (doesn't apply to dialogs)
2548 """
2549 return self._sk_property("ZG\232\007]\022", 922, True)
2550 opt_joining_enabled = property(_sk_get_opt_joining_enabled)
2551 propid2label[922] = "opt_joining_enabled"
2552 P_OPT_JOINING_ENABLED = 922
2554 """
2555 rank that is auto-assigned at join (doesn't apply to dialogs)
2556 """
2557 return skypekit.enumof(Participant.RANK, self._sk_property("ZG\212\007]\022", 906, True))
2558 opt_entry_level_rank = property(_sk_get_opt_entry_level_rank)
2559 propid2label[906] = "opt_entry_level_rank"
2560 P_OPT_ENTRY_LEVEL_RANK = 906
2562 """
2563 if history visible to new consumers (doesn't apply to dialogs)
2564 """
2565 return self._sk_property("ZG\213\007]\022", 907, True)
2566 opt_disclose_history = property(_sk_get_opt_disclose_history)
2567 propid2label[907] = "opt_disclose_history"
2568 P_OPT_DISCLOSE_HISTORY = 907
2570 """
2571 activities that only ADMIN can do. Bitmap of ALLOWED_ACTIVITY values (doesn't apply to dialogs)
2572 """
2573 return self._sk_property("ZG\215\007]\022", 909, True)
2574 opt_admin_only_activities = property(_sk_get_opt_admin_only_activities)
2575 propid2label[909] = "opt_admin_only_activities"
2576 P_OPT_ADMIN_ONLY_ACTIVITIES = 909
2578 """
2579 public conversation password hint, use SetPassword to set (doesn't apply to dialogs)
2580 """
2581 return self._sk_property("ZG\324\007]\022", 980, True)
2582 passwordhint = property(_sk_get_passwordhint)
2583 propid2label[980] = "passwordhint"
2584 P_PASSWORDHINT = 980
2590 meta_name = property(_sk_get_meta_name)
2591 propid2label[910] = "meta_name"
2592 P_META_NAME = 910
2598 meta_topic = property(_sk_get_meta_topic)
2599 propid2label[911] = "meta_topic"
2600 P_META_TOPIC = 911
2606 meta_guidelines = property(_sk_get_meta_guidelines)
2607 propid2label[913] = "meta_guidelines"
2608 P_META_GUIDELINES = 913
2614 meta_picture = property(_sk_get_meta_picture)
2615 propid2label[914] = "meta_picture"
2616 P_META_PICTURE = 914
2617
2618 SETUPKEY_ENABLE_BIRTHDAY_NOTIFICATION = "Lib/Conversation/EnableBirthday"
2619 SETUPKEY_INBOX_UPDATE_TIMEOUT = "Lib/Conversation/InboxUpdateTimeout"
2620 SETUPKEY_RECENTLY_LIVE_TIMEOUT = "Lib/Conversation/RecentlyLiveTimeout"
2621 SETUPKEY_DISABLE_CHAT = "Lib/Chat/DisableChat"
2622 SETUPKEY_DISABLE_CHAT_HISTORY = "Lib/Message/DisableHistory"
2623 SETUPKEY_CHAT_HISTORY_DAYS = "Lib/Chat/HistoryDays"
2624 SETUPKEY_CHATDB_LIMIT_KB = "Lib/Chat/ChatDBLimitKb"
2625 SETUPKEY_DISABLE_CHAT_ACTIVITY_INDICATION = "Lib/Chat/DisableActivityIndication"
2626 SETUPKEY_CALL_NOANSWER_TIMEOUT = "Lib/Call/NoAnswerTimeout"
2627 SETUPKEY_CALL_SEND_TO_VM = "Lib/Call/SendToVM"
2628 SETUPKEY_CALL_APPLY_CF = "Lib/Call/ApplyCF"
2629 SETUPKEY_CALL_EMERGENCY_COUNTRY = "Lib/Call/EmergencyCountry"
2630 - def SetOption(
2631 self,
2632 prop_key,
2633 value
2634 ):
2635 """
2636 Setter method for Conversation option properties. Option properties are all Conversation properties starting with OPT_ prefix.
2637
2638
2639 B{Arguments:}
2640 - B{prop_key} - Conversation property key, for example: Conversation::OPT_JOINING_ENABLED
2641
2642 - B{value} - New value for the option property.
2643
2644 """
2645 l_request = skypekit.XCallRequest("ZR\022\001", 18, 1)
2646 l_request.add_parm('O', 0, self)
2647 l_request.add_parm('e', 1, prop_key)
2648 l_request.add_parm('u', 2, value)
2649 self.transport.xcall(l_request)
2650 - def SetTopic(
2651 self,
2652 topic,
2653 is_xml = False
2654 ):
2655 """
2656 Setter for Conversation class META_TOPIC. This topic will be set for remote participants as well.
2657
2658
2659 B{Arguments:}
2660 - B{topic} - New conversation topic.
2661
2662 - B{is_xml} - Notifies remote UIs that the new topic contains xml tags.
2663
2664 """
2665 l_request = skypekit.XCallRequest("ZR\022\002", 18, 2)
2666 l_request.add_parm('O', 0, self)
2667 l_request.add_parm('S', 1, topic)
2668 l_request.add_parm('b', 2, is_xml)
2669 self.transport.xcall(l_request)
2670 - def SetGuidelines(
2671 self,
2672 guidelines,
2673 is_xml = False
2674 ):
2675 """
2676 Setter for Conversation META_GUIDELINES. This property will be visible to remote participants of the conversation.
2677
2678
2679 B{Arguments:}
2680 - B{guidelines} - New value for the META_GUIDELINES property.
2681
2682 - B{is_xml} - Set true to notify remote UIs that the new guideline contains XML tags.
2683
2684 """
2685 l_request = skypekit.XCallRequest("ZR\022\003", 18, 3)
2686 l_request.add_parm('O', 0, self)
2687 l_request.add_parm('S', 1, guidelines)
2688 l_request.add_parm('b', 2, is_xml)
2689 self.transport.xcall(l_request)
2694 """
2695 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.
2696
2697
2698 B{Arguments:}
2699 - B{jpeg} - Conversation avatar binary.
2700
2701 """
2702 l_request = skypekit.XCallRequest("ZR\022\004", 18, 4)
2703 l_request.add_parm('O', 0, self)
2704 l_request.add_parm('B', 1, jpeg)
2705 self.transport.xcall(l_request)
2710 """
2711 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.
2712
2713
2714 B{Arguments:}
2715 - 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.
2716
2717
2718 B{Return values:}
2719 - B{conference} - Returns the resulting conversation or 0 if the method call failed.
2720
2721 """
2722 l_request = skypekit.XCallRequest("ZR\022\006", 18, 6)
2723 l_request.add_parm('O', 0, self)
2724 l_request.add_parm('S', 1, identities_to_add)
2725 l_response = self.transport.xcall(l_request)
2726 l_result = module_id2classes[18](l_response.get(1), self.transport)
2727 return l_result
2732 """
2733 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.
2734
2735
2736 B{Arguments:}
2737 - B{identities} - Contact identities to be added to the Conversation.
2738
2739 """
2740 l_request = skypekit.XCallRequest("ZR\022\007", 18, 7)
2741 l_request.add_parm('O', 0, self)
2742 l_request.add_parm('S', 1, identities)
2743 self.transport.xcall(l_request)
2744 - def Assimilate(
2745 self,
2746 other_conversation
2747 ):
2748 """
2749 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.
2750
2751
2752 B{Arguments:}
2753 - B{other_conversation} - The new conversation to be merged with the one already in live state.
2754
2755
2756 B{Return values:}
2757 - B{conversation} - Returns a 3rd live conversation, result of merging two existing ones.
2758
2759 """
2760 l_request = skypekit.XCallRequest("ZR\022\011", 18, 9)
2761 l_request.add_parm('O', 0, self)
2762 l_request.add_parm('O', 1, other_conversation)
2763 l_response = self.transport.xcall(l_request)
2764 l_result = module_id2classes[18](l_response.get(1), self.transport)
2765 return l_result
2770 """
2771 starts, answers or joins a live session (first one to join becomes LIVE_HOST)
2772
2773 B{Arguments:}
2774 - B{access_token} - if starting a live session, allows to set a custom access token
2775 """
2776 l_request = skypekit.XCallRequest("ZR\022\012", 18, 10)
2777 l_request.add_parm('O', 0, self)
2778 l_request.add_parm('S', 1, access_token)
2779 self.transport.xcall(l_request)
2780 - def RingOthers(
2781 self,
2782 identities = [],
2783 video_call = False,
2784 origin = ""
2785 ):
2786 """
2787 This is an alternative to calling Ring method for each Participant individually. This also works with dialogs (with identities containing only one item).
2788
2789
2790 B{Arguments:}
2791 - B{identities} - List of Participants to ring. Leaving the list empty will result in ringing all participants of at least speaker level.
2792
2793 - B{video_call} - If true, indicates that we want to do a video call (video still needs to be separately enabled)
2794
2795 - B{origin} - When call is initiated from web link, this argument must contain the URI that was used
2796
2797 """
2798 l_request = skypekit.XCallRequest("ZR\022$", 18, 36)
2799 l_request.add_parm('O', 0, self)
2800 l_request.add_parm('S', 1, identities)
2801 l_request.add_parm('b', 2, video_call)
2802 l_request.add_parm('S', 3, origin)
2803 self.transport.xcall(l_request)
2805 """
2806 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.
2807
2808 """
2809 l_request = skypekit.XCallRequest("ZR\022\013", 18, 11)
2810 l_request.add_parm('O', 0, self)
2811 self.transport.xcall(l_request)
2813 """
2814 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.
2815
2816 """
2817 l_request = skypekit.XCallRequest("ZR\022\014", 18, 12)
2818 l_request.add_parm('O', 0, self)
2819 self.transport.xcall(l_request)
2821 """
2822 Puts the conversation on hold - Conversation LOCAL_LIVESTATUS changes to ON_HOLD_LOCALLY and to ON_HOLD_REMOTELY for remote participants.
2823
2824 """
2825 l_request = skypekit.XCallRequest("ZR\022\015", 18, 13)
2826 l_request.add_parm('O', 0, self)
2827 self.transport.xcall(l_request)
2829 """
2830 Resumes call from local hold.
2831
2832 """
2833 l_request = skypekit.XCallRequest("ZR\022\016", 18, 14)
2834 l_request.add_parm('O', 0, self)
2835 self.transport.xcall(l_request)
2840 """
2841 Hang up or refuse to answer an incoming call. Set postVoiceAutoresponse to true to enable a caller to leave a voicemail message.
2842
2843
2844 B{Arguments:}
2845 - B{post_voice_autoresponse}
2846 """
2847 l_request = skypekit.XCallRequest("ZR\022\017", 18, 15)
2848 l_request.add_parm('O', 0, self)
2849 l_request.add_parm('b', 1, post_voice_autoresponse)
2850 self.transport.xcall(l_request)
2852 """
2853 Begin recording a voice mail for this conversation's remote participant. Applies to conversations of type DIALOG only.
2854
2855 """
2856 l_request = skypekit.XCallRequest("ZR\022-", 18, 45)
2857 l_request.add_parm('O', 0, self)
2858 self.transport.xcall(l_request)
2864 """
2865 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.
2866
2867 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).
2868
2869 - Caller A - calls Caller B; Caller B picks up the call - live conversation C1 is now up with A and B in it.
2870 - 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.
2871 - 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.
2872
2873
2874 B{Arguments:}
2875 - B{identities} - String list of transfer target identities. As soon as first one in this list picks up the call, others will stop ringing.
2876
2877 - 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.
2878
2879 """
2880 l_request = skypekit.XCallRequest("ZR\022(", 18, 40)
2881 l_request.add_parm('O', 0, self)
2882 l_request.add_parm('S', 1, identities)
2883 l_request.add_parm('S', 2, transfer_topic)
2884 self.transport.xcall(l_request)
2889 """
2890 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.
2891
2892
2893 B{Arguments:}
2894 - B{identity} - Target identity.
2895
2896
2897 B{Return values:}
2898 - B{result} - Returns true if call transfer to given target is possible.
2899
2900 """
2901 l_request = skypekit.XCallRequest("ZR\022.", 18, 46)
2902 l_request.add_parm('O', 0, self)
2903 l_request.add_parm('S', 1, identity)
2904 l_response = self.transport.xcall(l_request)
2905 l_result = l_response.get(1, False)
2906 return l_result
2907 - def SendDTMF(
2908 self,
2909 dtmf,
2910 length_in_ms = 260
2911 ):
2912 """
2913 Sends DTMF tone to a live conversation.
2914
2915
2916 B{Arguments:}
2917 - B{dtmf} - Outgoing dtmf tone, possible values come from Participant::DTMF enumerator.
2918
2919 - B{length_in_ms} - Duration in milliseconds. Defaults to 260 ms. Note that the DTMF tone can be also cancelled with Conversation::StopSendDTMF method.
2920
2921 """
2922 l_request = skypekit.XCallRequest("ZR\022\020", 18, 16)
2923 l_request.add_parm('O', 0, self)
2924 l_request.add_parm('e', 1, Participant.DTMF[dtmf])
2925 l_request.add_parm('u', 2, length_in_ms)
2926 self.transport.xcall(l_request)
2928 """
2929 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.
2930
2931 """
2932 l_request = skypekit.XCallRequest("ZR\022\060", 18, 48)
2933 l_request.add_parm('O', 0, self)
2934 self.transport.xcall(l_request)
2935 - def SetMyTextStatusTo(
2936 self,
2937 status
2938 ):
2939 """
2940 Sets local user typing indicator in the Conversation. Remote Participants can display these in their UI.
2941
2942
2943 B{Arguments:}
2944 - B{status} - Typing indicator status value - Participant::TEXT_STATUS
2945
2946 """
2947 l_request = skypekit.XCallRequest("ZR\022\022", 18, 18)
2948 l_request.add_parm('O', 0, self)
2949 l_request.add_parm('e', 1, Participant.TEXT_STATUS[status])
2950 self.transport.xcall(l_request)
2951 - def PostText(
2952 self,
2953 text,
2954 is_xml = False
2955 ):
2956 """
2957 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.)
2958
2959
2960 B{Arguments:}
2961 - B{text} - Text value of the outgoing message (gets set as BODY_XML property of the Message object).
2962
2963 - B{is_xml} - For cases where the text argument was already encoded as xml message.
2964
2965
2966 B{Return values:}
2967 - B{message} - Returns the Message object created as a result of this method (if successful).
2968
2969 """
2970 l_request = skypekit.XCallRequest("ZR\022\023", 18, 19)
2971 l_request.add_parm('O', 0, self)
2972 l_request.add_parm('S', 1, text)
2973 l_request.add_parm('b', 2, is_xml)
2974 l_response = self.transport.xcall(l_request)
2975 l_result = module_id2classes[9](l_response.get(1), self.transport)
2976 return l_result
2981 """
2982 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.
2983
2984 The list of posted contacts can be retrieved with the Message::GetContacts method.
2985
2986 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:
2987 - t - contact type. "s" - skype contact; "p" - phone number;
2988 - s - skypename, present only in skypename contacts (t="s")
2989 - p - phone number, present only in phone number contacts (t="p")
2990 - f - contact's full name, if available
2991 - d - contact's display name, if available
2992
2993 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.
2994
2995 Example BODY_XML with skypname contact:
2996 ::
2997 <contacts alt="alt text"><c t="s" s="skypename" f="full name"/></contacts>
2998
2999
3000 Example BODY_XML with PSTN contact:
3001 ::
3002 <contacts alt="alt text"><c t="p" p="+37212345678" d="Some PSTN number"/></contacts>
3003
3004
3005 Example BODY_XML with multiple contacts:
3006 ::
3007 <contacts alt="alt text"><c t="p" p="+37212345678" d="Some PSTN number"/><c t="s" s="someskypename"/></contacts>
3008
3009
3010
3011 B{Arguments:}
3012 - B{contacts} - List of Contact objects, to be posted in the conversation.
3013
3014 """
3015 l_request = skypekit.XCallRequest("ZR\022\024", 18, 20)
3016 l_request.add_parm('O', 0, self)
3017 l_request.add_parm('O', 1, contacts)
3018 self.transport.xcall(l_request)
3019 - def PostFiles(
3020 self,
3021 paths,
3022 body
3023 ):
3024 """
3025 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.
3026
3027
3028 B{Arguments:}
3029 - B{paths} - list of fully-qualified filenames to be transferred
3030
3031 - B{body} - Optional BODY_XML property for POSTED_FILES type messages that show up in remote UI.
3032
3033
3034 B{Return values:}
3035 - 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.
3036
3037 - B{error_file} - Filename of the file that triggered error.
3038
3039 """
3040 l_request = skypekit.XCallRequest("ZR\022\025", 18, 21)
3041 l_request.add_parm('O', 0, self)
3042 l_request.add_parm('f', 1, paths)
3043 l_request.add_parm('S', 2, body)
3044 l_response = self.transport.xcall(l_request)
3045 l_result = (skypekit.enumof(Skype.TRANSFER_SENDFILE_ERROR, l_response.get(1))),
3046 l_result += (l_response.get(2, '')),
3047 return l_result
3048 - def PostVoiceMessage(
3049 self,
3050 voicemail,
3051 body
3052 ):
3053 """
3054 Stops the active voicemail recording and sends it (dialog only)
3055
3056 B{Arguments:}
3057 - 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).
3058
3059 - B{body} - Optional text message that remote UI can display in conversation, to notify the user of a new voicemail.
3060
3061 """
3062 l_request = skypekit.XCallRequest("ZR\022\026", 18, 22)
3063 l_request.add_parm('O', 0, self)
3064 l_request.add_parm('O', 1, voicemail)
3065 l_request.add_parm('S', 2, body)
3066 self.transport.xcall(l_request)
3067 - def PostSMS(
3068 self,
3069 sms,
3070 body = ""
3071 ):
3072 """
3073 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.
3074
3075
3076 B{Arguments:}
3077 - B{sms} - SMS object.
3078
3079 - 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
3080
3081 """
3082 l_request = skypekit.XCallRequest("ZR\022\027", 18, 23)
3083 l_request.add_parm('O', 0, self)
3084 l_request.add_parm('O', 1, sms)
3085 l_request.add_parm('S', 2, body)
3086 self.transport.xcall(l_request)
3088 """
3089 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++):
3090 ::
3091 C->SetOption(Conversation::OPT_JOINING_ENABLED, true);
3092
3093
3094 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.
3095
3096 B{Return values:}
3097 - B{blob} - Returns the public conversation join blob.
3098
3099 """
3100 l_request = skypekit.XCallRequest("ZR\022\030", 18, 24)
3101 l_request.add_parm('O', 0, self)
3102 l_response = self.transport.xcall(l_request)
3103 l_result = l_response.get(1, '')
3104 return l_result
3106 """
3107 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.
3108
3109 """
3110 l_request = skypekit.XCallRequest("ZR\022\031", 18, 25)
3111 l_request.add_parm('O', 0, self)
3112 self.transport.xcall(l_request)
3117 """
3118 Submits password for joining password-protected conversation.
3119
3120
3121 B{Arguments:}
3122 - B{password} - Password string.
3123
3124 """
3125 l_request = skypekit.XCallRequest("ZR\022\032", 18, 26)
3126 l_request.add_parm('O', 0, self)
3127 l_request.add_parm('S', 1, password)
3128 self.transport.xcall(l_request)
3129 - def SetPassword(
3130 self,
3131 password,
3132 hint
3133 ):
3134 """
3135 Sets password protection/new password for the conversation.
3136
3137
3138 B{Arguments:}
3139 - B{password} - New password.
3140
3141 - B{hint} - Password hint.
3142
3143 """
3144 l_request = skypekit.XCallRequest("ZR\022\033", 18, 27)
3145 l_request.add_parm('O', 0, self)
3146 l_request.add_parm('S', 1, password)
3147 l_request.add_parm('S', 2, hint)
3148 self.transport.xcall(l_request)
3150 """
3151 Leaves the conference. Not applicable to dialogs.
3152
3153 """
3154 l_request = skypekit.XCallRequest("ZR\022\034", 18, 28)
3155 l_request.add_parm('O', 0, self)
3156 self.transport.xcall(l_request)
3158 """
3159 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.
3160
3161 """
3162 l_request = skypekit.XCallRequest("ZR\022/", 18, 47)
3163 l_request.add_parm('O', 0, self)
3164 self.transport.xcall(l_request)
3165 - def RenameTo(
3166 self,
3167 name
3168 ):
3169 """
3170 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.
3171
3172
3173 B{Arguments:}
3174 - B{name} - New name for the conversation. Passing an empty string in this argument causes the META_NAME to unset.
3175
3176 """
3177 l_request = skypekit.XCallRequest("ZR\022\035", 18, 29)
3178 l_request.add_parm('O', 0, self)
3179 l_request.add_parm('S', 1, name)
3180 self.transport.xcall(l_request)
3185 """
3186 Setter for Conversation class IS_BOOKMARKED.
3187
3188
3189 B{Arguments:}
3190 - B{bookmark} - Set true to set the bookmark, false to remove the bookmark.
3191
3192 """
3193 l_request = skypekit.XCallRequest("ZR\022\036", 18, 30)
3194 l_request.add_parm('O', 0, self)
3195 l_request.add_parm('b', 1, bookmark)
3196 self.transport.xcall(l_request)
3201 """
3202 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.
3203
3204
3205 B{Arguments:}
3206 - B{alert_string} - Substring to check in BODY_XML property of incoming messages.
3207
3208 """
3209 l_request = skypekit.XCallRequest("ZR\022\037", 18, 31)
3210 l_request.add_parm('O', 0, self)
3211 l_request.add_parm('S', 1, alert_string)
3212 self.transport.xcall(l_request)
3214 """
3215 Removes conversation from Inbox.
3216
3217 """
3218 l_request = skypekit.XCallRequest("ZR\022 ", 18, 32)
3219 l_request.add_parm('O', 0, self)
3220 self.transport.xcall(l_request)
3221 - def AddToInbox(
3222 self,
3223 timestamp = 0
3224 ):
3225 """
3226 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.
3227
3228
3229 B{Arguments:}
3230 - B{timestamp} - If left empty or set to 0, the inbox_timestamp property is set to current time.
3231
3232 """
3233 l_request = skypekit.XCallRequest("ZR\022!", 18, 33)
3234 l_request.add_parm('O', 0, self)
3235 l_request.add_parm('u', 1, timestamp)
3236 self.transport.xcall(l_request)
3242 """
3243 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.
3244
3245
3246 B{Arguments:}
3247 - B{timestamp} - Consumption cutoff timestamp. Setting this to current time will mark all messages in the conversation as consumed.
3248
3249 - 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.
3250
3251 """
3252 l_request = skypekit.XCallRequest("ZR\022\042", 18, 34)
3253 l_request.add_parm('O', 0, self)
3254 l_request.add_parm('u', 1, timestamp)
3255 l_request.add_parm('b', 2, also_unconsume)
3256 self.transport.xcall(l_request)
3258 """
3259 sets consumption horizon to last inbox message id timestamp
3260 """
3261 l_request = skypekit.XCallRequest("ZR\022#", 18, 35)
3262 l_request.add_parm('O', 0, self)
3263 self.transport.xcall(l_request)
3268 """
3269 Checks if the conversation is a member of the given ContactGroup
3270
3271
3272 B{Arguments:}
3273 - B{group} - ContactGroup
3274
3275
3276 B{Return values:}
3277 - B{result} - True if this conversation is a member of the ContactGroup specified by the group argument contains the conversation
3278
3279 """
3280 l_request = skypekit.XCallRequest("ZR\022%", 18, 37)
3281 l_request.add_parm('O', 0, self)
3282 l_request.add_parm('O', 1, group)
3283 l_response = self.transport.xcall(l_request)
3284 l_result = l_response.get(1, False)
3285 return l_result
3290 """
3291 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).
3292
3293
3294 B{Arguments:}
3295 - B{filter} - Conversation::PARTICIPANTFILTER - defaults to Conversation::ALL
3296
3297
3298 B{Return values:}
3299 - B{participants} - List of conversation Participant objects that passed the filter.
3300
3301 """
3302 l_request = skypekit.XCallRequest("ZR\022&", 18, 38)
3303 l_request.add_parm('O', 0, self)
3304 l_request.add_parm('e', 1, Conversation.PARTICIPANTFILTER[filter])
3305 l_response = self.transport.xcall(l_request)
3306 l_result = [module_id2classes[19](oid, self.transport) for oid in l_response.get(1, [])]
3307 return l_result
3312 """
3313 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.
3314
3315
3316 B{Arguments:}
3317 - 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
3318
3319
3320 B{Return values:}
3321 - B{context_messages} - Already consumed messages, provided for context
3322 - B{unconsumed_messages} - Unconsumed messages
3323 """
3324 l_request = skypekit.XCallRequest("ZR\022'", 18, 39)
3325 l_request.add_parm('O', 0, self)
3326 l_request.add_parm('u', 1, require_timestamp)
3327 l_response = self.transport.xcall(l_request)
3328 l_result = ([module_id2classes[9](oid, self.transport) for oid in l_response.get(1, [])]),
3329 l_result += ([module_id2classes[9](oid, self.transport) for oid in l_response.get(2, [])]),
3330 return l_result
3336 """
3337 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.
3338
3339
3340 B{Arguments:}
3341 - B{text} - Substring to search for.
3342
3343 - B{from_timestamp_up}
3344
3345 B{Return values:}
3346 - 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.
3347
3348 """
3349 l_request = skypekit.XCallRequest("ZR\022)", 18, 41)
3350 l_request.add_parm('O', 0, self)
3351 l_request.add_parm('S', 1, text)
3352 l_request.add_parm('u', 2, from_timestamp_up)
3353 l_response = self.transport.xcall(l_request)
3354 l_result = module_id2classes[9](l_response.get(1), self.transport)
3355 return l_result
3357 """
3358 This callback gets fired when participants join or leave the conversation.
3359
3360 """
3361 pass
3365 event_handlers[1] = "_sk_on_participant_list_change"
3366 - def OnMessage(
3367 self,
3368 message
3369 ):
3370 """
3371 Called for each message in currently loaded conversations
3372
3373 B{Return values:}
3374 - B{message}
3375 """
3376 pass
3377 event_handlers[2] = "_sk_on_message"
3379 """ internal event dispatcher for OnMessage """
3380 l_cleanparms = module_id2classes[9](parms.get(1), self.transport)
3381 self.OnMessage(l_cleanparms)
3386 """
3387 This callback gets fired when a new Conversation is created using SpawnConference.
3388
3389
3390 B{Return values:}
3391 - B{spawned} - Conversation object that got created.
3392
3393 """
3394 pass
3395 event_handlers[3] = "_sk_on_spawn_conference"
3400 module_id2classes[18] = Conversation
3401
3402 -class Message(skypekit.Object):
3403 """
3404 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.
3405
3406 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.
3407
3408 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.
3409
3410 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.
3411
3412 Following messages have a text entered by the user as a body. It may contain emoticons, URLs, etc.
3413 - POSTED_TEXT
3414 - POSTED_EMOTE
3415 - SET_METADATA
3416 - REQUESTED_AUTH
3417
3418 Following messages have a custom XML format for the body (see the specific section on these message types for details):
3419 - POSTED_CONTACTS
3420 - POSTED_VOICE_MESSAGE
3421 - POSTED_FILES
3422 - POSTED_SMS
3423 - STARTED_LIVESESSION and ENDED_LIVESESSION (same format)
3424
3425 Following messages do not use the body property:
3426 - SPAWNED_CONFERENCE
3427 - ADDED_CONSUMERS
3428 - ADDED_APPLICANTS
3429 - RETIRED_OTHERS
3430 - RETIRED
3431 - SET_RANK
3432 - HAS_BIRTHDAY
3433 - GRANTED_AUTH
3434 - BLOCKED
3435
3436 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.
3437
3438 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.
3439
3440 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.
3441
3442 But it is obviously nicer to display at least the most commonly used tags.
3443
3444 To strip the XML:
3445 - 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
3446 - if no alt="" attribute set, use tag content as output - <sometag>hereissomething</sometag> is output as hereissomething
3447 - if no alt="" and no tag content, ignore the tag altogether (return nothing)
3448 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.
3449 Animated emoticons
3450 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:
3451 ::
3452 Hi <ss type="smile">:-)</ss>
3453
3454
3455 Flag emoticons
3456 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:
3457 ::
3458 I am in <flag country="cc">CC</flag>
3459
3460
3461 Links
3462 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:
3463 ::
3464 I am in <a href="http://wwww.skype.com">www.skype.com</a>
3465
3466
3467 Alert matches
3468 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:
3469 ::
3470 Maybe <alertmatch>Vincent</alertmatch> knows the answer
3471
3472
3473 Bold, italic, etc
3474 Skype for Windows also supports displaying bold and italic text, using the "b" and "i" tags.
3475
3476 Encoding messages
3477 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.
3478 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.
3479
3480 """
3481 event_handlers = {}
3482 propid2label = {}
3487 return "Message %s" % (self.object_id, )
3488 @staticmethod
3490 """ convert a property name to the enum of the property """
3491 return getattr(Message, "P_"+propname.upper())
3492 module_id = 9
3494 """ notifies from a property change """
3495
3496 pass
3497 TYPE = {
3498 2 :'SET_METADATA',
3499 4 :'SPAWNED_CONFERENCE',
3500 10 :'ADDED_CONSUMERS',
3501 11 :'ADDED_APPLICANTS',
3502 12 :'RETIRED_OTHERS',
3503 13 :'RETIRED',
3504 21 :'SET_RANK',
3505 30 :'STARTED_LIVESESSION',
3506 39 :'ENDED_LIVESESSION',
3507 50 :'REQUESTED_AUTH',
3508 51 :'GRANTED_AUTH',
3509 53 :'BLOCKED',
3510 61 :'POSTED_TEXT',
3511 60 :'POSTED_EMOTE',
3512 63 :'POSTED_CONTACTS',
3513 64 :'POSTED_SMS',
3514 65 :'POSTED_ALERT',
3515 67 :'POSTED_VOICE_MESSAGE',
3516 68 :'POSTED_FILES',
3517 69 :'POSTED_INVOICE',
3518 110:'HAS_BIRTHDAY',
3519 'SET_METADATA' : 2,
3520 'SPAWNED_CONFERENCE' : 4,
3521 'ADDED_CONSUMERS' : 10,
3522 'ADDED_APPLICANTS' : 11,
3523 'RETIRED_OTHERS' : 12,
3524 'RETIRED' : 13,
3525 'SET_RANK' : 21,
3526 'STARTED_LIVESESSION' : 30,
3527 'ENDED_LIVESESSION' : 39,
3528 'REQUESTED_AUTH' : 50,
3529 'GRANTED_AUTH' : 51,
3530 'BLOCKED' : 53,
3531 'POSTED_TEXT' : 61,
3532 'POSTED_EMOTE' : 60,
3533 'POSTED_CONTACTS' : 63,
3534 'POSTED_SMS' : 64,
3535 'POSTED_ALERT' : 65,
3536 'POSTED_VOICE_MESSAGE' : 67,
3537 'POSTED_FILES' : 68,
3538 'POSTED_INVOICE' : 69,
3539 'HAS_BIRTHDAY' :110
3540 }
3541 """
3542 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.
3543
3544 - SET_METADATA - Conference metadata were changed
3545 - SPAWNED_CONFERENCE - A conference was spawned from this dialog
3546 - ADDED_CONSUMERS - Some users were added to the conference
3547 - ADDED_APPLICANTS - Some users are applying to be added to the conference
3548 - RETIRED_OTHERS - User was kicked from the conference
3549 - RETIRED - User left the conference
3550 - SET_RANK - Changed the rank of a user in the Conversation (multichat administration)
3551
3552 - STARTED_LIVESESSION - A live session started
3553 - ENDED_LIVESESSION - A live session ended
3554 - REQUESTED_AUTH - User requested authorization
3555 - GRANTED_AUTH - User was granted authorization. Notification message that user is now an authorized contact (of the local user).
3556
3557 - BLOCKED - User was blocked
3558 - POSTED_TEXT - A text message
3559 - POSTED_EMOTE - An emote ('John Doe is laughing', cf /me chat command)
3560 - 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
3561
3562 - 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.
3563
3564 - POSTED_ALERT - Deprecated, never sent
3565 - POSTED_VOICE_MESSAGE - A voicemail
3566 - 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
3567
3568 - POSTED_INVOICE - Currently unused.
3569
3570 - HAS_BIRTHDAY - The message represents a Contact birthday notification.
3571
3572 """
3573 SENDING_STATUS = {1:'SENDING', 'SENDING':1, 2:'SENT', 'SENT':2, 3:'FAILED_TO_SEND', 'FAILED_TO_SEND':3}
3574 """
3575 - SENDING - Message has not been delivered to at least one of the participants
3576
3577 - SENT - Message has been delivered to at least one other participant
3578
3579 - FAILED_TO_SEND - Message could not be delivered (for SMS this reflects the actual SMS, not the chat message)
3580
3581 """
3582 CONSUMPTION_STATUS = {0:'CONSUMED', 'CONSUMED':0, 1:'UNCONSUMED_SUPPRESSED', 'UNCONSUMED_SUPPRESSED':1, 2:'UNCONSUMED_NORMAL', 'UNCONSUMED_NORMAL':2, 3:'UNCONSUMED_ELEVATED', 'UNCONSUMED_ELEVATED':3}
3583 """
3584 Indicates if a message has been consumed (meaning read) or not
3585 - 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.
3586
3587 - UNCONSUMED_SUPPRESSED - Do not notify the user that they have this unread message
3588
3589 - UNCONSUMED_NORMAL - Notify the user that they have this unread message
3590
3591 - UNCONSUMED_ELEVATED - This message consumption state is marked as DEPRECATED
3592
3593 """
3594 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}
3595 """
3596 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.
3597 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.
3598
3599 - SET_META_NAME - Notification message that conversation name has changed.
3600
3601 - SET_META_TOPIC - Notification message that conversation topic has changed.
3602
3603 - SET_META_GUIDELINES - Notification message that conversation guidelines have changed.
3604
3605 - SET_META_PICTURE - Notification message that conversation picture has changed.
3606
3607 """
3608 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}
3609 """
3610 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.
3611
3612 - USER_INCAPABLE - User cannot chat (user is currently logged in with a client that has chat disabled - see Contact::CAPABILITY.CAPABILITY_TEXT)
3613
3614 - ADDER_MUST_BE_FRIEND - Attempt to add local user to a conversation by an unknown contact
3615
3616 - ADDER_MUST_BE_AUTHORIZED - Attempt to add local user to a conversation by an unauthorized contact
3617
3618 - DECLINE_ADD - Local user declined an "invitation" to join a chat
3619
3620 - UNSUBSCRIBE - User decided to end participation in an on-going multi-chat
3621
3622 """
3623
3625 """
3626 DB ID of corresponding conversation
3627 """
3628 return module_id2classes[18](self._sk_property("ZG\300\007]\011", 960, True), self.transport)
3629 convo_id = property(_sk_get_convo_id)
3630 propid2label[960] = "convo_id"
3631 P_CONVO_ID = 960
3633 """
3634 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.
3635
3636 """
3637 return self._sk_property("ZGx]\011", 120, True)
3638 convo_guid = property(_sk_get_convo_guid)
3639 propid2label[120] = "convo_guid"
3640 P_CONVO_GUID = 120
3642 """
3643 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).
3644
3645 """
3646 return self._sk_property("ZGz]\011", 122, True)
3647 author = property(_sk_get_author)
3648 propid2label[122] = "author"
3649 P_AUTHOR = 122
3651 """
3652 displayname of the sender at the time of posting
3653 """
3654 return self._sk_property("ZG{]\011", 123, True)
3655 author_displayname = property(_sk_get_author_displayname)
3656 propid2label[123] = "author_displayname"
3657 P_AUTHOR_DISPLAYNAME = 123
3659 """
3660 Unlike the message id, the GUID is the same on all instances and for all participants.
3661
3662 """
3663 return self._sk_property("ZG\230\006]\011", 792, True)
3664 guid = property(_sk_get_guid)
3665 propid2label[792] = "guid"
3666 P_GUID = 792
3668 """
3669 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.
3670
3671 """
3672 return self._sk_property("ZG\226\006]\011", 790, True)
3673 originally_meant_for = property(_sk_get_originally_meant_for)
3674 propid2label[790] = "originally_meant_for"
3675 P_ORIGINALLY_MEANT_FOR = 790
3677 """
3678 UNIX timestamp (sent time, adjusted for local clock)
3679 """
3680 return self._sk_property("ZGy]\011", 121, True)
3681 timestamp = property(_sk_get_timestamp)
3682 propid2label[121] = "timestamp"
3683 P_TIMESTAMP = 121
3686 type = property(_sk_get_type)
3687 propid2label[961] = "type"
3688 P_TYPE = 961
3691 sending_status = property(_sk_get_sending_status)
3692 propid2label[962] = "sending_status"
3693 P_SENDING_STATUS = 962
3696 consumption_status = property(_sk_get_consumption_status)
3697 propid2label[968] = "consumption_status"
3698 P_CONSUMPTION_STATUS = 968
3700 """
3701 Identity of the author that last edited this message. NULL if message has not been edited
3702
3703 """
3704 return self._sk_property("ZG\336\001]\011", 222, True)
3705 edited_by = property(_sk_get_edited_by)
3706 propid2label[222] = "edited_by"
3707 P_EDITED_BY = 222
3709 """
3710 UNIX timestamp of last edit
3711 """
3712 return self._sk_property("ZG\337\001]\011", 223, True)
3713 edit_timestamp = property(_sk_get_edit_timestamp)
3714 propid2label[223] = "edit_timestamp"
3715 P_EDIT_TIMESTAMP = 223
3717 """
3718 Message type-specific parameter. See Message::SET_METADATA_KEY for more information.
3719
3720 """
3721 return self._sk_property("ZG\303\007]\011", 963, True)
3722 param_key = property(_sk_get_param_key)
3723 propid2label[963] = "param_key"
3724 P_PARAM_KEY = 963
3726 """
3727 Message type-specific parameter
3728
3729 """
3730 return self._sk_property("ZG\304\007]\011", 964, True)
3731 param_value = property(_sk_get_param_value)
3732 propid2label[964] = "param_value"
3733 P_PARAM_VALUE = 964
3734 - def _sk_get_body_xml(self):
3735 """
3736 Message type-specific parameter
3737
3738 """
3739 return self._sk_property("ZG\177]\011", 127, True)
3740 body_xml = property(_sk_get_body_xml)
3741 propid2label[127] = "body_xml"
3742 P_BODY_XML = 127
3744 """
3745 Message type-specific parameter. Depending of Message type, this property contains:
3746 - STARTED_LIVESESSION - list of participants in the cal;
3747 - ENDED_LIVESESSION - list of participants in the call;
3748 - POSTED_SMS - list of recipients of the message;
3749 - SPAWNED_CONFERENCE - the list of identities that were added;
3750 - ADDED_CONSUMERS - the list of identities that were added;
3751 - RETIRED_OTHERS - the skypename of the participant who was kicked;
3752 - SET_RANK - the skypename of the participant whose rank was changed;
3753 - 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;
3754 - GRANTED_AUTH - the skypename of the user we granted authorization;
3755 - BLOCKED - the skypename of the user who was blocked;
3756 - HAS_BIRTHDAY - skypename of current logged in user.
3757
3758 """
3759 return self._sk_property("ZG}]\011", 125, True)
3760 identities = property(_sk_get_identities)
3761 propid2label[125] = "identities"
3762 P_IDENTITIES = 125
3764 """
3765 Message type-specific parameter. Possible values for STARTED/ENDED_LIVESESSION (only set for dialogs):
3766 - no_answer
3767 - manual
3768 - busy
3769 - connection_dropped
3770 - no_skypeout_subscription;
3771 - insufficient_funds
3772 - internet_connection_lost
3773 - skypeout_account_blocked
3774 - pstn_could_not_connect_to_skype_proxy
3775 - pstn_invalid_number
3776 - pstn_number_forbidden
3777 - pstn_call_timed_out
3778 - pstn_busy
3779 - pstn_call_terminated
3780 - pstn_network_error
3781 - number_unavailable
3782 - pstn_call_rejected
3783 - pstn_misc_error
3784 - internal_error
3785 - unable_to_connect
3786 - connection_dropped
3787 - recording_failed
3788 - playback_error
3789 - legacy_error
3790 - blocked_by_privacy_settings
3791 - error
3792 - transfer_failed
3793 - transfer_insufficient_funds
3794 - blocked_by_us
3795 - emergency_call_denied
3796
3797 This information is now available as an enum in LEAVEREASON
3798
3799 """
3800 return self._sk_property("ZG\306\007]\011", 966, True)
3801 reason = property(_sk_get_reason)
3802 propid2label[966] = "reason"
3803 P_REASON = 966
3805 """
3806 Leave reason for message of the RETIRED type, and STARTED/ENDED_LIVESESSION. Use for STARTED/ENDED_LIVESESSION is to provide simpler, enum based handling and deprecates the reason property (only set for dialogs)
3807 """
3808 return skypekit.enumof(Skype.LEAVE_REASON, self._sk_property("ZG~]\011", 126, True))
3809 leavereason = property(_sk_get_leavereason)
3810 propid2label[126] = "leavereason"
3811 P_LEAVEREASON = 126
3813 """
3814 Number of people who received this message (including local user)
3815
3816 """
3817 return self._sk_property("ZG\326\007]\011", 982, True)
3818 participant_count = property(_sk_get_participant_count)
3819 propid2label[982] = "participant_count"
3820 P_PARTICIPANT_COUNT = 982
3821
3823 """
3824 For Message types having a body, determines whether that body is editable by the user.
3825
3826
3827 B{Return values:}
3828 - B{result}
3829 """
3830 l_request = skypekit.XCallRequest("ZR\011\001", 9, 1)
3831 l_request.add_parm('O', 0, self)
3832 l_response = self.transport.xcall(l_request)
3833 l_result = l_response.get(1, False)
3834 return l_result
3835 - def Edit(
3836 self,
3837 new_text,
3838 is_xml = False,
3839 undo = False
3840 ):
3841 """
3842 For Message types that include a body and are editable:
3843 - alters BODY_XML of the message object
3844 - sets EDITED_BY and EDIT_TIMESTAMP properties
3845 - propagates the changes to remote users.
3846
3847
3848 B{Arguments:}
3849 - B{new_text} - New value of the message BODY_XML property.
3850
3851 - 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.
3852
3853 - B{undo} - Reverts the message body to the original version. newText parameter is ignored when this is set
3854 """
3855 l_request = skypekit.XCallRequest("ZR\011\002", 9, 2)
3856 l_request.add_parm('O', 0, self)
3857 l_request.add_parm('S', 1, new_text)
3858 l_request.add_parm('b', 2, is_xml)
3859 l_request.add_parm('b', 3, undo)
3860 self.transport.xcall(l_request)
3875 """
3876 For messages of type POSTED_FILES, parses the body XML and creates a list of Transfer instances.
3877
3878
3879 B{Return values:}
3880 - B{transfers}
3881 """
3882 l_request = skypekit.XCallRequest("ZR\011\004", 9, 4)
3883 l_request.add_parm('O', 0, self)
3884 l_response = self.transport.xcall(l_request)
3885 l_result = [module_id2classes[6](oid, self.transport) for oid in l_response.get(1, [])]
3886 return l_result
3888 """
3889 For messages of type POSTED_VOICE_MESSAGE, parses the body XML and creates a Voicemail instance.
3890
3891
3892 B{Return values:}
3893 - B{voicemail}
3894 """
3895 l_request = skypekit.XCallRequest("ZR\011\005", 9, 5)
3896 l_request.add_parm('O', 0, self)
3897 l_response = self.transport.xcall(l_request)
3898 l_result = module_id2classes[7](l_response.get(1), self.transport)
3899 return l_result
3901 """
3902 For messages of type POSTED_SMS, parses the body XML and creates an SMS instances
3903
3904
3905 B{Return values:}
3906 - B{sms}
3907 """
3908 l_request = skypekit.XCallRequest("ZR\011\006", 9, 6)
3909 l_request.add_parm('O', 0, self)
3910 l_response = self.transport.xcall(l_request)
3911 l_result = module_id2classes[12](l_response.get(1), self.transport)
3912 return l_result
3914 """
3915 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.
3916
3917 """
3918 l_request = skypekit.XCallRequest("ZR\011\010", 9, 8)
3919 l_request.add_parm('O', 0, self)
3920 self.transport.xcall(l_request)
3921 module_id2classes[9] = Message
3922
3923 -class Video(skypekit.Object):
3924 """
3925 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:
3926
3927 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.
3928
3929 - C->P1->V1-> outgoing video stream
3930 - C->P2->V2-> incoming video stream 1
3931 - C->P3->V3-> incoming video stream 2
3932 - C->P4-> no video object as participant P4 does not advertise supporting video
3933 - V0-> local webcam preview - this is not attached to any particular conversation, however the corresponding video object can be retrieved with Skype::GetPreviewVideo method.
3934
3935 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:
3936
3937 You start out with a Conversation, that suddenly becomes live
3938
3939 CONVERSATION::LOCAL_LIVESTATUS = IM_LIVE
3940 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.
3941
3942 PARTICIPANT::VIDEO_STATUS = VIDEO_AVAILABLE
3943 If you get to VIDEO_AVAILABLE (not necessarily for all Participants), you can retrieve Video object, with Participant::GetVideo method.
3944
3945 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:
3946
3947 - Video::STATUS = AVAILABLE
3948 - Video::STATUS = STARTING
3949 - Video::STATUS = CHECKING_SUBSCRIPTION
3950 - Video::STATUS = STARTING
3951
3952 Participant::VIDEO_STATUS = VIDEO_CONNECTING
3953 - Video::STATUS = RUNNING
3954 - Participant::VIDEO_STATUS = STREAMING
3955 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.
3956
3957 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.
3958
3959 """
3960 event_handlers = {}
3961 propid2label = {}
3966 return "Video %s" % (self.object_id, )
3967 @staticmethod
3969 """ convert a property name to the enum of the property """
3970 return getattr(Video, "P_"+propname.upper())
3971 module_id = 11
3973 """ notifies from a property change """
3974
3975 pass
3976 STATUS = {
3977 0 :'NOT_AVAILABLE',
3978 1 :'AVAILABLE',
3979 2 :'STARTING',
3980 3 :'REJECTED',
3981 4 :'RUNNING',
3982 5 :'STOPPING',
3983 6 :'PAUSED',
3984 7 :'NOT_STARTED',
3985 8 :'HINT_IS_VIDEOCALL_RECEIVED',
3986 9 :'UNKNOWN',
3987 10:'RENDERING',
3988 11:'CHECKING_SUBSCRIPTION',
3989 12:'SWITCHING_DEVICE',
3990 'NOT_AVAILABLE' : 0,
3991 'AVAILABLE' : 1,
3992 'STARTING' : 2,
3993 'REJECTED' : 3,
3994 'RUNNING' : 4,
3995 'STOPPING' : 5,
3996 'PAUSED' : 6,
3997 'NOT_STARTED' : 7,
3998 'HINT_IS_VIDEOCALL_RECEIVED' : 8,
3999 'UNKNOWN' : 9,
4000 'RENDERING' :10,
4001 'CHECKING_SUBSCRIPTION' :11,
4002 'SWITCHING_DEVICE' :12
4003 }
4004 """
4005 - NOT_AVAILABLE
4006 - AVAILABLE
4007 - STARTING
4008 - REJECTED
4009 - RUNNING
4010 - STOPPING
4011 - PAUSED
4012 - NOT_STARTED
4013 - HINT_IS_VIDEOCALL_RECEIVED
4014 - UNKNOWN
4015 - RENDERING
4016 - CHECKING_SUBSCRIPTION
4017 - SWITCHING_DEVICE
4018 """
4019 MEDIATYPE = {1:'MEDIA_SCREENSHARING', 'MEDIA_SCREENSHARING':1, 0:'MEDIA_VIDEO', 'MEDIA_VIDEO':0}
4020 """
4021 - MEDIA_SCREENSHARING
4022 - MEDIA_VIDEO
4023 """
4024 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}
4025 """
4026 - VIDEOCAP_HQ_CAPABLE
4027 - VIDEOCAP_HQ_CERTIFIED
4028 - VIDEOCAP_REQ_DRIVERUPDATE
4029 - VIDEOCAP_USB_HIGHSPEED
4030 """
4031
4033 """
4034 Video::STATUS
4035 """
4036 return skypekit.enumof(Video.STATUS, self._sk_property("ZG\202\001]\013", 130, True))
4037 status = property(_sk_get_status)
4038 propid2label[130] = "status"
4039 P_STATUS = 130
4041 """
4042 'errorcode errortext'
4043 """
4044 return self._sk_property("ZG\203\001]\013", 131, True)
4045 error = property(_sk_get_error)
4046 propid2label[131] = "error"
4047 P_ERROR = 131
4049 """
4050 space-separated string of tokens
4051 """
4052 return self._sk_property("ZG\204\001]\013", 132, True)
4053 debuginfo = property(_sk_get_debuginfo)
4054 propid2label[132] = "debuginfo"
4055 P_DEBUGINFO = 132
4057 """
4058 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.
4059
4060 """
4061 return self._sk_property("ZG\205\001]\013", 133, True)
4062 dimensions = property(_sk_get_dimensions)
4063 propid2label[133] = "dimensions"
4064 P_DIMENSIONS = 133
4071 media_type = property(_sk_get_media_type)
4072 propid2label[134] = "media_type"
4073 P_MEDIA_TYPE = 134
4075 """
4076 conference id to be able to identify remote/local video in the same call
4077 """
4078 return module_id2classes[18](self._sk_property("ZG\320\010]\013", 1104, True), self.transport)
4079 convo_id = property(_sk_get_convo_id)
4080 propid2label[1104] = "convo_id"
4081 P_CONVO_ID = 1104
4083 """
4084 device path used by video object
4085 """
4086 return self._sk_property("ZG\321\010]\013", 1105, True)
4087 device_path = property(_sk_get_device_path)
4088 propid2label[1105] = "device_path"
4089 P_DEVICE_PATH = 1105
4090
4091 SETUPKEY_VIDEO_DEVICE = "Lib/Video/Device"
4092 SETUPKEY_VIDEO_DEVICE_PATH = "Lib/Video/DevicePath"
4093 SETUPKEY_VIDEO_AUTOSEND = "Lib/Video/AutoSend"
4094 SETUPKEY_VIDEO_DISABLE = "*Lib/Video/Disable"
4095 SETUPKEY_VIDEO_RECVPOLICY = "Lib/Video/RecvPolicy"
4096 SETUPKEY_VIDEO_ADVERTPOLICY = "Lib/Video/AdvertPolicy"
4097 - def SetScreen(
4098 self,
4099 windowh
4100 ):
4101 """
4102 No description available.
4103
4104 B{Arguments:}
4105 - B{windowh}
4106 """
4107 l_request = skypekit.XCallRequest("ZR\013\001", 11, 1)
4108 l_request.add_parm('O', 0, self)
4109 l_request.add_parm('u', 1, windowh)
4110 self.transport.xcall(l_request)
4112 """
4113 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).
4114
4115 """
4116 l_request = skypekit.XCallRequest("ZR\013\002", 11, 2)
4117 l_request.add_parm('O', 0, self)
4118 self.transport.xcall(l_request)
4120 """
4121 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).
4122
4123 """
4124 l_request = skypekit.XCallRequest("ZR\013\003", 11, 3)
4125 l_request.add_parm('O', 0, self)
4126 self.transport.xcall(l_request)
4128 """
4129 No description available.
4130
4131 B{Return values:}
4132 - B{ret}
4133 - B{request_id}
4134 """
4135 l_request = skypekit.XCallRequest("ZR\013\013", 11, 11)
4136 l_request.add_parm('O', 0, self)
4137 l_response = self.transport.xcall(l_request)
4138 l_result = (l_response.get(1, False)),
4139 l_result += (l_response.get(2, 0)),
4140 return l_result
4149 """
4150 No description available.
4151
4152 B{Return values:}
4153 - B{request_id}
4154 - B{is_successful}
4155 - B{image}
4156 - B{width}
4157 - B{height}
4158 """
4159 pass
4160 event_handlers[2] = "_sk_on_capture_request_completed"
4162 """ internal event dispatcher for OnCaptureRequestCompleted """
4163 l_cleanparms = (parms.get(1, 0)),
4164 l_cleanparms += (parms.get(2, False)),
4165 l_cleanparms += (parms.get(3, '')),
4166 l_cleanparms += (parms.get(4, 0)),
4167 l_cleanparms += (parms.get(5, 0)),
4168 self.OnCaptureRequestCompleted(*l_cleanparms)
4169 - def SetScreenCaptureRectangle(
4170 self,
4171 x0,
4172 y0,
4173 width,
4174 height,
4175 monitor_number = 0,
4176 window_handle = 0
4177 ):
4178 """
4179 This method has no known effect in current version.
4180
4181
4182 B{Arguments:}
4183 - B{x0}
4184 - B{y0}
4185 - B{width}
4186 - B{height}
4187 - B{monitor_number}
4188 - B{window_handle}
4189 """
4190 l_request = skypekit.XCallRequest("ZR\013\005", 11, 5)
4191 l_request.add_parm('O', 0, self)
4192 l_request.add_parm('i', 1, x0)
4193 l_request.add_parm('i', 2, y0)
4194 l_request.add_parm('u', 3, width)
4195 l_request.add_parm('u', 4, height)
4196 l_request.add_parm('i', 5, monitor_number)
4197 l_request.add_parm('u', 6, window_handle)
4198 self.transport.xcall(l_request)
4206 """
4207 No description available.
4208
4209 B{Arguments:}
4210 - B{x0}
4211 - B{y0}
4212 - B{width}
4213 - B{height}
4214 """
4215 l_request = skypekit.XCallRequest("ZR\013\006", 11, 6)
4216 l_request.add_parm('O', 0, self)
4217 l_request.add_parm('i', 1, x0)
4218 l_request.add_parm('i', 2, y0)
4219 l_request.add_parm('u', 3, width)
4220 l_request.add_parm('u', 4, height)
4221 self.transport.xcall(l_request)
4226 """
4227 No description available.
4228
4229 B{Arguments:}
4230 - B{id}
4231 """
4232 l_request = skypekit.XCallRequest("ZR\013\016", 11, 14)
4233 l_request.add_parm('O', 0, self)
4234 l_request.add_parm('u', 1, id)
4235 self.transport.xcall(l_request)
4236 - def SelectVideoSource(
4237 self,
4238 media_type,
4239 webcam_name = "",
4240 device_path = "",
4241 update_setup = False
4242 ):
4243 """
4244 This method has no effect in current version.
4245
4246
4247 B{Arguments:}
4248 - B{media_type}
4249 - B{webcam_name}
4250 - B{device_path}
4251 - B{update_setup}
4252 """
4253 l_request = skypekit.XCallRequest("ZR\013\007", 11, 7)
4254 l_request.add_parm('O', 0, self)
4255 l_request.add_parm('e', 1, Video.MEDIATYPE[media_type])
4256 l_request.add_parm('S', 2, webcam_name)
4257 l_request.add_parm('S', 3, device_path)
4258 l_request.add_parm('b', 4, update_setup)
4259 self.transport.xcall(l_request)
4261 """
4262 No description available.
4263
4264 B{Return values:}
4265 - B{mediatype}
4266 - B{device_name}
4267 - B{device_path}
4268 """
4269 l_request = skypekit.XCallRequest("ZR\013\012", 11, 10)
4270 l_request.add_parm('O', 0, self)
4271 l_response = self.transport.xcall(l_request)
4272 l_result = (skypekit.enumof(Video.MEDIATYPE, l_response.get(1))),
4273 l_result += (l_response.get(2, '')),
4274 l_result += (l_response.get(3, '')),
4275 return l_result
4276 module_id2classes[11] = Video
4279 """
4280 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.
4281
4282 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.
4283
4284 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.
4285
4286 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.
4287
4288 To put it another way, the object chain goes like this:
4289 ::
4290 Contact->Conversation->Message->Voicemail
4291
4292
4293 There are three basic types of Voicemail objects:
4294 - INCOMING - received voice messages that can be retrieved from Message objects;
4295 - OUTGOING - outbound voice messages that can be created with Conversation::StartVoiceMessage;
4296 - 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.
4297
4298 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.
4299
4300 Recording and Sending a Voice Message
4301
4302 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
4303
4304 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.
4305
4306 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.
4307
4308 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.
4309
4310 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.
4311
4312 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.
4313
4314 The relevant terminal state Voicemail::P_STATUS property values are:
4315 - Voicemail::CANCELLED - recording and/or sending of this message was cancelled
4316 - Voicemail::UPLOADED - message sent
4317 - Voicemail::FAILED - message could not be sent
4318
4319 Receiving and Playing Back a Voice Message
4320
4321 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:
4322
4323 ::
4324 <voicemail alt="Sent voicemail to people in this conversation."><message length="5" ></message></voicemail>
4325
4326
4327 Receiver side UI can then retrieve the Voicemail object from the message with Message::GetVoiceMessage and
4328 start local playback with Message::StartPlayback.
4329
4330 """
4331 event_handlers = {}
4332 propid2label = {}
4337 return "Voicemail %s" % (self.object_id, )
4338 @staticmethod
4340 """ convert a property name to the enum of the property """
4341 return getattr(Voicemail, "P_"+propname.upper())
4342 module_id = 7
4344 """ notifies from a property change """
4345
4346 pass
4347 TYPE = {1:'INCOMING', 'INCOMING':1, 4:'DEFAULT_GREETING', 'DEFAULT_GREETING':4, 2:'CUSTOM_GREETING', 'CUSTOM_GREETING':2, 3:'OUTGOING', 'OUTGOING':3}
4348 """
4349 - INCOMING
4350 - DEFAULT_GREETING
4351 - CUSTOM_GREETING
4352 - OUTGOING
4353 """
4354 STATUS = {
4355 1 :'NOTDOWNLOADED',
4356 2 :'DOWNLOADING',
4357 3 :'UNPLAYED',
4358 4 :'BUFFERING',
4359 5 :'PLAYING',
4360 6 :'PLAYED',
4361 7 :'BLANK',
4362 8 :'RECORDING',
4363 9 :'RECORDED',
4364 10:'UPLOADING',
4365 11:'UPLOADED',
4366 12:'DELETING',
4367 13:'FAILED',
4368 14:'DELETING_FAILED',
4369 15:'CHECKING',
4370 16:'CANCELLED',
4371 'NOTDOWNLOADED' : 1,
4372 'DOWNLOADING' : 2,
4373 'UNPLAYED' : 3,
4374 'BUFFERING' : 4,
4375 'PLAYING' : 5,
4376 'PLAYED' : 6,
4377 'BLANK' : 7,
4378 'RECORDING' : 8,
4379 'RECORDED' : 9,
4380 'UPLOADING' :10,
4381 'UPLOADED' :11,
4382 'DELETING' :12,
4383 'FAILED' :13,
4384 'DELETING_FAILED' :14,
4385 'CHECKING' :15,
4386 'CANCELLED' :16
4387 }
4388 """
4389 - NOTDOWNLOADED
4390 - DOWNLOADING
4391 - UNPLAYED
4392 - BUFFERING
4393 - PLAYING
4394 - PLAYED
4395 - BLANK
4396 - RECORDING
4397 - RECORDED
4398 - UPLOADING
4399 - UPLOADED
4400 - DELETING
4401 - FAILED
4402 - DELETING_FAILED
4403 - CHECKING
4404 - CANCELLED
4405 """
4406 FAILUREREASON = {
4407 1 :'MISC_ERROR',
4408 2 :'CONNECT_ERROR',
4409 3 :'NO_VOICEMAIL_CAPABILITY',
4410 4 :'NO_SUCH_VOICEMAIL',
4411 5 :'FILE_READ_ERROR',
4412 6 :'FILE_WRITE_ERROR',
4413 7 :'RECORDING_ERROR',
4414 8 :'PLAYBACK_ERROR',
4415 9 :'NO_PERMISSION',
4416 10:'RECEIVER_DISABLED_VOICEMAIL',
4417 11:'SENDER_NOT_AUTHORIZED',
4418 12:'SENDER_BLOCKED',
4419 'MISC_ERROR' : 1,
4420 'CONNECT_ERROR' : 2,
4421 'NO_VOICEMAIL_CAPABILITY' : 3,
4422 'NO_SUCH_VOICEMAIL' : 4,
4423 'FILE_READ_ERROR' : 5,
4424 'FILE_WRITE_ERROR' : 6,
4425 'RECORDING_ERROR' : 7,
4426 'PLAYBACK_ERROR' : 8,
4427 'NO_PERMISSION' : 9,
4428 'RECEIVER_DISABLED_VOICEMAIL' :10,
4429 'SENDER_NOT_AUTHORIZED' :11,
4430 'SENDER_BLOCKED' :12
4431 }
4432 """
4433 - MISC_ERROR
4434 - CONNECT_ERROR
4435 - NO_VOICEMAIL_CAPABILITY
4436 - NO_SUCH_VOICEMAIL
4437 - FILE_READ_ERROR
4438 - FILE_WRITE_ERROR
4439 - RECORDING_ERROR
4440 - PLAYBACK_ERROR
4441 - NO_PERMISSION
4442 - RECEIVER_DISABLED_VOICEMAIL - receiver turned off voicemail
4443 - SENDER_NOT_AUTHORIZED - receiver has not authorized you and privacy is not set to anyone
4444 - SENDER_BLOCKED - receiver blocked sender
4445 """
4446
4449 type = property(_sk_get_type)
4450 propid2label[100] = "type"
4451 P_TYPE = 100
4453 """
4454 registered username of the other party
4455 """
4456 return self._sk_property("ZGe]\007", 101, True)
4457 partner_handle = property(_sk_get_partner_handle)
4458 propid2label[101] = "partner_handle"
4459 P_PARTNER_HANDLE = 101
4461 """
4462 user's display name of the other party
4463 """
4464 return self._sk_property("ZGf]\007", 102, True)
4465 partner_dispname = property(_sk_get_partner_dispname)
4466 propid2label[102] = "partner_dispname"
4467 P_PARTNER_DISPNAME = 102
4470 status = property(_sk_get_status)
4471 propid2label[103] = "status"
4472 P_STATUS = 103
4475 failurereason = property(_sk_get_failurereason)
4476 propid2label[104] = "failurereason"
4477 P_FAILUREREASON = 104
4479 """
4480 DEPRECATED: subject line
4481 """
4482 return self._sk_property("ZGi]\007", 105, True)
4483 subject = property(_sk_get_subject)
4484 propid2label[105] = "subject"
4485 P_SUBJECT = 105
4487 """
4488 timestamp of creation
4489 """
4490 return self._sk_property("ZGj]\007", 106, True)
4491 timestamp = property(_sk_get_timestamp)
4492 propid2label[106] = "timestamp"
4493 P_TIMESTAMP = 106
4495 """
4496 duration in seconds
4497 """
4498 return self._sk_property("ZGk]\007", 107, True)
4499 duration = property(_sk_get_duration)
4500 propid2label[107] = "duration"
4501 P_DURATION = 107
4503 """
4504 max allowed duration in seconds
4505 """
4506 return self._sk_property("ZGl]\007", 108, True)
4507 allowed_duration = property(_sk_get_allowed_duration)
4508 propid2label[108] = "allowed_duration"
4509 P_ALLOWED_DURATION = 108
4511 """
4512 VM playback progress in seconds
4513 """
4514 return self._sk_property("ZGm]\007", 109, True)
4515 playback_progress = property(_sk_get_playback_progress)
4516 propid2label[109] = "playback_progress"
4517 P_PLAYBACK_PROGRESS = 109
4519 """
4520 CONVERSATION_ID of corresponding conversation
4521 """
4522 return module_id2classes[18](self._sk_property("ZG\276\006]\007", 830, True), self.transport)
4523 convo_id = property(_sk_get_convo_id)
4524 propid2label[830] = "convo_id"
4525 P_CONVO_ID = 830
4527 """
4528 GUID of the message that the VM is tied to
4529 """
4530 return self._sk_property("ZG\277\006]\007", 831, True)
4531 chatmsg_guid = property(_sk_get_chatmsg_guid)
4532 propid2label[831] = "chatmsg_guid"
4533 P_CHATMSG_GUID = 831
4534
4536 """
4537 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.
4538
4539 """
4540 l_request = skypekit.XCallRequest("ZR\007\003", 7, 3)
4541 l_request.add_parm('O', 0, self)
4542 self.transport.xcall(l_request)
4544 """
4545 Stop recording of your own auto-answer greeting message only. To stop recording of and send an outgoing Voicemail, use Conversation::PostVoiceMessage.
4546
4547 """
4548 l_request = skypekit.XCallRequest("ZR\007\004", 7, 4)
4549 l_request.add_parm('O', 0, self)
4550 self.transport.xcall(l_request)
4552 """
4553 Initiates playback of a voice message
4554
4555 """
4556 l_request = skypekit.XCallRequest("ZR\007\005", 7, 5)
4557 l_request.add_parm('O', 0, self)
4558 self.transport.xcall(l_request)
4560 """
4561 Terminates playback of a voice message
4562
4563 """
4564 l_request = skypekit.XCallRequest("ZR\007\006", 7, 6)
4565 l_request.add_parm('O', 0, self)
4566 self.transport.xcall(l_request)
4568 """
4569 first from server, and then the local copy
4570 """
4571 l_request = skypekit.XCallRequest("ZR\007\007", 7, 7)
4572 l_request.add_parm('O', 0, self)
4573 self.transport.xcall(l_request)
4575 """
4576 Canceling recording of your own auto-answer greeting message. To stop recording of and cancel an outgoing Voicemail, use Conversation::LeaveLiveSession.
4577
4578 """
4579 l_request = skypekit.XCallRequest("ZR\007\010", 7, 8)
4580 l_request.add_parm('O', 0, self)
4581 self.transport.xcall(l_request)
4583 """
4584 check if we can send voicemail (unauth,blocked,no priv etc cases). only OUTGOING
4585
4586 B{Return values:}
4587 - B{result}
4588 """
4589 l_request = skypekit.XCallRequest("ZR\007\015", 7, 13)
4590 l_request.add_parm('O', 0, self)
4591 l_response = self.transport.xcall(l_request)
4592 l_result = l_response.get(1, False)
4593 return l_result
4594 module_id2classes[7] = Voicemail
4595
4596 -class Sms(skypekit.Object):
4597 """
4598 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.
4599
4600 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:
4601
4602 ::
4603 Conversation->Message->SMS
4604
4605
4606 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.
4607
4608 """
4609 event_handlers = {}
4610 propid2label = {}
4615 return "Sms %s" % (self.object_id, )
4616 @staticmethod
4618 """ convert a property name to the enum of the property """
4619 return getattr(Sms, "P_"+propname.upper())
4620 module_id = 12
4622 """ notifies from a property change """
4623
4624 pass
4625 TYPE = {2:'OUTGOING', 'OUTGOING':2, 3:'CONFIRMATION_CODE_REQUEST', 'CONFIRMATION_CODE_REQUEST':3, 4:'CONFIRMATION_CODE_SUBMIT', 'CONFIRMATION_CODE_SUBMIT':4}
4626 """
4627 - OUTGOING - a normal outgoing SMS message
4628 - CONFIRMATION_CODE_REQUEST - a message requesting a SMS confirmation code be sent to the number provided
4629 - CONFIRMATION_CODE_SUBMIT - a message returning the SMS confirmation code received as a result of a CONFIRMATION_CODE_REQUEST to authorize it
4630 """
4631 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}
4632 """
4633 - COMPOSING
4634 - SENDING_TO_SERVER
4635 - SENT_TO_SERVER
4636 - DELIVERED
4637 - SOME_TARGETS_FAILED
4638 - FAILED
4639 """
4640 FAILUREREASON = {
4641 1:'MISC_ERROR',
4642 2:'SERVER_CONNECT_FAILED',
4643 3:'NO_SMS_CAPABILITY',
4644 4:'INSUFFICIENT_FUNDS',
4645 5:'INVALID_CONFIRMATION_CODE',
4646 6:'USER_BLOCKED',
4647 7:'IP_BLOCKED',
4648 8:'NODE_BLOCKED',
4649 9:'NO_SENDERID_CAPABILITY',
4650 'MISC_ERROR' :1,
4651 'SERVER_CONNECT_FAILED' :2,
4652 'NO_SMS_CAPABILITY' :3,
4653 'INSUFFICIENT_FUNDS' :4,
4654 'INVALID_CONFIRMATION_CODE' :5,
4655 'USER_BLOCKED' :6,
4656 'IP_BLOCKED' :7,
4657 'NODE_BLOCKED' :8,
4658 'NO_SENDERID_CAPABILITY' :9
4659 }
4660 """
4661 - MISC_ERROR
4662 - SERVER_CONNECT_FAILED
4663 - NO_SMS_CAPABILITY
4664 - INSUFFICIENT_FUNDS
4665 - INVALID_CONFIRMATION_CODE
4666 - USER_BLOCKED
4667 - IP_BLOCKED
4668 - NODE_BLOCKED
4669 - NO_SENDERID_CAPABILITY
4670 """
4671 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}
4672 """
4673 - TARGET_ANALYZING
4674 - TARGET_UNDEFINED
4675 - TARGET_ACCEPTABLE
4676 - TARGET_NOT_ROUTABLE
4677 - TARGET_DELIVERY_PENDING
4678 - TARGET_DELIVERY_SUCCESSFUL
4679 - TARGET_DELIVERY_FAILED
4680 """
4681 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}
4682 """
4683 - BODY_INVALID - body not set. message status wrong or invalid, or body not valid utf8 string
4684 - BODY_TRUNCATED - body too long. set, but truncated. charsUntilNextChunk contains maxChunks value
4685 - BODY_OK - body was set OK
4686 - BODY_LASTCHAR_IGNORED - last unicode char was ignored, as some of the text would be deleted due to conversion
4687 """
4688 CONFIRM_TYPE = {1:'ID_SMS', 'ID_SMS':1, 2:'ID_MOBILE', 'ID_MOBILE':2, 3:'ID_SKYPEIN', 'ID_SKYPEIN':3}
4689 """
4690 - ID_SMS - Confirm mobile number as SMS sender number
4691 - ID_MOBILE - Confirm mobile number as CLI for SkypeOut calls
4692 - ID_SKYPEIN - unused currently
4693 """
4694
4697 type = property(_sk_get_type)
4698 propid2label[190] = "type"
4699 P_TYPE = 190
4702 status = property(_sk_get_status)
4703 propid2label[191] = "status"
4704 P_STATUS = 191
4706 """
4707 Set asynchronously and meaningful only after invoking Conversation::PostSMS and detecting Sms::STATUS of SOME_TARGETS_FAILED or FAILED.
4708
4709 """
4710 return skypekit.enumof(Sms.FAILUREREASON, self._sk_property("ZG\300\001]\014", 192, True))
4711 failurereason = property(_sk_get_failurereason)
4712 propid2label[192] = "failurereason"
4713 P_FAILUREREASON = 192
4715 """
4716 set to 1 when status goes to FAILED. use MarkSeen() to clear
4717 """
4718 return self._sk_property("ZG0]\014", 48, True)
4719 is_failed_unseen = property(_sk_get_is_failed_unseen)
4720 propid2label[48] = "is_failed_unseen"
4721 P_IS_FAILED_UNSEEN = 48
4723 """
4724 unix timestamp of message submission
4725 """
4726 return self._sk_property("ZG\306\001]\014", 198, True)
4727 timestamp = property(_sk_get_timestamp)
4728 propid2label[198] = "timestamp"
4729 P_TIMESTAMP = 198
4731 """
4732 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.
4733
4734 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:
4735
4736 ::
4737 actualPrice = price / 10^pricePrecision;
4738
4739
4740 """
4741 return self._sk_property("ZG\301\001]\014", 193, True)
4742 price = property(_sk_get_price)
4743 propid2label[193] = "price"
4744 P_PRICE = 193
4746 """
4747 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.
4748
4749 """
4750 return self._sk_property("ZG1]\014", 49, True)
4751 price_precision = property(_sk_get_price_precision)
4752 propid2label[49] = "price_precision"
4753 P_PRICE_PRECISION = 49
4755 """
4756 should be same as account currency at the time of composing/sending
4757 """
4758 return self._sk_property("ZG\302\001]\014", 194, True)
4759 price_currency = property(_sk_get_price_currency)
4760 propid2label[194] = "price_currency"
4761 P_PRICE_CURRENCY = 194
4763 """
4764 number that should receive the replies
4765 """
4766 return self._sk_property("ZG\307\001]\014", 199, True)
4767 reply_to_number = property(_sk_get_reply_to_number)
4768 propid2label[199] = "reply_to_number"
4769 P_REPLY_TO_NUMBER = 199
4771 """
4772 space-separated normalised pstn numbers
4773 """
4774 return self._sk_property("ZG\303\001]\014", 195, True)
4775 target_numbers = property(_sk_get_target_numbers)
4776 propid2label[195] = "target_numbers"
4777 P_TARGET_NUMBERS = 195
4779 """
4780 binary blob. track with OnPropertyChange(), access with GetTargetStatus(target)
4781 """
4782 return self._sk_property("ZG\304\001]\014", 196, True)
4783 target_statuses = property(_sk_get_target_statuses)
4784 propid2label[196] = "target_statuses"
4785 P_TARGET_STATUSES = 196
4786 - def _sk_get_body(self):
4787 """
4788 actual payload
4789 """
4790 return self._sk_property("ZG\305\001]\014", 197, True)
4791 body = property(_sk_get_body)
4792 propid2label[197] = "body"
4793 P_BODY = 197
4795 """
4796 reference to Message
4797 """
4798 return module_id2classes[9](self._sk_property("ZG\310\006]\014", 840, True), self.transport)
4799 chatmsg_id = property(_sk_get_chatmsg_id)
4800 propid2label[840] = "chatmsg_id"
4801 P_CHATMSG_ID = 840
4802
4807 """
4808 Retrieves the send status of this SMS to a particular recipient (P_TARGET_STATUSES) either prior to or after invoking Conversation::PostSMS.
4809
4810
4811 B{Arguments:}
4812 - B{target} - The normalized phone number of the target recipient.
4813
4814
4815 B{Return values:}
4816 - 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.
4817
4818 """
4819 l_request = skypekit.XCallRequest("ZR\014\004", 12, 4)
4820 l_request.add_parm('O', 0, self)
4821 l_request.add_parm('S', 1, target)
4822 l_response = self.transport.xcall(l_request)
4823 l_result = skypekit.enumof(Sms.TARGETSTATUS, l_response.get(1))
4824 return l_result
4829 """
4830 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.
4831
4832 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:
4833 ::
4834 actualTargetPrice = targetPrice / 10^pricePrecision;
4835
4836
4837
4838 B{Arguments:}
4839 - B{target} - The normalized phone number of the target recipient.
4840
4841
4842 B{Return values:}
4843 - B{price} - The price of sending this SMS message to the target recipient.
4844
4845 """
4846 l_request = skypekit.XCallRequest("ZR\014\015", 12, 13)
4847 l_request.add_parm('O', 0, self)
4848 l_request.add_parm('S', 1, target)
4849 l_response = self.transport.xcall(l_request)
4850 l_result = l_response.get(1, 0)
4851 return l_result
4856 """
4857 Sets the recipient(s) of this SMS. Note that each invocation replaces the target list and re-calculates all prices - they are not additive!
4858
4859
4860 B{Arguments:}
4861 - B{numbers} - Normalized phone number(s) of the intended recipient(s).
4862
4863
4864 B{Return values:}
4865 - 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.
4866
4867 """
4868 l_request = skypekit.XCallRequest("ZR\014\006", 12, 6)
4869 l_request.add_parm('O', 0, self)
4870 l_request.add_parm('S', 1, numbers)
4871 l_response = self.transport.xcall(l_request)
4872 l_result = l_response.get(1, False)
4873 return l_result
4874 - def SetBody(
4875 self,
4876 text
4877 ):
4878 """
4879 -The- method for setting the body text of this SMS. While Conversation::PostSMS does have a body argument, that argument is currently unused.
4880
4881
4882 B{Arguments:}
4883 - B{text} - Message body text.
4884
4885
4886 B{Return values:}
4887 - B{result} - Whether the Message body was successfully set and if not, why not.
4888
4889 - B{chunks} - The Message body as a list of individual chunks.
4890
4891 - B{chars_until_next_chunk} - Number of available characters until creation of the next chunk becomes necessary.
4892
4893 """
4894 l_request = skypekit.XCallRequest("ZR\014\007", 12, 7)
4895 l_request.add_parm('O', 0, self)
4896 l_request.add_parm('S', 1, text)
4897 l_response = self.transport.xcall(l_request)
4898 l_result = (skypekit.enumof(Sms.SETBODYRESULT, l_response.get(1))),
4899 l_result += (l_response.get(2, [])),
4900 l_result += (l_response.get(3, 0)),
4901 return l_result
4902 - def GetBodyChunks(self):
4903 """
4904 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.
4905
4906
4907 B{Return values:}
4908 - B{text_chunks} - List of text chunk strings
4909
4910 - B{chars_until_next_chunk} - Number of available characters until creation of the next chunk becomes necessary.
4911
4912 """
4913 l_request = skypekit.XCallRequest("ZR\014\010", 12, 8)
4914 l_request.add_parm('O', 0, self)
4915 l_response = self.transport.xcall(l_request)
4916 l_result = (l_response.get(1, [])),
4917 l_result += (l_response.get(2, 0)),
4918 return l_result
4919 module_id2classes[12] = Sms
4922 """
4923 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).
4924
4925 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
4926 this Message instance, and the Message::P_BODY_XML looks like this:
4927
4928 ::
4929 Some text<files alt=""><file size="2336020" index="0">test.zip</file></files>
4930
4931
4932 To put it another way, the object chain goes like this:
4933 ::
4934 Conversation->Message->Transfer
4935
4936
4937 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:
4938 - file size in bytes
4939 - index - more or less arbitrary order in which the transfers should be displayed in the UI
4940 - file name.
4941
4942 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
4943 a Conversation using the same Message, Message:GetTransfers retrieves a list of Transfer instances - one per file per recipient.
4944
4945 You can determine the direction of particular Transfer instance by querying Transfer::P_TYPE (INCOMING/OUTGOING).
4946
4947 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.
4948
4949 Another property of interest is Transfer::P_STATUS. The normal transfer status sequence during successful outgoing transfer is this:
4950 - TRANSFER STATUS -> NEW
4951 - TRANSFER STATUS -> WAITING_FOR_ACCEPT
4952 - TRANSFER STATUS -> CONNECTING
4953 - TRANSFER STATUS -> TRANSFERRING
4954 - TRANSFER STATUS -> CONNECTING
4955 - TRANSFER STATUS -> COMPLETED
4956
4957 The list of all terminal Transfer statuses is:
4958 - COMPLETED
4959 - FAILED
4960 - CANCELLED
4961 - CANCELLED_BY_REMOTE
4962
4963 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.
4964
4965 Incoming transfers, once accepted, overwrite existing files with the same name. Before accepting an incoming file transfer,
4966 your UI should prompt the recipient to:
4967 - accept or decline the file
4968 - if accepted, specify the directory of here to save the file (with a pre-filled default)
4969 - 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
4970
4971 Similarly, your UI should verify the existence of outgoing files prior to invoking Conversation::PostFiles.
4972
4973 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.
4974
4975 """
4976 event_handlers = {}
4977 propid2label = {}
4982 return "Transfer %s" % (self.object_id, )
4983 @staticmethod
4985 """ convert a property name to the enum of the property """
4986 return getattr(Transfer, "P_"+propname.upper())
4987 module_id = 6
4989 """ notifies from a property change """
4990
4991 pass
4992 TYPE = {1:'INCOMING', 'INCOMING':1, 2:'OUTGOING', 'OUTGOING':2}
4993 """
4994 - INCOMING
4995 - OUTGOING
4996 """
4997 STATUS = {
4998 0 :'NEW',
4999 1 :'CONNECTING',
5000 2 :'WAITING_FOR_ACCEPT',
5001 3 :'TRANSFERRING',
5002 4 :'TRANSFERRING_OVER_RELAY',
5003 5 :'PAUSED',
5004 6 :'REMOTELY_PAUSED',
5005 7 :'CANCELLED',
5006 8 :'COMPLETED',
5007 9 :'FAILED',
5008 10:'PLACEHOLDER',
5009 11:'OFFER_FROM_OTHER_INSTANCE',
5010 12:'CANCELLED_BY_REMOTE',
5011 'NEW' : 0,
5012 'CONNECTING' : 1,
5013 'WAITING_FOR_ACCEPT' : 2,
5014 'TRANSFERRING' : 3,
5015 'TRANSFERRING_OVER_RELAY' : 4,
5016 'PAUSED' : 5,
5017 'REMOTELY_PAUSED' : 6,
5018 'CANCELLED' : 7,
5019 'COMPLETED' : 8,
5020 'FAILED' : 9,
5021 'PLACEHOLDER' :10,
5022 'OFFER_FROM_OTHER_INSTANCE' :11,
5023 'CANCELLED_BY_REMOTE' :12
5024 }
5025 """
5026 Recognized values for the P_STATUS property. Reflects current state of this Transfer.
5027
5028 - NEW - The file has either not been posted (sent) (OUTGOING), or not accepted (received) (INCOMING).
5029
5030 - 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.
5031
5032 - WAITING_FOR_ACCEPT - The files have been posted but the recipient has not yet accepted (or has declined) the transfer.
5033
5034 - TRANSFERRING - The transfer has been accepted and file data is being sent/received. Periodic updates of P_BYTESTRANSFERRED property should occur.
5035
5036 - 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.
5037
5038 - PAUSED - The local user (either the sender or a receiver) has paused the transfer.
5039
5040 - 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.
5041
5042 - CANCELLED - Local side (either sender or receiver) has canceled the transfer. This is a final state of the STATE property.
5043
5044 - COMPLETED - File transfer has completed. This is a terminal state.
5045
5046 - FAILED - File transfer has failed. This is a terminal state. UI should provide feedback, based on value of P_FAILUREREASON.
5047
5048 - PLACEHOLDER - Transfer whose existence has been hinted by corresponding chat message, but which is yet to arrive.
5049
5050 - 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.
5051
5052 - CANCELLED_BY_REMOTE - Remote side (either sender or receiver) has canceled the transfer. This is a final state of the STATE property.
5053
5054 """
5055 FAILUREREASON = {
5056 1 :'SENDER_NOT_AUTHORISED',
5057 2 :'REMOTELY_CANCELLED',
5058 3 :'FAILED_READ',
5059 4 :'FAILED_REMOTE_READ',
5060 5 :'FAILED_WRITE',
5061 6 :'FAILED_REMOTE_WRITE',
5062 7 :'REMOTE_DOES_NOT_SUPPORT_FT',
5063 8 :'REMOTE_OFFLINE_FOR_TOO_LONG',
5064 9 :'TOO_MANY_PARALLEL',
5065 10:'PLACEHOLDER_TIMEOUT',
5066 'SENDER_NOT_AUTHORISED' : 1,
5067 'REMOTELY_CANCELLED' : 2,
5068 'FAILED_READ' : 3,
5069 'FAILED_REMOTE_READ' : 4,
5070 'FAILED_WRITE' : 5,
5071 'FAILED_REMOTE_WRITE' : 6,
5072 'REMOTE_DOES_NOT_SUPPORT_FT' : 7,
5073 'REMOTE_OFFLINE_FOR_TOO_LONG' : 8,
5074 'TOO_MANY_PARALLEL' : 9,
5075 'PLACEHOLDER_TIMEOUT' :10
5076 }
5077 """
5078 - SENDER_NOT_AUTHORISED
5079 - REMOTELY_CANCELLED
5080 - FAILED_READ
5081 - FAILED_REMOTE_READ
5082 - FAILED_WRITE
5083 - FAILED_REMOTE_WRITE
5084 - REMOTE_DOES_NOT_SUPPORT_FT
5085 - REMOTE_OFFLINE_FOR_TOO_LONG
5086 - TOO_MANY_PARALLEL
5087 - PLACEHOLDER_TIMEOUT
5088 """
5089
5091 """
5092 INCOMING / OUTGOING
5093
5094 """
5095 return skypekit.enumof(Transfer.TYPE, self._sk_property("ZGP]\006", 80, True))
5096 type = property(_sk_get_type)
5097 propid2label[80] = "type"
5098 P_TYPE = 80
5100 """
5101 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.
5102
5103 """
5104 return self._sk_property("ZGQ]\006", 81, True)
5105 partner_handle = property(_sk_get_partner_handle)
5106 propid2label[81] = "partner_handle"
5107 P_PARTNER_HANDLE = 81
5109 """
5110 Display name of the remote participant.
5111
5112 """
5113 return self._sk_property("ZGR]\006", 82, True)
5114 partner_dispname = property(_sk_get_partner_dispname)
5115 propid2label[82] = "partner_dispname"
5116 P_PARTNER_DISPNAME = 82
5118 """
5119 Current state of the transfer
5120
5121 """
5122 return skypekit.enumof(Transfer.STATUS, self._sk_property("ZGS]\006", 83, True))
5123 status = property(_sk_get_status)
5124 propid2label[83] = "status"
5125 P_STATUS = 83
5132 failurereason = property(_sk_get_failurereason)
5133 propid2label[84] = "failurereason"
5134 P_FAILUREREASON = 84
5136 """
5137 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.
5138
5139 """
5140 return self._sk_property("ZGU]\006", 85, True)
5141 starttime = property(_sk_get_starttime)
5142 propid2label[85] = "starttime"
5143 P_STARTTIME = 85
5145 """
5146 UNIX timestamp of when this Transfer COMPLETED or FAILED. This property is never set if the receiving side (local or remote) canceled the transfer.
5147
5148 """
5149 return self._sk_property("ZGV]\006", 86, True)
5150 finishtime = property(_sk_get_finishtime)
5151 propid2label[86] = "finishtime"
5152 P_FINISHTIME = 86
5154 """
5155 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.
5156
5157 """
5158 return self._sk_property("ZGW]\006", 87, True)
5159 filepath = property(_sk_get_filepath)
5160 propid2label[87] = "filepath"
5161 P_FILEPATH = 87
5163 """
5164 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.
5165
5166 """
5167 return self._sk_property("ZGX]\006", 88, True)
5168 filename = property(_sk_get_filename)
5169 propid2label[88] = "filename"
5170 P_FILENAME = 88
5172 """
5173 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.
5174
5175 """
5176 return self._sk_property("ZGY]\006", 89, True)
5177 filesize = property(_sk_get_filesize)
5178 propid2label[89] = "filesize"
5179 P_FILESIZE = 89
5181 """
5182 The number of bytes already transferred. Calculate the percentage of the file transferred so far as:
5183 ::
5184 P_BYTESTRANSFERRED / (P_FILESIZE / 100);
5185
5186
5187 Use float variables to avoid problems with files smaller than 100 bytes!
5188
5189 """
5190 return self._sk_property("ZGZ]\006", 90, True)
5191 bytestransferred = property(_sk_get_bytestransferred)
5192 propid2label[90] = "bytestransferred"
5193 P_BYTESTRANSFERRED = 90
5195 """
5196 Current data transfer speed in bytes per second. Typically, your UI will want to display this value as kilobytes per second (KBps).
5197
5198 """
5199 return self._sk_property("ZG[]\006", 91, True)
5200 bytespersecond = property(_sk_get_bytespersecond)
5201 propid2label[91] = "bytespersecond"
5202 P_BYTESPERSECOND = 91
5204 """
5205 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.
5206
5207 """
5208 return self._sk_property("ZG\134]\006", 92, True)
5209 chatmsg_guid = property(_sk_get_chatmsg_guid)
5210 propid2label[92] = "chatmsg_guid"
5211 P_CHATMSG_GUID = 92
5213 """
5214 A more or less arbitrary index for ordering multiple file transfers within the UI.
5215
5216 """
5217 return self._sk_property("ZG]]\006", 93, True)
5218 chatmsg_index = property(_sk_get_chatmsg_index)
5219 propid2label[93] = "chatmsg_index"
5220 P_CHATMSG_INDEX = 93
5222 """
5223 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.
5224
5225 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.
5226
5227 """
5228 return module_id2classes[18](self._sk_property("ZGb]\006", 98, True), self.transport)
5229 convo_id = property(_sk_get_convo_id)
5230 propid2label[98] = "convo_id"
5231 P_CONVO_ID = 98
5232
5233 - def Accept(
5234 self,
5235 filename_with_path
5236 ):
5237 """
5238 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.
5239
5240
5241 B{Arguments:}
5242 - 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.
5243
5244
5245 B{Return values:}
5246 - 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.
5247
5248 """
5249 l_request = skypekit.XCallRequest("ZR\006\003", 6, 3)
5250 l_request.add_parm('O', 0, self)
5251 l_request.add_parm('f', 1, filename_with_path)
5252 l_response = self.transport.xcall(l_request)
5253 l_result = l_response.get(1, False)
5254 return l_result
5256 """
5257 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.
5258
5259 """
5260 l_request = skypekit.XCallRequest("ZR\006\004", 6, 4)
5261 l_request.add_parm('O', 0, self)
5262 self.transport.xcall(l_request)
5264 """
5265 Resumes a previously paused file transfer.
5266
5267 """
5268 l_request = skypekit.XCallRequest("ZR\006\005", 6, 5)
5269 l_request.add_parm('O', 0, self)
5270 self.transport.xcall(l_request)
5272 """
5273 Cancels an in-progress file transfer. Transfer::STATUS will transition to CANCELLED for incoming file transfers and to CANCELLED_BY_REMOTE for outgoing transfers.
5274
5275 """
5276 l_request = skypekit.XCallRequest("ZR\006\006", 6, 6)
5277 l_request.add_parm('O', 0, self)
5278 self.transport.xcall(l_request)
5279 module_id2classes[6] = Transfer
5280
5281 -class Account(skypekit.Object):
5282 """
5283 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.
5284
5285 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.
5286
5287 The set of writeable account profile properties (local profile) is as follows;
5288 - P_FULLNAME,
5289 - P_BIRTHDAY,
5290 - P_GENDER,
5291 - P_LANGUAGES,
5292 - P_COUNTRY,
5293 - P_PROVINCE,
5294 - P_CITY,
5295 - P_PHONE_HOME,
5296 - P_PHONE_OFFICE,
5297 - P_PHONE_MOBILE,
5298 - P_EMAILS,
5299 - P_HOMEPAGE,
5300 - P_ABOUT,
5301 - P_MOOD_TEXT,
5302 - P_TIMEZONE,
5303 - P_AVATAR_IMAGE,
5304 - P_RICH_MOOD_TEXT
5305
5306 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.
5307
5308 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.
5309
5310 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:
5311
5312 - obtain an Account instance by invoking Skype::GetAccount. This automatically sets P_SKYPENAME.
5313 - set any additional profile-related properties. Skype recommends that you minimally set the following:
5314 - their email address so that they can retrieve a lost password (P_EMAILS)
5315 - the user's full name (P_FULLNAME)
5316 - at least one phone number (P_PHONE_HOME, P_PHONE_HOME, P_PHONE_OFFICE)
5317 - invoke Account::Register to actually create the account
5318
5319 """
5320 event_handlers = {}
5321 propid2label = {}
5326 return "Account %s" % (self.object_id, )
5327 @staticmethod
5329 """ convert a property name to the enum of the property """
5330 return getattr(Account, "P_"+propname.upper())
5331 module_id = 5
5333 """ notifies from a property change """
5334
5335 pass
5336 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}
5337 """
5338 - LOGGED_OUT
5339 - LOGGED_OUT_AND_PWD_SAVED - the account is logged out, but password is not needed for re-login
5340 - CONNECTING_TO_P2P - connecting to P2P network
5341 - CONNECTING_TO_SERVER - connecting to login server
5342 - LOGGING_IN - waiting for response from server
5343 - INITIALIZING - response OK. initialising account-specific lib structures
5344 - LOGGED_IN - alright, we're good to go!
5345 - LOGGING_OUT - Logout() has been called but not processed yet
5346 """
5347 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}
5348 """
5349 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).
5350
5351 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.
5352
5353 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.
5354
5355 - CBL_INITIALIZING - status is not clear (yet)
5356 - CBL_INITIAL_SYNC_PENDING - first sync with empty profile
5357 - 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.
5358 - CBL_SYNC_IN_PROGRESS - CBL synchronization is currently taking place.
5359 - CBL_IN_SYNC - Account properties are up-to-date.
5360 - 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.
5361 - CBL_REMOTE_SYNC_PENDING - we have received a hint that there is a remote data change in CBL
5362 """
5363 LOGOUTREASON = {
5364 1 :'LOGOUT_CALLED',
5365 2 :'HTTPS_PROXY_AUTH_FAILED',
5366 3 :'SOCKS_PROXY_AUTH_FAILED',
5367 4 :'P2P_CONNECT_FAILED',
5368 5 :'SERVER_CONNECT_FAILED',
5369 6 :'SERVER_OVERLOADED',
5370 7 :'DB_IN_USE',
5371 8 :'INVALID_SKYPENAME',
5372 9 :'INVALID_EMAIL',
5373 10:'UNACCEPTABLE_PASSWORD',
5374 11:'SKYPENAME_TAKEN',
5375 12:'REJECTED_AS_UNDERAGE',
5376 13:'NO_SUCH_IDENTITY',
5377 14:'INCORRECT_PASSWORD',
5378 15:'TOO_MANY_LOGIN_ATTEMPTS',
5379 16:'PASSWORD_HAS_CHANGED',
5380 17:'PERIODIC_UIC_UPDATE_FAILED',
5381 18:'DB_DISK_FULL',
5382 19:'DB_IO_ERROR',
5383 20:'DB_CORRUPT',
5384 21:'DB_FAILURE',
5385 22:'INVALID_APP_ID',
5386 23:'APP_ID_FAILURE',
5387 24:'UNSUPPORTED_VERSION',
5388 'LOGOUT_CALLED' : 1,
5389 'HTTPS_PROXY_AUTH_FAILED' : 2,
5390 'SOCKS_PROXY_AUTH_FAILED' : 3,
5391 'P2P_CONNECT_FAILED' : 4,
5392 'SERVER_CONNECT_FAILED' : 5,
5393 'SERVER_OVERLOADED' : 6,
5394 'DB_IN_USE' : 7,
5395 'INVALID_SKYPENAME' : 8,
5396 'INVALID_EMAIL' : 9,
5397 'UNACCEPTABLE_PASSWORD' :10,
5398 'SKYPENAME_TAKEN' :11,
5399 'REJECTED_AS_UNDERAGE' :12,
5400 'NO_SUCH_IDENTITY' :13,
5401 'INCORRECT_PASSWORD' :14,
5402 'TOO_MANY_LOGIN_ATTEMPTS' :15,
5403 'PASSWORD_HAS_CHANGED' :16,
5404 'PERIODIC_UIC_UPDATE_FAILED' :17,
5405 'DB_DISK_FULL' :18,
5406 'DB_IO_ERROR' :19,
5407 'DB_CORRUPT' :20,
5408 'DB_FAILURE' :21,
5409 'INVALID_APP_ID' :22,
5410 'APP_ID_FAILURE' :23,
5411 'UNSUPPORTED_VERSION' :24
5412 }
5413 """
5414 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.
5415
5416 - LOGOUT_CALLED - manual logout (or unknown reason from previous session)
5417 - HTTPS_PROXY_AUTH_FAILED - sync errors at login/registration
5418 - SOCKS_PROXY_AUTH_FAILED - sync errors at login/registration
5419 - P2P_CONNECT_FAILED - sync errors at login/registration
5420 - SERVER_CONNECT_FAILED - sync errors at login/registration
5421 - SERVER_OVERLOADED - sync errors at login/registration
5422 - DB_IN_USE - sync errors at login/registration
5423 - INVALID_SKYPENAME - sync errors at registration
5424 - INVALID_EMAIL - sync errors at registration
5425 - UNACCEPTABLE_PASSWORD - sync errors at registration
5426 - SKYPENAME_TAKEN - sync errors at registration
5427 - REJECTED_AS_UNDERAGE - sync errors at registration
5428 - NO_SUCH_IDENTITY - sync errors at login
5429 - INCORRECT_PASSWORD - sync errors at login
5430 - TOO_MANY_LOGIN_ATTEMPTS - sync errors at login
5431 - PASSWORD_HAS_CHANGED - async errors (can happen anytime while logged in)
5432 - PERIODIC_UIC_UPDATE_FAILED - async errors (can happen anytime while logged in)
5433 - DB_DISK_FULL - async errors (can happen anytime while logged in)
5434 - DB_IO_ERROR - async errors (can happen anytime while logged in)
5435 - DB_CORRUPT - async errors (can happen anytime while logged in)
5436 - DB_FAILURE - deprecated (superceded by more detailed DB_* errors)
5437 - INVALID_APP_ID - platform sdk
5438 - APP_ID_FAILURE - platform sdk
5439 - UNSUPPORTED_VERSION - forced upgrade/discontinuation
5440 """
5441 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}
5442 """
5443 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.
5444 - PWD_CHANGING - consider displaying an "in progress" indicator and continue polling
5445 - PWD_OK - consider displaying an updated indicator and stop polling
5446 - PWD_OK_BUT_CHANGE_SUGGESTED - consider displaying an updated indicator, along with a recommendation to change again to a stronger password.
5447
5448 - PWD_OK - Password change succeeded.
5449
5450 - PWD_CHANGING - Password change is in progress.
5451
5452 - PWD_INVALID_OLD_PASSWORD - Old password was incorrect.
5453
5454 - PWD_SERVER_CONNECT_FAILED - Failed to verify password because of no connection to server.
5455
5456 - PWD_OK_BUT_CHANGE_SUGGESTED - Password was set but server didn't like it much.
5457
5458 - PWD_MUST_DIFFER_FROM_OLD - New password was exactly the same as old one.
5459
5460 - PWD_INVALID_NEW_PWD - The new password was unacceptable. (too short, too simple, etc.)
5461
5462 - PWD_MUST_LOG_IN_TO_CHANGE - Account was currently not logged in.
5463
5464 """
5465 COMMITSTATUS = {1:'COMMITTED', 'COMMITTED':1, 2:'COMMITTING_TO_SERVER', 'COMMITTING_TO_SERVER':2, 3:'COMMIT_FAILED', 'COMMIT_FAILED':3}
5466 """
5467 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.
5468
5469 - COMMITTED - No pending updates to the server.
5470
5471 - COMMITTING_TO_SERVER - Update to the server in progress.
5472
5473 - COMMIT_FAILED - Server update has failed.
5474
5475 """
5476 CHATPOLICY = {0:'EVERYONE_CAN_ADD', 'EVERYONE_CAN_ADD':0, 2:'BUDDIES_OR_AUTHORIZED_CAN_ADD', 'BUDDIES_OR_AUTHORIZED_CAN_ADD':2}
5477 """
5478 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
5479
5480 - EVERYONE_CAN_ADD - Unauthorized contacts can initiate text chat.
5481
5482 - BUDDIES_OR_AUTHORIZED_CAN_ADD - Only authorized contacts can initiate chat (default policy).
5483
5484 """
5485 SKYPECALLPOLICY = {0:'EVERYONE_CAN_CALL', 'EVERYONE_CAN_CALL':0, 2:'BUDDIES_OR_AUTHORIZED_CAN_CALL', 'BUDDIES_OR_AUTHORIZED_CAN_CALL':2}
5486 """
5487 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.
5488
5489 - EVERYONE_CAN_CALL - Skype calls accepted from unauthorized contacts.
5490 - BUDDIES_OR_AUTHORIZED_CAN_CALL - Skype calls not accepted from unauthorized contacts.
5491 """
5492 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}
5493 """
5494 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
5495
5496 - ALL_NUMBERS_CAN_CALL - All incoming PSTN calls are accepted.
5497 - DISCLOSED_NUMBERS_CAN_CALL - Only PSTN calls that report caller ID are accepted.
5498 - BUDDY_NUMBERS_CAN_CALL - Only calls from PSTN numbers found in local contact list are accepted.
5499 """
5500 AVATARPOLICY = {0:'BUDDIES_OR_AUTHORIZED_CAN_SEE', 'BUDDIES_OR_AUTHORIZED_CAN_SEE':0, 2:'EVERYONE_CAN_SEE', 'EVERYONE_CAN_SEE':2}
5501 """
5502 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.
5503 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.
5504
5505 - BUDDIES_OR_AUTHORIZED_CAN_SEE - Only authorized remote users can see this user's avatar image
5506 - 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.
5507 """
5508 BUDDYCOUNTPOLICY = {0:'DISCLOSE_TO_AUTHORIZED', 'DISCLOSE_TO_AUTHORIZED':0, 1:'DISCLOSE_TO_NOONE', 'DISCLOSE_TO_NOONE':1}
5509 """
5510 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:
5511 account->SetServersideIntProperty(Account::P_BUDDYCOUNT_POLICY, Account::DISCLOSE_TO_AUTHORIZED);
5512 account->SetServersideIntProperty(Account::P_BUDDYCOUNT_POLICY, Account::DISCLOSE_TO_NOONE );
5513
5514 - DISCLOSE_TO_AUTHORIZED - Authorized remote users can retrieve the number of this user's authorized contacts (Contact::P_NROF_AUTHED_BUDDIES)
5515 - 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
5516 """
5517 TIMEZONEPOLICY = {0:'TZ_AUTOMATIC', 'TZ_AUTOMATIC':0, 1:'TZ_MANUAL', 'TZ_MANUAL':1, 2:'TZ_UNDISCLOSED', 'TZ_UNDISCLOSED':2}
5518 """
5519 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.
5520 - TZ_AUTOMATIC - Account's timezone setting is determined automatically.
5521
5522 - TZ_MANUAL - Account's timezone setting is set manually.
5523
5524 - TZ_UNDISCLOSED - Remote users will have no idea what your local time is.
5525
5526 """
5527 WEBPRESENCEPOLICY = {0:'WEBPRESENCE_DISABLED', 'WEBPRESENCE_DISABLED':0, 1:'WEBPRESENCE_ENABLED', 'WEBPRESENCE_ENABLED':1}
5528 """
5529 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.
5530
5531 - WEBPRESENCE_DISABLED - Disable displaying online status on web for this account.
5532 - WEBPRESENCE_ENABLED - Enable displaying online status on web for this account.
5533 """
5534 PHONENUMBERSPOLICY = {0:'PHONENUMBERS_VISIBLE_FOR_BUDDIES', 'PHONENUMBERS_VISIBLE_FOR_BUDDIES':0, 1:'PHONENUMBERS_VISIBLE_FOR_EVERYONE', 'PHONENUMBERS_VISIBLE_FOR_EVERYONE':1}
5535 """
5536 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
5537
5538 - PHONENUMBERS_VISIBLE_FOR_BUDDIES - Only authorized contacts can see the phone numbers.
5539 - PHONENUMBERS_VISIBLE_FOR_EVERYONE - Everyone can see the phone numbers.
5540 """
5541 VOICEMAILPOLICY = {0:'VOICEMAIL_ENABLED', 'VOICEMAIL_ENABLED':0, 1:'VOICEMAIL_DISABLED', 'VOICEMAIL_DISABLED':1}
5542 """
5543 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.
5544
5545 - VOICEMAIL_ENABLED - Incoming voicemails enabled.
5546 - VOICEMAIL_DISABLED - Incoming voicemails disabled.
5547 """
5548 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}
5549 """
5550 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.
5551
5552 - NO_CAPABILITY - Capability is not supported by the currently logged in SkypeKit client.
5553 - CAPABILITY_EXISTS - Capability is supported by the currently logged in SkypeKit client.
5554
5555 - FIRST_EXPIRY_WARNING - Support for this capability ends this month (within 30 days)
5556
5557 - SECOND_EXPIRY_WARNING - Support for this capability ends this week (within 7 days)
5558
5559 - FINAL_EXPIRY_WARNING - Support for this capability ends today
5560
5561 """
5562
5568 status = property(_sk_get_status)
5569 propid2label[70] = "status"
5570 P_STATUS = 70
5576 pwdchangestatus = property(_sk_get_pwdchangestatus)
5577 propid2label[71] = "pwdchangestatus"
5578 P_PWDCHANGESTATUS = 71
5580 """
5581 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.
5582
5583 """
5584 return skypekit.enumof(Account.LOGOUTREASON, self._sk_property("ZGI]\005", 73, True))
5585 logoutreason = property(_sk_get_logoutreason)
5586 propid2label[73] = "logoutreason"
5587 P_LOGOUTREASON = 73
5593 commitstatus = property(_sk_get_commitstatus)
5594 propid2label[78] = "commitstatus"
5595 P_COMMITSTATUS = 78
5597 """
5598 suggested skypenames, semi-colon separated. present if logoutreason==SKYPENAME_TAKEN
5599 """
5600 return self._sk_property("ZGH]\005", 72, True)
5601 suggested_skypename = property(_sk_get_suggested_skypename)
5602 propid2label[72] = "suggested_skypename"
5603 P_SUGGESTED_SKYPENAME = 72
5605 """
5606 'EUR', 'USD', etc.
5607 """
5608 return self._sk_property("ZGJ]\005", 74, True)
5609 skypeout_balance_currency = property(_sk_get_skypeout_balance_currency)
5610 propid2label[74] = "skypeout_balance_currency"
5611 P_SKYPEOUT_BALANCE_CURRENCY = 74
5613 """
5614 balance in 'cents'
5615 """
5616 return self._sk_property("ZGK]\005", 75, True)
5617 skypeout_balance = property(_sk_get_skypeout_balance)
5618 propid2label[75] = "skypeout_balance"
5619 P_SKYPEOUT_BALANCE = 75
5621 """
5622 decimal points in ACCOUNT_SKYPEOUT_BALANCE
5623 """
5624 return self._sk_property("ZG\244\006]\005", 804, True)
5625 skypeout_precision = property(_sk_get_skypeout_precision)
5626 propid2label[804] = "skypeout_precision"
5627 P_SKYPEOUT_PRECISION = 804
5629 """
5630 space-separated list of skypein numbers
5631 """
5632 return self._sk_property("ZGL]\005", 76, True)
5633 skypein_numbers = property(_sk_get_skypein_numbers)
5634 propid2label[76] = "skypein_numbers"
5635 P_SKYPEIN_NUMBERS = 76
5641 cblsyncstatus = property(_sk_get_cblsyncstatus)
5642 propid2label[79] = "cblsyncstatus"
5643 P_CBLSYNCSTATUS = 79
5645 """
5646 space-separated list of 'begSecond,endSecond,identity' tokens
5647 """
5648 return self._sk_property("ZGM]\005", 77, True)
5649 offline_callforward = property(_sk_get_offline_callforward)
5650 propid2label[77] = "offline_callforward"
5651 P_OFFLINE_CALLFORWARD = 77
5653 """
5654 Server-side account property, use SetServerside*Property() to set
5655 """
5656 return skypekit.enumof(Account.CHATPOLICY, self._sk_property("ZG\240\001]\005", 160, True))
5657 chat_policy = property(_sk_get_chat_policy)
5658 propid2label[160] = "chat_policy"
5659 P_CHAT_POLICY = 160
5661 """
5662 Server-side account property, use SetServerside*Property() to set
5663 """
5664 return skypekit.enumof(Account.SKYPECALLPOLICY, self._sk_property("ZG\241\001]\005", 161, True))
5665 skype_call_policy = property(_sk_get_skype_call_policy)
5666 propid2label[161] = "skype_call_policy"
5667 P_SKYPE_CALL_POLICY = 161
5669 """
5670 Server-side account property, use SetServerside*Property() to set
5671 """
5672 return skypekit.enumof(Account.PSTNCALLPOLICY, self._sk_property("ZG\242\001]\005", 162, True))
5673 pstn_call_policy = property(_sk_get_pstn_call_policy)
5674 propid2label[162] = "pstn_call_policy"
5675 P_PSTN_CALL_POLICY = 162
5677 """
5678 Server-side account property, use SetServerside*Property() to set
5679 """
5680 return skypekit.enumof(Account.AVATARPOLICY, self._sk_property("ZG\243\001]\005", 163, True))
5681 avatar_policy = property(_sk_get_avatar_policy)
5682 propid2label[163] = "avatar_policy"
5683 P_AVATAR_POLICY = 163
5685 """
5686 Server-side account property, use SetServerside*Property() to set
5687 """
5688 return skypekit.enumof(Account.BUDDYCOUNTPOLICY, self._sk_property("ZG\244\001]\005", 164, True))
5689 buddycount_policy = property(_sk_get_buddycount_policy)
5690 propid2label[164] = "buddycount_policy"
5691 P_BUDDYCOUNT_POLICY = 164
5693 """
5694 Server-side account property, use SetServerside*Property() to set
5695 """
5696 return skypekit.enumof(Account.TIMEZONEPOLICY, self._sk_property("ZG\245\001]\005", 165, True))
5697 timezone_policy = property(_sk_get_timezone_policy)
5698 propid2label[165] = "timezone_policy"
5699 P_TIMEZONE_POLICY = 165
5701 """
5702 Server-side account property, use SetServerside*Property() to set
5703 """
5704 return skypekit.enumof(Account.WEBPRESENCEPOLICY, self._sk_property("ZG\246\001]\005", 166, True))
5705 webpresence_policy = property(_sk_get_webpresence_policy)
5706 propid2label[166] = "webpresence_policy"
5707 P_WEBPRESENCE_POLICY = 166
5713 phonenumbers_policy = property(_sk_get_phonenumbers_policy)
5714 propid2label[168] = "phonenumbers_policy"
5715 P_PHONENUMBERS_POLICY = 168
5717 """
5718 Server-side account property, use SetServerside*Property() to set
5719 """
5720 return skypekit.enumof(Account.VOICEMAILPOLICY, self._sk_property("ZG\251\001]\005", 169, True))
5721 voicemail_policy = property(_sk_get_voicemail_policy)
5722 propid2label[169] = "voicemail_policy"
5723 P_VOICEMAIL_POLICY = 169
5725 """
5726 Alerts: opted out partner id's, space separated
5727 """
5728 return self._sk_property("ZG\205\006]\005", 773, True)
5729 partner_optedout = property(_sk_get_partner_optedout)
5730 propid2label[773] = "partner_optedout"
5731 P_PARTNER_OPTEDOUT = 773
5733 """
5734 service information if the user is a paid service provider
5735 """
5736 return self._sk_property("ZG\240\006]\005", 800, True)
5737 service_provider_info = property(_sk_get_service_provider_info)
5738 propid2label[800] = "service_provider_info"
5739 P_SERVICE_PROVIDER_INFO = 800
5741 """
5742 NB! Unlike your common UNIX timestamps, the registration_timestamp is special, as it counts MINUTES rather than seconds, from Epoch (January 1, 1970)
5743
5744 """
5745 return self._sk_property("ZG\241\006]\005", 801, True)
5746 registration_timestamp = property(_sk_get_registration_timestamp)
5747 propid2label[801] = "registration_timestamp"
5748 P_REGISTRATION_TIMESTAMP = 801
5750 """
5751 number of times this user is logged in from other computers
5752 """
5753 return self._sk_property("ZG\242\006]\005", 802, True)
5754 nr_of_other_instances = property(_sk_get_nr_of_other_instances)
5755 propid2label[802] = "nr_of_other_instances"
5756 P_NR_OF_OTHER_INSTANCES = 802
5758 return self._sk_property("ZG\004]\005", 4, True)
5759 skypename = property(_sk_get_skypename)
5760 propid2label[4] = "skypename"
5761 P_SKYPENAME = 4
5763 return self._sk_property("ZG\005]\005", 5, True)
5764 fullname = property(_sk_get_fullname)
5765 propid2label[5] = "fullname"
5766 P_FULLNAME = 5
5768 """
5769 YYYYMMDD
5770 """
5771 return self._sk_property("ZG\007]\005", 7, True)
5772 birthday = property(_sk_get_birthday)
5773 propid2label[7] = "birthday"
5774 P_BIRTHDAY = 7
5776 """
5777 1-male, 2-female
5778 """
5779 return self._sk_property("ZG\010]\005", 8, True)
5780 gender = property(_sk_get_gender)
5781 propid2label[8] = "gender"
5782 P_GENDER = 8
5784 """
5785 ISO language codes, space-separated
5786 """
5787 return self._sk_property("ZG\011]\005", 9, True)
5788 languages = property(_sk_get_languages)
5789 propid2label[9] = "languages"
5790 P_LANGUAGES = 9
5792 """
5793 ISO country code
5794 """
5795 return self._sk_property("ZG\012]\005", 10, True)
5796 country = property(_sk_get_country)
5797 propid2label[10] = "country"
5798 P_COUNTRY = 10
5800 return self._sk_property("ZG\013]\005", 11, True)
5801 province = property(_sk_get_province)
5802 propid2label[11] = "province"
5803 P_PROVINCE = 11
5805 return self._sk_property("ZG\014]\005", 12, True)
5806 city = property(_sk_get_city)
5807 propid2label[12] = "city"
5808 P_CITY = 12
5810 """
5811 NB! string not integer
5812 """
5813 return self._sk_property("ZG\015]\005", 13, True)
5814 phone_home = property(_sk_get_phone_home)
5815 propid2label[13] = "phone_home"
5816 P_PHONE_HOME = 13
5818 return self._sk_property("ZG\016]\005", 14, True)
5819 phone_office = property(_sk_get_phone_office)
5820 propid2label[14] = "phone_office"
5821 P_PHONE_OFFICE = 14
5823 return self._sk_property("ZG\017]\005", 15, True)
5824 phone_mobile = property(_sk_get_phone_mobile)
5825 propid2label[15] = "phone_mobile"
5826 P_PHONE_MOBILE = 15
5828 """
5829 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.
5830
5831 """
5832 return self._sk_property("ZG\020]\005", 16, True)
5833 emails = property(_sk_get_emails)
5834 propid2label[16] = "emails"
5835 P_EMAILS = 16
5836 - def _sk_get_homepage(self):
5837 return self._sk_property("ZG\021]\005", 17, True)
5838 homepage = property(_sk_get_homepage)
5839 propid2label[17] = "homepage"
5840 P_HOMEPAGE = 17
5842 """
5843 arbitrary introductory text
5844 """
5845 return self._sk_property("ZG\022]\005", 18, True)
5846 about = property(_sk_get_about)
5847 propid2label[18] = "about"
5848 P_ABOUT = 18
5850 """
5851 UNIX timestamp of last profile change
5852 """
5853 return self._sk_property("ZG\023]\005", 19, True)
5854 profile_timestamp = property(_sk_get_profile_timestamp)
5855 propid2label[19] = "profile_timestamp"
5856 P_PROFILE_TIMESTAMP = 19
5858 """
5859 Personal mood text (visible to authorised users only). Max length 300 bytes.
5860
5861 """
5862 return self._sk_property("ZG\032]\005", 26, True)
5863 mood_text = property(_sk_get_mood_text)
5864 propid2label[26] = "mood_text"
5865 P_MOOD_TEXT = 26
5867 """
5868 24*3600+diff_to_UTC_in_seconds. nb! changes with DST
5869 """
5870 return self._sk_property("ZG\033]\005", 27, True)
5871 timezone = property(_sk_get_timezone)
5872 propid2label[27] = "timezone"
5873 P_TIMEZONE = 27
5875 """
5876 Count of this user's authorized contacts.
5877
5878 """
5879 return self._sk_property("ZG\034]\005", 28, True)
5880 nrof_authed_buddies = property(_sk_get_nrof_authed_buddies)
5881 propid2label[28] = "nrof_authed_buddies"
5882 P_NROF_AUTHED_BUDDIES = 28
5888 availability = property(_sk_get_availability)
5889 propid2label[34] = "availability"
5890 P_AVAILABILITY = 34
5892 """
5893 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.
5894
5895 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.
5896
5897 In any case, the avatar picture should be pre-validated with the Skype::ValidateAvatar method.
5898
5899 """
5900 return self._sk_property("ZG%]\005", 37, True)
5901 avatar_image = property(_sk_get_avatar_image)
5902 propid2label[37] = "avatar_image"
5903 P_AVATAR_IMAGE = 37
5905 """
5906 UNIX timestamp of when current avatar was set
5907 """
5908 return self._sk_property("ZG\266\001]\005", 182, True)
5909 avatar_timestamp = property(_sk_get_avatar_timestamp)
5910 propid2label[182] = "avatar_timestamp"
5911 P_AVATAR_TIMESTAMP = 182
5913 """
5914 UNIX timestamp of when current mood was set
5915 """
5916 return self._sk_property("ZG\267\001]\005", 183, True)
5917 mood_timestamp = property(_sk_get_mood_timestamp)
5918 propid2label[183] = "mood_timestamp"
5919 P_MOOD_TIMESTAMP = 183
5921 """
5922 XML version of CONTACT_MOOD_TEXT. Max length 1000 bytes.
5923
5924 """
5925 return self._sk_property("ZG\315\001]\005", 205, True)
5926 rich_mood_text = property(_sk_get_rich_mood_text)
5927 propid2label[205] = "rich_mood_text"
5928 P_RICH_MOOD_TEXT = 205
5929
5931 """
5932 No description available.
5933
5934 B{Return values:}
5935 - B{status} - Current value of this account's P_STATUS property
5936 - B{progress} - This argument returns 0.
5937
5938 """
5939 l_request = skypekit.XCallRequest("ZR\005\001", 5, 1)
5940 l_request.add_parm('O', 0, self)
5941 l_response = self.transport.xcall(l_request)
5942 l_result = (skypekit.enumof(Account.STATUS, l_response.get(1))),
5943 l_result += (l_response.get(2, 0)),
5944 return l_result
5945 - def Login(
5946 self,
5947 set_availability_to = "UNKNOWN"
5948 ):
5949 """
5950 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.
5951
5952 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
5953
5954
5955 B{Arguments:}
5956 - B{set_availability_to} - force this account's initial online status to the specified Contact::AVAILABILITY value.
5957 """
5958 l_request = skypekit.XCallRequest("ZR\005\005", 5, 5)
5959 l_request.add_parm('O', 0, self)
5960 l_request.add_parm('e', 1, Contact.AVAILABILITY[set_availability_to])
5961 self.transport.xcall(l_request)
5962 - def LoginWithPassword(
5963 self,
5964 password,
5965 save_pwd = False,
5966 save_data_locally = True
5967 ):
5968 """
5969
5970 Login in an account by specifying its password. To retrieve an account instance for login, invoke Skype::GetAccount.
5971
5972
5973 B{Arguments:}
5974 - B{password} - Password string (plaintext) for this account, which should be pre-validated (Skype::ValidatePassword)
5975
5976 - B{save_pwd} -
5977 - true: Saves the password, ensuring that auto-login is enabled.
5978 - 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).
5979 - B{save_data_locally} - For internal use only.
5980 """
5981 l_request = skypekit.XCallRequest("ZR\005\006", 5, 6)
5982 l_request.add_parm('O', 0, self)
5983 l_request.add_parm('S', 1, password)
5984 l_request.add_parm('b', 2, save_pwd)
5985 l_request.add_parm('b', 3, save_data_locally)
5986 self.transport.xcall(l_request)
5987 - def Register(
5988 self,
5989 password,
5990 save_pwd = False,
5991 save_data_locally = True,
5992 email = "",
5993 allow_spam = False
5994 ):
5995 """
5996 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.
5997 NB! You should pre-validate your P_SKYPENAME value and any email string (Skype::ValidateProfileString) prior to invoking this method.
5998
5999
6000 B{Arguments:}
6001 - B{password} - Password string (plaintext) for this account, which should be pre-validated (Skype::ValidatePassword)
6002 - B{save_pwd} -
6003 - true: Saves the password and enables auto-login.
6004 - false (default): Does not save the password, and the user needs to be prompted for password on the next login attempt.
6005 - B{save_data_locally} - For internal use only.
6006 - B{email} - An email address for retrieving lost passwords and receiving news and information from Skype.
6007 - B{allow_spam} - enable/disable news and information from Skype being sent to account's e-mail.
6008 """
6009 l_request = skypekit.XCallRequest("ZR\005\007", 5, 7)
6010 l_request.add_parm('O', 0, self)
6011 l_request.add_parm('S', 1, password)
6012 l_request.add_parm('b', 2, save_pwd)
6013 l_request.add_parm('b', 3, save_data_locally)
6014 l_request.add_parm('S', 4, email)
6015 l_request.add_parm('b', 5, allow_spam)
6016 self.transport.xcall(l_request)
6017 - def Logout(
6018 self,
6019 clear_saved_pwd = False
6020 ):
6021 """
6022 Logs out current account. Note that calling this on client application exit is optional.
6023
6024
6025 B{Arguments:}
6026 - B{clear_saved_pwd} -
6027 - true: Clears any saved password use with auto-login and so disables auto-login until you explicitly invoke Account::SetPasswordSaved(true).
6028 - false (default): Does not clear any saved password and so does not affect existing auto-login behavior.
6029 """
6030 l_request = skypekit.XCallRequest("ZR\005\010", 5, 8)
6031 l_request.add_parm('O', 0, self)
6032 l_request.add_parm('b', 1, clear_saved_pwd)
6033 self.transport.xcall(l_request)
6034 - def ChangePassword(
6035 self,
6036 old_password,
6037 new_password,
6038 save_pwd = False
6039 ):
6040 """
6041 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.
6042
6043
6044 B{Arguments:}
6045 - B{old_password} - "Current password string (plaintext) for this account
6046 - B{new_password} - New password string (plaintext) for this account
6047 - B{save_pwd} -
6048 - true: Saves the new password and enables auto-login.
6049 - false (default): Clears any existing saved password and so the user cannot effect auto-login until they explicitly invoke Account::SetPasswordSaved(true)
6050 """
6051 l_request = skypekit.XCallRequest("ZR\005\013", 5, 11)
6052 l_request.add_parm('O', 0, self)
6053 l_request.add_parm('S', 1, old_password)
6054 l_request.add_parm('S', 2, new_password)
6055 l_request.add_parm('b', 3, save_pwd)
6056 self.transport.xcall(l_request)
6061 """
6062 save or clear credentials for auto-login whilst already logged in
6063
6064 B{Arguments:}
6065 - B{save_pwd}
6066 """
6067 l_request = skypekit.XCallRequest("ZR\005\031", 5, 25)
6068 l_request.add_parm('O', 0, self)
6069 l_request.add_parm('b', 1, save_pwd)
6070 self.transport.xcall(l_request)
6076 """
6077 Setter for integer (and enum) server-side properties. For a list of writeable server-side properties, see the detailed description of the Account class.
6078
6079
6080 B{Arguments:}
6081 - B{prop_key}
6082 - B{value}
6083 """
6084 l_request = skypekit.XCallRequest("ZR\005\014", 5, 12)
6085 l_request.add_parm('O', 0, self)
6086 l_request.add_parm('e', 1, prop_key)
6087 l_request.add_parm('u', 2, value)
6088 self.transport.xcall(l_request)
6094 """
6095 Setter for String server-side properties. For a list of writeable server-side properties, see the detailed description of the Account class.
6096
6097
6098 B{Arguments:}
6099 - B{prop_key}
6100 - B{value}
6101 """
6102 l_request = skypekit.XCallRequest("ZR\005\015", 5, 13)
6103 l_request.add_parm('O', 0, self)
6104 l_request.add_parm('e', 1, prop_key)
6105 l_request.add_parm('S', 2, value)
6106 self.transport.xcall(l_request)
6108 """
6109 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.
6110
6111 """
6112 l_request = skypekit.XCallRequest("ZR\005\017", 5, 15)
6113 l_request.add_parm('O', 0, self)
6114 self.transport.xcall(l_request)
6120 """
6121 Setter for integer properties. For a list of writeable account profile properties, see the detailed description of the Account class.
6122
6123
6124 B{Arguments:}
6125 - B{prop_key}
6126 - B{value}
6127 """
6128 l_request = skypekit.XCallRequest("ZR\005\020", 5, 16)
6129 l_request.add_parm('O', 0, self)
6130 l_request.add_parm('e', 1, prop_key)
6131 l_request.add_parm('u', 2, value)
6132 self.transport.xcall(l_request)
6138 """
6139 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.
6140
6141
6142 B{Arguments:}
6143 - B{prop_key}
6144 - B{value}
6145 """
6146 l_request = skypekit.XCallRequest("ZR\005\021", 5, 17)
6147 l_request.add_parm('O', 0, self)
6148 l_request.add_parm('e', 1, prop_key)
6149 l_request.add_parm('S', 2, value)
6150 self.transport.xcall(l_request)
6156 """
6157 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.
6158
6159
6160 B{Arguments:}
6161 - B{prop_key}
6162 - B{value}
6163 """
6164 l_request = skypekit.XCallRequest("ZR\005\022", 5, 18)
6165 l_request.add_parm('O', 0, self)
6166 l_request.add_parm('e', 1, prop_key)
6167 l_request.add_parm('B', 2, value)
6168 self.transport.xcall(l_request)
6173 """
6174 Sets online status of the currently logged in account to one of the values from Contact class AVAILABILITY enumerator.
6175
6176
6177 B{Arguments:}
6178 - B{availability} - only subset of all contact availabilities allowed
6179 """
6180 l_request = skypekit.XCallRequest("ZR\005\023", 5, 19)
6181 l_request.add_parm('O', 0, self)
6182 l_request.add_parm('e', 1, Contact.AVAILABILITY[availability])
6183 self.transport.xcall(l_request)
6188 """
6189 Transitions the availability of this account's associated user, who is assumed to be logged in.
6190
6191
6192 B{Arguments:}
6193 - B{standby} -
6194 - true: Saves the user's current availability, then sets it to CONTACT::AVAILABILITY.OFFLINE
6195 - false: Reconnects the user and restores their previous availability
6196 """
6197 l_request = skypekit.XCallRequest("ZR\005\012", 5, 10)
6198 l_request.add_parm('O', 0, self)
6199 l_request.add_parm('b', 1, standby)
6200 self.transport.xcall(l_request)
6205 """
6206 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.
6207
6208
6209 B{Arguments:}
6210 - B{capability}
6211
6212 B{Return values:}
6213 - B{status}
6214 - B{expiry_timestamp}
6215 """
6216 l_request = skypekit.XCallRequest("ZR\005\025", 5, 21)
6217 l_request.add_parm('O', 0, self)
6218 l_request.add_parm('e', 1, Contact.CAPABILITY[capability])
6219 l_response = self.transport.xcall(l_request)
6220 l_result = (skypekit.enumof(Account.CAPABILITYSTATUS, l_response.get(1))),
6221 l_result += (l_response.get(2, 0)),
6222 return l_result
6224 """
6225 Response is empty when called with an inactive or invalid account
6226
6227 B{Return values:}
6228 - B{skypename_hash}
6229 """
6230 l_request = skypekit.XCallRequest("ZR\005\026", 5, 22)
6231 l_request.add_parm('O', 0, self)
6232 l_response = self.transport.xcall(l_request)
6233 l_result = l_response.get(1, '')
6234 return l_result
6236 """
6237 returns verified-by-Skype e-mail for this account if exists and verifiable
6238
6239 B{Return values:}
6240 - B{email}
6241 """
6242 l_request = skypekit.XCallRequest("ZR\005\002", 5, 2)
6243 l_request.add_parm('O', 0, self)
6244 l_response = self.transport.xcall(l_request)
6245 l_result = l_response.get(1, '')
6246 return l_result
6248 """
6249 returns verified-by-Skype company for this account if exists and verifiable
6250
6251 B{Return values:}
6252 - B{company}
6253 """
6254 l_request = skypekit.XCallRequest("ZR\005\003", 5, 3)
6255 l_request.add_parm('O', 0, self)
6256 l_response = self.transport.xcall(l_request)
6257 l_result = l_response.get(1, '')
6258 return l_result
6260 """
6261 Deletes all account data stored locally. Does not remove any account data from the server!
6262
6263 """
6264 l_request = skypekit.XCallRequest("ZR\005\030", 5, 24)
6265 l_request.add_parm('O', 0, self)
6266 self.transport.xcall(l_request)
6268 """ get multiple properties from self """
6269 self.multiget("ZG\004,\005,\032,\020,\015,\016,\017,\007,\010,\011,\012,\013,\014,\021,\022,\033]\005")
6270 module_id2classes[5] = Account
6272 """
6273 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.
6274
6275 """
6276 module_id = 0
6277 event_handlers = {}
6279 self.object_id = 0
6280 self.transport = transport
6281 transport.set_root(self)
6282 ''' Stop background operations (background threads). Might take some time.
6283 '''
6285 self.transport.stop()
6287 warnings.warn("use stop() instead of Stop()", DeprecationWarning, stacklevel=2)
6288 self.stop()
6290 """
6291 No description available.
6292
6293 B{Return values:}
6294 - B{started}
6295 """
6296 l_request = skypekit.XCallRequest("ZR\000\221\001", 0, 145)
6297 l_response = self.transport.xcall(l_request)
6298 l_result = l_response.get(1, False)
6299 return l_result
6300 SETUPKEY_DB_STORAGE_QUOTA_KB = "*Lib/DbManager/StorageQuotaKb"
6302 """
6303 returns the runtime version as a string
6304
6305 B{Return values:}
6306 - B{version}
6307 """
6308 l_request = skypekit.XCallRequest("ZR\000\034", 0, 28)
6309 l_response = self.transport.xcall(l_request)
6310 l_result = l_response.get(1, '')
6311 return l_result
6313 """
6314 Returns the time as used in SkypeKit, in the form of a Unix timestamp (number of seconds since 1.1.1970). If the local system time is incorrect my more than one year, the time provided by the Skype network will be provided, which is correct. Therefore this function can be used to adjust the system time if set incorrectly (e.g. if set to 1.1.1970).
6315
6316 B{Return values:}
6317 - B{timestamp}
6318 """
6319 l_request = skypekit.XCallRequest("ZR\000\206\001", 0, 134)
6320 l_response = self.transport.xcall(l_request)
6321 l_result = l_response.get(1, 0)
6322 return l_result
6378 event_handlers[1] = "_sk_on_new_custom_contact_group"
6447 IDENTITYTYPE = {
6448 0:'UNRECOGNIZED',
6449 1:'SKYPE',
6450 2:'SKYPE_MYSELF',
6451 3:'SKYPE_UNDISCLOSED',
6452 4:'PSTN',
6453 5:'PSTN_EMERGENCY',
6454 6:'PSTN_FREE',
6455 7:'PSTN_UNDISCLOSED',
6456 8:'CONFERENCE',
6457 9:'EXTERNAL',
6458 'UNRECOGNIZED' :0,
6459 'SKYPE' :1,
6460 'SKYPE_MYSELF' :2,
6461 'SKYPE_UNDISCLOSED' :3,
6462 'PSTN' :4,
6463 'PSTN_EMERGENCY' :5,
6464 'PSTN_FREE' :6,
6465 'PSTN_UNDISCLOSED' :7,
6466 'CONFERENCE' :8,
6467 'EXTERNAL' :9
6468 }
6469 """
6470 - UNRECOGNIZED
6471 - SKYPE
6472 - SKYPE_MYSELF
6473 - SKYPE_UNDISCLOSED
6474 - PSTN
6475 - PSTN_EMERGENCY
6476 - PSTN_FREE
6477 - PSTN_UNDISCLOSED
6478 - CONFERENCE
6479 - EXTERNAL
6480 """
6485 """
6486 This takes skypename or a phone number string as argument and returns corresponding identity type (SKYPE, SKYPE_MYSELF, PSTN, etc.)
6487
6488
6489 B{Arguments:}
6490 - B{identity}
6491
6492 B{Return values:}
6493 - B{type_}
6494 """
6495 l_request = skypekit.XCallRequest("ZR\000\023", 0, 19)
6496 l_request.add_parm('S', 1, identity)
6497 l_response = self.transport.xcall(l_request)
6498 l_result = skypekit.enumof(Skype.IDENTITYTYPE, l_response.get(1))
6499 return l_result
6500 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}
6501 """
6502 - IDENTITY_OK
6503 - IDENTITY_EMPTY
6504 - IDENTITY_TOO_LONG
6505 - IDENTITY_CONTAINS_INVALID_CHAR
6506 - PSTN_NUMBER_TOO_SHORT
6507 - PSTN_NUMBER_HAS_INVALID_PREFIX - identity looks like pstn number but does not start with +/00/011
6508 - SKYPENAME_STARTS_WITH_NONALPHA
6509 - SKYPENAME_SHORTER_THAN_6_CHARS - returned only when isNewSkypeName
6510 """
6516 """
6517 compares two identities to see if they match
6518
6519 B{Arguments:}
6520 - B{identity_a}
6521 - B{identity_b}
6522
6523 B{Return values:}
6524 - B{result}
6525 """
6526 l_request = skypekit.XCallRequest("ZR\000X", 0, 88)
6527 l_request.add_parm('S', 1, identity_a)
6528 l_request.add_parm('S', 2, identity_b)
6529 l_response = self.transport.xcall(l_request)
6530 l_result = l_response.get(1, False)
6531 return l_result
6532 - def NormalizeIdentity(
6533 self,
6534 original,
6535 is_new_skype_name = False
6536 ):
6537 """
6538 This method is deprecated. Use ValidateProfileString method instead.
6539
6540
6541 B{Arguments:}
6542 - B{original}
6543 - B{is_new_skype_name}
6544
6545 B{Return values:}
6546 - B{result}
6547 - B{normalized}
6548 """
6549 l_request = skypekit.XCallRequest("ZR\000\011", 0, 9)
6550 l_request.add_parm('S', 1, original)
6551 l_request.add_parm('b', 2, is_new_skype_name)
6552 l_response = self.transport.xcall(l_request)
6553 l_result = (skypekit.enumof(Skype.NORMALIZERESULT, l_response.get(1))),
6554 l_result += (l_response.get(2, '')),
6555 return l_result
6561 """
6562 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.
6563
6564
6565 B{Arguments:}
6566 - B{original}
6567 - B{country_prefix}
6568
6569 B{Return values:}
6570 - B{result}
6571 - B{normalized}
6572 """
6573 l_request = skypekit.XCallRequest("ZR\000\315\001", 0, 205)
6574 l_request.add_parm('S', 1, original)
6575 l_request.add_parm('u', 2, country_prefix)
6576 l_response = self.transport.xcall(l_request)
6577 l_result = (skypekit.enumof(Skype.NORMALIZERESULT, l_response.get(1))),
6578 l_result += (l_response.get(2, '')),
6579 return l_result
6591 event_handlers[2] = "_sk_on_contact_online_appearance"
6607 event_handlers[3] = "_sk_on_contact_gone_offline"
6613 """
6614 list of (min,max) pairs
6615
6616 B{Return values:}
6617 - B{range_list}
6618 """
6619 l_request = skypekit.XCallRequest("ZR\000M", 0, 77)
6620 l_response = self.transport.xcall(l_request)
6621 l_result = l_response.get(1, [])
6622 return l_result
6658 """
6659 searches skypenames and aliases. returns 0 or 1 results. false if not valid
6660
6661 B{Arguments:}
6662 - B{identity}
6663
6664 B{Return values:}
6665 - B{search}
6666 """
6667 l_request = skypekit.XCallRequest("ZR\000\014", 0, 12)
6668 l_request.add_parm('S', 1, identity)
6669 l_response = self.transport.xcall(l_request)
6670 l_result = module_id2classes[1](l_response.get(1), self.transport)
6671 return l_result
6672 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}
6673 """
6674 sync failure reasons when starting a transfer
6675 - TRANSFER_OPEN_SUCCESS
6676 - TRANSFER_BAD_FILENAME
6677 - TRANSFER_OPEN_FAILED
6678 - TRANSFER_TOO_MANY_PARALLEL
6679 """
6680 LEAVE_REASON = {
6681 0 :'LEAVE_REASON_NONE',
6682 2 :'RETIRED_USER_INCAPABLE',
6683 3 :'RETIRED_ADDER_MUST_BE_FRIEND',
6684 4 :'RETIRED_ADDER_MUST_BE_AUTHORIZED',
6685 5 :'RETIRED_DECLINE_ADD',
6686 6 :'RETIRED_UNSUBSCRIBE',
6687 100:'LIVE_NO_ANSWER',
6688 101:'LIVE_MANUAL',
6689 102:'LIVE_BUSY',
6690 103:'LIVE_CONNECTION_DROPPED',
6691 104:'LIVE_NO_SKYPEOUT_SUBSCRIPTION',
6692 105:'LIVE_INSUFFICIENT_FUNDS',
6693 106:'LIVE_INTERNET_CONNECTION_LOST',
6694 107:'LIVE_SKYPEOUT_ACCOUNT_BLOCKED',
6695 108:'LIVE_PSTN_COULD_NOT_CONNECT_TO_SKYPE_PROXY',
6696 109:'LIVE_PSTN_INVALID_NUMBER',
6697 110:'LIVE_PSTN_NUMBER_FORBIDDEN',
6698 111:'LIVE_PSTN_CALL_TIMED_OUT',
6699 112:'LIVE_PSTN_BUSY',
6700 113:'LIVE_PSTN_CALL_TERMINATED',
6701 114:'LIVE_PSTN_NETWORK_ERROR',
6702 115:'LIVE_NUMBER_UNAVAILABLE',
6703 116:'LIVE_PSTN_CALL_REJECTED',
6704 117:'LIVE_PSTN_MISC_ERROR',
6705 118:'LIVE_INTERNAL_ERROR',
6706 119:'LIVE_UNABLE_TO_CONNECT',
6707 120:'LIVE_RECORDING_FAILED',
6708 121:'LIVE_PLAYBACK_ERROR',
6709 122:'LIVE_LEGACY_ERROR',
6710 123:'LIVE_BLOCKED_BY_PRIVACY_SETTINGS',
6711 124:'LIVE_ERROR',
6712 125:'LIVE_TRANSFER_FAILED',
6713 126:'LIVE_TRANSFER_INSUFFICIENT_FUNDS',
6714 127:'LIVE_BLOCKED_BY_US',
6715 128:'LIVE_EMERGENCY_CALL_DENIED',
6716 'LEAVE_REASON_NONE' : 0,
6717 'RETIRED_USER_INCAPABLE' : 2,
6718 'RETIRED_ADDER_MUST_BE_FRIEND' : 3,
6719 'RETIRED_ADDER_MUST_BE_AUTHORIZED' : 4,
6720 'RETIRED_DECLINE_ADD' : 5,
6721 'RETIRED_UNSUBSCRIBE' : 6,
6722 'LIVE_NO_ANSWER' :100,
6723 'LIVE_MANUAL' :101,
6724 'LIVE_BUSY' :102,
6725 'LIVE_CONNECTION_DROPPED' :103,
6726 'LIVE_NO_SKYPEOUT_SUBSCRIPTION' :104,
6727 'LIVE_INSUFFICIENT_FUNDS' :105,
6728 'LIVE_INTERNET_CONNECTION_LOST' :106,
6729 'LIVE_SKYPEOUT_ACCOUNT_BLOCKED' :107,
6730 'LIVE_PSTN_COULD_NOT_CONNECT_TO_SKYPE_PROXY' :108,
6731 'LIVE_PSTN_INVALID_NUMBER' :109,
6732 'LIVE_PSTN_NUMBER_FORBIDDEN' :110,
6733 'LIVE_PSTN_CALL_TIMED_OUT' :111,
6734 'LIVE_PSTN_BUSY' :112,
6735 'LIVE_PSTN_CALL_TERMINATED' :113,
6736 'LIVE_PSTN_NETWORK_ERROR' :114,
6737 'LIVE_NUMBER_UNAVAILABLE' :115,
6738 'LIVE_PSTN_CALL_REJECTED' :116,
6739 'LIVE_PSTN_MISC_ERROR' :117,
6740 'LIVE_INTERNAL_ERROR' :118,
6741 'LIVE_UNABLE_TO_CONNECT' :119,
6742 'LIVE_RECORDING_FAILED' :120,
6743 'LIVE_PLAYBACK_ERROR' :121,
6744 'LIVE_LEGACY_ERROR' :122,
6745 'LIVE_BLOCKED_BY_PRIVACY_SETTINGS' :123,
6746 'LIVE_ERROR' :124,
6747 'LIVE_TRANSFER_FAILED' :125,
6748 'LIVE_TRANSFER_INSUFFICIENT_FUNDS' :126,
6749 'LIVE_BLOCKED_BY_US' :127,
6750 'LIVE_EMERGENCY_CALL_DENIED' :128
6751 }
6752 """
6753 - LEAVE_REASON_NONE
6754 - RETIRED_USER_INCAPABLE - automatic, user cannot chat (only some older versions might set this)
6755 - RETIRED_ADDER_MUST_BE_FRIEND - automatic
6756 - RETIRED_ADDER_MUST_BE_AUTHORIZED - automatic
6757 - RETIRED_DECLINE_ADD - manual reason (afaik no UI uses this)
6758 - RETIRED_UNSUBSCRIBE - manual reason
6759 - LIVE_NO_ANSWER
6760 - LIVE_MANUAL - live: User hung up
6761 - LIVE_BUSY
6762 - LIVE_CONNECTION_DROPPED
6763 - LIVE_NO_SKYPEOUT_SUBSCRIPTION
6764 - LIVE_INSUFFICIENT_FUNDS
6765 - LIVE_INTERNET_CONNECTION_LOST
6766 - LIVE_SKYPEOUT_ACCOUNT_BLOCKED
6767 - LIVE_PSTN_COULD_NOT_CONNECT_TO_SKYPE_PROXY
6768 - LIVE_PSTN_INVALID_NUMBER
6769 - LIVE_PSTN_NUMBER_FORBIDDEN
6770 - LIVE_PSTN_CALL_TIMED_OUT
6771 - LIVE_PSTN_BUSY
6772 - LIVE_PSTN_CALL_TERMINATED
6773 - LIVE_PSTN_NETWORK_ERROR
6774 - LIVE_NUMBER_UNAVAILABLE
6775 - LIVE_PSTN_CALL_REJECTED
6776 - LIVE_PSTN_MISC_ERROR
6777 - LIVE_INTERNAL_ERROR
6778 - LIVE_UNABLE_TO_CONNECT
6779 - LIVE_RECORDING_FAILED - live: Voicemail recording failed
6780 - LIVE_PLAYBACK_ERROR - live: Voicemail playback failed
6781 - LIVE_LEGACY_ERROR
6782 - LIVE_BLOCKED_BY_PRIVACY_SETTINGS
6783 - LIVE_ERROR - live: Fallback error
6784 - LIVE_TRANSFER_FAILED
6785 - LIVE_TRANSFER_INSUFFICIENT_FUNDS
6786 - LIVE_BLOCKED_BY_US
6787 - LIVE_EMERGENCY_CALL_DENIED
6788 """
6790 """ get multiple properties from objects """
6791 self.transport.multiget("ZG\247\007,\246\007,\250\007,\244\007,\266\007,\252\007,\243\007]\023", objects)
6793 """ get multiple properties from objects """
6794 self.transport.multiget("ZG\234\007,\320\007,\240\007]\022", objects)
6796 """
6797 Creates a new empty conversation object and returns a reference to it.
6798
6799
6800 B{Return values:}
6801 - B{conference}
6802 """
6803 l_request = skypekit.XCallRequest("ZR\000\015", 0, 13)
6804 l_response = self.transport.xcall(l_request)
6805 l_result = module_id2classes[18](l_response.get(1), self.transport)
6806 return l_result
6811 """
6812 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.
6813
6814
6815 B{Arguments:}
6816 - B{convo_identity}
6817
6818 B{Return values:}
6819 - B{conversation}
6820 """
6821 l_request = skypekit.XCallRequest("ZR\000\017", 0, 15)
6822 l_request.add_parm('S', 1, convo_identity)
6823 l_response = self.transport.xcall(l_request)
6824 l_result = module_id2classes[18](l_response.get(1), self.transport)
6825 return l_result
6826 - def GetConversationByParticipants(
6827 self,
6828 participant_identities,
6829 create_if_non_existing = False,
6830 ignore_bookmarked_or_named = False
6831 ):
6832 """
6833 myself not included
6834
6835 B{Arguments:}
6836 - B{participant_identities}
6837 - B{create_if_non_existing}
6838 - B{ignore_bookmarked_or_named}
6839
6840 B{Return values:}
6841 - B{conversation}
6842 """
6843 l_request = skypekit.XCallRequest("ZR\000\020", 0, 16)
6844 l_request.add_parm('S', 1, participant_identities)
6845 l_request.add_parm('b', 2, create_if_non_existing)
6846 l_request.add_parm('b', 3, ignore_bookmarked_or_named)
6847 l_response = self.transport.xcall(l_request)
6848 l_result = module_id2classes[18](l_response.get(1), self.transport)
6849 return l_result
6855 """
6856 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.
6857
6858
6859 B{Arguments:}
6860 - B{join_blob} - The BLOB string.
6861
6862 - B{also_join} - If set to true, automatically joins current user into the Conversation.
6863
6864
6865 B{Return values:}
6866 - B{conversation} - Returns Conversation object if successful.
6867
6868 """
6869 l_request = skypekit.XCallRequest("ZR\000\021", 0, 17)
6870 l_request.add_parm('S', 1, join_blob)
6871 l_request.add_parm('b', 2, also_join)
6872 l_response = self.transport.xcall(l_request)
6873 l_result = module_id2classes[18](l_response.get(1), self.transport)
6874 return l_result
6879 """
6880 Returns a list of Conversation objects by Conversation::LIST_TYPE filter.
6881
6882
6883 B{Arguments:}
6884 - B{type_} - Filter.
6885
6886
6887 B{Return values:}
6888 - B{conversations} - List of conversations matching the filter.
6889
6890 """
6891 l_request = skypekit.XCallRequest("ZR\000\022", 0, 18)
6892 l_request.add_parm('e', 1, Conversation.LIST_TYPE[type_])
6893 l_response = self.transport.xcall(l_request)
6894 l_result = [module_id2classes[18](oid, self.transport) for oid in l_response.get(1, [])]
6895 return l_result
6902 """
6903 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.
6904
6905
6906 B{Return values:}
6907 - B{conversation} - Conversation object that was added or removed to a list specified in the type argument.
6908
6909 - B{type_} - Specifies the list, into which the conversation was added or removed from.
6910
6911 - 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.
6912
6913 """
6914 pass
6915 event_handlers[4] = "_sk_on_conversation_list_change"
6923 """ get multiple properties from objects """
6924 self.transport.multiget("ZG\300\007,{,\301\007,\177,y]\011", objects)
6929 """
6930 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).
6931
6932
6933 B{Arguments:}
6934 - B{guid} - Globally unique ID of the message.
6935
6936
6937 B{Return values:}
6938 - B{message} - Returns a Message object if a match was found.
6939
6940 """
6941 l_request = skypekit.XCallRequest("ZR\000\025", 0, 21)
6942 l_request.add_parm('B', 1, guid)
6943 l_response = self.transport.xcall(l_request)
6944 l_result = module_id2classes[9](l_response.get(1), self.transport)
6945 return l_result
6953 """
6954 Returns all messages of the given type
6955
6956 B{Arguments:}
6957 - B{type_} - Type of messages requested. For POSTED_TEXT or POSTED_EMOTE, returns a list with both types
6958 - B{latest_per_conv_only} - Whether to return only the most recent message per conversation
6959 - B{from_timestamp_inc} - Starting timestamp for reqested range, inclusive
6960 - B{to_timestamp_exc} - Ending timestamp for requested range, exclusive
6961
6962 B{Return values:}
6963 - B{messages}
6964 """
6965 l_request = skypekit.XCallRequest("ZR\000\210\001", 0, 136)
6966 l_request.add_parm('e', 1, Message.TYPE[type_])
6967 l_request.add_parm('b', 2, latest_per_conv_only)
6968 l_request.add_parm('u', 3, from_timestamp_inc)
6969 l_request.add_parm('u', 4, to_timestamp_exc)
6970 l_response = self.transport.xcall(l_request)
6971 l_result = [module_id2classes[9](oid, self.transport) for oid in l_response.get(1, [])]
6972 return l_result
6973 - def OnMessage(
6974 self,
6975 message,
6976 changes_inbox_timestamp,
6977 supersedes_history_message,
6978 conversation
6979 ):
6980 """
6981 No description available.
6982
6983 B{Return values:}
6984 - B{message}
6985 - B{changes_inbox_timestamp} - if changesInboxTimestamp==true is a hint that tray alert should probably be displayed
6986 - B{supersedes_history_message} - DEPRECATED, not set anymore
6987 - B{conversation}
6988 """
6989 pass
6990 event_handlers[5] = "_sk_on_message"
7000 """
7001 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.
7002
7003
7004 B{Return values:}
7005 - B{device_names}
7006 - B{device_paths}
7007 - B{count}
7008 """
7009 l_request = skypekit.XCallRequest("ZR\000P", 0, 80)
7010 l_response = self.transport.xcall(l_request)
7011 l_result = (l_response.get(1, [])),
7012 l_result += (l_response.get(2, [])),
7013 l_result += (l_response.get(3, 0)),
7014 return l_result
7021 """
7022 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.
7023
7024
7025 B{Arguments:}
7026 - B{device_name} - Human readable device name.
7027
7028 - B{device_path} - Device ID.
7029
7030 - B{cap} - Any of the Video::VIDEO_DEVICE_CAPABILITY values.
7031
7032
7033 B{Return values:}
7034 - B{result}
7035 """
7036 l_request = skypekit.XCallRequest("ZR\000!", 0, 33)
7037 l_request.add_parm('S', 1, device_name)
7038 l_request.add_parm('S', 2, device_path)
7039 l_request.add_parm('e', 3, Video.VIDEO_DEVICE_CAPABILITY[cap])
7040 l_response = self.transport.xcall(l_request)
7041 l_result = l_response.get(1, False)
7042 return l_result
7048 """
7049 No description available.
7050
7051 B{Arguments:}
7052 - B{device_name}
7053 - B{device_path}
7054 """
7055 l_request = skypekit.XCallRequest("ZR\000\042", 0, 34)
7056 l_request.add_parm('S', 1, device_name)
7057 l_request.add_parm('S', 2, device_path)
7058 self.transport.xcall(l_request)
7059 - def GetPreviewVideo(
7060 self,
7061 type_,
7062 device_name = "",
7063 device_path = ""
7064 ):
7065 """
7066 Warning: Will be deprecated soon
7067
7068 B{Arguments:}
7069 - B{type_}
7070 - B{device_name} - name and path to be used only with media type VIDEO
7071 - B{device_path}
7072
7073 B{Return values:}
7074 - B{video}
7075 """
7076 l_request = skypekit.XCallRequest("ZR\000#", 0, 35)
7077 l_request.add_parm('e', 1, Video.MEDIATYPE[type_])
7078 l_request.add_parm('S', 2, device_name)
7079 l_request.add_parm('S', 3, device_path)
7080 l_response = self.transport.xcall(l_request)
7081 l_result = module_id2classes[11](l_response.get(1), self.transport)
7082 return l_result
7087 """
7088 Avaible to Video Engines using the Video RTP API
7089
7090 B{Arguments:}
7091 - B{command}
7092
7093 B{Return values:}
7094 - B{response}
7095 """
7096 l_request = skypekit.XCallRequest("ZR\000;", 0, 59)
7097 l_request.add_parm('S', 1, command)
7098 l_response = self.transport.xcall(l_request)
7099 l_result = l_response.get(1, '')
7100 return l_result
7102 """
7103 This callback gets fired when there are changes in the system video device list (USB webcam gets plugged in or is detached.)
7104
7105 """
7106 pass
7110 event_handlers[7] = "_sk_on_available_video_device_list_change"
7112 """
7113 Event is implemented only in SkypeKit builds. Fired when Skype video library uses software H264 codec for the first time on the particular hardware by particular SkypeKit-based application
7114 """
7115 pass
7117 """ internal event dispatcher for OnH264Activated """
7118 self.OnH264Activated()
7119 event_handlers[44] = "_sk_on_h264activated"
7120 QUALITYTESTTYPE = {0:'QTT_AUDIO_IN', 'QTT_AUDIO_IN':0, 1:'QTT_AUDIO_OUT', 'QTT_AUDIO_OUT':1, 2:'QTT_VIDEO_OUT', 'QTT_VIDEO_OUT':2, 3:'QTT_CPU', 'QTT_CPU':3, 4:'QTT_NETWORK', 'QTT_NETWORK':4, 5:'QTT_VIDEO_IN', 'QTT_VIDEO_IN':5}
7121 """
7122 - QTT_AUDIO_IN
7123 - QTT_AUDIO_OUT
7124 - QTT_VIDEO_OUT
7125 - QTT_CPU
7126 - QTT_NETWORK
7127 - QTT_VIDEO_IN
7128 """
7129 QUALITYTESTRESULT = {0:'QTR_UNDEFINED', 'QTR_UNDEFINED':0, 1:'QTR_CRITICAL', 'QTR_CRITICAL':1, 2:'QTR_POOR', 'QTR_POOR':2, 3:'QTR_AVERAGE', 'QTR_AVERAGE':3, 4:'QTR_GOOD', 'QTR_GOOD':4, 5:'QTR_EXCELLENT', 'QTR_EXCELLENT':5}
7130 """
7131 - QTR_UNDEFINED
7132 - QTR_CRITICAL
7133 - QTR_POOR
7134 - QTR_AVERAGE
7135 - QTR_GOOD
7136 - QTR_EXCELLENT
7137 """
7143 """
7144 No description available.
7145
7146 B{Arguments:}
7147 - B{with_user} - if empty, network test results would reflect status of local node only
7148 - B{exclude_network_test}
7149 """
7150 l_request = skypekit.XCallRequest("ZR\000\214\001", 0, 140)
7151 l_request.add_parm('S', 1, with_user)
7152 l_request.add_parm('b', 2, exclude_network_test)
7153 self.transport.xcall(l_request)
7159 """
7160 No description available.
7161
7162 B{Arguments:}
7163 - B{with_user}
7164 - B{just_stop}
7165
7166 B{Return values:}
7167 - B{result}
7168 """
7169 l_request = skypekit.XCallRequest("ZR\000\215\001", 0, 141)
7170 l_request.add_parm('S', 1, with_user)
7171 l_request.add_parm('b', 2, just_stop)
7172 l_response = self.transport.xcall(l_request)
7173 l_result = skypekit.enumof(Skype.QUALITYTESTRESULT, l_response.get(1))
7174 return l_result
7175 - def OnQualityTestResult(
7176 self,
7177 test_type,
7178 test_result,
7179 with_user,
7180 details,
7181 xml_details
7182 ):
7183 """
7184 No description available.
7185
7186 B{Return values:}
7187 - B{test_type}
7188 - B{test_result}
7189 - B{with_user}
7190 - B{details}
7191 - B{xml_details}
7192 """
7193 pass
7194 event_handlers[28] = "_sk_on_quality_test_result"
7207 """
7208 No description available.
7209
7210 B{Arguments:}
7211 - B{skype_name}
7212
7213 B{Return values:}
7214 - B{greeting}
7215 """
7216 l_request = skypekit.XCallRequest("ZR\000-", 0, 45)
7217 l_request.add_parm('S', 1, skype_name)
7218 l_response = self.transport.xcall(l_request)
7219 l_result = module_id2classes[7](l_response.get(1), self.transport)
7220 return l_result
7221 SETUPKEY_DISABLED_CODECS = "*Lib/Audio/DisableCodecs"
7222 SETUPKEY_DISABLE_AEC = "*Lib/Audio/DisableAEC"
7223 SETUPKEY_DISABLE_NOISE_SUPPRESSOR = "*Lib/Audio/DisableNS"
7224 SETUPKEY_DISABLE_AGC = "*Lib/Audio/DisableAGC"
7225 SETUPKEY_DISABLE_DIGITAL_NEAR_END_AGC = "*Lib/Audio/DisableDigitalNearEndAGC"
7226 SETUPKEY_DISABLE_DIGITAL_FAR_END_AGC = "*Lib/Audio/DisableDigitalFarEndAGC"
7227 SETUPKEY_BEAMFORMER_MIC_SPACING = "*Lib/Audio/BeamformerMicSpacing"
7228 SETUPKEY_DISABLE_AUDIO_DEVICE_PROBING = "*Lib/QualityMonitor/DisableAudioDeviceProbing"
7229 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}
7230 """
7231 - PREPARESOUND_SUCCESS
7232 - PREPARESOUND_MISC_ERROR
7233 - PREPARESOUND_FILE_NOT_FOUND
7234 - PREPARESOUND_FILE_TOO_BIG
7235 - PREPARESOUND_FILE_READ_ERROR
7236 - PREPARESOUND_UNSUPPORTED_FILE_FORMAT
7237 - PREPARESOUND_PLAYBACK_NOT_SUPPORTED
7238 """
7239 AUDIODEVICE_CAPABILITIES = {
7240 1 :'HAS_VIDEO_CAPTURE',
7241 2 :'HAS_USB_INTERFACE',
7242 4 :'POSSIBLY_HEADSET',
7243 8 :'HAS_AUDIO_CAPTURE',
7244 16 :'HAS_AUDIO_RENDERING',
7245 32 :'HAS_LOWBANDWIDTH_CAPTURE',
7246 64 :'IS_WEBCAM',
7247 128 :'IS_HEADSET',
7248 256 :'POSSIBLY_WEBCAM',
7249 2048:'HAS_VIDEO_RENDERING',
7250 4096:'HAS_BLUETOOTH_INTERFACE',
7251 'HAS_VIDEO_CAPTURE' : 1,
7252 'HAS_USB_INTERFACE' : 2,
7253 'POSSIBLY_HEADSET' : 4,
7254 'HAS_AUDIO_CAPTURE' : 8,
7255 'HAS_AUDIO_RENDERING' : 16,
7256 'HAS_LOWBANDWIDTH_CAPTURE' : 32,
7257 'IS_WEBCAM' : 64,
7258 'IS_HEADSET' : 128,
7259 'POSSIBLY_WEBCAM' : 256,
7260 'HAS_VIDEO_RENDERING' :2048,
7261 'HAS_BLUETOOTH_INTERFACE' :4096
7262 }
7263 """
7264 - HAS_VIDEO_CAPTURE
7265 - HAS_USB_INTERFACE
7266 - POSSIBLY_HEADSET
7267 - HAS_AUDIO_CAPTURE
7268 - HAS_AUDIO_RENDERING
7269 - HAS_LOWBANDWIDTH_CAPTURE
7270 - IS_WEBCAM
7271 - IS_HEADSET
7272 - POSSIBLY_WEBCAM
7273 - HAS_VIDEO_RENDERING
7274 - HAS_BLUETOOTH_INTERFACE
7275 """
7276 - def PlayStart(
7277 self,
7278 soundid,
7279 sound,
7280 loop,
7281 use_call_out_device = False
7282 ):
7283 """
7284 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.
7285
7286
7287 B{Arguments:}
7288 - B{soundid}
7289 - B{sound}
7290 - B{loop}
7291 - B{use_call_out_device}
7292 """
7293 l_request = skypekit.XCallRequest("ZR\000\060", 0, 48)
7294 l_request.add_parm('u', 1, soundid)
7295 l_request.add_parm('B', 2, sound)
7296 l_request.add_parm('b', 3, loop)
7297 l_request.add_parm('b', 4, use_call_out_device)
7298 self.transport.xcall(l_request)
7299 - def PlayStartFromFile(
7300 self,
7301 soundid,
7302 datafile,
7303 loop,
7304 use_call_out_device = False
7305 ):
7306 """
7307 No description available.
7308
7309 B{Arguments:}
7310 - B{soundid}
7311 - B{datafile}
7312 - B{loop}
7313 - B{use_call_out_device}
7314
7315 B{Return values:}
7316 - B{result}
7317 """
7318 l_request = skypekit.XCallRequest("ZR\000\324\001", 0, 212)
7319 l_request.add_parm('u', 1, soundid)
7320 l_request.add_parm('f', 2, datafile)
7321 l_request.add_parm('b', 3, loop)
7322 l_request.add_parm('b', 4, use_call_out_device)
7323 l_response = self.transport.xcall(l_request)
7324 l_result = skypekit.enumof(Skype.PREPARESOUNDRESULT, l_response.get(1))
7325 return l_result
7326 - def PlayStop(
7327 self,
7328 soundid
7329 ):
7330 """
7331 Stops playback of the soundfile. The argument is the same ID you passed in the Skype class StartPlayback method.
7332
7333
7334 B{Arguments:}
7335 - B{soundid}
7336 """
7337 l_request = skypekit.XCallRequest("ZR\000\061", 0, 49)
7338 l_request.add_parm('u', 1, soundid)
7339 self.transport.xcall(l_request)
7344 """
7345 No description available.
7346
7347 B{Arguments:}
7348 - B{record_and_playback_data}
7349 """
7350 l_request = skypekit.XCallRequest("ZR\000\062", 0, 50)
7351 l_request.add_parm('b', 1, record_and_playback_data)
7352 self.transport.xcall(l_request)
7354 """
7355 No description available.
7356 """
7357 l_request = skypekit.XCallRequest("ZR\000\063", 0, 51)
7358 self.transport.xcall(l_request)
7360 """
7361 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).
7362
7363
7364 B{Return values:}
7365 - B{handle_list}
7366 - B{name_list}
7367 - B{product_id_list}
7368 """
7369 l_request = skypekit.XCallRequest("ZR\000\065", 0, 53)
7370 l_response = self.transport.xcall(l_request)
7371 l_result = (l_response.get(1, [])),
7372 l_result += (l_response.get(2, [])),
7373 l_result += (l_response.get(3, [])),
7374 return l_result
7376 """
7377 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).
7378
7379
7380 B{Return values:}
7381 - B{handle_list}
7382 - B{name_list}
7383 - B{product_id_list}
7384 """
7385 l_request = skypekit.XCallRequest("ZR\000\066", 0, 54)
7386 l_response = self.transport.xcall(l_request)
7387 l_result = (l_response.get(1, [])),
7388 l_result += (l_response.get(2, [])),
7389 l_result += (l_response.get(3, [])),
7390 return l_result
7391 - def SelectSoundDevices(
7392 self,
7393 call_in_device,
7394 call_out_device,
7395 wave_out_device
7396 ):
7397 """
7398 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).
7399
7400
7401 B{Arguments:}
7402 - B{call_in_device}
7403 - B{call_out_device}
7404 - B{wave_out_device}
7405 """
7406 l_request = skypekit.XCallRequest("ZR\000\067", 0, 55)
7407 l_request.add_parm('S', 1, call_in_device)
7408 l_request.add_parm('S', 2, call_out_device)
7409 l_request.add_parm('S', 3, wave_out_device)
7410 self.transport.xcall(l_request)
7415 """
7416 The uint argument returns AUDIODEVICE_CAPABILITIES (declared in Skype class)
7417
7418
7419 B{Arguments:}
7420 - B{device_handle}
7421
7422 B{Return values:}
7423 - B{interface_string}
7424 - B{capabilities} - bit set of AUDIODEVICE_CAPABILITIES
7425 """
7426 l_request = skypekit.XCallRequest("ZR\000\070", 0, 56)
7427 l_request.add_parm('S', 1, device_handle)
7428 l_response = self.transport.xcall(l_request)
7429 l_result = (l_response.get(1, '')),
7430 l_result += (l_response.get(2, 0)),
7431 return l_result
7433 """
7434 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.
7435
7436
7437 B{Return values:}
7438 - B{mic_level}
7439 - B{speaker_level}
7440 """
7441 l_request = skypekit.XCallRequest("ZR\000\071", 0, 57)
7442 l_response = self.transport.xcall(l_request)
7443 l_result = (l_response.get(1, 0)),
7444 l_result += (l_response.get(2, 0)),
7445 return l_result
7450 """
7451 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.
7452
7453
7454 B{Arguments:}
7455 - B{command}
7456
7457 B{Return values:}
7458 - B{response}
7459 """
7460 l_request = skypekit.XCallRequest("ZR\000:", 0, 58)
7461 l_request.add_parm('S', 1, command)
7462 l_response = self.transport.xcall(l_request)
7463 l_result = l_response.get(1, '')
7464 return l_result
7466 """
7467 Returns value of audio playback volume setting (0..100).
7468
7469
7470 B{Return values:}
7471 - B{volume}
7472 """
7473 l_request = skypekit.XCallRequest("ZR\000<", 0, 60)
7474 l_response = self.transport.xcall(l_request)
7475 l_result = l_response.get(1, 0)
7476 return l_result
7481 """
7482 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.
7483
7484
7485 B{Arguments:}
7486 - B{volume}
7487 """
7488 l_request = skypekit.XCallRequest("ZR\000=", 0, 61)
7489 l_request.add_parm('u', 1, volume)
7490 self.transport.xcall(l_request)
7492 """
7493 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).
7494
7495
7496 B{Return values:}
7497 - B{mic_volume}
7498 """
7499 l_request = skypekit.XCallRequest("ZR\000>", 0, 62)
7500 l_response = self.transport.xcall(l_request)
7501 l_result = l_response.get(1, 0)
7502 return l_result
7507 """
7508 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.
7509
7510
7511 B{Arguments:}
7512 - B{volume}
7513 """
7514 l_request = skypekit.XCallRequest("ZR\000?", 0, 63)
7515 l_request.add_parm('u', 1, volume)
7516 self.transport.xcall(l_request)
7518 """
7519 Returns true in &muted argument if the currently selected playback device is muted.
7520
7521
7522 B{Return values:}
7523 - B{muted}
7524 """
7525 l_request = skypekit.XCallRequest("ZR\000@", 0, 64)
7526 l_response = self.transport.xcall(l_request)
7527 l_result = l_response.get(1, False)
7528 return l_result
7530 """
7531 Returns true in &muted argument if the currently selected microphone is muted.
7532
7533
7534 B{Return values:}
7535 - B{muted}
7536 """
7537 l_request = skypekit.XCallRequest("ZR\000\101", 0, 65)
7538 l_response = self.transport.xcall(l_request)
7539 l_result = l_response.get(1, False)
7540 return l_result
7545 """
7546 Sets currently selected playback device mute status according to argument.
7547
7548
7549 B{Arguments:}
7550 - B{mute}
7551 """
7552 l_request = skypekit.XCallRequest("ZR\000\102", 0, 66)
7553 l_request.add_parm('b', 1, mute)
7554 self.transport.xcall(l_request)
7559 """
7560 Sets currently selected microphone mute status according to argument.
7561
7562
7563 B{Arguments:}
7564 - B{mute}
7565 """
7566 l_request = skypekit.XCallRequest("ZR\000\103", 0, 67)
7567 l_request.add_parm('b', 1, mute)
7568 self.transport.xcall(l_request)
7570 """
7571 This callback gets fired when there are changes in the system audio device list (USB headset gets plugged in or is detached.)
7572
7573 """
7574 pass
7578 event_handlers[10] = "_sk_on_available_device_list_change"
7580 """
7581 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.
7582
7583 """
7584 pass
7586 """ internal event dispatcher for OnNrgLevelsChange """
7587 self.OnNrgLevelsChange()
7588 event_handlers[11] = "_sk_on_nrg_levels_change"
7589 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}
7590 """
7591 - OM_UNKNOWN
7592 - OM_FREE
7593 - OM_FREE_WIRELESS
7594 - OM_3G
7595 - OM_4G
7596 """
7621 """
7622 creates and sends a CONFIRMATION_CODE_REQUEST message this sends a confirmation code to the number provided
7623
7624 B{Arguments:}
7625 - B{type_}
7626 - B{number}
7627
7628 B{Return values:}
7629 - B{sms}
7630 """
7631 l_request = skypekit.XCallRequest("ZR\000\035", 0, 29)
7632 l_request.add_parm('e', 1, Sms.CONFIRM_TYPE[type_])
7633 l_request.add_parm('S', 2, number)
7634 l_response = self.transport.xcall(l_request)
7635 l_result = module_id2classes[12](l_response.get(1), self.transport)
7636 return l_result
7642 """
7643 creates and sends a CONFIRMATION_CODE_SUBMIT message this authorizes the number with the server for the purpose given in RequestConfirmationCode
7644
7645 B{Arguments:}
7646 - B{number}
7647 - B{code}
7648
7649 B{Return values:}
7650 - B{sms}
7651 """
7652 l_request = skypekit.XCallRequest("ZR\000\036", 0, 30)
7653 l_request.add_parm('S', 1, number)
7654 l_request.add_parm('S', 2, code)
7655 l_response = self.transport.xcall(l_request)
7656 l_result = module_id2classes[12](l_response.get(1), self.transport)
7657 return l_result
7659 """
7660 creates an OUTGOING/COMPOSING SMS message
7661
7662 B{Return values:}
7663 - B{sms}
7664 """
7665 l_request = skypekit.XCallRequest("ZR\000\106", 0, 70)
7666 l_response = self.transport.xcall(l_request)
7667 l_result = module_id2classes[12](l_response.get(1), self.transport)
7668 return l_result
7669 SETUPKEY_FT_AUTOACCEPT = "Lib/FileTransfer/AutoAccept"
7670 SETUPKEY_FT_SAVEPATH = "Lib/FileTransfer/SavePath"
7671 SETUPKEY_FT_INCOMING_LIMIT = "Lib/FileTransfer/IncomingLimit"
7672 SETUPKEY_IDLE_TIME_FOR_AWAY = "Lib/Account/IdleTimeForAway"
7673 SETUPKEY_IDLE_TIME_FOR_NA = "Lib/Account/IdleTimeForNA"
7674 - def GetAccount(
7675 self,
7676 identity
7677 ):
7678 """
7679 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.
7680
7681
7682 B{Arguments:}
7683 - B{identity} - Account skypename.
7684
7685
7686 B{Return values:}
7687 - B{account} - Returns account object if successful.
7688
7689 """
7690 l_request = skypekit.XCallRequest("ZR\000s", 0, 115)
7691 l_request.add_parm('S', 1, identity)
7692 l_response = self.transport.xcall(l_request)
7693 l_result = module_id2classes[5](l_response.get(1), self.transport)
7694 return l_result
7696 """
7697 Returns a list of possible profiles used before on this machine
7698
7699 B{Return values:}
7700 - B{account_name_list}
7701 """
7702 l_request = skypekit.XCallRequest("ZR\000q", 0, 113)
7703 l_response = self.transport.xcall(l_request)
7704 l_result = l_response.get(1, [])
7705 return l_result
7707 """
7708 return most recently used account that has pwd saved. empty string if none
7709
7710 B{Return values:}
7711 - B{account}
7712 """
7713 l_request = skypekit.XCallRequest("ZR\000r", 0, 114)
7714 l_response = self.transport.xcall(l_request)
7715 l_result = l_response.get(1, '')
7716 return l_result
7721 """
7722 suggest a nice skypename to go with given fullname
7723
7724 B{Arguments:}
7725 - B{fullname}
7726
7727 B{Return values:}
7728 - B{suggested_name}
7729 """
7730 l_request = skypekit.XCallRequest("ZR\000t", 0, 116)
7731 l_request.add_parm('S', 1, fullname)
7732 l_response = self.transport.xcall(l_request)
7733 l_result = l_response.get(1, '')
7734 return l_result
7735 VALIDATERESULT = {
7736 0 :'NOT_VALIDATED',
7737 1 :'VALIDATED_OK',
7738 2 :'TOO_SHORT',
7739 3 :'TOO_LONG',
7740 4 :'CONTAINS_INVALID_CHAR',
7741 5 :'CONTAINS_SPACE',
7742 6 :'SAME_AS_USERNAME',
7743 7 :'INVALID_FORMAT',
7744 8 :'CONTAINS_INVALID_WORD',
7745 9 :'TOO_SIMPLE',
7746 10:'STARTS_WITH_INVALID_CHAR',
7747 'NOT_VALIDATED' : 0,
7748 'VALIDATED_OK' : 1,
7749 'TOO_SHORT' : 2,
7750 'TOO_LONG' : 3,
7751 'CONTAINS_INVALID_CHAR' : 4,
7752 'CONTAINS_SPACE' : 5,
7753 'SAME_AS_USERNAME' : 6,
7754 'INVALID_FORMAT' : 7,
7755 'CONTAINS_INVALID_WORD' : 8,
7756 'TOO_SIMPLE' : 9,
7757 'STARTS_WITH_INVALID_CHAR' :10
7758 }
7759 """
7760 A value of this type can be returned by one of the following methods (of Skype class): ValidateAvatar, ValidateProfileString, ValidatePassword.
7761
7762 - 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.
7763
7764 - VALIDATED_OK - Avatar or profile string validation succeeded.
7765
7766 - TOO_SHORT - Password is too short.
7767
7768 - TOO_LONG - The value exceeds max size limit for the given property.
7769
7770 - CONTAINS_INVALID_CHAR - Value contains illegal characters.
7771
7772 - CONTAINS_SPACE - Value contains whitespace.
7773
7774 - SAME_AS_USERNAME - Password cannot be the same as skypename.
7775
7776 - INVALID_FORMAT - Value has invalid format.
7777
7778 - CONTAINS_INVALID_WORD - Value contains invalid word.
7779
7780 - TOO_SIMPLE - Password is too simple.
7781
7782 - STARTS_WITH_INVALID_CHAR - Value starts with an invalid character.
7783
7784 """
7789 """
7790 No description available.
7791
7792 B{Arguments:}
7793 - B{value}
7794
7795 B{Return values:}
7796 - B{result}
7797 - B{free_bytes_left}
7798 """
7799 l_request = skypekit.XCallRequest("ZR\000w", 0, 119)
7800 l_request.add_parm('B', 1, value)
7801 l_response = self.transport.xcall(l_request)
7802 l_result = (skypekit.enumof(Skype.VALIDATERESULT, l_response.get(1))),
7803 l_result += (l_response.get(2, 0)),
7804 return l_result
7805 - def ValidateProfileString(
7806 self,
7807 prop_key,
7808 str_value,
7809 for_registration = False
7810 ):
7811 """
7812 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)
7813
7814
7815 B{Arguments:}
7816 - B{prop_key}
7817 - B{str_value}
7818 - B{for_registration}
7819
7820 B{Return values:}
7821 - B{result}
7822 - B{free_bytes_left}
7823 """
7824 l_request = skypekit.XCallRequest("ZR\000f", 0, 102)
7825 l_request.add_parm('e', 1, prop_key)
7826 l_request.add_parm('S', 2, str_value)
7827 l_request.add_parm('b', 3, for_registration)
7828 l_response = self.transport.xcall(l_request)
7829 l_result = (skypekit.enumof(Skype.VALIDATERESULT, l_response.get(1))),
7830 l_result += (l_response.get(2, 0)),
7831 return l_result
7837 """
7838 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.)
7839
7840
7841 B{Arguments:}
7842 - B{username}
7843 - B{password}
7844
7845 B{Return values:}
7846 - B{result}
7847 """
7848 l_request = skypekit.XCallRequest("ZR\000G", 0, 71)
7849 l_request.add_parm('S', 1, username)
7850 l_request.add_parm('S', 2, password)
7851 l_response = self.transport.xcall(l_request)
7852 l_result = skypekit.enumof(Skype.VALIDATERESULT, l_response.get(1))
7853 return l_result
7854 SETUPKEY_PORT = "*Lib/Connection/Port"
7855 SETUPKEY_HTTPS_PROXY_ENABLE = "*Lib/Connection/HttpsProxy/Enable"
7856 SETUPKEY_HTTPS_PROXY_ADDR = "*Lib/Connection/HttpsProxy/Addr"
7857 SETUPKEY_HTTPS_PROXY_USER = "*Lib/Connection/HttpsProxy/User"
7858 SETUPKEY_HTTPS_PROXY_PWD = "*Lib/Connection/HttpsProxy/Pwd"
7859 SETUPKEY_SOCKS_PROXY_ENABLE = "*Lib/Connection/SocksProxy/Enable"
7860 SETUPKEY_SOCKS_PROXY_ADDR = "*Lib/Connection/SocksProxy/Addr"
7861 SETUPKEY_SOCKS_PROXY_USER = "*Lib/Connection/SocksProxy/User"
7862 SETUPKEY_SOCKS_PROXY_PWD = "*Lib/Connection/SocksProxy/Pwd"
7863 SETUPKEY_LOCALADDRESS = "*Lib/Connection/LocalAddress"
7864 SETUPKEY_DISABLE_PORT80 = "*Lib/Connection/DisablePort80"
7865 SETUPKEY_DISABLE_UDP = "*Lib/Connection/DisableUDP"
7866 PROXYTYPE = {0:'HTTPS_PROXY', 'HTTPS_PROXY':0, 1:'SOCKS_PROXY', 'SOCKS_PROXY':1}
7867 """
7868 - HTTPS_PROXY
7869 - SOCKS_PROXY
7870 """
7875 """
7876 No description available.
7877
7878 B{Return values:}
7879 - B{type_}
7880 """
7881 pass
7882 event_handlers[12] = "_sk_on_proxy_auth_failure"
7888 """
7889 port that lib ended up listening. usually equal to SETUPKEY_PORT. 0 if none used (disconnected or binding failed)
7890
7891 B{Return values:}
7892 - B{port}
7893 """
7894 l_request = skypekit.XCallRequest("ZR\000\202\001", 0, 130)
7895 l_response = self.transport.xcall(l_request)
7896 l_result = l_response.get(1, 0)
7897 return l_result
7898 - def GetStr(
7899 self,
7900 key
7901 ):
7902 """
7903 This is used for retrieving local setup keys of type string. For more information, see Defines section in the skype-embedded_2.h
7904
7905
7906 B{Arguments:}
7907 - B{key}
7908
7909 B{Return values:}
7910 - B{value}
7911 """
7912 l_request = skypekit.XCallRequest("ZR\000x", 0, 120)
7913 l_request.add_parm('S', 1, key)
7914 l_response = self.transport.xcall(l_request)
7915 l_result = l_response.get(1, '')
7916 return l_result
7917 - def GetInt(
7918 self,
7919 key
7920 ):
7921 """
7922 This is used for retrieving local setup keys of type int. For more information, see Defines section in the skype-embedded_2.h
7923
7924
7925 B{Arguments:}
7926 - B{key}
7927
7928 B{Return values:}
7929 - B{value}
7930 """
7931 l_request = skypekit.XCallRequest("ZR\000y", 0, 121)
7932 l_request.add_parm('S', 1, key)
7933 l_response = self.transport.xcall(l_request)
7934 l_result = l_response.get(1, 0)
7935 return l_result
7936 - def GetBin(
7937 self,
7938 key
7939 ):
7940 """
7941 This is used for retrieving local setup keys of type binary. For more information, see Defines section in the skype-embedded_2.h
7942
7943
7944 B{Arguments:}
7945 - B{key}
7946
7947 B{Return values:}
7948 - B{value}
7949 """
7950 l_request = skypekit.XCallRequest("ZR\000z", 0, 122)
7951 l_request.add_parm('S', 1, key)
7952 l_response = self.transport.xcall(l_request)
7953 l_result = l_response.get(1, '')
7954 return l_result
7955 - def SetStr(
7956 self,
7957 key,
7958 value
7959 ):
7960 """
7961 This is used for setting local setup keys of type string. For more information, see Defines section in the skype-embedded_2.h
7962
7963
7964 B{Arguments:}
7965 - B{key}
7966 - B{value}
7967 """
7968 l_request = skypekit.XCallRequest("ZR\000{", 0, 123)
7969 l_request.add_parm('S', 1, key)
7970 l_request.add_parm('S', 2, value)
7971 self.transport.xcall(l_request)
7972 - def SetInt(
7973 self,
7974 key,
7975 value
7976 ):
7977 """
7978 This is used for setting local setup keys of type int. For more information, see Defines section in the skype-embedded_2.h
7979
7980
7981 B{Arguments:}
7982 - B{key}
7983 - B{value}
7984 """
7985 l_request = skypekit.XCallRequest("ZR\000|", 0, 124)
7986 l_request.add_parm('S', 1, key)
7987 l_request.add_parm('i', 2, value)
7988 self.transport.xcall(l_request)
7989 - def SetBin(
7990 self,
7991 key,
7992 value
7993 ):
7994 """
7995 This is used for setting local setup keys of type binary. For more information, see Defines section in the skype-embedded_2.h
7996
7997
7998 B{Arguments:}
7999 - B{key}
8000 - B{value}
8001 """
8002 l_request = skypekit.XCallRequest("ZR\000}", 0, 125)
8003 l_request.add_parm('S', 1, key)
8004 l_request.add_parm('B', 2, value)
8005 self.transport.xcall(l_request)
8010 """
8011 Returns true if the given setup key is defined in local setup. For more information, see Defines section in the skype-embedded_2.h
8012
8013
8014 B{Arguments:}
8015 - B{key}
8016
8017 B{Return values:}
8018 - B{value}
8019 """
8020 l_request = skypekit.XCallRequest("ZR\000~", 0, 126)
8021 l_request.add_parm('S', 1, key)
8022 l_response = self.transport.xcall(l_request)
8023 l_result = l_response.get(1, False)
8024 return l_result
8025 - def Delete(
8026 self,
8027 key
8028 ):
8029 """
8030 No description available.
8031
8032 B{Arguments:}
8033 - B{key}
8034 """
8035 l_request = skypekit.XCallRequest("ZR\000\177", 0, 127)
8036 l_request.add_parm('S', 1, key)
8037 self.transport.xcall(l_request)
8042 """
8043 No description available.
8044
8045 B{Arguments:}
8046 - B{key}
8047
8048 B{Return values:}
8049 - B{value}
8050 """
8051 l_request = skypekit.XCallRequest("ZR\000\200\001", 0, 128)
8052 l_request.add_parm('S', 1, key)
8053 l_response = self.transport.xcall(l_request)
8054 l_result = l_response.get(1, [])
8055 return l_result
8057 """
8058 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.
8059
8060
8061 B{Return values:}
8062 - B{language_code_list}
8063 - B{language_name_list} - assumes UI has set correct language
8064 """
8065 l_request = skypekit.XCallRequest("ZR\000\317\001", 0, 207)
8066 l_response = self.transport.xcall(l_request)
8067 l_result = (l_response.get(1, [])),
8068 l_result += (l_response.get(2, [])),
8069 return l_result
8071 """
8072 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.
8073
8074
8075 B{Return values:}
8076 - B{country_code_list}
8077 - B{country_name_list} - assumes UI has set correct language
8078 - B{country_prefix_list}
8079 - B{country_dial_example_list}
8080 """
8081 l_request = skypekit.XCallRequest("ZR\000\320\001", 0, 208)
8082 l_response = self.transport.xcall(l_request)
8083 l_result = (l_response.get(1, [])),
8084 l_result += (l_response.get(2, [])),
8085 l_result += (l_response.get(3, [])),
8086 l_result += (l_response.get(4, [])),
8087 return l_result
8092 """
8093 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.
8094
8095
8096 B{Arguments:}
8097 - B{number}
8098
8099 B{Return values:}
8100 - B{country_code}
8101 """
8102 l_request = skypekit.XCallRequest("ZR\000\323\001", 0, 211)
8103 l_request.add_parm('S', 1, number)
8104 l_response = self.transport.xcall(l_request)
8105 l_result = l_response.get(1, '')
8106 return l_result
8111 """
8112 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.
8113
8114 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.
8115
8116 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.
8117
8118 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.
8119
8120 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.
8121
8122
8123 B{Arguments:}
8124 - 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.
8125
8126
8127 B{Return values:}
8128 - 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.
8129
8130 """
8131 l_request = skypekit.XCallRequest("ZR\000\327\001", 0, 215)
8132 l_request.add_parm('S', 1, appname)
8133 l_response = self.transport.xcall(l_request)
8134 l_result = l_response.get(1, False)
8135 return l_result
8140 """
8141 Disconnects and deletes the App2App application.
8142
8143
8144 B{Arguments:}
8145 - B{appname} - application ID.
8146
8147
8148 B{Return values:}
8149 - B{result} - Returns true if the deletion was successful (application with such ID actually existed)
8150
8151 """
8152 l_request = skypekit.XCallRequest("ZR\000\330\001", 0, 216)
8153 l_request.add_parm('S', 1, appname)
8154 l_response = self.transport.xcall(l_request)
8155 l_result = l_response.get(1, False)
8156 return l_result
8162 """
8163 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.
8164
8165
8166 B{Arguments:}
8167 - B{appname} - Application ID. This needs to match with application ID connecting from the remote side.
8168
8169 - B{skypename} - Skype Name of the remote party.
8170
8171
8172 B{Return values:}
8173 - 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.
8174
8175 """
8176 l_request = skypekit.XCallRequest("ZR\000\331\001", 0, 217)
8177 l_request.add_parm('S', 1, appname)
8178 l_request.add_parm('S', 2, skypename)
8179 l_response = self.transport.xcall(l_request)
8180 l_result = l_response.get(1, False)
8181 return l_result
8187 """
8188 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.
8189
8190
8191 B{Arguments:}
8192 - B{appname} - application ID
8193
8194 - B{stream} - stream ID.
8195
8196
8197 B{Return values:}
8198 - B{result} - returns true when the stream disconnect was successful.
8199
8200 """
8201 l_request = skypekit.XCallRequest("ZR\000\332\001", 0, 218)
8202 l_request.add_parm('S', 1, appname)
8203 l_request.add_parm('S', 2, stream)
8204 l_response = self.transport.xcall(l_request)
8205 l_result = l_response.get(1, False)
8206 return l_result
8207 - def App2AppWrite(
8208 self,
8209 appname,
8210 stream,
8211 data
8212 ):
8213 """
8214 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.
8215
8216
8217 B{Arguments:}
8218 - B{appname} - application ID
8219
8220 - B{stream} - stream ID
8221
8222 - B{data} - packet payload
8223
8224
8225 B{Return values:}
8226 - B{result} - returns true if the call was successful. Note that this does indicate the packet was actually received by remote party.
8227
8228 """
8229 l_request = skypekit.XCallRequest("ZR\000\333\001", 0, 219)
8230 l_request.add_parm('S', 1, appname)
8231 l_request.add_parm('S', 2, stream)
8232 l_request.add_parm('B', 3, data)
8233 l_response = self.transport.xcall(l_request)
8234 l_result = l_response.get(1, False)
8235 return l_result
8236 - def App2AppDatagram(
8237 self,
8238 appname,
8239 stream,
8240 data
8241 ):
8242 """
8243 Sends a datagram to the remote party specified in the stream argument. The max size of datagram payload is 1500 bytes.
8244
8245
8246 B{Arguments:}
8247 - B{appname} - application ID - from App2AppCreate
8248
8249 - B{stream} - stream ID - either from App2AppGetStreamsList or from OnApp2AppStreamListChange
8250 - B{data} - datagram payload (max 1500 bytes)
8251
8252 B{Return values:}
8253 - 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.
8254 """
8255 l_request = skypekit.XCallRequest("ZR\000\334\001", 0, 220)
8256 l_request.add_parm('S', 1, appname)
8257 l_request.add_parm('S', 2, stream)
8258 l_request.add_parm('B', 3, data)
8259 l_response = self.transport.xcall(l_request)
8260 l_result = l_response.get(1, False)
8261 return l_result
8262 - def App2AppRead(
8263 self,
8264 appname,
8265 stream
8266 ):
8267 """
8268 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.
8269
8270
8271 B{Arguments:}
8272 - B{appname} - application ID
8273
8274 - B{stream} - stream ID
8275
8276
8277 B{Return values:}
8278 - 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.
8279
8280 - B{data} - stream packet payload
8281
8282 """
8283 l_request = skypekit.XCallRequest("ZR\000\335\001", 0, 221)
8284 l_request.add_parm('S', 1, appname)
8285 l_request.add_parm('S', 2, stream)
8286 l_response = self.transport.xcall(l_request)
8287 l_result = (l_response.get(1, False)),
8288 l_result += (l_response.get(2, '')),
8289 return l_result
8294 """
8295 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.
8296
8297
8298 B{Arguments:}
8299 - B{appname} - application ID
8300
8301
8302 B{Return values:}
8303 - B{result} - returns true on method success
8304
8305 - B{users} - stringlist with Skype Names of connectable users
8306
8307 """
8308 l_request = skypekit.XCallRequest("ZR\000\336\001", 0, 222)
8309 l_request.add_parm('S', 1, appname)
8310 l_response = self.transport.xcall(l_request)
8311 l_result = (l_response.get(1, False)),
8312 l_result += (l_response.get(2, [])),
8313 return l_result
8314 APP2APP_STREAMS = {0:'ALL_STREAMS', 'ALL_STREAMS':0, 1:'SENDING_STREAMS', 'SENDING_STREAMS':1, 2:'RECEIVED_STREAMS', 'RECEIVED_STREAMS':2}
8315 """
8316 - ALL_STREAMS
8317 - SENDING_STREAMS
8318 - RECEIVED_STREAMS
8319 """
8325 """
8326 Takes application ID and list type filter and returns a stringlist with streamID's that pass the filter.
8327
8328
8329 B{Arguments:}
8330 - B{appname} - application ID
8331
8332 - B{list_type} - list type filter
8333
8334
8335 B{Return values:}
8336 - B{result} - results true if the method call was successful
8337
8338 - B{streams} - string list with stream IDs
8339
8340 - B{received_sizes} - For RECEIVED_STREAMS, contains the number of bytes in each stream waiting to be read
8341 """
8342 l_request = skypekit.XCallRequest("ZR\000\337\001", 0, 223)
8343 l_request.add_parm('S', 1, appname)
8344 l_request.add_parm('e', 2, Skype.APP2APP_STREAMS[list_type])
8345 l_response = self.transport.xcall(l_request)
8346 l_result = (l_response.get(1, False)),
8347 l_result += (l_response.get(2, [])),
8348 l_result += (l_response.get(3, [])),
8349 return l_result
8356 """
8357 This event gets fired on incoming app2app datagram.
8358
8359
8360 B{Return values:}
8361 - B{appname} - App2app application ID.
8362
8363 - B{stream} - App2app stream ID - see OnApp2AppStreamListChange event for obtaining stream IDs.
8364
8365 - B{data} - Datagram payload - limited to 1500 bytes.
8366
8367 """
8368 pass
8369 event_handlers[6] = "_sk_on_app2app_datagram"
8371 """ internal event dispatcher for OnApp2AppDatagram """
8372 l_cleanparms = (parms.get(1, '')),
8373 l_cleanparms += (parms.get(2, '')),
8374 l_cleanparms += (parms.get(3, '')),
8375 self.OnApp2AppDatagram(*l_cleanparms)
8383 """
8384 In context of datagrams, this event will fire when:
8385 - 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
8386 - When a datagram is sent, the sender will get this event with listType SENDING_STREAMS Receiver of the datagram will get OnApp2AppDatagram event instead.
8387 - When the remote party drops app2app connection, the local user will get OnApp2AppStreamListChange with listType ALL_STREAMS and streams.size() zero.
8388 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.
8389
8390
8391 B{Return values:}
8392 - B{appname} - application ID - the name you supplied in App2AppCreate.
8393
8394 - B{list_type} - application list type (read/write/all)
8395
8396 - B{streams} - SEStringlist with affected stream IDs.
8397
8398 - B{received_sizes} - For RECEIVED_STREAMS, contains the number of bytes in each stream waiting to be read
8399 """
8400 pass
8401 event_handlers[8] = "_sk_on_app2app_stream_list_change"
8403 """ internal event dispatcher for OnApp2AppStreamListChange """
8404 l_cleanparms = (parms.get(1, '')),
8405 l_cleanparms += (Skype.APP2APP_STREAMS[parms.get(2)]),
8406 l_cleanparms += (parms.get(3, [])),
8407 l_cleanparms += (parms.get(4, [])),
8408 self.OnApp2AppStreamListChange(*l_cleanparms)
8409
8410 -def GetSkype(apptoken, has_event_thread=True, host='127.0.0.1', port=8963, logtransport=False, secure=True):
8411 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,19:955,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,0:7,0:44,0:28,0:10,0:11,0:12,0:6,0:8\n"
8412 return Skype(skypekit.SkypeKit(apptoken, module_id2classes, has_event_thread, host, port, logtransport, secure, setup))
8413