📄 skype4py.application-pysrc.html
字号:
<h1 class="epydoc">Source Code for <a href="Skype4Py.application-module.html">Module Skype4Py.application</a></h1><pre class="py-src"><a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-docstring">'''APP2APP protocol.</tt> </tt><a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-docstring">'''</tt> </tt><a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"> </tt><a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module Skype4Py.utils=Skype4Py.utils-module.html"><a title="Skype4Py.utils" class="py-name" href="#" onclick="return doclink('link-0', 'utils', 'link-0');">utils</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt><a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Module Skype4Py.user=Skype4Py.user-module.html"><a title="Skype4Py.user" class="py-name" href="#" onclick="return doclink('link-1', 'user', 'link-1');">user</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt><a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">threading</tt> </tt><a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"> </tt><a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"> </tt><a name="IApplication"></a><div id="IApplication-def"><a name="L9"></a><tt class="py-lineno"> 9</tt> <a class="py-toggle" href="#" id="IApplication-toggle" onclick="return toggle('IApplication');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="Skype4Py.application.IApplication-class.html">IApplication</a><tt class="py-op">(</tt><tt class="py-base-class">Cached</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt></div><div id="IApplication-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="IApplication-expanded"><a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"> <tt class="py-docstring">'''Represents an application in APP2APP protocol. Use L{ISkype.Application<skype.ISkype.Application>} to instatinate.</tt> </tt><a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-docstring"> '''</tt> </tt><a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"> </tt><a name="IApplication.__repr__"></a><div id="IApplication.__repr__-def"><a name="L13"></a><tt class="py-lineno"> 13</tt> <a class="py-toggle" href="#" id="IApplication.__repr__-toggle" onclick="return toggle('IApplication.__repr__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="Skype4Py.application.IApplication-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt></div><div id="IApplication.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IApplication.__repr__-expanded"><a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'<%s with Name=%s>'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt id="link-2" class="py-name" targets="Class Skype4Py.utils.Cached=Skype4Py.utils.Cached-class.html"><a title="Skype4Py.utils.Cached" class="py-name" href="#" onclick="return doclink('link-2', 'Cached', 'link-2');">Cached</a></tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method Skype4Py.API.ICommand.__repr__()=Skype4Py.API.ICommand-class.html#__repr__,Method Skype4Py.API.darwin.CFNumber.__repr__()=Skype4Py.API.darwin.CFNumber-class.html#__repr__,Method Skype4Py.API.darwin.CFString.__repr__()=Skype4Py.API.darwin.CFString-class.html#__repr__,Method Skype4Py.API.darwin.CFType.__repr__()=Skype4Py.API.darwin.CFType-class.html#__repr__,Method Skype4Py.application.IApplication.__repr__()=Skype4Py.application.IApplication-class.html#__repr__,Method Skype4Py.application.IApplicationStream.__repr__()=Skype4Py.application.IApplicationStream-class.html#__repr__,Method Skype4Py.call.ICall.__repr__()=Skype4Py.call.ICall-class.html#__repr__,Method Skype4Py.call.IConference.__repr__()=Skype4Py.call.IConference-class.html#__repr__,Method Skype4Py.call.IParticipant.__repr__()=Skype4Py.call.IParticipant-class.html#__repr__,Method Skype4Py.callchannel.ICallChannel.__repr__()=Skype4Py.callchannel.ICallChannel-class.html#__repr__,Method Skype4Py.chat.IChat.__repr__()=Skype4Py.chat.IChat-class.html#__repr__,Method Skype4Py.chat.IChatMember.__repr__()=Skype4Py.chat.IChatMember-class.html#__repr__,Method Skype4Py.chat.IChatMessage.__repr__()=Skype4Py.chat.IChatMessage-class.html#__repr__,Method Skype4Py.client.IPluginEvent.__repr__()=Skype4Py.client.IPluginEvent-class.html#__repr__,Method Skype4Py.client.IPluginMenuItem.__repr__()=Skype4Py.client.IPluginMenuItem-class.html#__repr__,Method Skype4Py.filetransfer.IFileTransfer.__repr__()=Skype4Py.filetransfer.IFileTransfer-class.html#__repr__,Method Skype4Py.sms.ISmsChunk.__repr__()=Skype4Py.sms.ISmsChunk-class.html#__repr__,Method Skype4Py.sms.ISmsMessage.__repr__()=Skype4Py.sms.ISmsMessage-class.html#__repr__,Method Skype4Py.sms.ISmsTarget.__repr__()=Skype4Py.sms.ISmsTarget-class.html#__repr__,Method Skype4Py.user.IGroup.__repr__()=Skype4Py.user.IGroup-class.html#__repr__,Method Skype4Py.user.IUser.__repr__()=Skype4Py.user.IUser-class.html#__repr__,Method Skype4Py.voicemail.IVoicemail.__repr__()=Skype4Py.voicemail.IVoicemail-class.html#__repr__"><a title="Skype4Py.API.ICommand.__repr__Skype4Py.API.darwin.CFNumber.__repr__Skype4Py.API.darwin.CFString.__repr__Skype4Py.API.darwin.CFType.__repr__Skype4Py.application.IApplication.__repr__Skype4Py.application.IApplicationStream.__repr__Skype4Py.call.ICall.__repr__Skype4Py.call.IConference.__repr__Skype4Py.call.IParticipant.__repr__Skype4Py.callchannel.ICallChannel.__repr__Skype4Py.chat.IChat.__repr__Skype4Py.chat.IChatMember.__repr__Skype4Py.chat.IChatMessage.__repr__Skype4Py.client.IPluginEvent.__repr__Skype4Py.client.IPluginMenuItem.__repr__Skype4Py.filetransfer.IFileTransfer.__repr__Skype4Py.sms.ISmsChunk.__repr__Skype4Py.sms.ISmsMessage.__repr__Skype4Py.sms.ISmsTarget.__repr__Skype4Py.user.IGroup.__repr__Skype4Py.user.IUser.__repr__Skype4Py.voicemail.IVoicemail.__repr__" class="py-name" href="#" onclick="return doclink('link-3', '__repr__', 'link-3');">__repr__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Variable Skype4Py.application.IApplication.Name=Skype4Py.application.IApplication-class.html#Name,Variable Skype4Py.callchannel.ICallChannelManager.Name=Skype4Py.callchannel.ICallChannelManager-class.html#Name,Variable Skype4Py.chat.IChat.Name=Skype4Py.chat.IChat-class.html#Name"><a title="Skype4Py.application.IApplication.NameSkype4Py.callchannel.ICallChannelManager.NameSkype4Py.chat.IChat.Name" class="py-name" href="#" onclick="return doclink('link-4', 'Name', 'link-4');">Name</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt></div><a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"> </tt><a name="IApplication._Alter"></a><div id="IApplication._Alter-def"><a name="L16"></a><tt class="py-lineno"> 16</tt> <a class="py-toggle" href="#" id="IApplication._Alter-toggle" onclick="return toggle('IApplication._Alter');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="Skype4Py.application.IApplication-class.html#_Alter">_Alter</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">AlterName</tt><tt class="py-op">,</tt> <tt class="py-param">Args</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt></div><div id="IApplication._Alter-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IApplication._Alter-expanded"><a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_Skype</tt><tt class="py-op">.</tt><tt class="py-name">_Alter</tt><tt class="py-op">(</tt><tt class="py-string">'APPLICATION'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_Name</tt><tt class="py-op">,</tt> <tt class="py-name">AlterName</tt><tt class="py-op">,</tt> <tt class="py-name">Args</tt><tt class="py-op">)</tt> </tt></div><a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"> </tt><a name="IApplication._Init"></a><div id="IApplication._Init-def"><a name="L19"></a><tt class="py-lineno"> 19</tt> <a class="py-toggle" href="#" id="IApplication._Init-toggle" onclick="return toggle('IApplication._Init');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="Skype4Py.application.IApplication-class.html#_Init">_Init</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">Name</tt><tt class="py-op">,</tt> <tt class="py-param">Skype</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt></div><div id="IApplication._Init-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IApplication._Init-expanded"><a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_Name</tt> <tt class="py-op">=</tt> <tt class="py-name">unicode</tt><tt class="py-op">(</tt><tt id="link-5" class="py-name"><a title="Skype4Py.application.IApplication.NameSkype4Py.callchannel.ICallChannelManager.NameSkype4Py.chat.IChat.Name" class="py-name" href="#" onclick="return doclink('link-5', 'Name', 'link-4');">Name</a></tt><tt class="py-op">)</tt> </tt><a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_Skype</tt> <tt class="py-op">=</tt> <tt class="py-name">Skype</tt> </tt></div><a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"> </tt><a name="IApplication._Property"></a><div id="IApplication._Property-def"><a name="L23"></a><tt class="py-lineno"> 23</tt> <a class="py-toggle" href="#" id="IApplication._Property-toggle" onclick="return toggle('IApplication._Property');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="Skype4Py.application.IApplication-class.html#_Property">_Property</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">PropName</tt><tt class="py-op">,</tt> <tt class="py-param">Set</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt></div><div id="IApplication._Property-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IApplication._Property-expanded"><a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_Skype</tt><tt class="py-op">.</tt><tt class="py-name">_Property</tt><tt class="py-op">(</tt><tt class="py-string">'APPLICATION'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_Name</tt><tt class="py-op">,</tt> <tt class="py-name">PropName</tt><tt class="py-op">,</tt> <tt class="py-name">Set</tt><tt class="py-op">)</tt> </tt></div><a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"> </tt><a name="IApplication.__Connect_app_streams"></a><div id="IApplication.__Connect_app_streams-def"><a name="L26"></a><tt class="py-lineno"> 26</tt> <a class="py-toggle" href="#" id="IApplication.__Connect_app_streams-toggle" onclick="return toggle('IApplication.__Connect_app_streams');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="Skype4Py.application.IApplication-class.html#__Connect_app_streams">__Connect_app_streams</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">App</tt><tt class="py-op">,</tt> <tt class="py-param">Streams</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt></div><div id="IApplication.__Connect_app_streams-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="IApplication.__Connect_app_streams-expanded"><a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">App</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">:</tt> </tt><a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-name">x</tt> <tt class="py-keyword">for</tt> <tt class="py-name">x</tt> <tt class="py-keyword">in</tt> <tt id="link-6" class="py-name" targets="Variable Skype4Py.application.IApplication.Streams=Skype4Py.application.IApplication-class.html#Streams"><a title="Skype4Py.application.IApplication.Streams" class="py-name" href="#" onclick="return doclink('link-6', 'Streams', 'link-6');">Streams</a></tt> <tt class="py-keyword">if</tt> <tt class="py-name">x</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Variable Skype4Py.application.IApplicationStream.PartnerHandle=Skype4Py.application.IApplicationStream-class.html#PartnerHandle,Variable Skype4Py.call.ICall.PartnerHandle=Skype4Py.call.ICall-class.html#PartnerHandle,Variable Skype4Py.filetransfer.IFileTransfer.PartnerHandle=Skype4Py.filetransfer.IFileTransfer-class.html#PartnerHandle,Variable Skype4Py.voicemail.IVoicemail.PartnerHandle=Skype4Py.voicemail.IVoicemail-class.html#PartnerHandle"><a title="Skype4Py.application.IApplicationStream.PartnerHandleSkype4Py.call.ICall.PartnerHandleSkype4Py.filetransfer.IFileTransfer.PartnerHandleSkype4Py.voicemail.IVoicemail.PartnerHandle" class="py-name" href="#" onclick="return doclink('link-7', 'PartnerHandle', 'link-7');">PartnerHandle</a></tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__Connect_username</tt><tt class="py-op">]</tt> </tt><a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">s</tt><tt class="py-op">:</tt> </tt>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -