Главная » Просмотр файлов » Wiley.Developing.Software.for.Symbian.OS.2nd.Edition.Dec.2007

Wiley.Developing.Software.for.Symbian.OS.2nd.Edition.Dec.2007 (779887), страница 14

Файл №779887 Wiley.Developing.Software.for.Symbian.OS.2nd.Edition.Dec.2007 (Symbian Books) 14 страницаWiley.Developing.Software.for.Symbian.OS.2nd.Edition.Dec.2007 (779887) страница 142018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

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

Congratulations on creating and running your first SymbianOS C++ program on a smartphone!3Symbian OS ArchitectureThis chapter gives an overview of the architecture of Symbian OS – itsmain components and its underlying functionality.Much of the functionality described in this chapter is transparentfrom a typical Symbian OS application programming view; however,understanding the architectural details of an operating system can beuseful in developing software for it – especially for programming onhighly reliable, limited-resource devices such as smartphones.You can skim this chapter on a first read if you want, since anunderstanding of many of the subjects here is not absolutely essential todeveloping applications.

But if you are like me and prefer to dig into thedetails in order to gain deeper knowledge, then you will find this chapteruseful.3.1 Components in Symbian OSThere are usually many ways to slice a system up into pieces – thefollowing breakdown of the major parts of Symbian OS is suitable for thedetail covered in this chapter:1•KernelThe kernel is the central manager and arbiter of Symbian OS. Itmanages the system memory and schedules programs for execution. Italso allocates shared system resources and handles any functionalitythat requires privileged access to the CPU.•Base libraries: user library, file system, database manager1For more information about the components that comprise Symbian OS, I recommendyou consult the system model diagram available from the Symbian Developer Network(http://developer.symbian.com/main/oslibrary/sys models).64SYMBIAN OS ARCHITECTUREThe user library (euser.dll) contains APIs that provide functionalitysuch as string manipulation, linked lists, containers, math functions,error handling, and timers.

The user library also provides ‘user-side’access to kernel functions (e.g., thread control and client–servercommunications). This library is used not only by applications, butalso by the OS components.As you would expect, the file system library (efsrv.lib) providesthe functionality to manipulate files and directories, parse filenames,and perform file I/O.

The database manager (edbms.lib) provides aset of interfaces for relation database access.•Application services, engines, and protocolsApplication services, engines, and protocols provide access for programs to core application data, features, and services. An exampleis an engine to directly manipulate the data of built-in applicationsthat manage contacts, the calendar, and to-do lists. Other examplesinclude setting and handling alarms, and access to high-level communication features such as HTTP and HTTPS.•Application frameworkThe application framework implements the base functionality of thesmartphone’s graphical user interface applications.

This includes aframework for handling the GUI itself and an architecture frameworkfor handling non-GUI-related application functionality.•Communications architectureThe communications architecture consists of the APIs and frameworkthat implement data communications. This includes voice telephonyand TCP/IP over cellular radio as well as local communication protocols such as Bluetooth technology, IR, and USB. The messagingframework for support is also included, with SMS, MMS, and emailmessaging.•Middleware feature librariesThis is a catch-all category for the rest of the APIs and frameworks notcovered in the previous items. It includes components which provideservices for multimedia, security, and the POSIX-compliant librariesfor standard C.3.2 Multitasking in Symbian OSSymbian OS is a multitasking operating system – it can run multipleprograms at once. Although a smartphone’s screen is too small to displaymore than one application at a time (as desktop computers are able to),you can switch between running applications as needed.

Also, as withoperating systems such as Linux and Windows, Symbian OS providesSHARED CODE: LIBRARIES, DLLS, AND FRAMEWORKS65true multithreaded behavior in that it allows multiple execution threadsto execute in parallel, even in a single application.Here I’ll briefly introduce threads and processes in Symbian OS – theseform the basis of the multitasking capability in Symbian OS. Chapter 9covers threads and processes and inter-thread communication in moredetail.3.2.1 ThreadsThreads are streams of code execution that run in parallel with each other,based on their priorities.

The Symbian OS kernel supports pre-emptivemultithreading, which means that not only can threads run in parallel,but the kernel can switch execution from one thread to another withoutneeding any code in the running thread to explicitly relinquish control.A single Symbian OS program can have multiple threads, but as youwill see later, it’s best to avoid using them in your program directly, andinstead use the asynchronous framework. This framework provides anevent-driven cooperative multitasking model for your application, whichwill be introduced later in this chapter (and detailed in Chapter 8).3.2.2ProcessesA process is a running instance of a program that has its own independentdata space as well as one or more threads executing within it.

The codefor a process is contained in a file whose extension is .exe. The kernelcreates and starts a separate process for each invocation of an EXE file.Multiple processes can run at a time, and the kernel switches to a processwhenever one of the threads in that process becomes active.A process always contains a main thread, and can contain additionalthreads if needed. All threads within a process share its data space, and,therefore, can directly access its static data. For protection, Symbian OSdoes not allow a process to directly access memory in another process.3.3 Shared Code: Libraries, DLLs, and FrameworksShared code consists of packages of executable code that, as the namesuggests, can be shared by other executables; providing functions toall running programs for reuse.

These packages are usually known asdynamic link libraries (DLLs). This is more efficient than the traditionalstatically linked library, where each executable that uses the library’sfunctions links to a separate copy of its code. DLLs are used extensivelyin Symbian OS, and there are well over 100 of them on a typical phone.When a thread invokes a function within a DLL, that function runs within66SYMBIAN OS ARCHITECTUREthe context of the calling thread (and the corresponding process) and thusis able to directly access the data space of the calling process.Prior to Symbian OS v9, GUI applications were actually DLLs themselves; however, from Symbian OS v9 onwards, applications are implemented as fully independent executable processes.On Symbian OS, the most common types of shared binary are staticinterface libraries and polymorphic interface libraries.

They may alsosimply be referred to as DLLs when the context of the type of sharedbinary is established.3.3.1 Static Interface LibrariesStatic interface libraries are the traditional style of libraries, containinga collection of classes and functions that are made available to callingprograms through a series of exported functions, as Chapter 5 will discuss.The base operating system library (euser.dll), which, for example,provides string manipulation functions, is an example of a static interfacelibrary.

Static interface libraries typically end in .dll.3.3.2 Polymorphic DLLsPolymorphic interface libraries (most commonly known as ‘polymorphicDLLs’) are used as plug-ins to a framework, as opposed to simply providingclasses and functions as in static interface DLLs. They provide a concreteimplementation for some abstracted interface. A good example is a devicedriver, which is a polymorphic DLL that can be loaded or unloaded,kernel-side at runtime.Polymorphic DLLs, in a similar fashion to static interface DLLs, areloaded when needed and linked to at runtime. Unlike a static interfacelibrary, which supplies the implementation of an API that is fixed atcompile time and typically loaded by the system, a polymorphic DLL actsas a plug-in, and must be loaded by a framework or other client wishingto use it.A polymorphic DLL implements an abstract interface as a concrete C++class.

The first (and usually only) exported function of the polymorphicDLL just instantiates its concrete class and returns a pointer to it. Withpolymorphic DLLs, you can implement custom plug-ins that presentconsistent interfaces to applications.

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

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

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

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