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

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

?? notifprocessortest.cpp

?? funambol windows mobile plugin source code, the source code is taken from the funambol site
?? CPP
字號:
/*
 * 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 <sys/types.h>
//#include <sys/stat.h>

#include "base/fscapi.h"
#include "base/Log.h"
#include "base/util/utils.h"
//#include "base/util/UTF8StringBuffer.h"
#include "syncml/core/SyncNotification.h"

/////////////////////////////////////////////////////////////////////////////////
#ifdef _WIN32_WCE
void Print(TCHAR *pFormat, ...) {
    va_list ArgList;
    TCHAR   Buffer[256];

    va_start (ArgList, pFormat);

    (void)wvsprintf (Buffer, pFormat, ArgList);
    MessageBox(NULL, Buffer, TEXT(""), MB_OK);

    va_end(ArgList);
}
#else
#define Print wprintf
#endif

/////////////////////////////////////////////////////////////////////////////////
class SyncNotificationTest {
    public:
        SyncNotificationTest();
        SyncNotificationTest(const char *filename);
        ~SyncNotificationTest();

        size_t getMsgLen() { return msglen; };

        bool test(int bytenum);
    private:
        SyncNotification sn;
        SN_Errors errcode;
        char *msg;
        size_t msglen;

        void readFromFile(const char* path);
};

///////////////////////////////////////////////////////////////////////////////
static const unsigned char message1_bin[] = {
  0x6d, 0x0d, 0x2e, 0x6f, 0xa3, 0x1a, 0x94, 0xbc, 0xc8, 0xbd, 0x7c, 0xa2,
  0x46, 0xd8, 0xc6, 0x5f, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f,
  0x73, 0x79, 0x6e, 0x63, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
  0x63, 0x6f, 0x6d, 0x20, 0x80, 0x00, 0x00, 0x00, 0x05, 0x6e, 0x6f, 0x74,
  0x65, 0x73, 0x80, 0x00, 0x00, 0x00, 0x08, 0x63, 0x61, 0x6c, 0x65, 0x6e,
  0x64, 0x61, 0x72
};
static const unsigned int message1_bin_len = 63;

SyncNotificationTest::SyncNotificationTest() {
    errcode=SNErr_Undefined;
    msglen=message1_bin_len;
    msg=new char[message1_bin_len+1];
    memcpy(msg, message1_bin, message1_bin_len);
}
SyncNotificationTest::SyncNotificationTest(const char *filename) {
    errcode=SNErr_Undefined;
    readFile(filename, &msg, &msglen, true);
}
SyncNotificationTest::~SyncNotificationTest() {
    if (msg)
        delete [] msg;
}

bool SyncNotificationTest::test(int bytenum)
{
    for(size_t i=bytenum; ; i+=bytenum){
        if(i>msglen) i=msglen;
        fprintf(stderr, "Try with len=%d\n", i);

        fprintf(stderr, "Start parse (%d)\t", i);
        errcode=sn.parse(msg, i);
        fprintf(stderr, "parse finished with code: %d\n", errcode);

        if(errcode != SNErr_Incomplete) break;
#if 0
        Print(TEXT("Message incomplete. Press enter\n"));
#ifndef _WIN32_WCE
        getchar();
#endif
#endif
    }
    if(errcode){
        fprintf(stderr,"Error number: %d\n", errcode);
        return false;
    }
    else{
        fprintf(stderr,"Version:\t%d\n", sn.getVersion());
        fprintf(stderr,"UIMode:\t%d\n", sn.getUIMode());
        fprintf(stderr,"Initiator:\t%s\n",
                ( sn.getInitiator() == UserInitiated )
                    ? "UserInitiated" : "ServerInitiated" );
        fprintf(stderr,"Session ID:\t%d (%x)\n", sn.getSessionId(), sn.getSessionId() );
        fprintf(stderr,"Server ID:\t%S\n", sn.getServerId() );
        fprintf(stderr,"NumSyncs:\t%d\n", sn.getNumSyncs() );

        for (int i=0; i<sn.getNumSyncs(); i++){
            SyncAlert *sync;

            sync=sn.getSyncAlert(i);

            if( ! sync ){
                fprintf(stderr, "Error on sync #%d\n", i);
                return false;
            }
            fprintf(stderr,"Sync type:\t%d\n", sync->getSyncType() );
            fprintf(stderr,"Content type:\t%x\n", sync->getContentType() );
            fprintf(stderr,"Server URI:\t%S\n", sync->getServerURI() );
        }

        return true;
    }
}

/////////////////////////////////////////////////////////////////////////////////
#ifdef _WIN32_WCE
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd )
{
    //argc=0;
    FILE *stream = _wfreopen( L"testlog.txt", L"w", stderr );

    if( stream == NULL ) {
        fprintf(stderr,"error on freopen\n" );
        exit(1);
    }
    int argc = 1;
    char *argv[] = { "test", NULL };
#else
int main(int argc, char** argv)
{
#endif

    fprintf(stderr, "Notification processor debug\n\n");

    SyncNotificationTest *t;
    int len;

//    if (argc>1) {
//        fprintf(stderr, "Message: %s\n", argv[1]);
//        t = new SyncNotificationTest(argv[1]);
//    }
//    else {
        fprintf(stderr, "Default message.\n");
        t = new SyncNotificationTest;
//    }

//    len  = (argc>2) ? atoi(argv[2]) : t->getMsgLen();
    len = t->getMsgLen();

    fprintf(stderr, "Start test\n");
    if ( t->test(len) ){
        fprintf(stderr, "Success\n");
        return 0;
    }
    else{
        fprintf(stderr, "Failure\n");
        return 1;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美美女黄视频| 自拍偷拍国产精品| 中文字幕日韩av资源站| 丝袜美腿亚洲综合| 成人a免费在线看| 久久青草欧美一区二区三区| 亚洲不卡一区二区三区| 成人av在线观| 精品精品欲导航| 五月天久久比比资源色| 91九色最新地址| 国产精品久久久久影视| 国产一区二区三区观看| 91精品综合久久久久久| 亚洲高清在线精品| 91亚洲精品久久久蜜桃网站 | 麻豆91精品视频| 欧美性视频一区二区三区| 国产人妖乱国产精品人妖| 久久99精品国产麻豆婷婷| 777奇米成人网| 午夜激情一区二区| 欧美人伦禁忌dvd放荡欲情| 亚洲欧美一区二区三区国产精品| 国产mv日韩mv欧美| 国产精品视频麻豆| 国产宾馆实践打屁股91| 欧美国产一区视频在线观看| 国产成人综合网站| 国产亚洲美州欧州综合国| 极品少妇xxxx精品少妇| 久久综合五月天婷婷伊人| 国产一区二区导航在线播放| 久久嫩草精品久久久久| 国产伦精品一区二区三区免费| 日韩欧美国产小视频| 久久66热偷产精品| 国产视频911| 99精品热视频| 亚洲精品乱码久久久久久日本蜜臀| 91网站视频在线观看| 亚洲精选在线视频| 欧美精品国产精品| 麻豆成人在线观看| 国产日本亚洲高清| 色综合天天做天天爱| 亚洲18女电影在线观看| 日韩欧美中文字幕公布| 国产一区二区视频在线| 亚洲国产经典视频| 在线视频综合导航| 日本不卡在线视频| 久久蜜桃av一区精品变态类天堂 | 亚洲精品一二三四区| 一本色道久久综合狠狠躁的推荐| 一区av在线播放| 欧美日韩大陆一区二区| 激情都市一区二区| 亚洲人成伊人成综合网小说| 3atv在线一区二区三区| 国产裸体歌舞团一区二区| 亚洲色图另类专区| 日韩欧美一区二区三区在线| 成人a免费在线看| 视频一区二区中文字幕| 日本一区二区免费在线| 欧美日韩国产成人在线免费| 国产精品一区二区男女羞羞无遮挡| 国产精品卡一卡二卡三| 欧美日韩一卡二卡三卡| 丁香婷婷深情五月亚洲| 午夜电影网亚洲视频| 亚洲国产精品精华液ab| 欧美麻豆精品久久久久久| 成人综合婷婷国产精品久久蜜臀| 日韩在线卡一卡二| 欧美激情一区二区三区在线| 欧美区在线观看| 99国产精品一区| 国内精品伊人久久久久影院对白| 一区二区三区日韩| 欧美国产一区视频在线观看| 日韩三级电影网址| 在线国产亚洲欧美| 粉嫩嫩av羞羞动漫久久久| 免费在线看一区| 亚洲一二三四区| 国产精品久线观看视频| 精品国产一区二区三区忘忧草| 欧美日韩中字一区| 在线一区二区三区做爰视频网站| 国产高清亚洲一区| 久久99久国产精品黄毛片色诱| 亚洲国产综合色| 亚洲欧美成人一区二区三区| 中文字幕高清不卡| 久久综合成人精品亚洲另类欧美| 欧美日韩激情在线| 日本精品一区二区三区高清| av在线不卡免费看| 成人小视频在线观看| 国产一区二区三区免费在线观看| 日韩制服丝袜av| 石原莉奈在线亚洲二区| 亚洲成人福利片| 亚洲国产精品久久不卡毛片| 一区二区视频在线| 亚洲精品v日韩精品| 国产精品久久久久久久久免费相片| 久久综合久久综合亚洲| 欧美精品一区二区久久久| 欧美xingq一区二区| 日韩亚洲欧美综合| 日韩精品一区二区三区中文不卡 | 久久日韩精品一区二区五区| 亚洲精品在线一区二区| 精品国精品国产尤物美女| 久久综合一区二区| 久久精品欧美一区二区三区不卡| 久久人人97超碰com| 国产日韩欧美麻豆| 国产精品私人影院| 国产精品乱码一区二三区小蝌蚪| 中文字幕欧美国产| 中文字幕中文乱码欧美一区二区| 中文字幕在线不卡一区二区三区| 国产精品夫妻自拍| 一片黄亚洲嫩模| 人妖欧美一区二区| 久久99久久99| 成人av在线看| 欧美私人免费视频| 日韩欧美国产一区在线观看| 国产欧美视频一区二区三区| 亚洲日本欧美天堂| 日日夜夜免费精品| 激情文学综合插| caoporen国产精品视频| 欧美私模裸体表演在线观看| 欧美一级片在线看| 国产日韩精品视频一区| 一区二区三区丝袜| 捆绑变态av一区二区三区| 国产+成+人+亚洲欧洲自线| 91黄色免费网站| 日韩精品专区在线影院观看| 国产精品色哟哟网站| 亚洲最大成人网4388xx| 麻豆国产欧美一区二区三区| 91丝袜高跟美女视频| 91精品国产手机| 国产精品少妇自拍| 日日夜夜免费精品| 北条麻妃国产九九精品视频| 欧美视频在线播放| 欧美国产日本韩| 日本大胆欧美人术艺术动态| www.久久久久久久久| 91精品国产黑色紧身裤美女| 18成人在线视频| 精品亚洲成a人| 欧美做爰猛烈大尺度电影无法无天| 亚洲精品一区二区在线观看| 亚洲靠逼com| 成人激情免费视频| 精品国产a毛片| 丝袜a∨在线一区二区三区不卡| 成人听书哪个软件好| 欧美一区二区三区四区五区| 亚洲人成网站影音先锋播放| 国产一区二区三区香蕉 | 欧美激情一区不卡| 美女国产一区二区| 欧美日韩在线播放三区| 国产精品美女一区二区三区| 久久成人免费网站| 在线成人av影院| 亚洲第一二三四区| 9i看片成人免费高清| 久久久久久久久免费| 美女www一区二区| 91麻豆精品国产91久久久久久久久 | 国产精品亚洲一区二区三区妖精 | 久久成人精品无人区| 欧美日韩一区二区三区视频| 亚洲色图欧洲色图| gogogo免费视频观看亚洲一| 国产欧美一区二区精品忘忧草 | 国产亚洲欧美一级| 国内久久婷婷综合| 精品国产凹凸成av人网站| 无码av中文一区二区三区桃花岛| 色噜噜久久综合| 亚洲自拍偷拍综合| 欧美艳星brazzers| 亚洲国产精品一区二区久久恐怖片| 97久久超碰国产精品| 亚洲精品乱码久久久久久黑人| 91福利在线观看| 亚洲风情在线资源站|