Главная » Просмотр файлов » Concepts with Symbian OS

Concepts with Symbian OS (779878), страница 58

Файл №779878 Concepts with Symbian OS (Symbian Books) 58 страницаConcepts with Symbian OS (779878) страница 582018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 58)

These MTM-specific functions are implemented in the MTMand assigned IDs that correspond to each protocol-specific operationoffered.Easy Sending of Messages: Send-As MessagingBy now you might be a little taken aback by the complexity of messagehandling and the message architecture of Symbian OS. While it is true thatthe architecture is big and complex – after all, it must handle messages asdifferent as faxes and SMS messages – the designers of Symbian OS havestreamlined the process we use to send messages.

The sending process isrelatively short and very straightforward. Let’s review that process in thissection.The sending procedure is called send-as messaging. It is a genericprocess – i.e., one process for all message types – that uses a messagetype’s MTM to guide the sending process. It is a powerful model that canbe used to send messages of all types and even to transfer data in uniqueways. The procedure follows the sequence we outlined in the last section.Send-as messaging centers on the CSendAs class and is accomplishedby the following steps:MESSAGE HANDLING IN LINUX2811.Choose the MTM that the CSendAs object uses to send the message.This can be done in two ways: we can set the MTM directly or wecan use a CSendAs object to search for the MTM we need.2.Choose the service to use for the outgoing message.3.Create the message (and all its parts) as a CSendAs object.

Once themessage for the CSendAs object has been created, we can createand modify its components: the recipients, the subject, contents ofthe body, and so forth.4.Save and send the message means saving it into the appropriateservice’s message store.Receiving MessagesApplications can work with the messaging system and message arrival.While the message server itself handles the listening and messagetransport functions, applications can register themselves to be notifiedupon message arrival.Registration occurs when a connection with the message server isestablished. Recall that connecting with the message server requires aparameter that is an object of the MMsvSessionObserver class.The message server calls a specific function from the class objectpassed during the server connection whenever a ‘message event’ occurs.A code that signifies which event occurred is passed in the first parameterand up to three pointers to data areas that apply to the message eventmake up the rest of the function call’s parameter list.13.3Message Handling in LinuxWhere messaging may seem quite complex on Symbian OS, it is positivelysimple on Linux.

As an illustration and contrast, let’s overview howmessages are handled by the Linux operating system.Message Models in LinuxAs we have seen before, Linux designers usually take the simplest routethey can when dealing with complex situations. Messaging is no exception. There is little built-in support for messages or message types in theLinux kernel. Any message modeling or message structure must be built282MESSAGINGand configured by applications or by third-party developers designingmodules for Linux. Email messages represent an exception: there is somesmall support for email in Linux.Linux message structure is quite straightforward. Text files representemail messages; any other kind of messages are built and used by theapplications that implement them.

Even attachments to email requiremessage-processing programs supplied outside of the operating system.Linux supplies the mechanism to receive messages and place them in afile. Any reading of messages must access the message file and processthat file in a way appropriate to the message type.In a sense, this approach to messages utilizes abstraction – except thatit is not built into the operating system. Linux supplies the base operationand assumes that any further processing is provided by an outside source.In like manner, Symbian OS provides the base processing and assumesthat further processing of a message is supplied by outside MTMs.

Themajor difference between these two is the lack of a model in Linux. Linuxsimply assumes that applications are provided to process the text filemessage that has just been received.Sending MessagesThe communications medium over which messages travel is a sharedresource in Linux. Whether it is a network or a Bluetooth connection,Linux usually provides a server that shares the resource between theprocesses that require it.The reasoning for these Linux servers, however, is a bit different thanthe reasoning behind servers in a microkernel operating system likeSymbian OS.

