tailieunhanh - Symbian OS C++ for Mobile Phones VOL 1 PHẦN 9

Việc xử lý bẫy có một đức hạnh: nó cho phép người sử dụng biết những gì đang xảy ra. Nó vẫn không đủ tốt để sử dụng ứng dụng nghiêm trọng, mặc dù, bởi vì phương pháp này mất người sử dụng và các tập tin dữ liệu. Đó là một quy tắc hồng y rằng hệ điều hành Symbian không nên làm điều đó. | The data formats are as follows GDP PDU. This is the chunk of data that s passed down to our GDP implementation through the CGdpSession interface along with protocol-specific addressing information. GDP-SMS PDU. Here we have put a unique pattern on the front so that we can spot our messages at the far end. In this case BATTLESHIP . Note alternatively SMS Port numbers can be used. The destination address passed down through the GDP interface is encoded directly into the SMS PDU along with the SCA if present. The GDP-SMS Implementation The structure of the SMS code is illustrated below. The main component from the client s point of view is the CGdpSmsComms class shown in the center of the diagram. This implements CGdpSession through which all client operations are performed save for initially creating the object . This center class actually provides a simple thin interface or facade into the various components used for SMS communications. The three main subcomponents CGdpSmsSender CGdpSmsReceiver and CGdpSmsResourceManager actually carry out the three tasks required for the GDP session Figure . Figure Note It is interesting to note that the session class CGdpSmsComms has no state itself. This is because GDP-SMS along with all GDP implementations is actually stateless. This may come as a surprise after all the talk about state machines but it does make sense when you consider that GDP is a connectionless best-efforts datagram protocol. All the state is concerned with is attempting to get a specific packet in or out of the machine - no significant state is held over between packet transmissions. Through the following sections you ll see an in depth example of how to use the Symbian OS sockets API to communicate over SMS. The CGdpSmsSender class handles the task of creating an SMS message and sending it over via the socket server. It comes to life whenever the client code calls the SendL member of the GDP-SMS session object and continues asynchronous .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.