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

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

?? ctpmessage.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_CTP_MESSAGE
    #define INCL_CTP_MESSAGE
/** @cond DEV */
    
    #include "stdio.h"     
    #include <stdio.h>
    #include <windows.h>
    #include "syncml/core/SyncNotification.h" 
    #include "CTPParam.h"

    #include <list>
    
    using namespace std;

    /**
    * Commands
    */
    #define CM_AUTH        0x01
    #define CM_READY       0x02
    #define CM_BYE         0x03
    
    /**
    * Status
    */
    #define ST_OK          0x20
    #define ST_JUMP        0x37
    #define ST_ERROR       0x50
    #define ST_UNAUTHORIZED 0x41
    #define ST_FORBIDDEN   0x43
    #define ST_SYNC        0x29
    #define ST_RETRY       0x53
        

    #define MAX_MESSAGE_SIZE        4096
        

    class CTPMessage {

    private:
        
        /**
        * It represents the notification <san> message from the server.
        * It is no used if the CTPMessage is created from the client to 
        * communicate with the server
        */
        SyncNotification* np;

        
        /**
        * The length of the package to be sent to the server. Used together
        * to the toByte method.
        * For the parse method this value should be set at the beginning
        * with the value of the messageLength + 2.
        */
        int packageLength;
        
        /**
        * The lenght of the message inside the package. This value is retrieved
        * from the first 2 bytes of the package.
        */
        int bufferLength;
        
        /**
        * The buffer field has a different meaning based on the action it is performing.        
        * Parse action: The field contains the value of the status associated.
        * The same could be retrieved from the Params list.
        * if genericCommand is OK  : buffer is the <nonce> (if exists)
        * if genericCommand is JUMP: buffer is the <to> 
        * if genericCommand is ERROR: buffer is the <description> 
        * if genericCommand is UNAUTHORIZED: buffer is the <nonce> 
        * if genericCommand is FORBIDDEN: buffer is the NULL 
        * if genericCommand is SYNC: buffer is the NULL (SyncNotification is populated)
        * if genericCommand is RETRY: buffer is the <sleep> (not yet implemented)
        
        * Format action: to create the package to be returned after a toByte action
        */
        char* buffer;
        /**
        * the length of from property
        */
        int fromLength;
        void setFromLength(int v) { fromLength = v; }

        /**
        * Used only when the status is JUMP. It represent the <from> Param sent by the
        * server. The <to> is in the buffer property
        */
        char* from;
        

        /**
        * the version of the protocol
        * to set in exadecimal mode 0x10 for 1.0 version...
        */ 
        char protocolVersion;
        
        /**
        * the generic command could be a command or a status.
        * The commands are 
        *       AUTH, 
        *       READY, 
        *       BYE 
        * sent from client to server
        * The status are 
        *       OK,
                JUMP,
                ERROR,
                UNAUTHORIZED,
                FORBIDDEN,
                SYNC,
                RETRY (not yet implemented)

        * Command and status are in exadecimal representation
        */ 
        char genericCommand;
        
        /**
        * init the variables
        */
        void initialize();

    public:        
        

        /**
        * List containing the param(s) to be exchanged in the message.
        * It is public to permit to have access to all list methods
        * (to conside to make it private if it not necessary to access them)
        */
        list<CTPParam> params;

        /**
        * Used to create an empty class to be populated by the client.
        */
        CTPMessage();
        
        /**
        * Used to create a filled class populated with the server package.
        * @param package the package sent by the server
        * @param maxPackageLen  optional, the length of the package sent (if already known)
        */
        CTPMessage(const char* package, int maxPackageLen = 0);
        
        /**
        * Destructor
        */
        ~CTPMessage();
        
        /**
        * Used to populated all the fields with the server properties.
        * @param package the package sent by the server to be parsed
        * @param maxPackageLen  optional, the length of the package sent (if already known)
        * @return 0 if the parse action works properly, -1 there is an error.
        */
        int parse(const char* package, int maxPackageLen = 0);
        
        /**
        * Used to create the byte array of the package using all the not-NULL fields .
        * @return the pointer to the internally allocated package
        * NOTE: the length of the byte array is in the packageLength field
        */
        char* toByte();
        
        /**
        * set the package length of the just created byte array to be sent
        * to the server
        */
        void setPackageLength(int v) { packageLength = v; }
        
        /**
        * return the package length of the just created byte array 
        */
        int getPackageLength() { return packageLength; }
        
        /**
        * set the message length
        */
        void setBufferLength(int v) { bufferLength = v; }
        
        /**
        * get the message length
        */
        int getBufferLength()      { return bufferLength; }

        /**
        * get the allocated buffer internally. It needs to get the action
        * due to the parting method
        */
        char* getBuffer() { return buffer; }
       
        /**
        * Used to set the command from client to server
        */
        void setGenericCommand(char c) { genericCommand = c; }

        /**
        * Used to get the status from server to client
        */
        char getGenericCommand() { return genericCommand; }
        
        /**
        * Used to set the protocol version 
        */
        void setProtocolVersion(char c) { protocolVersion = c; }

        /**
        * Used to get the protocol version
        */
        char getProtocolVersion() { return protocolVersion; }
        
        /**
        * Return the internal SyncNotification
        */
        SyncNotification* getSyncNotification() { return np; }
        
        /**
        * get the from field length
        */
        int getFromLength()      { return fromLength; }

        /**
        * get the allocated buffer internally. It needs to get the action
        * due to the parting method
        */
        char* getFrom() { return from; }
            
        /**
        * add CTPParam to the internal public params list member. This method is
        * only to avoid to add directly 
        */
        void addParam(CTPParam* p);
    };

    
