<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ⅴ无码一区二区二三区软件 亚洲AⅤ视频一区二区三区 | 亚洲无码高清在线观看| 中中文字幕亚洲无线码| 人成午夜免费视频在线观看| 亚洲电影在线播放| 国产免费一区二区三区| 亚洲a级成人片在线观看| 青青草a免费线观a| 亚洲色成人四虎在线观看| 好爽又高潮了毛片免费下载| 亚洲色在线无码国产精品不卡| 在线观看免费宅男视频| 看免费毛片天天看| 青青草原亚洲视频| 先锋影音资源片午夜在线观看视频免费播放| 九月丁香婷婷亚洲综合色| 亚洲视频在线免费播放| www.亚洲成在线| 四虎影视永久免费观看网址| 成人在线免费视频| 亚洲AV无码专区国产乱码电影| 99re在线精品视频免费| 亚洲 暴爽 AV人人爽日日碰 | 亚洲成AV人在线观看网址| 久久久久久噜噜精品免费直播| 亚洲熟妇无码八AV在线播放| 99re在线这里只有精品免费| 亚洲欧美自偷自拍另类视| 亚洲午夜精品第一区二区8050| 午夜免费啪视频在线观看| 亚洲一卡2卡三卡4卡无卡下载| 亚洲欧洲日产国码一级毛片| 6080午夜一级毛片免费看| 337p日本欧洲亚洲大胆人人| 亚洲人成网亚洲欧洲无码久久 | 13一14周岁毛片免费| 亚洲私人无码综合久久网| 中文字幕亚洲无线码a| 精品成在人线AV无码免费看| 日韩在线观看免费| 亚洲美女激情视频|