Central Repository Overview

The Central Repository is a collection of data structures which retains the setup of an application or component from one session to another.

Purpose

Many applications and modules come with a data structure called a repository or keyspace which is used to persist application data such as default filenames, locale settings and user preferences from one session to another. The component which manages repositories is called the Central Repository. Repositories are created and initialized along with their associated application when a device is built by device creators. The purpose of the Central Repository APT is to enable application developers and device creators to modify repository data and to provide notification of changes to a repository.

Required background

To use the Central Repository APT it is necessary to know the structure and syntax of an initialization file as explained in Central Repository How To Guide.

Key concepts and terms

Repository

A data structure holding data to be persisted for a component or application, equivalent to a file. Also called a keyspace.

Setting

An item of data in a repository, equivalent to a line in a file. Also called a key.

Initialization file

The text file from which a repository is created.

Keyspaces

Another term for a repository.

Access policies

Read or write permissions on a setting or group of settings.

Architecture

Conceptually, the Central Repository is comparable to a folder, an individual repository to a file and a setting to a line in a file. In fact repositories are implemented as binary files held at various locations in memory and are accessed through C++ classes which encapsulate them with a single API. Repositories are created with the applications to which they refer at device build time. The Central Repository APT is only used to access repositories, not to create them.

APIs

The Central Repository APT provides the CRepository class to provide access to repositories.

APT Description

CRepository

Provides the functionality to access the repository created with an application.

CCenRepNotifyHandler

Creates notification of changes to a repository.

MCenRepNotifyHandlerCallback

A callback interface to be implemented to respond to change notification.

Typical uses

The Central Repository is typically used by applications such as messaging services to retrieve logins, localization data and information needed for interprocess communication.

Related concepts