<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 67  文章 - 79  trackbacks - 0
    <2009年3月>
    22232425262728
    1234567
    891011121314
    15161718192021
    22232425262728
    2930311234

    常用鏈接

    留言簿(1)

    隨筆檔案

    文章檔案

    相冊

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    6.2 telephone —電話服務
    這個模塊提供了使用電話的api
    因為設備用戶也可以手動明確的掛起電話,所以這會影響到當前的通話狀態。補充,使用這個模塊在模擬器上不會有效果因為不能得到通話。
    此telephone模塊有下列函數。

    dial(number)
         撥打number指定的號碼,number 是一個字符串,例如 u'+358501234567' 此處'+'表示國際前綴,'358'為國家代號,'50'為移動網絡代號(或地區代碼) '1234567'為用戶電話。如果有一個進行中的通話早于在python中的撥號,那么先前的通話被掛斷然后新的通話被建立。

    hang_up()
       嘗試掛起調用此函數進程中的一個被dial 函數建立的通話。如果通話已經完成,拋出 SymbianError: KErrNotReady


    Note: The following functions and data items are available from S60 3rd Edition onwards (inclusive).
    incoming call()
         Wait for incoming call, returns immediately. If a call arrives, answer can be called to answer the call. Without the invocation of function incoming call, the function answer has no effect.
    answer()
         Answers an incoming call - see also incoming call.
    call state(callable)
         The callable will be called when there are changes in the telephone line (lines) in the device. The argument for the call is a tuple with first item the possible new state and the second item, the possible incoming call number as a Unicode string.
         The possible states in the tuple are defined as telephone module constants.

    messaging 模塊提供消息服務api。目前,messaging 模塊有函數:
    The messaging module offers APIs to messaging services. Currently, the messaging module has functions:

    sms_send(number, msg, [encoding=’7bit’, callback=None, name=”” ])
           發送一個主體為文字(unicode 編碼)的SMS 消息到指定電話號碼(為字符串)
           Sends an SMS message with body text msg 4 (Unicode)to telephone number number (string).
          可選參數 encoding被用來定義消息編碼。
           The optional parameter encoding is used to define encoding in the message. The parameter values  can be ’7bit’, ’8bit’ or ’UCS2’.
           可選參數callback 根據當前發送操作狀態被執行。可用的狀態定義在messaging 模塊的數據成員中。如果前一次發送請求正在進行,再執行另外一次發送, 將拋出RuntimeError
           The optional parameter callback is invoked with the current status of the send operation as parameter. The possible states are data items in the module messaging. Invoking another send while a previous send request is ongoing will result in RuntimeError being raised.
           如果callback 沒有提供,sms 發送函數將阻塞直到隊列中的消息被刪除或發生發送錯誤。
           If the callback is not given, the sms send function will block until the message in the queue is either deleted or the sending has failed5 .
         可選參數name在消息成功發送到號碼后 ,將顯示在發件箱中,表示接受消息者名稱。如果參數沒有提供,那么接受者電話號碼將被顯示在 發件箱中。
           The optional parameter name will be shown in the sent item message entry as recipient’s name after successfully sending message to number . If this parameter is not specified, then the recipient’s phone number will be shown in the sent item message entry6 .


    example:

    >>> import messaging
    >>>
    >>> def cb(state):
    ...   if state==messaging.ESent:
    ...     print "**Message was sent**"
    ...   if state==messaging.ESendFailed:
    ...     print "**Something went wrong - Truly sorry for this**"
    ...
    >>> messaging.sms_send("1234567", "Hello from PyS60!", ’7bit’, cb, "Mary")
    >>> **Message was sent** # This is printed from the callback


    mms_send(number, msg, [attachment=None ])
           Note: Available from S60 3.0 onwards (inclusive).
           Sends an MMS message with body text msg (Unicode) to telephone number number (string). The
           optional parameter attachment is full path to e.g. image file attached to the message.


    posted on 2009-03-16 15:32 zarra 閱讀(329) 評論(1)  編輯  收藏

    FeedBack:
    # re: pys60 文檔 簡單翻譯[未登錄] 2009-03-17 18:21 apple
    好牛啊,連這個都被你研究出來了~~~~~~~~  回復  更多評論
      

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 在线视频精品免费| 大地资源网高清在线观看免费 | 成人片黄网站色大片免费| 亚洲精品国产字幕久久不卡| 一级做a爰片久久毛片免费陪 | 日韩精品人妻系列无码专区免费| 国产成人麻豆亚洲综合无码精品 | 成人亚洲国产va天堂| 成年人性生活免费视频| 在线观看亚洲AV日韩A∨| 一个人免费观看www视频在线| 亚洲午夜在线一区| 在线观看免费高清视频| 亚洲精品无码国产片| 免费国产在线观看| 亚洲天堂免费在线视频| 久久精品国产69国产精品亚洲| 久久久精品免费国产四虎| 亚洲综合激情九月婷婷| 2021久久精品免费观看| 亚洲熟妇AV乱码在线观看| 国产在线不卡免费播放| 国产男女爽爽爽免费视频| 亚洲精品乱码久久久久66| 99精品一区二区免费视频| 亚洲成人激情小说| 免费真实播放国产乱子伦| a级成人毛片免费视频高清| 亚洲欧洲日产国码www| 国产一级淫片免费播放电影| 韩日电影在线播放免费版| 亚洲国产精品成人精品软件| 成人毛片手机版免费看| 一级免费黄色大片| 亚洲视频一区调教| 国产老女人精品免费视频| 美女视频黄a视频全免费网站色窝 美女被cao网站免费看在线看 | 亚洲欧洲日产国码二区首页 | 成人性生交大片免费看好| 亚洲va久久久久| 亚洲熟女一区二区三区|