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

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

?? syncsource.h

?? funambol windows mobile plugin source code, the source code is taken from the funambol site
?? H
字號:
/*
 * Copyright (C) 2003-2007 Funambol, Inc
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY, TITLE, NONINFRINGEMENT or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 * 02111-1307  USA
 */

#ifndef INCL_SYNC_SOURCE
#define INCL_SYNC_SOURCE
/** @cond API */
/** @addtogroup Client */
/** @{ */

#include "base/fscapi.h"
#include "base/ErrorHandler.h"
#include "base/util/ArrayElement.h"
#include "filter/SourceFilter.h"
#include "spds/constants.h"
#include "spds/SyncItem.h"
#include "spds/SyncStatus.h"
#include "spds/SyncSourceConfig.h"
#include "spds/SyncSourceReport.h"

/**
 * This is the main API that a SyncML client developer needs to implement
 * to let the sync engine access the client's data. Each client may provide
 * access to one or more sources.
 */
class SyncSource : public ArrayElement {

private:
    SyncMode      syncMode;
    unsigned long lastSync;
    unsigned long nextSync;
    WCHAR*      name;

    char next[DIM_ANCHOR];
    char last[DIM_ANCHOR];

    //ErrorHandler* errorHandler;

    SourceFilter* filter;

protected:
    SyncSourceConfig& config;
    SyncSourceReport* report;

    /**
     * copies all elements, to be used by derived class' clone() implementation
     */
    void assign(SyncSource& s);

public:

    /**
     * Constructor: create a SyncSource with the specified name
     *
     * @param name   the name of the SyncSource
     * @param sc     configuration for the sync source: the instance
     *               must remain valid throughout the lifetime of the
     *               sync source because it keeps a reference to it
     *               and uses it as its own. A NULL pointer is allowed
     *               for unit testing outside of the sync framework;
     *               the sync source then references a global config
     *               instance to avoid crashes, but modifying that config
     *               will not make much sense.
     */
    SyncSource(const WCHAR* name, SyncSourceConfig* sc);

    // Destructor
    virtual ~SyncSource();

    /**
     * Get the source name.
     *
     * @return - the source name (a pointer to the object buffer,
     *           will be released at object destruction)
     *
     */
    const WCHAR *getName();

    /**********************************************************
     * Most of the configurable properties are read
     * by the client library from the config (in
     * SyncClient::setDMConfig()) and then copied into the
     * sync source.
     *
     * These properties are stored in a local copy which will not be
     * written back into the permanent config, with a few exceptions:
     * properties related to mananging sync sessions like lastAnchor
     * are written back into the config by the library afer a
     * successful synchronization.
     *
     * A client developer is not required to modify these calls,
     * but he can use and/or update the properties before the
     * synchronization starts.
     *********************************************************/

    /** read-only access to configuration */
    const SyncSourceConfig& getConfig() const {
        return config;
    }
    /** read-write access to configuration */
    SyncSourceConfig& getConfig() {
        return config;
    }


    /**
     * Return pointer to report object.
     */
    SyncSourceReport* getReport();

    /**
     * Set the report pointer with the given one
     * (no copy, only assign the pointer to the external one)
     *
     * @param sr   the report for this sync source
     */
    void setReport(SyncSourceReport* sr);

    /**
     * Get & Set the preferred synchronization mode for the SyncSource.
     *
     * Taken initially from the configuration by setConfig(), it can then
     * be modified by the client. The code synchronization code itself
     * reads this value, but it doesn't modify it.
     */
    SyncMode getPreferredSyncMode();
    void setPreferredSyncMode(SyncMode syncMode);

    /**
     * Get & Sets the server imposed synchronization mode for the SyncSource.
     *
     * Agreed upon with the server during the initial exchange with the server.
     * The SyncSource can react to it in beginSync(), in particular it must wipe
     * its local data during a refresh from server.
     */
    SyncMode getSyncMode();
    void setSyncMode(SyncMode syncMode);

