Главная » Просмотр файлов » Wiley.Symbian.OS.C.plus.plus.for.Mobile.Phones.Aug.2007

Wiley.Symbian.OS.C.plus.plus.for.Mobile.Phones.Aug.2007 (779890), страница 55

Файл №779890 Wiley.Symbian.OS.C.plus.plus.for.Mobile.Phones.Aug.2007 (Symbian Books) 55 страницаWiley.Symbian.OS.C.plus.plus.for.Mobile.Phones.Aug.2007 (779890) страница 552018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

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

The program is then visible from the ApplicationLauncher.One of the benefits of installing applications using the SIS file format,rather than by copying files directly, is that you get an entry in this listing.This means that you can use it to remove the application; just tap on280PLATFORM SECURITY AND PUBLISHING APPLICATIONSUninstall and select your application from the list of uninstallable programs.

Then press Uninstall again to confirm. Go back to the ApplicationLauncher and see that it is gone.9.6 List of CapabilitiesThe unsigned-sandboxed and basic capabilities are:• LocalServices, which grants access to local network services thatusually do not incur a cost, such as Bluetooth• NetworkServices, which grants access to remote network services thatmay incur a cost, such as text messages; this capability is granted ona one-shot basis if not previously authorized• UserEnvironment, which grants access to live confidential informationabout the user and their immediate environment (e.g., audio, video orbiometric data)• ReadUserData, which grants read access to data that is confidentialto the phone user (subject to confirmation)• WriteUserData, which grants write access to data that is confidentialto the phone user (subject to confirmation)The extended capabilities essentially control access to services anddata.

They are defined at a general level, so that a server can presentthem to the end-user of a phone when installing an application, allowingthe end-user some control over what an application may do.• CommDD grants access to communications device drivers.• MultimediaDD grants access to multimedia device drivers.• PowerMgmt grants the right to power off unused peripherals, switchthe phone into and out of standby state, and power the phone down.• ReadDeviceData grants read access to confidential phone settings ordata.• WriteDeviceData grants write access to confidential settings thatcontrol the phone’s behavior.• DiskAdmin grants access to specific disk-administration operations.• NetworkControl grants access or modification rights to network protocol controls.SUMMARYSummaryIn this chapter, we’ve looked at:• key concepts in Platform Security• authorizing applications• implementing Platform Security in application and project files• how to build an application for delivering to a phone• how to get an application Symbian Signed.28110Debugging and the EmulatorDebugging is an indispensable step in the software development cycle.

Itis used to find out why an application is not behaving as expected andto correct the behavior. To help with debugging, all Symbian OS SDKscome with an emulator, which allows you to see, on your PC, what willhappen when you run the code on a target device – a mobile phone.The emulator is designed to be the primary development and debugging tool for Symbian OS, alongside any language-specific tools providedby the development environment.For most development purposes, you can write the same source codeto run on both the emulator and Symbian OS phones almost 100 % of thetime.

The basic emulator is delivered by Symbian, but is then customizedby the UI vendors for S60 and UIQ.This chapter looks at the emulator and the debugging facilities offeredby Symbian OS on the emulator, to help you to create robust applicationsrapidly and efficiently.10.1 Using the EmulatorSymbian OS phones use an ARM processor but PCs usually use an x86processor, so C++ programs for the emulator are compiled to nativex86 machine instructions and the emulator uses Win32 APIs to emulatemachine hardware and Symbian OS services.

Due to the hardwaredifference, there are some restrictions to bear in mind when testing withthe emulator.• The emulator cannot be used to test that code behaves the sameon phones of different capabilities (e.g. S60 phones with differentprocessor speeds or specifications), but can be used to test some284DEBUGGING AND THE EMULATORdifferences in behavior such as for different screen resolutions andorientations in later SDK versions.• The speed at which the emulator runs is dependent on the PC anddoes not mimic the hardware. Timing differences may be significant,hence testing on hardware is important, even at the early stages, toprove that a concept is possible on the phone and not likely to be tooslow to be usable.The emulator can be slow to start up, which is frustrating, but thiscan be improved in various ways, depending on the version of the SDKin question.

