亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dbmsengine.h

?? Symbian S60 DBMS example
?? H
字號:
/*
 * ============================================================================
 *  Name     : CBookDb from DBMSEngine.h
 *  Part of  : DBMS
 *  Created  : 04.11.2006 by Forum Nokia
 *  Version  : 2.0
 *  Copyright: Nokia Corporation
 * ============================================================================
 */

#ifndef __BOOKDBENGINE_H__
#define __BOOKDBENGINE_H__


#include <e32std.h>
#include <badesca.h>    // CDesCArrayFlat (cannot be forward declarated)
#include <d32dbms.h>    // RDbStoreDatabase
#include <f32file.h>    // RFs


// Forward declarations
class CFileStore;

// Constants
_LIT(KBooksTable, "Books");                /* Name of the one table       */
_LIT(KBooksAuthorCol, "Author");           /* First column                */
_LIT(KBooksTitleCol, "Title");             /* Second column               */
_LIT(KBooksDescriptionCol, "Description"); /* Third column                */
_LIT(KBooksDateCol,"PublishDate");         /* Dynamic optional column     */
_LIT(KBooksIndexName,"BooksIndex");        /* Name of the one index       */
const int KTitleMaxLength = 60;            /* Max length of title column  */
const int KDescriptionMaxLength = 128;     /* Max length of descr. column */


/**
 *  Maximum length of individual item in CDesCArrayFlat (see GetAllBooksL &
 *  GetBooksByKeyL methods).
 */
const int KBookItemMaxLength = 256;

/**
 *  Separator within individual CDesCArrayFlat item. Each item has format
 *  <Author>|<Title>|<Description>
 */
_LIT(KSeparator,"|");


/**
 * Class:       CBookDb
 *
 * Description: An instance of class CBookDb provides simple Book
 *              database access: creating & manipulating Book database
 *              files and database entries (books).
 *
 * Database definition:
 *
 *              The Book contains one table as follows:
 *
 *              Table name: Books
 *                 Column:       Type:          Max length:
 *                 ------        -----          -----------
 *                 Author        EDbColText     50  (using default)
 *                 Title         EDbColText     60  (see KTitleMaxLength)
 *                 Description   EDbColLongText 128 (see KDescriptionMaxLength)
 *    In run time: PublishDate   EDbColDateTime
 *
 *              Note that underlying database allows description to be up to
 *              2GB long, but this engine limits the size to 128 unicode
 *              characters.
 *              The PublishDate does not exist, when the database is created.
 *              It can be added on the fly (see AddDateColumnL method).
 *
 *              There is also index for Books table with name "BooksIndex". It
 *              consists of two columns:
 *
 *                   Author, Title
 *
 *              Index provides quick find.
 */