For Linux, servers implement protocols. These protocolsare complicated enough that a server is designed to handle the complexnature of the communication. The server implementation is an assistantto developers that want to use the resource, but that is all. The serverdoes not protect the resource; in fact, if an application were to want touse the resource, the system would gladly allow the access. This meansthat, while sending messages in Linux is aided by opening a connectionto a server, that connection is not technically necessary.However, sending messages in Linux is helped by various messageservers. Consider email. There are several email servers that run underLinux; a popular application for this service is the ‘sendmail’ server.A sendmail server receives an email message from a client, processesthat message by reviewing the textual message contents and opens aSUMMARY283connection to a remote server by way of delivering the message.

There isno special format other than the format of an email message itself (whichis public-domain specification).There is nothing special about an email server. In fact, if an emailclient wanted to send its email directly to the receiver’s email server,it could certainly do so. The network connection would be shared bythe operating system through the abstraction of sockets.

The ‘sendmail’process could easily be bypassed.Receiving and Delivering MessagesAs you might expect from a Linux system, receipt and delivery of messagesis very simple as well. The computers that are configured to receivemessages run a server that listens for incoming messages, receives thosemessages and stores them. Again, a server is used because it is convenientnot because it is managing the shared communication medium.Email again makes a great example. The ‘sendmail’ server processesincoming messages as well as outgoing messages.

It listens for connections – as it always does – and delivers messages to local as well asremote computers. Notice that this action is the same action we discussedin the last section. The server’s actions are very straightforward – receivea message, determine the destination, and either send it on or store itlocally. Local storage is as a text file.Sometimes the simplicity of Linux is a liability. The simplicity of‘receive a message’ and ‘deliver a message’ has degraded system securityin the past.

A practice called relaying is used to send an email from anoutside party to an outside party. This would not be such a bad practicewere it not for spam email or unsolicited email. Often, a relayed messagecomes into an email server with 100s of email addresses as destinations.The resulting delivery is not only a burden on the delivery server, butit also shields the sender’s address.

Relaying is a practice that is on thedecline, mostly because of new verification mechanisms built into Linuxemail servers.13.4SummaryIn this chapter, we have discussed the messaging frameworks of operatingsystems. Since messages vary widely in content but can be roughlycategorized by form, frameworks have been designed to be generic284MESSAGINGenough to handle all forms of messages and to allow specialization ofmessage handling.We reviewed the components of a message and outlined the structureof message implementations for each message type.

We then discussedthe way that Symbian OS addresses messages, from the message server,the process that manages messaging stores and facilities, to the detailedways that we interact with the message server to read and send email.We also discussed ‘send-as messaging’, which is a convenient wayto send messages through a simple interface, using functions commonto all message types. We then contrasted the Symbian OS approachwith the Linux approach. We noted how a simple, usually text-based,approach to messages can be abstract, allowing for the same interfacesto work with many different message types, and also allow for the otherimplementations to co-exist with current servers.Exercises1.Why are email messages always in readable text?2.Is sending a fax an example of the push or pull model of messaging?3.Why does Symbian OS use message servers? Why are clients notallowed to access messages directly?4.Let’s say that a new message format is invented that is like the SMSformat, but can be sent over a local area network.

If you had toimplement a receiver for this kind of message, would you rather usethe approach of Linux or Symbian OS? Explain your answer.5.Smartphones have powerful computers in them. Why would it notwork to make a smartphone into a mail server?14SecurityThe Great Wall of China is an amazing feat of architecture. Started duringChina’s Zhou dynasty around 600 BC, the Great Wall still stands today.It has been fortified and repaired and today runs for over 5000 kilometersthrough northern China. Its purpose was chiefly defensive in nature: itwas a protective barrier between China and marauding tribes to the north.Protection – keeping those who do not belong out – was the reason thewall was built. When the wall was breached for the last time by theManchurians in 1644, it is said that the wall was still doing its job andthat a weakness in the government allowed others to take power.While the Great Wall provided protection, it did not provide security.Protection is a barrier keeping everything out.

Характеристики

Тип файла
PDF-файл
Размер
1,2 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6289
Авторов
на СтудИзбе
315
Средний доход
с одного платного файла
Обучение Подробнее