<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 閱讀(335) 評論(1)  編輯  收藏

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

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


    網站導航:
     
    主站蜘蛛池模板: 国产综合成人亚洲区| 老司机69精品成免费视频| 又大又硬又爽又粗又快的视频免费| 亚洲综合无码AV一区二区| 搜日本一区二区三区免费高清视频 | 韩国欧洲一级毛片免费| 久久精品国产亚洲AV大全| 久久久久久久久久国产精品免费| 国产成人亚洲综合色影视| 99视频有精品视频免费观看| 亚洲美女视频免费| 久久国内免费视频| 亚洲自偷自拍另类12p| 久久精品国产亚洲AV电影网| 亚洲国产精品无码久久久久久曰| 国产精品国产亚洲区艳妇糸列短篇 | 无码少妇一区二区浪潮免费| 亚洲人成激情在线播放| 97热久久免费频精品99| 日本一区二区三区在线视频观看免费 | 毛片无码免费无码播放| 亚洲变态另类一区二区三区| 亚洲人成网站在线播放影院在线| 免费无码黄网站在线观看| 久久久免费精品re6| 久久九九全国免费| 亚洲AV日韩综合一区| 亚洲国产成人九九综合| 久热综合在线亚洲精品| 亚洲欧洲久久av| 国产精品久久香蕉免费播放| 最新欧洲大片免费在线| 免费看又黄又无码的网站| 免费看无码特级毛片| 国产精品午夜免费观看网站| 亚洲成人在线免费观看| 人妻无码中文字幕免费视频蜜桃 | 亚洲激情校园春色| 久久精品蜜芽亚洲国产AV| 无码乱人伦一区二区亚洲| 亚洲国产成人久久综合碰|