    /**
     * Get & Set the timestamp in milliseconds of the last synchronization.
     * The reference time of the timestamp is platform specific.
     */
    unsigned long getLastSync();
    void setLastSync(unsigned long timestamp);

    /**
     * Gets & Sets the timestamp in milliseconds of the next synchronization.
     * The reference time of the timestamp is platform specific.
     */
    unsigned long getNextSync();
    void setNextSync(unsigned long timestamp);

    /**
     * Gets & Sets the last anchor associated to the source
     */
    void setLastAnchor(const char*  last);
    const char*  getLastAnchor();

    /**
     * Gets & Sets the next anchor associated to the source
     */
    const char*  getNextAnchor();
    void setNextAnchor(const char*  next);

    /**
     * Gets filter
     */
    SourceFilter* getFilter();

    /**
     * Sets filter
     *
     * @param f the new filter
     *
     */
    void setFilter(SourceFilter* f);

    /******************************************************
     * The following methods are virtual because a
     * derived SyncSource is expected to override or
     * implement them. Only the pure virtual methods
     * really have to be implemented, the others have
     * reasonable defaults.
     *****************************************************/

    /**
     * Called by the engine from inside SyncClient::sync()
     * at the begin of the sync.
     *
     * The SyncSource can do every initialization it needs.
     * The server has been contacted, so in particular
     * getSyncMode() can now be used to find out what
     * the sync mode for this synchronization run will be.
     * After this call the iterators for SyncItems must return
     * valid results for the current sync mode.
     *
     * The synchronization stops if this function return a non-zero value.
     *
     * @return - 0 on success, an error otherwise
     */
    virtual int beginSync();

    /**
     * Called by the engine from inside SyncClient::sync()
     * at the end of the sync.
     *
     * The SyncSource can do any needed commit action to save
     * the state of the items. The engine commits to the server
     * the changes applied in the transaction only if this function
     * return 0.
     *
     * FIXME: the return code is currently ignored by the sync engine
     *
     * @return - 0 on success, an error otherwise
     */
    virtual int endSync();

    /**
     * called by the sync engine with the status returned by the
     * server for a certain item that the client sent to the server
     *
     * @param key      the local key of the item
     * @param status   the SyncML status returned by the server
     */
    virtual void setItemStatus(const WCHAR* key, int status) = 0;

    /**
     * Return the key of the first SyncItem of all.
     * It is used in case of refresh sync
     * and retrieve all the keys of the data source.
     */
    virtual SyncItem* getFirstItemKey() = 0;

    /**
     * Return the key of the next SyncItem of all.
     * It is used in case of refresh sync
     * and retrieve all the keys of the data source.
     */
    virtual SyncItem* getNextItemKey() = 0;

    /**
     * Return the first SyncItem of all.
     * It is used in case of slow sync
     * and retrieve the entire data source content.
     */
    virtual SyncItem* getFirstItem() = 0;

    /**
     * Return the next SyncItem of all.
     * It is used in case of slow sync
     * and retrieve the entire data source content.
     */
    virtual SyncItem* getNextItem() = 0;

    /**
     * Return the first SyncItem of new one. It is used in case of fast sync
     * and retrieve the new data source content.
     */
    virtual SyncItem* getFirstNewItem() = 0;

    /**
     * Return the next SyncItem of new one. It is used in case of fast sync
     * and retrieve the new data source content.
     */
    virtual SyncItem* getNextNewItem() = 0;

    /**
     * Return the first SyncItem of updated one. It is used in case of fast sync
     * and retrieve the new data source content.
     */
    virtual SyncItem* getFirstUpdatedItem() = 0;

    /**
     * Return the next SyncItem of updated one. It is used in case of fast sync
     * and retrieve the new data source content.
     */
    virtual SyncItem* getNextUpdatedItem() = 0;

    /**
     * Return the first SyncItem of updated one. It is used in case of fast sync
     * and retrieve the new data source content.
     */
    virtual SyncItem* getFirstDeletedItem() = 0;

