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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? syncclient.cpp

?? funambol windows mobile plugin source code, the source code is taken from the funambol site
?? CPP
字號(hào):
/*
 * 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
 */


#include "client/SyncClient.h"
#include "spds/SyncManager.h"
#include "spds/spdsutils.h"
#include "base/LogErrorHandler.h"
#include "syncml/core/CTTypeSupported.h"
#include "syncml/core/CTCap.h"
#include "syncml/core/CTPropParam.h"

//--------------------------------------------------- Constructor & Destructor
SyncClient::SyncClient() {
}

SyncClient::~SyncClient() {
}

//------------------------------------------------------------- Public Methods

/*
* Used to start the sync process. The argument is an array of SyncSources
* that have to be synched with the sync process
*/
int SyncClient::sync(SyncManagerConfig& config, SyncSource** sources) {

    resetError();
    int ret = 0;

    if (!config.getSyncSourceConfigsCount()) {
        sprintf(lastErrorMsg, "Error in sync() - configuration not set correctly.");
        LOG.error(lastErrorMsg);
        return 1;
    }

    //
    // Synchronization report.
    //
    syncReport.setSyncSourceReports(config);
    // Set source report on each SyncSource (assign pointer)
    int i=0;
    while (sources[i]) {
        char* name = toMultibyte(sources[i]->getName());
        SyncSourceReport *ssr = syncReport.getSyncSourceReport(name);
        ssr->setState(SOURCE_ACTIVE);
        sources[i]->setReport(ssr);

        delete[] name;
        i++;
    }

    SyncManager syncManager(config, syncReport);

    if ((ret = syncManager.prepareSync(sources))) {
        LOG.error("Error in preparing sync: %s", lastErrorMsg);
        goto finally;
    }

    ret = continueAfterPrepareSync();
    if (ret) {
        LOG.error("SyncClient: continueAfterPrepareSync returns error code: %d.", ret);
        goto finally;
    }

    if ((ret = syncManager.sync())) {
        LOG.error("Error in syncing: %s", lastErrorMsg);
        goto finally;
    }

    ret = continueAfterSync();
    if (ret) {
        LOG.error("SyncClient: continueAfterSync returns error code: %d.", ret);
        goto finally;
    }

    if ((ret = syncManager.endSync())) {
        LOG.error("Error in ending sync: %s", lastErrorMsg);
        goto finally;
    }

finally:

    // Update SyncReport with last error from sync
    syncReport.setLastErrorCode(lastErrorCode);
    syncReport.setLastErrorMsg(lastErrorMsg);

    return ret;
}


/*
 * Start the sync process.
 * SyncSources are managed (created, initialized, deleted) inside
 * this method. When SyncSource array is ready, the method 'sync(sources**)'
 * is called to start the sync process.
 *
 * @param sourceNames: optional, a NULL terminated array of source names that
 *                     we want to sync. If NULL, sources to sync are chosen
 *                     from the configuration object (config).
 * @return:            0 on success, an error otherwise
 */