class CBookDb : public CBase
    {
public: // Creation and destruction

    /**
     * Function:    NewL
     *
     * Description: Get instance of a CBookDb object.
     */
    static CBookDb* NewL();

    /**
     * Function:    ~CBookDb
     *
     * Description: Destroy the object.
     */
    ~CBookDb();


public: // Public API for database operations

    /**
     * Function:    OpenDbL
     *
     * Description: Open existing Book database in exclusive
     *              (non-shared) mode.
     *
     * Param:       aExistingBookFile is full path to Book
     *              database file.
     *
     * Return:      KErrNone, if no error. KErrNotFound, if the file does
     *              not exist.
     *
     * Leaves:      With one of the system wide error codes, if the file
     *              is not a correct database file.
     */
    TInt OpenDb(const TFileName& aExistingBookFile);

    /**
     * Function:    CreateDbL
     *
     * Description: Creates and opens a new Book database. Creates a
     *              database file, table structure and an index. The database
     *              will be open in exclusive (non-shareable) mode. The
     *              database must be closed, when not used any more. If the
     *              database exists, it is replaced.
     *
     * Param:       aNewBookFile Name of the new database file. Is  a full
     *              path (incl. the filename). Operations following this call
     *              are performed to the new database file.
     *
     * Return:      returns always KErrNone
     *
     * Leaves:      If the file cannot be created or database initialized.
     *              Leaves with system wide error codes.
     */
    TInt CreateDb(const TFileName& aNewBookFile);

    /**
     * Function:    RemoveDbL
     *
     * Description: Removes Book database. Closes any open database,
     *              before dropping the database.
     *
     * Param:       aExistingBookFile is full path to Book
     *              database file.
     *
     * Leaves:      If the file file is not a valid database file or the
     *              database does not containt Books table, the method
     *              leaves with system wide error codes.
     */
    TInt RemoveDb(const TFileName& aExistingBookFile);

    /**
     * Function:    Close
     *
     * Description: Closes the database opened with either OpenDbL or
     *              CreateDbL. It is safe to close the database even if it
     *              is closed.
     *
     * Return:      KErrNone, if no error. KErrNotFound, if the file does
     *              not exist.
     */
    TInt Close();

    /**
     * Function:    IsOpen
     *
     * Description: Return status, whether the database is open and ready
     *              for operations.
     */
    TBool IsOpen() const;

    /**
     * Function:    AddBookWithSql
     *
     * Description: Adds a new book to Books table. The book is inserted using
     *              SQL and RDbView.
     *
     * Param:       aAuthor Author of the book. Must be shorter than
     *              the default max text length in Book API (=50). Must not be
     *              empty.
     *
     * Param:       aTitle Title of the book. Must be shorter than
     *              KTitleMaxLength. Must not be empty.
     *
     * Param:       aDescription Description of the book. It must not be longer
     *              than KDescriptionMaxLength. Must not be empty.
     */
    TInt AddBookWithSql(const TDesC& aAuthor,
                         const TDesC& aTitle,
                         const TDesC& aDescription);

    /**
     * Function:    AddBookWithCppApi
     *
     * Description: Adds a new book to Books table. The book is inserted using
     *              RDbTable API.
     *
     * Param:       aAuthor Author of the book. Must be shorter than
     *              the default max text length in Book API (=50). Must not be
     *              empty.
     *
     * Param:       aTitle Title of the book. Must be shorter than
     *              KTitleMaxLength. Must not be empty.
     *
     * Param:       aDescription Description of the book. It must not be longer
     *              than KDescriptionMaxLength. Must not be empty.
     */
    TInt AddBookWithCppApi(const TDesC& aAuthor,
                            const TDesC& aTitle,
                            const TDesC& aDescription);

    /**
     * Function:    GetAllBooksL
     *
     * Description: Retrieve all books from database.
     *
     * Returns:     Array of books. Each array item is represented as follows:
     *                  <Author>|<Title>|<Description>
     *              Maximum length of each item is KBookItemMaxLength
     *              Caller takes ownership of the array.
     */
    CDesCArrayFlat* GetAllBooksL();

    /**
     * Function:    GetBooksByKeyL
     *
     * Description: Retrieve books from database, which match given column
     *              and search pattern. Implementation uses SQL.
     *
     * Param:       aColumnName Name of the column to apply the search pattern.
     *              Must be either KBooksAuthorCol or KBooksTitleCol
     *
     * Param:       aSearchString Search pattern used to restrict results to.
     *
     * Returns:     Array of books. Each array item is represented as follows:
     *                  <Author>|<Title>|<Description>
     *              Maximum length of each item is KBookItemMaxLength
     *              Caller takes ownership of the array.
     */
    CDesCArrayFlat* GetBooksByKeyL(const TDesC& aColumnName,
        const TDesC& aSearchString);

    /**
     * Function:    GetABookFast
     *
     * Description: Retrieves book information for given book name. This method
     *              uses index to find first occurrence of the book.
     *              Implementation uses exact match.
     *
     * Param:       aTitle is name of the book to search for.
     *
     * Param:       aResult If there is a matching book, the complete book info
     *              is written to aResult. It is in the following format:
     *                  <Author>|<Title>|<Description>
     *              Length of the given descriptor must be KBookItemMaxLength
     */
    TInt GetABookFast(const TDesC& aTitle, TDes& aResult);

    /**
     * Function:    RemoveBooks
     *
     * Description: Deletes book(s) from database.
     *
     * Param:       aTitle is name of the book to delete. It can contain
     *              wildcard characters (% for single char, * for zero or
     *              multiple chars).
     *
     * Param:       aResultCount will contain number of deleted books.
     *
     * Returns:     KErrNone or one of the system wide error codes.
     */
    TInt RemoveBooks(const TDesC& aTitle, TInt& aResultCount);

    /**
     * Function:    RemoveAllBooksL
     *
     * Description: Deletes all books from database.
     *
     * Param:       aResultCount will contain number of deleted books.
     *
     * Returns:     KErrNone or one of the system wide error codes.
     */
    TInt RemoveAllBooks(TInt& aResultCount);


    /**
     * Function:    UpdateBookTitle
     *
     * Description: Changes the title for a book (or books, if there are
     *              multiple books with the name aOldTitleKey).
     *
     * Param:       aOldTitleKey Book title used for getting books for update.
     *
     * Param:       aNewTitle New title for the book(s).
     *
     * Returns:     KErrNone or one of the system wide error codes.
     */
    TInt UpdateBookTitle(const TDesC& aOldTitleKey, const TDesC& aNewTitle);



    /**
     * Function:    ColumnNamesAndSizes
     *
     * Description: Get array of colum names in the Books table. The result
     *              array includes also the size of the textual columns.
     *              This is here just to demonstrate iterating column names
     *              from a table.
     *
     * Returns:     Array of column names. Caller takes ownership.
     */
    CDesCArrayFlat* ColumnNamesAndSizesL();

    /**
     * Function:    HasDateColumn
     *
     * Description: Tests whether the Books table has date column.
     *
     * Returns:     KErrNone or one of the system wide error codes.
     */
    TInt HasDateColumn(TBool& aReturnValue);

    /**
     * Function:    AddDateColumn
     *
     * Description: Adds date column to Books table. This here just to
     *              demonstrate how to alter table definition.
     *              This fails, if the date column already exists.
     *
     * Returns:     KErrNone or one of the system wide error codes.
     */
    TInt AddDateColumn();

    /**
     * Function:    RemoveDateColumn
     *
     * Description: Removes date column from Books table. This here just to
     *              demonstrate how to alter table definition.
     *              This fails, if the date column does not exist.
     *
     * Returns:     KErrNone or one of the system wide error codes.
     */
    TInt RemoveDateColumn();

private: // Construction

    /**
     * Function:    ConstructL
     *
     * Description: Perform the second phase construction of a CBookDb
     *              object
     */
    void ConstructL();

    /**
     * Function:    CBookDb
     *
     * Description: Perform the first phase of two phase construction.
     */
    CBookDb();

private: // Helpers

    void CreateBooksTableL();     /* Create the Books table                  */
    void CreateBooksIndexL();     /* Create the BooksIndex for Books table   */
    void DropBooksTable();       /* Drop Books table (DDL example)          */

private: // Member data

    RFs              iFsSession;  /* For use of iFileStore                   */
    RDbStoreDatabase iBookDb;/* For database operations                 */
    CFileStore*      iFileStore;  /* For creating and opening database files */
    TBool            iOpen;       /* Flag indicating iBookDb open status*/
    };