For example, the S60 3rd Edition emulator can use a modified version of the starter.rsc file. The simplest existing version isepoc32\release\winscw\udeb\z\resource\starter_shell.rsc,which can considerably speed up the emulator start time The drawback is that it does not start everything you need in the full emulator(for example, you can no longer double click to navigate through theemulator screens, but need to use the four-way navigation buttons, leftand right soft keys and menus).You can give this a try by renaming epoc32\release\winscw\udeb\z\resource\starter_shel l.rsc to starter.rsc. It is advisableto back up the current starter.rsc by renaming it before you do this,so you can roll back and use it, if you decide the ‘skinny’ emulator startup is no good for your purposes.Drive MappingThe emulator maps features of the target machine onto features of thePC environment.

For software development, it is particularly important toknow how the emulator maps drives and directories onto your PC’s filesystem.On a Symbian OS phone, there are two important drives (seeFigure 10.1):• Z: is the ROM, which contains a bootstrap loader and all the EXE,DLL and other files required to boot and run Symbian OS and itsapplications. All files on Z: are read-only; program files are executeddirectly from the ROM rather than being loaded into RAM.• C: is the read–write drive that is allocated from internal RAM.C: contains application data, application and system INI files anduser-installed applications.On the emulator, these drives are mapped onto subdirectories of thedrive on which you installed the SDK (see Figure 10.2 and the followingdescription).

This is to separate different emulator builds, and to ensureUSING THE EMULATOR285Free RAMKernel and user memoryRAMC: RAM diskZ:ROMFigure 10.1 Drives on a Symbian OS phonethat applications running on the emulator cannot write to other locationson your PC’s C: drive. An emulator configuration directory and startupdirectory completes the list of directories required by the emulator.epoc32dataEmulator configuration directoryreleasewinscwudebStartup directoryzEmulated Z: drivewinscwcEmulated C: driveFigure 10.2 Emulator directories• \epoc32\data\ is the emulator configuration directory. It containsthe initialization parameters for the emulator (epoc.ini), the bitmapused as the fascia surround for the screen (epoc.bmp), and variantsfor screens of different sizes.• \epoc32\release\winscw\udeb\ is the emulator startup directory.

It contains the Windows emulator (epoc.exe) and all theshared library DLLs.286DEBUGGING AND THE EMULATOR• \epoc32\release\winscw\udeb\z\ is the emulated Z: drive. Itcontains everything that the EPOC Z: drive should contain, exceptshared library DLLs, which are in the parent directory.• \epoc32\winscw\c\ is the emulated C: drive. It contains data andfiles. It does not contain compiled C++ programs – those should allbe on Z:.

In the emulator, all compiled applications become part ofthe pseudo-ROM that is the emulated Z: drive.You might wonder why there are so many deeply nested directories.The directories categorize the Symbian OS SDK materials, as follows:• epoc32\ sets apart the Symbian OS SDK run-time software fromanything else on the same drive• release\ sets apart released code from documentation, temporarybuild files, configuration files, etc.• winscw\ sets apart the emulator from target-machine builds; differenttargets use different directories; for Carbide.c++ and MetrowerksCodeWarrior, it is winscw• udeb\ sets apart the debug build from other builds; an executableC++ program built for the emulator debug build won’t run in anyother execution environment, so the debug build is kept distinct fromany other build• z\ attempts to mirror the structure of Z: on a real Symbian OS mobilephone.It would be nice if \epoc32\release\winscw\udeb\z\ could contain the entire emulated Z: drive.

Unfortunately, it cannot: EXEs andshared library DLLs cannot use the file structure of Symbian OS, withoutimpractical implications for the path environment in Win32. The onlypractical thing to do is to place all EXEs and shared library DLLs in thestartup directory: \epoc32\release\winscw\udeb\.Finally, data is independent of whether a build is release or debug, soC: is mapped to the \epoc32\winscw\c\ directory and shared betweenall builds.Emulator KeysThe majority of the PC keyboard is mapped in a straightforward way tothe Symbian OS keyboard. However, some special keys are available, asshown in Table 10.1.USING THE EMULATOR287Table 10.1 PC key mappings to Symbian OS functionsPC keySymbian OS facilityF1Alt+F2Menu keyHelp key (this doesn’t work in theUIQ emulator as there is no systemhelp file)Close the emulator windowPower onPower offAlt+F4F9F10Different user interfaces have additional keys that are part of thehardware.

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

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

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

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