int SyncClient::sync(SyncManagerConfig& config, char** sourceNames) {
    SyncSourceConfig* sc = NULL;
    SyncSource **sources = NULL;
    const char* currName;
    int currSource = 0, numActive = 0, numSources = 0;
    int ret = 0;

    ret = prepareSync(config);
    if (ret) {
        LOG.error("SyncClient: prepareSync returned error code: %d.", ret);
        goto finally;
    }

    // Get number of sources: from passed parameter or (if NULL) from config.
    numSources = 0;
    if (sourceNames) {
        while (sourceNames[numSources]) {
            numSources ++;
        }
    }
    else {
        numSources = config.getSyncSourceConfigsCount();
    }

    // make room for all potential sync sources
    sources = new SyncSource* [numSources + 1];

    // iterate over all configs and add those which the client
    // wants to have synchronized
    while (currSource < numSources) {

        // use only sources indicated in 'sourceNames' param
        if (sourceNames) {
            currName = sourceNames[currSource];
            if (! (sc = config.getSyncSourceConfig(currName)) ) {
                if (sources)
                    delete [] sources;
                return lastErrorCode;
            }
        }
        // use all available sources from config
        else {
            if (! (sc = config.getSyncSourceConfig(currSource)) ) {
                if (sources)
                    delete [] sources;
                return lastErrorCode;
            }
            currName = sc->getName();
        }

        ret = createSyncSource(currName, currSource, sc, sources + numActive);
        if (ret) {
            LOG.error("SyncClient: createSyncSource returned error code: %d.", ret);
            goto finally;
        }

        if (sources[numActive]) {
            numActive++;
        }
        currSource++;
    }
    sources[numActive] = NULL;


    ret = beginSync(sources);
    if (ret) {
        LOG.error("SyncClient: beginSync returned error code: %d.", ret);
        goto finally;
    }

    //
    // ready to synchronize
    //
    ret = sync(config, sources);
    if (ret) {
        goto finally;
    }

    ret = endSync(sources);
    if (ret) {
        LOG.error("SyncClient: endSync returned error code: %d.", ret);
    }

finally:
    if (sources) {
        for (int i=0; sources[i]; i++) {
            delete sources[i];
        }
        delete [] sources;
    }

    return ret;
}


