class RBkDatabase |
RBkDatabase represents a handle to the database as a whole. Opening the handle will initiate a connection to the system-wide bookmark store. RBkDatabase is responsible for all operations such as creating new bookmarks and folders or changing database-wide data such as setting the home page or registering custom properties.
Public Member Functions | |
---|---|
RBkDatabase () | |
IMPORT_C void | Close () |
IMPORT_C void | CommitL () |
IMPORT_C RBkBookmark | CreateBookmarkL ( RBkFolder *) |
IMPORT_C RBkFolder | CreateFolderL (const TDesC &, RBkFolder *) |
IMPORT_C Bookmark::TAttachmentId | CreateIconL (const TDesC8 &) |
IMPORT_C TUint32 | DefaultNap () |
IMPORT_C TUint32 | DefaultProxy () |
IMPORT_C TInt | DeleteIconL ( Bookmark::TAttachmentId ) |
IMPORT_C void | DeleteItemL ( Bookmark::TItemId , TBool ) |
IMPORT_C TInt | DeregisterBookmarkPropertyL ( TUid ) |
IMPORT_C TInt | DeregisterDatabasePropertyL ( TUid ) |
IMPORT_C TInt | DeregisterFolderPropertyL ( TUid ) |
IMPORT_C void | GetCustomPropertyL ( TUid , TInt &) |
IMPORT_C void | GetCustomPropertyL ( TUid , TReal &) |
IMPORT_C void | GetCustomPropertyL ( TUid , TDes &) |
IMPORT_C void | GetCustomPropertyL ( TUid , TDes8 &) |
IMPORT_C const TDesC8 & | GetIconL ( Bookmark::TAttachmentId ) |
IMPORT_C const TDesC & | HomePageText () |
IMPORT_C RBkBookmark | OpenBookmarkL ( Bookmark::TItemId ) |
IMPORT_C RBkFolder | OpenFolderL ( Bookmark::TItemId ) |
IMPORT_C RBkFolder | OpenFolderL (const TDesC &) |
IMPORT_C RBkBookmark | OpenHomeL () |
IMPORT_C void | OpenL ( Bookmark::TVisibility , MBookmarkObserver *) |
IMPORT_C RBkFolder | OpenRootL () |
IMPORT_C void | RefreshL () |
IMPORT_C void | RegisterBookmarkPropertyL ( TUid , Bookmark::TPropertyType ) |
IMPORT_C void | RegisterDatabasePropertyL ( TUid , Bookmark::TPropertyType ) |
IMPORT_C void | RegisterFolderPropertyL ( TUid , Bookmark::TPropertyType ) |
IMPORT_C const TDesC8 & | SearchUri () |
IMPORT_C void | SetCustomPropertyL ( TUid , TInt ) |
IMPORT_C void | SetCustomPropertyL ( TUid , TReal ) |
IMPORT_C void | SetCustomPropertyL ( TUid , const TDesC &) |
IMPORT_C void | SetCustomPropertyL ( TUid , const TDesC8 &) |
IMPORT_C void | SetDefaultNap ( TUint32 ) |
IMPORT_C void | SetDefaultProxy ( TUint32 ) |
void | SetHome (const RBkBookmark &) |
IMPORT_C void | SetHomeL (const RBkBookmark &) |
IMPORT_C void | SetHomePageTextL (const TDesC &) |
IMPORT_C void | SetSearchUriL (const TDesC8 &) |
IMPORT_C TVersion | Version () |
Private Attributes | |
---|---|
CBookmarkDb * | iDatabase |
IMPORT_C void | CommitL | ( | ) |
Runs through the folder tree and commits any changes. Also commits any changes to icons, registered custom properties and database-wide data.
The central repository, which the bookmark database uses, provides no locking mechanism. Concurrent accesses are simply queued. Although this should cause no problems it is worth remembering if you find any timing and commiting issues.
IMPORT_C RBkBookmark | CreateBookmarkL | ( | RBkFolder * | aParent = NULL | ) |
Creates a new bookmark. If a parent folder is supplied then it is added to this folder. If no parent is supplied then it is placed in the root. The newly created bookmark item is writable. The new bookmark will be permanently added to the database once there is a call to CommitL() .
RBkFolder * aParent = NULL | The new bookmark will be placed in this folder. The bookmark will be placed in the root is this is NULL. |
IMPORT_C RBkFolder | CreateFolderL | ( | const TDesC & | aTitle, |
RBkFolder * | aParent = NULL | |||
) |
Creates a new folder. If a parent folder is supplied then it is added to this folder. If no parent is supplied then it is placed in the root. The newly created bookmark item is writable. The new folder will be permanently added to the database once there is a call to CommitL() ;
IMPORT_C Bookmark::TAttachmentId | CreateIconL | ( | const TDesC8 & | aIconData | ) |
Creates a new icon and adds it to the database's icon list. The database retains ownership of the icon and the new item's ID is returned.
const TDesC8 & aIconData | Descriptor containing the icon's raw data |
IMPORT_C TInt | DeleteIconL | ( | Bookmark::TAttachmentId | aIconId | ) |
Deletes an icon with the given icon Id.
Bookmark::TAttachmentId aIconId | Id of the icon to delete. |
IMPORT_C void | DeleteItemL | ( | Bookmark::TItemId | aBookmarkId, |
TBool | aRecursive = EFalse | |||
) |
Deletes a bookmark item. If the item is a folder and aRecursive is false, all its children are set to the root folder. If aRecursive is true all child bookmarks and folders are also deleted.
Bookmark::TItemId aBookmarkId | Id of the bookmark item |
TBool aRecursive = EFalse | Set to ETrue to delete all child bookmarks and subfolders |
IMPORT_C TInt | DeregisterBookmarkPropertyL | ( | TUid | aCustomId | ) |
Method for deregistering a custom bookmark property
TUid aCustomId | The identifier of the property. |
IMPORT_C TInt | DeregisterDatabasePropertyL | ( | TUid | aCustomId | ) |
Method for deregistering a custom database property
TUid aCustomId | The identifier of the property. |
IMPORT_C TInt | DeregisterFolderPropertyL | ( | TUid | aCustomId | ) |
Method for deregistering a custom folder property
TUid aCustomId | The identifier of the property. |
IMPORT_C void | GetCustomPropertyL | ( | TUid | aPropertyId, |
TInt & | aValue | |||
) | const |
Gets a custom database property for the given property ID.
IMPORT_C void | GetCustomPropertyL | ( | TUid | aPropertyId, |
TReal & | aValue | |||
) | const |
Gets a custom database property for the given property ID.
IMPORT_C void | GetCustomPropertyL | ( | TUid | aPropertyId, |
TDes & | aValue | |||
) | const |
Gets a custom database property for the given property ID.
IMPORT_C void | GetCustomPropertyL | ( | TUid | aPropertyId, |
TDes8 & | aValue | |||
) | const |
Gets a custom database property for the given property ID.
IMPORT_C const TDesC8 & | GetIconL | ( | Bookmark::TAttachmentId | aIconId | ) | const |
Gets the icon with the given icon Id.
Bookmark::TAttachmentId aIconId | Id of the icon to find. |
IMPORT_C RBkBookmark | OpenBookmarkL | ( | Bookmark::TItemId | aBookmarkID | ) | const |
Finds a bookmark given a bookmark Id. Leaves if the item can not be found
Bookmark::TItemId aBookmarkID | Id of the bookmark item |
IMPORT_C RBkFolder | OpenFolderL | ( | Bookmark::TItemId | aFolderID | ) | const |
Finds a folder given a folder Id. Leaves if the item can not be found
Bookmark::TItemId aFolderID | Id of the folder item |
IMPORT_C RBkFolder | OpenFolderL | ( | const TDesC & | aFolderTitle | ) | const |
Finds a folder with the given title text. Leaves if the item can not be found
const TDesC & aFolderTitle | Title text to find |
IMPORT_C RBkBookmark | OpenHomeL | ( | ) | const |
Method for getting the home page bookmark. Leaves if no home page has been set.
IMPORT_C void | OpenL | ( | Bookmark::TVisibility | aVisibility = Bookmark::EVisibilityDefault, |
MBookmarkObserver * | aObserver = NULL | |||
) |
Creates the bookmark database object and tries to connect to the repository. The client can register an observer if it wants to be notitied of external changes to the database.
Bookmark::TVisibility aVisibility = Bookmark::EVisibilityDefault | The visibility condition under which the database should be opened |
MBookmarkObserver * aObserver = NULL | Pointer to an observer that will be notified of changes to the database |
IMPORT_C RBkFolder | OpenRootL | ( | ) | const |
Retrieves the root folder and constructs the internal folder and bookmark tree if it doesn't yet exist. Only includes folders and bookmarks that are visible to this application.
IMPORT_C void | RefreshL | ( | ) |
Refreshes the bookmark tree. Ususally called in response to a notification that the database has been changed from an external source.
IMPORT_C void | RegisterBookmarkPropertyL | ( | TUid | aCustomId, |
Bookmark::TPropertyType | aDataType | |||
) |
Method for registering a custom bookmark property
TUid aCustomId | Unique identifier to assign for this property. |
Bookmark::TPropertyType aDataType | The type of data this property will contain. |
IMPORT_C void | RegisterDatabasePropertyL | ( | TUid | aCustomId, |
Bookmark::TPropertyType | aDataType | |||
) |
Method for registering a custom database property
TUid aCustomId | Unique identifier to assign for this property. |
Bookmark::TPropertyType aDataType | The type of data this property will contain. |
IMPORT_C void | RegisterFolderPropertyL | ( | TUid | aCustomId, |
Bookmark::TPropertyType | aDataType | |||
) |
Method for registering a custom folder property
TUid aCustomId | Unique identifier to assign for this property. |
Bookmark::TPropertyType aDataType | The type of data this property will contain. |
IMPORT_C void | SetCustomPropertyL | ( | TUid | aPropertyId, |
TInt | aValue | |||
) |
Assigns a new custom database property value to the bookmark item.
IMPORT_C void | SetCustomPropertyL | ( | TUid | aPropertyId, |
TReal | aValue | |||
) |
Assigns a new custom database property value to the bookmark item.
IMPORT_C void | SetCustomPropertyL | ( | TUid | aPropertyId, |
const TDesC & | aValue | |||
) |
Assigns a new custom database property value to the bookmark item.
IMPORT_C void | SetCustomPropertyL | ( | TUid | aPropertyId, |
const TDesC8 & | aValue | |||
) |
Assigns a new custom database property value to the bookmark item.
IMPORT_C void | SetDefaultNap | ( | TUint32 | aNetworkId | ) |
Method for setting the default nap.
TUint32 aNetworkId | Id for identifying the nap entry in the commdb |
IMPORT_C void | SetDefaultProxy | ( | TUint32 | aServiceId | ) |
Method for setting the default proxy.
TUint32 aServiceId | Id for identifying the proxy entry in the commdb |
void | SetHome | ( | const RBkBookmark & | aHome | ) | [inline] |
Method for setting the home page bookmark.
Left in for source compatibility, Use SetHomeL function instead
const RBkBookmark & aHome | Reference to the new home page |
IMPORT_C void | SetHomeL | ( | const RBkBookmark & | aHome | ) |
Method for setting the home page bookmark.
const RBkBookmark & aHome | Reference to the new home page |
IMPORT_C void | SetHomePageTextL | ( | const TDesC & | aHomePageText | ) |
Method for setting the home page text.
const TDesC & aHomePageText | Descriptor containing the new text |
IMPORT_C void | SetSearchUriL | ( | const TDesC8 & | aUri | ) |
Method for setting the search page Uri.
const TDesC8 & aUri | Descriptor containing the new Uri. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.