#endif // __BOOKDBENGINE_H__


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人福利视频在线| 国产偷国产偷亚洲高清人白洁| 日韩精品中午字幕| 亚洲色图制服诱惑 | 欧美撒尿777hd撒尿| 久久久99免费| 日韩不卡一区二区三区| 成人高清伦理免费影院在线观看| 欧美一级日韩一级| 亚洲一区在线视频| youjizz国产精品| 久久久精品一品道一区| 日韩在线播放一区二区| 色天天综合色天天久久| 欧美激情资源网| 国产一区二区三区黄视频| 欧美日韩国产综合一区二区三区| 国产精品福利一区二区| 国产一区在线看| 欧美成人艳星乳罩| 欧美aaa在线| 欧美一级在线观看| 日韩国产在线一| 欧美日韩一区二区在线观看视频| 中文字幕在线不卡国产视频| 粉嫩aⅴ一区二区三区四区五区 | 日本久久一区二区| 国产精品欧美久久久久无广告| 国产呦萝稀缺另类资源| 欧美成人国产一区二区| 久久机这里只有精品| 欧美成人一区二区| 狠狠色狠狠色合久久伊人| 欧美成人精品3d动漫h| 精品一区二区av| 日韩欧美国产成人一区二区| 日本欧美加勒比视频| 欧美精品第1页| 麻豆精品视频在线观看视频| 日韩一区二区三| 美腿丝袜亚洲三区| 精品国产一区二区三区久久久蜜月 | aaa亚洲精品| 亚洲三级在线免费观看| 色av一区二区| 日韩成人免费电影| 亚洲精品在线电影| 国产夫妻精品视频| 亚洲天天做日日做天天谢日日欢| 91麻豆国产福利精品| 亚洲一级二级三级| 日韩欧美不卡一区| 懂色av一区二区在线播放| 亚洲图片你懂的| 欧美精品一卡二卡| 国产在线播放一区| 亚洲色大成网站www久久九九| 欧洲人成人精品| 麻豆freexxxx性91精品| 国产亚洲欧美日韩俺去了| 91婷婷韩国欧美一区二区| 亚洲一二三级电影| 亚洲精品在线一区二区| 99这里都是精品| 日韩中文欧美在线| 久久精品亚洲精品国产欧美 | 国产精品成人免费在线| 在线观看日韩毛片| 国产伦精一区二区三区| 一卡二卡欧美日韩| 精品久久人人做人人爱| 一本色道亚洲精品aⅴ| 日本成人在线网站| 中文字幕永久在线不卡| 欧美一级高清片| 色综合久久久久综合| 久久精品国产99久久6| 亚洲卡通欧美制服中文| 精品成人佐山爱一区二区| 色狠狠色噜噜噜综合网| 国产精品原创巨作av| 天堂影院一区二区| 亚洲欧美一区二区在线观看| 日韩一区二区视频| 欧美丝袜第三区| 成人综合在线网站| 美女一区二区三区| 亚洲一区二区美女| 国产精品久久久久一区二区三区| 欧美不卡一区二区三区四区| 在线观看亚洲成人| 91丝袜国产在线播放| 国产又黄又大久久| 老司机一区二区| 五月激情综合色| 亚洲乱码日产精品bd| 国产日韩欧美麻豆| 久久―日本道色综合久久| 3d动漫精品啪啪1区2区免费| 色综合久久久久综合体桃花网| 粉嫩高潮美女一区二区三区| 精品一区二区三区蜜桃| 欧美aa在线视频| 日本不卡一区二区| 婷婷久久综合九色综合绿巨人 | 亚洲福利视频一区| 亚洲制服欧美中文字幕中文字幕| 国产精品久久夜| 国产精品理论片| 国产精品欧美经典| 亚洲日本免费电影| 亚洲精品免费视频| 玉米视频成人免费看| 综合在线观看色| 亚洲女同女同女同女同女同69| 国产精品婷婷午夜在线观看| 国产精品久久毛片| 亚洲美女电影在线| 伊人性伊人情综合网| 亚洲一区二区三区四区的| 亚洲欧美另类图片小说| 亚洲免费观看视频| 亚洲成人在线免费| 日产国产高清一区二区三区| 免费在线成人网| 九九久久精品视频| 国产成人av一区二区三区在线观看| 久久精品99国产国产精| 国产黄色精品网站| av在线不卡免费看| 91黄色激情网站| 91精品国产欧美一区二区成人| 欧美一区日韩一区| 国产亚洲精品福利| 亚洲女性喷水在线观看一区| 亚洲成人精品一区二区| 麻豆精品在线播放| 东方欧美亚洲色图在线| 91免费看视频| 欧美日韩国产系列| 亚洲精品一区二区三区香蕉| 亚洲国产精品国自产拍av| 亚洲精品乱码久久久久久黑人| 亚洲福利视频一区二区| 国内精品伊人久久久久av影院| 国产高清无密码一区二区三区| 91同城在线观看| 日韩欧美成人一区| 亚洲视频网在线直播| 日本最新不卡在线| www.亚洲色图.com| 欧美精品久久一区二区三区| 国产亚洲欧美日韩在线一区| 亚洲综合网站在线观看| 久久国产成人午夜av影院| 99久久婷婷国产| 日韩免费视频线观看| 亚洲欧美福利一区二区| 精品亚洲porn| 色婷婷久久综合| 久久久精品国产免大香伊| 亚洲一二三四在线| 成人黄色软件下载| 日韩精品一区二区在线观看| 亚洲色图在线看| 国产精品一区二区在线播放| 欧美三区在线视频| 国产精品全国免费观看高清 | 成人午夜视频福利| 日韩欧美你懂的| 亚洲一区二区三区国产| 成人综合在线观看| 欧美成人一区二区三区| 香蕉乱码成人久久天堂爱免费| 国产成人免费在线| 日韩精品一区二区三区老鸭窝| 亚洲永久精品大片| 成人黄色小视频| 久久久久久久网| 九一九一国产精品| 欧美一区国产二区| 亚洲电影一级黄| 欧洲一区二区三区在线| 欧美高清在线一区二区| 国产一区二区三区四| 日韩一区二区三区四区| 日韩中文字幕亚洲一区二区va在线 | 国产在线视视频有精品| 欧美美女一区二区在线观看| 亚洲精品成人a在线观看| 91丨porny丨最新| 欧美激情一区二区三区在线| 国产精品白丝jk黑袜喷水| 精品久久国产老人久久综合| 日韩av二区在线播放| 欧美日韩国产精品自在自线| 亚洲小说欧美激情另类| 欧美亚洲日本国产| 伊人一区二区三区| 色噜噜久久综合|