在C++下实现的程序拨号代码 |
| 作者:csdn 来源:csdn 发布时间:2006-11-30 22:13:39 |
|
呵呵,下面是一段拨号代码(摘自Nokia的例子),代码虽然不多,但很多地方都值得学习,例如:对R类的使用,清理;server/client机制;参数传递机制;编码风格;注释风格等等自己体会吧。 在阅读代码之前请熟悉Symbian OS C++中的ETel结构,以及它的核心类RTelServer,RPhone,RLine,RCall. 下面是代码内容: void DialNumberL(const TDesC& aPhoneNumber) { //Create a connection to the tel server //Load in the phone device driver //Check there are available phones //Get info about the first available phone //Use this info to open a connection to the phone, the phone is identified by its name //Get info about the first line from the phone //Use this to open a line //Open a new call on this line //newCallName will now contain the name of the call //Close the phone, line and call connections and remove them from the cleanup stack //Unload the phone device driver //Close the connection to the tel server and remove it from the cleanup stack |
| [] [返回上一页] [打 印] |
|
文章评论 |
