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

Symbian OS Communications (779884), страница 36

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

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

Asthere is no central control over their allocation, it is perfectly feasibleto be using one network, for example WLAN, and have an IP addressof 192.168.1.1, and also be connected to your network operator’s MMSnetwork where you could be given exactly the same IP address! At thispoint an IP stack using a traditional routing table approach would becompletely stuck. Even when the same address is not given to both localinterfaces, there are still problems with deciding where packets shouldgo – which interface do you use for a packet destined for 192.168.1.5,for example? There’s no way to tell, as the routing table is likely to offerboth interfaces as equally good routes – even though the device to whichyou want to connect is reachable on only one of the two networks.Symbian OS solves these multihoming problems by getting applications to declare which interface they want to use, through use ofthe RConnection API, then allowing them to associate their sockets160IP AND RELATED TECHNOLOGIESOperator ‘walledgarden’ servicesThe InternetOperator MMSnetworkInternet-basedweb serverOperator MMSgatewayOperator ‘walledgarden’ web serverFigure 6.2 A typical multihoming scenariowith that connection.

Host resolver connections can also be scoped inthe same way. This means that an application is unaware of other,potentially conflicting, network connections that are active on thedevice, and therefore works as it would if there were only the oneconnection.6.2 IP Networks and Symbian OSAn IP network for a mobile phone can provide many services over anumber of different bearers:• Network operators provide IP-based services on their own networks,for example, MMS, music and video downloads.• Most network operators offer access to the Internet as well as theirown walled garden services.• Ad-hoc networks can be created using local area networking technologies such as Bluetooth, for example, for multi-player gaming.IP NETWORKS AND SYMBIAN OS161• Service providers on the internet may provide their own IP services,for example, Skype.Because of the variety of networks available, you need to give carefulconsideration to which of these different networks are most suitable fortheir application.

Symbian OS aims to make it as easy as possible tosupport any or all of these network technologies by providing commoninterfaces that enable applications to use different bearers and networktypes without being concerned with the details of a specific networktechnology or connection.It is important to remember that devices running Symbian OS are‘mobile’. This means availability of networks may change as the devicemoves geographically – this can occur over large distances, such asgoing to a different country where a different service provider may beused; and over shorter distances, such as travelling on the train, wherethe availability of the GPRS network can vary from minute to minute.Applications need to be able cope with this dynamic behavior.

Thisis an important point to consider when developing for mobile devices,particularly if you are porting an application from another platform whichhas been designed to use a fixed network with a very high availability (aswould be the case for many PC-based applications, for example).This chapter discusses the basics of how to create a network connection, how to use it to enable IP-based services on Symbian OS and whatto consider when creating applications for mobile devices.ESOCKControlDataIP threadCommsDATConfiguration,Connection,Disconnectionetc.TCPNETWORKINTERFACE (NIF)NETWORKINTERFACE (NIF)GPRS/WCDMAGGSNUDPDNSICMPIPWIFIWIFI accesspointNETWORKINTERFACE (NIF)NETWORKINTERFACE (NIF)Circuitswitched callISPBluetoothBluetooth PANaccess pointFigure 6.3 Symbian OS networking subsystem and bearer technologies162IP AND RELATED TECHNOLOGIES6.2.1 Getting StartedOne of the most important concepts to understand for IP-based applications on Symbian OS is the Internet Access Point (IAP).

An IAP is acollection of settings that define how a connection to a particular network is made. These settings are stored in the communications database,CommsDat (discussed in section 6.3.2) – the application itself does notneed to know the parameters required to connect to different networks. Itcan use the system-wide connection preferences, or the application canprovide a specific connection preference.Here are some examples of information stored relating to a specificIAP:• The phone number, for a dial-up ISP.• The access point name (APN), for a GPRS connection.• The SSID of a WLAN access point.These details will be discussed further in section 6.3.2, but the conceptof an IAP is important to understand as it is used throughout the rest of thechapter. An IAP can also be thought of as representing a single networkinterface, and each IAP refers to a single interface.CommsDat is a new component in Symbian OS v9.1, and replacesCommDB which performed the same role in earlier releases.

A compatibility layer exists for clients of CommDB using the C++ API, howeverthere is no longer any support for querying the comms database usingSQL statements.The three most important classes for IP-based applications on SymbianOS are RConnection, RSocket and RHostResolver. These havealready been introduced in Chapter 3 but are discussed with particularreference to IP here.

RConnection was first introduced in SymbianOS v7.0s in order to support multihoming. RConnection allows anapplication to select which IAP to use for its network connection, andto associate its sockets with that connection. This is very importantbecause this ensures that the IP traffic from those sockets is sent to thecorrect network. RConnection also has APIs for gathering informationabout a network connection such as the status, connection informationetc.The RConnection API serves a similar purpose to the RNif andRGenericAgent APIs in v7.0, which were removed in v9.1.NETWORK BEARER TECHNOLOGIES IN SYMBIAN OS163RConnection is discussed in more detail in section 6.3.1.

In practice,an application should consider an RConnection to represent a handleto a network connection. Note, that we said a handle to the connection,not the connection itself. Multiple applications may have handles to thesame network connection.6.2.2 The Default or ‘implicit’ ConnectionEach Symbian OS device has a default network connection configured.This can be used by legacy applications (created before the RConnection API was introduced in Symbian OS v7.0s), or applications usingthe stdlib or PIPS sockets implementations (which are layered on top ofRSocket), which do not use an RConnection – in this case the defaultnetwork connection is started automatically if IP data is sent withoutfirst having connected an IAP explicitly.

This is known as the implicitconnection. The IAP used for the implicit connection is configured inCommsDat as part of the Connection Preferences table (again, discussedin section 6.3.2). UIQ allows the user to configure which IAP is usedfor the default connection as part of the internet account settings on thedevice, and it is presented to the user as the ‘Preferred’ internet account.The user also has an option to decide whether to be prompted to selectan IAP when a connection is requested by an application that does notspecify a connection itself, or whether the default IAP should always beused. For most applications on S60 the user is always prompted to selectthe IAP at connection time.

This allows the user to have control of whichconnections are made for each application. However, it may not alwaysbe appropriate for the user to make this decision since not all applicationswill work on all networks (for example, MMS will only work on thenetwork operator’s MMS network, which is why S60 allow the user tospecify a single IAP for this in the messaging settings). Therefore if yourapplication needs to connect over a specific network it is suggested thatyou provide a configuration option to the user to allow them to specifya network that should always be used.

This gives your application fullcontrol over its choice of network connection.6.3 Network Bearer Technologies in Symbian OSSymbian OS supports the following IP bearer technologies, althoughconfiguration options may not be available for all of these on a given UIplatform:• Packet-switched data connections over GPRS/W-CDMA – providesoperator services such as Internet access, MMS, music and videostreaming.164IP AND RELATED TECHNOLOGIES• Circuit-switched data calls – provides Internet access via dial-up ISPs,access to private networks.• Bluetooth PAN – provides a virtual Ethernet network over Bluetooth.Can be used for multi-player games over ad-hoc local networks.From v9.1 onwards Symbian OS supports the PAN-User (PANU) andGateway Node (GN) roles.

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

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

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

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