Home · All Classes · Annotated · Functions

Qtopia Startup Sequence

Introduction

This document describes the Qtopia Startup Sequence from when the qpe binary is loaded to when the user is able to interact with the device. Each stage of the startup sequence is described and a rough estimate is given for the time used by each of these stages.

Startup Stages

The following table lists the startup stages in order. For each stage, the table notes the file and function where that stage is performed and the estimated percentage of the total startup time used by that stage.

NumberDescriptionFunctionCalled FromPhone %Notes
1Static data initialization before main()--38.16%This code is distributed through the Qtopia server.
2Initialize EnvironmentinitEnvironment() in src/server/main.cppinitApplication() in src/server/main.cpp0.93%This step initializes essential environment variables such as TZ and LANG and determines the rotation and QWS display (specified as command line arguments and/or environment variables) that is used by Qtopia.
3Cleanup QCop directorycleanup() in src/server/main.cppinitApplication() in src/server/main.cpp0.37%This step deletes all QCop files in the Qtopia data directory.
4Desktop background setupQWSServer::setDesktopBackground() in qtopiacore/qt/src/gui/embedded/qwindowsystem_qws.cppinitApplication() in src/server/main.cpp-This step is currently disabled, awaiting porting to Qt4
5Construct ServerApplication objectServerApplication::ServerApplication() in src/server/serverapp.cppinitApplication() in src/server/main.cpp17.62%ServerApplication is the server's QtopiaApplication object.
6Refresh time zone informationrefreshTimeZoneConfig() in src/server/main.cppinitApplication() in src/server/main.cpp0.15%Qtopia maintains a list of default time zones. These time zones are considered to be the most frequently used zones in Qtopia. If the list of default time zones is empty it will be initialized with six standard time zones (New York, Los Angeles, Oslo, Tokyo, Hong Kong and Brisbane).
7Keyboard initializationinitKeyboard() in src/server/main.cppinitApplication() in src/server/main.cpp0.05%This stage sets up the keyboard layout used by Qtopia Core
8Load and display splash screenSplashScreen::splash() in src/server/main.cppinitApplication() in src/server/main.cpp1.47%For the Phone Edition, Qtopia presents a (possibly animated) splash screen. This step loads and starts the splash screen.
9Check first usefirstUse() in src/server/main.cppinitApplication() in src/server/main.cpp-The first time Qtopia is started, it runs a First Use Wizard to ask the user for environment settings such as time zone and language. This step checks whether it is necessary to run the First Use Wizard.
10Construct Server objectServer::Server() in src/server/server.cppinitApplication() in src/server/main.cpp40.59%The Server object is the main widget of the QPE server application.
10.1Server base class and member initialization-Server::Server() in src/server/server.cpp0.02%This step initializes the Server object's base class and member variables.
10.2Start ScreenSaverMonitorScreenSaverMonitor::ScreenSaverMonitor() in src/libraries/qtopia/screensaver.cppServer::Server() in src/server/server.cpp0.01%The ScreenSaverMonitor tracks temporary screen saver alterations across Qtopia applications, such as temporarily disabling back light dimming while playing a video.
10.3Server GUI creation (phone)PhoneImpl::createGUI() in src/server/phone/phoneimpl.cppServer::Server() in src/server/server.cpp33.17%This step creates the GUI elements of the Server's user interface.
10.4Document Manager startupDocumentList::DocumentList() in src/server/documentlist.cppServer::Server() in src/server/server.cpp0.05%This step starts the service that manages the documents stored on the device and presented to the user in the Documents menu. The Document Manager handles updating the Document menu when documents are created or removed and when removable media containing documents are inserted or removed.
10.5AppLauncher startupAppLauncher::AppLauncher() in src/server/applauncher.cppServer::Server() in src/server/server.cpp7.06%The Applauncher class connects the Qtopia user interface and applications. It handles application startup and utilizes Quicklauncher
10.6SecurityMonitor startupSecurityMonitor::SecurityMonitor() in src/libraries/qtopiasecurity/monitor.cpp and IdMangler::IdMangler() in src/server/qsxemangle.cppServer::Server() in src/server/server.cpp-The SecurityMonitor runs as a background thread and manages the Qtopia Safe Execution Environment.
10.7StorageMetaInfo startupQStorageMetaInfo::QStorageMetaInfo() in src/libraries/qtopia/qstorage.cppServer::Server() in src/server/server.cpp0.11%The server uses a QStorageMetaInfo object to track filesystem mounting activity.
10.8QCop channel creation-Server::Server() in src/server/server.cpp0.03%This step creates the various QCopChannel objects that manage communication between parts of the Qtopia system.
10.9Transfer Server startupServer::startTransferServer() in src/server/server.cppServer::Server() in src/server/server.cpp<0.01%The TransferServer is responsible for file transfer with Qtopia Desktop and uses the FTP protocol.
10.10Infra-red Server startupIrServer::IrServer() in src/server/irserver.cppServer::Server() in src/server/server.cpp0.02%The IrServer is loaded via a plug-in. It uses the Object Exchange Protocol (OBEX). The QObex plug-in is used by Qtopia for infra-red communication and links with OpenOBEX.
10.11Package Handler startupiPackageHandler::PackageHandler() in src/server/packageslave.cppServer::Server() in src/server/server.cpp0.02%The PackageHandler allows the (de-)installation of Qtopia packages. It relies on ipkg to do this task.
10.12Pre-load ApplicationspreloadApps() in src/server/server.cppServer::Server() in src/server/server.cpp0.07%This step pre-loads any applications that are listed in the PreloadApps section of the Launcher settings file.
11ServerApplication loginServerApplication::login() in src/server/serverapp.cppinitApplication() in src/server/main.cpp0.19%This stage performs any necessary user authentication before allowing further user input. For example, the Phone Edition will check whether the SIM card has a PIN number programmed, and if so requires the user to enter the PIN number to unlock the keypad.
12Start SysFileMonitorSysFileMonitor::SysFileMonitor() in src/server/stabmon.cppinitApplication() in src/server/main.cpp<0.01%The SysFileMonitor polls /etc/mtab and various other status files in order to track new Storage Cards added to the system. If the HotPlug system is Qtopia-aware this monitor is not necessary. The Qtopia StorageInfo class propagates these changes throughout Qtopia.
13QtopiaNetwork::createServerQtopiaNetwork::createServer() in src/libraries/qtopia/qtopianetwork.cppinitApplication() in src/server/main.cpp0.39%This step creates a server object to manage the device's network interfaces.
14Display the server (phone)SplashScreen::setReplacement() in src/server/main.cppinitApplication() in src/server/main.cpp0.02%This step displays the main window of the server application on the device screen, replacing the previously displayed splash screen (if any).
15AlarmServer startupQtopia_initAlarmServer() in src/libraries/qtopia/qalarmserver.cppinitApplication() in src/server/main.cpp0.06%This step starts the AlarmServer, which handles the raising of alarms that have been set via the Calendar application.

Delayed Startup Processing

To provide a responsive user interface as quickly as possible, some startup processing is postponed until after the Qtopia Server has entered its event loop. The delayed processing is setup by using a single-shot QTimer to call a slot once the event loop has started. The following table lists the delayed processing items and notes the place in the source code where the QTimer that triggers each item is created.

NumberDescriptionFunctionTriggered atNotes
1Load application linksDocumentList::startInitialScan() in src/server/documentlist.cppDocumentList::DocumentList() in src/server/documentlist.cppThis step finds all applications, loads their icons and adds each application (if all requirements are met) to the launcher view.
2Load document linksDocumentList::startInitialScan() in src/server/documentlist.cppDocumentList::DocumentList() in src/server/documentlist.cppThis step searches for all documents on the device and adds them to the document list in the launcher view.
3Create QuickLauncherAppLauncher::createQuickLauncher() in src/server/applauncher.cppAppLauncher::AppLauncher() in src/server/applauncher.cppIf the quicklauncher binary exists, this step starts it as a separate process.


Copyright © 2006 Trolltech Trademarks
Qtopia 4.1.7