/** @endcond */
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
777a∨成人精品桃花网| 曰韩精品一区二区| 日韩影院免费视频| 亚洲特级片在线| 亚洲天堂免费看| 一区二区三区在线不卡| 亚洲免费在线观看视频| 悠悠色在线精品| 亚洲国产一区在线观看| 丝袜亚洲精品中文字幕一区| 天天综合日日夜夜精品| 日本伊人色综合网| 久久成人av少妇免费| 国产美女在线观看一区| 成人性视频免费网站| 成人av网址在线| 欧美视频中文字幕| 91精品国产乱| 国产亚洲欧洲997久久综合| 国产精品天美传媒| 一区二区三区四区国产精品| 亚洲成a人片在线观看中文| 蜜臀av性久久久久蜜臀aⅴ四虎| 极品美女销魂一区二区三区| 国产精品69毛片高清亚洲| 成年人网站91| 欧美视频一区在线| 日韩一级高清毛片| 国产精品久久久久一区二区三区共| 成人成人成人在线视频| 日本大香伊一区二区三区| 欧美三级日韩三级| 精品福利视频一区二区三区| 中文字幕第一页久久| 亚洲一区在线看| 精品一区二区三区免费毛片爱| 懂色av一区二区三区蜜臀| 色噜噜狠狠色综合中国| 日韩三级电影网址| 国产精品欧美综合在线| 亚洲成人资源在线| 大胆欧美人体老妇| 7777精品久久久大香线蕉| 久久久噜噜噜久久人人看| 一区二区免费视频| 精品一区二区久久久| 97精品国产露脸对白| 欧美一二三在线| 国产精品福利影院| 久久成人久久爱| 在线欧美日韩国产| 国产日本欧洲亚洲| 婷婷激情综合网| 国产精品福利电影一区二区三区四区| 亚洲国产一区视频| 国产成人精品免费| 欧美一区二区三区影视| 国产精品毛片久久久久久| 蜜臀精品久久久久久蜜臀| 在线看日韩精品电影| 国产欧美一区视频| 日产国产高清一区二区三区| av一区二区三区四区| 欧美成人精品3d动漫h| 亚洲乱码国产乱码精品精98午夜| 九九**精品视频免费播放| 在线观看视频91| 国产精品传媒在线| 国产综合色在线视频区| 538prom精品视频线放| 亚洲精品国产高清久久伦理二区| 国产精品一线二线三线精华| 欧美一区二区三区啪啪| 夜夜精品视频一区二区 | 国产一区美女在线| 欧美日韩电影在线| 亚洲欧美日韩中文播放 | 亚洲精品国产精华液| 国产成人精品在线看| 欧美成人官网二区| 日韩高清一区二区| 欧美性大战久久| 亚洲免费大片在线观看| 丁香婷婷深情五月亚洲| 欧美v国产在线一区二区三区| 亚洲成av人片一区二区梦乃 | 国产欧美一区二区在线| 极品少妇一区二区三区精品视频 | 国产午夜精品一区二区三区嫩草 | 日韩国产在线观看一区| 欧美日韩三级一区二区| 一区二区三区四区国产精品| 亚洲人成精品久久久久| 成人av资源在线| 中文字幕在线观看一区| 国产白丝网站精品污在线入口| 精品精品欲导航| 久久草av在线| 久久久蜜桃精品| 国产精品99精品久久免费| 国产午夜一区二区三区| 国产91精品一区二区麻豆亚洲| 国产喂奶挤奶一区二区三区| 国产在线播精品第三| 久久欧美一区二区| 国产激情一区二区三区| 国产精品色噜噜| 91在线视频观看| 亚洲激情六月丁香| 欧美日韩三级视频| 免费美女久久99| www久久久久| 成人午夜电影久久影院| 亚洲欧洲精品一区二区三区不卡| av亚洲精华国产精华精| 一区二区在线看| 欧美日韩一区不卡| 免费在线一区观看| 久久精品视频在线看| 日本一区二区三区久久久久久久久不 | 色悠悠亚洲一区二区| 亚洲六月丁香色婷婷综合久久 | 亚洲日本在线a| 欧洲av一区二区嗯嗯嗯啊| 亚洲超碰精品一区二区| 日韩欧美在线影院| 成人激情免费电影网址| 艳妇臀荡乳欲伦亚洲一区| 91.成人天堂一区| 国产美女视频91| 亚洲三级电影网站| 欧美人妇做爰xxxⅹ性高电影 | 91在线云播放| 亚洲1区2区3区4区| 26uuu精品一区二区在线观看| 成人亚洲精品久久久久软件| 亚洲国产精品久久久久秋霞影院 | 日本韩国精品一区二区在线观看| 亚洲一区二区三区精品在线| 欧美一三区三区四区免费在线看| 国产一区二区三区四区五区入口 | 久草中文综合在线| 中文字幕一区二区三区av| 欧美人牲a欧美精品| 国产盗摄女厕一区二区三区| 亚洲激情图片小说视频| 日韩女同互慰一区二区| 成人免费av网站| 日产欧产美韩系列久久99| 国产精品久久午夜夜伦鲁鲁| 欧美日韩一区三区| 国产黑丝在线一区二区三区| 亚洲主播在线观看| 久久婷婷国产综合精品青草| 91久久精品日日躁夜夜躁欧美| 免费成人在线观看| 中文字幕欧美一区| 日韩欧美精品在线视频| 91视视频在线观看入口直接观看www | 91美女福利视频| 蜜臀久久99精品久久久久宅男| 成人免费在线视频| 日韩视频在线你懂得| 一本久久综合亚洲鲁鲁五月天| 麻豆精品国产传媒mv男同| 伊人婷婷欧美激情| 欧美高清在线精品一区| 91麻豆精品国产91久久久 | 欧美性大战xxxxx久久久| 国产福利精品一区二区| 日韩国产在线观看一区| 国产精品福利一区| 久久女同互慰一区二区三区| 欧美高清www午色夜在线视频| 94-欧美-setu| 国产成人精品免费看| 蜜臀av在线播放一区二区三区| 亚洲五月六月丁香激情| 国产精品看片你懂得 | 麻豆精品在线看| 亚洲综合精品自拍| 亚洲欧美日韩国产综合在线| 久久精品亚洲一区二区三区浴池| 日韩欧美一级片| 欧美精品vⅰdeose4hd| 在线亚洲高清视频| 亚洲蜜臀av乱码久久精品蜜桃| 国产欧美一二三区| 久久久久久久综合色一本| 精品精品欲导航| 日韩一级免费观看| 欧美一二三在线| 欧美日韩国产在线播放网站| 91激情在线视频| 一本色道久久综合精品竹菊| 99久久精品国产导航| 成人午夜在线免费| 国产乱码精品一区二区三区av | 亚洲午夜精品一区二区三区他趣| 国产精品美女一区二区在线观看|