    /**
     * Return the next SyncItem of updated one. It is used in case of fast sync
     * and retrieve the new data source content.
     */
    virtual SyncItem* getNextDeletedItem() = 0;

    /**
     * Called by the sync engine to add an item that the server has sent.
     * The sync source is expected to add it to its database, then set the
     * key to the local key assigned to the new item. Alternatively
     * the sync source can match the new item against one of the existing
     * items and return that key.
     *
     * @param item    the item as sent by the server
     * @return SyncML status code
     */
    virtual int addItem(SyncItem& item) = 0;

    /**
     * Called by the sync engine to update an item that the source already
     * should have. The item's key is the local key of that item.
     *
     * @param item    the item as sent by the server
     * @return SyncML status code
     */
    virtual int updateItem(SyncItem& item) = 0;

    /**
     * Called by the sync engine to update an item that the source already
     * should have. The item's key is the local key of that item, no data is
     * provided.
     *
     * @param item    the item as sent by the server
     */
    virtual int deleteItem(SyncItem& item) = 0;

    /**
     * ArrayElement implementation
     */
    virtual ArrayElement* clone() = 0;
};

/** @} */
/** @endcond */
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产aⅴ精品一区二区三区色成熟| 韩国一区二区三区| 日本成人超碰在线观看| 欧美乱妇23p| 美腿丝袜在线亚洲一区 | 亚洲视频精选在线| 色狠狠桃花综合| 国产福利一区二区三区在线视频| 一个色综合av| 欧美国产成人精品| 免费久久99精品国产| 欧美激情一区二区三区全黄| 欧美日韩亚洲综合一区 | 亚洲人成7777| 久久久久久电影| 欧美人妇做爰xxxⅹ性高电影| 国产一区二区网址| 日本视频在线一区| 免费看欧美美女黄的网站| 一区二区在线免费观看| 日韩一区二区三免费高清| 亚洲国产高清不卡| 日韩在线卡一卡二| 成人欧美一区二区三区白人 | 日韩欧美精品在线| 欧美一区二区三区在线观看 | 成人免费在线观看入口| 91丨porny丨户外露出| 95精品视频在线| 高清在线观看日韩| 国产自产v一区二区三区c| 国产综合色精品一区二区三区| 久久99久久久久久久久久久| 一区二区中文字幕在线| 欧美高清hd18日本| 欧美一区永久视频免费观看| 91精品国产综合久久久久| 中文字幕一区日韩精品欧美| 日韩一级片网址| 成人午夜激情在线| 1区2区3区精品视频| 国产欧美一区二区三区在线老狼| 精品免费国产二区三区| 国产午夜精品美女毛片视频| 中文字幕一区二区三区在线观看| 一区二区中文视频| 久久99这里只有精品| 99久久精品国产导航| 夜夜嗨av一区二区三区中文字幕 | 日韩欧美不卡一区| 成人免费精品视频| 欧美精选在线播放| 国产视频不卡一区| 亚洲综合色噜噜狠狠| 久久精品噜噜噜成人av农村| 成人ar影院免费观看视频| 91精品国产91综合久久蜜臀| 久久精品夜色噜噜亚洲aⅴ| 午夜国产精品影院在线观看| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美老肥妇做.爰bbww视频| 欧美视频一二三区| 国产无人区一区二区三区| 亚洲女同一区二区| 国产最新精品精品你懂的| 国产精品理论片| 欧美日韩在线电影| 韩日欧美一区二区三区| 国产精品国产a| 日韩欧美高清一区| 92国产精品观看| 九九精品一区二区| 婷婷综合在线观看| 国产日韩欧美在线一区| 91激情在线视频| 国产在线观看免费一区| 亚洲视频在线观看三级| 亚洲精品一区在线观看| 欧美三级一区二区| 99视频一区二区| 婷婷综合另类小说色区| 久久精品亚洲精品国产欧美kt∨| 精品在线免费视频| 日韩一区二区三区视频| 精品一区二区在线视频| 色噜噜狠狠成人中文综合| 国产精品麻豆久久久| 91精品综合久久久久久| 在线免费观看成人短视频| 99视频一区二区三区| 天使萌一区二区三区免费观看| 色婷婷亚洲综合| 日本中文字幕一区二区有限公司| 欧美久久一二区| 秋霞电影一区二区| 中文子幕无线码一区tr| 91成人在线免费观看| 韩国精品久久久| 伊人开心综合网| 91精品久久久久久久99蜜桃| 日本不卡中文字幕| 国产精品久久久久久妇女6080 | 婷婷六月综合网| 久久婷婷色综合| 91高清视频免费看| 99久久免费精品| 99riav一区二区三区| 成人高清免费观看| 91视频观看免费| 91久久人澡人人添人人爽欧美| 91视频91自| 欧美专区在线观看一区| 欧美精品三级在线观看| 欧美日韩一区二区不卡| 日韩欧美一级片| 日韩精品一区二区三区视频在线观看 | 色婷婷久久久综合中文字幕| 色婷婷av一区二区三区gif| 欧美激情一区二区三区蜜桃视频| 国产精品乱人伦| 捆绑调教一区二区三区| 在线观看成人免费视频| 久久人人97超碰com| 午夜久久电影网| 色呦呦国产精品| 国产精品久久久久久久久免费桃花 | 亚洲自拍偷拍综合| 亚洲美女淫视频| 国产精品久久久久一区二区三区 | 国产又黄又大久久| 色猫猫国产区一区二在线视频| 国产日产欧美精品一区二区三区| 亚洲精品在线网站| 日韩精品成人一区二区三区| 国产91丝袜在线观看| 欧美久久高跟鞋激| 亚洲天堂精品视频| 国产精品一区二区免费不卡 | 亚洲色欲色欲www在线观看| 日本在线不卡一区| 国产亚洲午夜高清国产拍精品| 久久成人免费日本黄色| 久久久久久久网| 成人国产精品免费观看动漫| 亚洲色图19p| 欧美性极品少妇| 国产精品一区二区无线| 国产精品国产精品国产专区不蜜| 99re在线精品| 日av在线不卡| 1区2区3区欧美| 7777精品伊人久久久大香线蕉| 狠狠色丁香久久婷婷综| 亚洲免费观看高清完整版在线| 精品国产亚洲在线| 成人免费电影视频| 免费在线看成人av| 亚洲黄色免费网站| 国产片一区二区| 欧美亚洲国产一区二区三区va| 国产成人超碰人人澡人人澡| 亚洲国产一区二区视频| 久久久久国产精品人| 欧美日韩精品欧美日韩精品一综合| 激情国产一区二区| 日本不卡一二三区黄网| 亚洲制服丝袜一区| 亚洲免费av高清| 国产精品乱人伦一区二区| 久久夜色精品一区| 欧美二区三区91| 99久久久久久| 日日欢夜夜爽一区| 国产精品久线观看视频| 久久色在线视频| 欧美α欧美αv大片| 欧美激情一区在线观看| 91精品国产欧美日韩| 欧美性一级生活| 欧美午夜影院一区| 在线欧美日韩精品| 99久久精品国产麻豆演员表| 国产精品1区2区3区| 国产露脸91国语对白| 国产一区二区三区最好精华液| 激情综合网天天干| 国产资源精品在线观看| 成人看片黄a免费看在线| 99精品热视频| 欧美性大战久久| 91精品国产乱码久久蜜臀| 欧美午夜宅男影院| 精品国产乱码久久久久久老虎| 久久蜜桃香蕉精品一区二区三区| 国产肉丝袜一区二区| 亚洲三级在线播放| 亚洲精品乱码久久久久久久久| 亚洲三级免费观看| 日本三级亚洲精品| 在线观看网站黄不卡|