<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)

    隨筆檔案

    文章檔案

    相冊(cè)

    搜索

    •  

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    6.2 telephone —電話服務(wù)
    這個(gè)模塊提供了使用電話的api
    因?yàn)樵O(shè)備用戶也可以手動(dòng)明確的掛起電話,所以這會(huì)影響到當(dāng)前的通話狀態(tài)。補(bǔ)充,使用這個(gè)模塊在模擬器上不會(huì)有效果因?yàn)椴荒艿玫酵ㄔ挕?br /> 此telephone模塊有下列函數(shù)。

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

    hang_up()
       嘗試掛起調(diào)用此函數(shù)進(jìn)程中的一個(gè)被dial 函數(shù)建立的通話。如果通話已經(jīng)完成,拋出 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 模塊提供消息服務(wù)api。目前,messaging 模塊有函數(shù):
    The messaging module offers APIs to messaging services. Currently, the messaging module has functions:

    sms_send(number, msg, [encoding=’7bit’, callback=None, name=”” ])
           發(fā)送一個(gè)主體為文字(unicode 編碼)的SMS 消息到指定電話號(hào)碼(為字符串)
           Sends an SMS message with body text msg 4 (Unicode)to telephone number number (string).
          可選參數(shù) encoding被用來定義消息編碼。
           The optional parameter encoding is used to define encoding in the message. The parameter values  can be ’7bit’, ’8bit’ or ’UCS2’.
           可選參數(shù)callback 根據(jù)當(dāng)前發(fā)送操作狀態(tài)被執(zhí)行??捎玫臓顟B(tài)定義在messaging 模塊的數(shù)據(jù)成員中。如果前一次發(fā)送請(qǐng)求正在進(jìn)行,再執(zhí)行另外一次發(fā)送, 將拋出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 發(fā)送函數(shù)將阻塞直到隊(duì)列中的消息被刪除或發(fā)生發(fā)送錯(cuò)誤。
           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 .
         可選參數(shù)name在消息成功發(fā)送到號(hào)碼后 ,將顯示在發(fā)件箱中,表示接受消息者名稱。如果參數(shù)沒有提供,那么接受者電話號(hào)碼將被顯示在 發(fā)件箱中。
           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) 評(píng)論(1)  編輯  收藏

    FeedBack:
    # re: pys60 文檔 簡(jiǎn)單翻譯[未登錄] 2009-03-17 18:21 apple
    好牛啊,連這個(gè)都被你研究出來了~~~~~~~~  回復(fù)  更多評(píng)論
      

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 无码国产精品一区二区免费式芒果 | 妻子5免费完整高清电视| 综合亚洲伊人午夜网| 国产V片在线播放免费无码| 免费真实播放国产乱子伦| 小说专区亚洲春色校园| 又粗又大又硬又爽的免费视频 | 午夜不卡久久精品无码免费| 亚洲AV日韩AV永久无码久久| 91精品全国免费观看含羞草 | 免费精品99久久国产综合精品| 亚洲中文字幕无码一区| 久久精品免费观看国产| 亚洲成人黄色在线观看| 毛片免费在线观看网址| 国产精品手机在线亚洲| 亚洲人成电影网站国产精品| 在线看片免费人成视频播| 久久亚洲AV成人无码软件| 成人免费男女视频网站慢动作| 国产亚洲精品2021自在线| 在线播放亚洲第一字幕| 最近中文字幕mv免费高清在线| 亚洲入口无毒网址你懂的| 又粗又大又猛又爽免费视频| 国产免费一级高清淫曰本片| 亚洲人成电影在在线观看网色| 无码永久免费AV网站| 特级aaaaaaaaa毛片免费视频| 久久精品国产亚洲综合色| AV无码免费永久在线观看| 免费在线观看亚洲| 91在线精品亚洲一区二区| 在线a人片天堂免费观看高清| 精品无码一级毛片免费视频观看| 亚洲黄色在线视频| 免费va人成视频网站全| 曰批全过程免费视频网址| 男人的好看免费观看在线视频| 亚洲AV无码乱码在线观看代蜜桃 | 久久精品亚洲中文字幕无码网站|