SyncReport* SyncClient::getSyncReport() {
    return &syncReport;
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天综合色天天综合色h| 自拍偷拍亚洲综合| 亚洲青青青在线视频| 青青草国产成人av片免费| 不卡免费追剧大全电视剧网站| 欧美日韩一区二区三区四区| 国产日韩一级二级三级| 久久国产日韩欧美精品| 91麻豆福利精品推荐| 久久一区二区三区国产精品| 日韩高清在线不卡| 欧美视频中文一区二区三区在线观看| 久久久久成人黄色影片| 视频一区视频二区中文| 欧美日韩在线一区二区| 亚洲色图视频网| 国产成人日日夜夜| 日韩欧美亚洲国产另类| 视频一区欧美日韩| 欧美日韩一区精品| 午夜精品久久久久久久| 欧美亚洲精品一区| 亚洲欧美日韩国产另类专区| 风间由美一区二区三区在线观看| 欧美v国产在线一区二区三区| 一区二区三区四区乱视频| 色综合久久中文字幕综合网 | 亚洲一区二区三区在线| 国产激情偷乱视频一区二区三区| 欧美成人精品3d动漫h| 天天综合色天天综合色h| 欧美日韩免费视频| 一区二区三区加勒比av| 在线观看日韩一区| 亚洲一二三区在线观看| 欧美三日本三级三级在线播放| 亚洲色图在线视频| 91久久精品一区二区三区| 一区二区三区日韩在线观看| 日本乱人伦一区| 午夜久久福利影院| 制服视频三区第一页精品| 五月天亚洲婷婷| 欧美精三区欧美精三区 | 亚洲精品日产精品乱码不卡| av中文字幕在线不卡| 亚洲激情在线播放| 欧美精品一卡二卡| 国产一区久久久| 亚洲视频在线一区二区| 91国偷自产一区二区三区观看| 丝袜亚洲另类欧美| 精品免费国产一区二区三区四区| 国产一区二区三区黄视频| 国产精品久久777777| 欧美午夜在线一二页| 久久爱另类一区二区小说| 国产精品美女久久久久久久 | 日韩免费看的电影| 粉嫩嫩av羞羞动漫久久久| 亚洲精品ww久久久久久p站| 欧美日韩亚洲国产综合| 国产精品一区在线观看乱码| 亚洲欧洲综合另类| 欧美一级理论片| 91玉足脚交白嫩脚丫在线播放| 日本最新不卡在线| 成人欧美一区二区三区1314 | 蜜臀av性久久久久蜜臀av麻豆| 亚洲精品一区二区在线观看| 色综合视频一区二区三区高清| 免费美女久久99| 亚洲三级在线播放| 欧美电影免费观看高清完整版在线| 成人av免费网站| 蜜桃精品视频在线| 又紧又大又爽精品一区二区| 精品国产乱码久久久久久老虎| 91日韩精品一区| 国产美女精品一区二区三区| 亚洲国产日韩综合久久精品| 欧美激情一区二区三区四区| 日韩精品一区二区在线| 欧美性色黄大片手机版| 成人av网址在线| 国产精品一区免费视频| 免费在线一区观看| 成人高清免费在线播放| 久久成人久久爱| 亚洲18女电影在线观看| 自拍偷自拍亚洲精品播放| 精品国产凹凸成av人网站| 欧美福利电影网| 欧美在线观看一二区| 99久久久精品| 成人精品视频一区二区三区尤物| 免费在线看一区| 日本在线不卡视频一二三区| 亚洲图片自拍偷拍| 一区二区三区.www| 一区二区三区中文字幕精品精品 | 欧美一级二级三级乱码| 欧美日韩国产精选| 91国产成人在线| 91免费看`日韩一区二区| 国产成人免费视频一区| 国产一区二区电影| 国产一区二区三区精品视频| 久久99国产精品免费网站| 麻豆精品新av中文字幕| 美女免费视频一区| 美国十次了思思久久精品导航| 青青草91视频| 蜜桃在线一区二区三区| 麻豆91小视频| 精久久久久久久久久久| 国产精品香蕉一区二区三区| 极品尤物av久久免费看| 国产乱色国产精品免费视频| 国产一区二三区| 国产精品亚洲综合一区在线观看| 国内精品国产三级国产a久久| 久久精品国产精品青草| 国产精品一区在线观看乱码| 成人激情动漫在线观看| 99综合电影在线视频| 色av综合在线| 91精品麻豆日日躁夜夜躁| 91精品欧美久久久久久动漫| 日韩一区二区在线免费观看| 26uuu精品一区二区三区四区在线| 久久看人人爽人人| 综合色天天鬼久久鬼色| 亚洲一级二级三级在线免费观看| 亚洲第一福利一区| 久久国产精品免费| 成人美女在线观看| 欧美日韩电影一区| 久久久噜噜噜久噜久久综合| 综合av第一页| 蜜臀av性久久久久蜜臀aⅴ| 国产精品一区二区三区99 | 国产成人aaaa| 色婷婷综合在线| 欧美一二三区在线| 国产精品免费视频一区| 亚洲福利视频三区| 国产一区二区三区在线观看免费| 不卡电影一区二区三区| 欧美精品色一区二区三区| 久久久久综合网| 亚洲小少妇裸体bbw| 国产成人综合在线观看| 欧美亚洲国产怡红院影院| 亚洲精品v日韩精品| 精彩视频一区二区| 色综合久久九月婷婷色综合| 日韩精品一区二区三区四区视频 | 久久九九国产精品| 亚洲国产三级在线| jlzzjlzz亚洲日本少妇| 欧美一区二区不卡视频| 亚洲欧洲成人精品av97| 麻豆传媒一区二区三区| 欧美影院午夜播放| 久久久三级国产网站| 亚洲成人一区在线| 成人黄色av网站在线| 日韩欧美一级二级三级久久久| 亚洲精品国产精华液| 国产成人亚洲综合a∨猫咪| 欧美高清性hdvideosex| 亚洲欧美激情插| 国产精品1区二区.| 欧美一区二区久久| 亚洲午夜av在线| 日韩精品最新网址| 91在线视频播放| 国产精品久久久久久久久免费桃花 | 久久精品视频一区二区| 日韩和的一区二区| 在线看一区二区| 亚洲三级在线播放| 成人在线综合网| 亚洲精品在线观看网站| 日韩极品在线观看| 欧美天堂一区二区三区| ...av二区三区久久精品| 成人亚洲精品久久久久软件| 久久只精品国产| 久久99精品国产91久久来源| 欧美精品一级二级| 亚洲电影欧美电影有声小说| 在线观看免费成人| 亚洲欧美电影院| 欧美影院午夜播放| 午夜视频在线观看一区二区| 欧美午夜在线一二页| 亚洲国产精品一区二区www | 亚洲精品免费在线|