dslinux/user/pixil/include/sync coder.h info_defs.h msg_defs.h syncerr.h

amadeus dslinux_amadeus at user.in-berlin.de
Tue Oct 3 13:24:49 CEST 2006


Update of /cvsroot/dslinux/dslinux/user/pixil/include/sync
In directory antilope:/tmp/cvs-serv11916/include/sync

Added Files:
	coder.h info_defs.h msg_defs.h syncerr.h 
Log Message:
adding pristine copy of pixil to HEAD so I can branch from it

--- NEW FILE: syncerr.h ---
/*                                                                       
 * Copyright (c) 2003 Century Software, Inc.   All Rights Reserved.     
 *                                                                       
 * This file is part of the PIXIL Operating Environment                 
 *                                                                       
 * The use, copying and distribution of this file is governed by one    
 * of two licenses, the PIXIL Commercial License, or the GNU General    
 * Public License, version 2.                                           
 *                                                                       
 * Licensees holding a valid PIXIL Commercial License may use this file 
 * in accordance with the PIXIL Commercial License Agreement provided   
 * with the Software. Others are governed under the terms of the GNU   
 * General Public License version 2.                                    
 *                                                                       
 * This file may be distributed and/or modified under the terms of the  
 * GNU General Public License version 2 as published by the Free        
 * Software Foundation and appearing in the file LICENSE.GPL included   
 * in the packaging of this file.                                      
 *                                                                       
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING  
 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A            
 * PARTICULAR PURPOSE.                                                  
 *                                                                       
 * RESTRICTED RIGHTS LEGEND                                             
 *                                                                     
 * Use, duplication, or disclosure by the government is subject to      
 * restriction as set forth in paragraph (b)(3)(b) of the Rights in     
 * Technical Data and Computer Software clause in DAR 7-104.9(a).       
 *                                                                      
 * See http://embedded.centurysoftware.com/gpl/ for GPL licensing       
 * information.                                                         
 *                                                                      
 * See http://embedded.centurysoftware.com/license.html or              
 * email cetsales at centurysoftware.com for information about the PIXIL   
 * Commercial License Agreement, or if any conditions of this licensing 
 * are not clear to you.                                                
 */


#ifndef _SYNC_ERROR_H_
#define _SYNC_ERROR_H_

typedef struct sync_err_struct_
{
    char *msg;
}
sync_err_struct;

#define NO_ERR			0
#define EXP_ABORT 	        1
#define EXP_OK 			2
#define EXP_INFO		3
#define EXP_BP			4
#define EXP_EP			5
#define EXP_STATUS	        6
#define EXP_BS			7
#define EXP_ES			8
#define	EXP_TS			9
#define EXP_RD			10
#define EXP_ET			11
#define EXP_EOT			12
#define EXP_FLIP		13
#define EXP_COMMIT	        14
#define BAD_TS			15
#define SAVE_RD			16
#define UNEXP_ERROR	        17
#define USER_ABORT	        18
#define DT_BUSY                 19
#define CLOSE_CONN              20
#define NO_AGENT		21
#define AGENT_NS		22
#define NO_DB_REG		23
#define UNK_ERROR		24

#define ERR_MAX			24

extern sync_err_struct sync_err_msg[];

inline char *
get_error_msg(const int err_code)
{
    if (ERR_MAX < err_code)
	return sync_err_msg[ERR_MAX].msg;
    else if (0 > err_code)
	return sync_err_msg[ERR_MAX].msg;
    else
	return sync_err_msg[err_code].msg;
}
#endif

--- NEW FILE: msg_defs.h ---
/*                                                                       
 * Copyright (c) 2003 Century Software, Inc.   All Rights Reserved.     
 *                                                                       
 * This file is part of the PIXIL Operating Environment                 
 *                                                                       
 * The use, copying and distribution of this file is governed by one    
 * of two licenses, the PIXIL Commercial License, or the GNU General    
 * Public License, version 2.                                           
 *                                                                       
 * Licensees holding a valid PIXIL Commercial License may use this file 
 * in accordance with the PIXIL Commercial License Agreement provided   
 * with the Software. Others are governed under the terms of the GNU   
 * General Public License version 2.                                    
 *                                                                       
 * This file may be distributed and/or modified under the terms of the  
 * GNU General Public License version 2 as published by the Free        
 * Software Foundation and appearing in the file LICENSE.GPL included   
 * in the packaging of this file.                                      
 *                                                                       
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING  
 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A            
 * PARTICULAR PURPOSE.                                                  
 *                                                                       
 * RESTRICTED RIGHTS LEGEND                                             
 *                                                                     
 * Use, duplication, or disclosure by the government is subject to      
 * restriction as set forth in paragraph (b)(3)(b) of the Rights in     
 * Technical Data and Computer Software clause in DAR 7-104.9(a).       
 *                                                                      
 * See http://embedded.centurysoftware.com/gpl/ for GPL licensing       
 * information.                                                         
 *                                                                      
 * See http://embedded.centurysoftware.com/license.html or              
 * email cetsales at centurysoftware.com for information about the PIXIL   
 * Commercial License Agreement, or if any conditions of this licensing 
 * are not clear to you.                                                
 */


#ifndef _MSG_DEF_H_
#define _MSG_DEF_H_

// msg_defs.h
//
// Description: Definitions of the message protocol to be passed back
//                              and forth between PIM applications and the desktop. 
//                              Some of these messages are also used for the sync.
//                              application to begin syncronization with the sync
//                              agent.

/*********** Old stuff
#define ACK		0	
#define BEG_SYNC 	1
#define ACK_SYNC 	2
#define BEG_COMP 	3
#define ACK_COMP 	4
#define BEG_APP 	100
#define ACK_APP 	101
#define BEG_TABLE 	102
#define ACK_TABLE 	103
#define ROW_DATA 	104
#define ACK_ROW 	105
#define END_TABLE 	190
#define END_APP 	192
#define RCV_COMM 	193
#define SND_COMM 	194
#define ABORT 		199
#define ACK_ABORT 	198
#define STATUS		80
#define ACK_STATUS 	81
#define END_COMP 	90
#define END_SYNC	91
#define ACK_END 	200
#define ERR 		99
***************/

// New stuff 12/13/01
#define ERR	100
#define ABORT   150
#define OK	200
#define INFO	250
#define BP	300
#define EP	350
#define STATUS  400
#define BS	500
#define ES	550
#define TS	600
#define RD	700
#define ET	800
#define EOT	850
#define FLIP	900
#define COMMIT	950

/* Anything 1000 and above are destined only for the sync agent */
#define CONNECT    1000
#define DISCONNECT 1005

#endif

--- NEW FILE: coder.h ---
/*                                                                       
 * Copyright (c) 2003 Century Software, Inc.   All Rights Reserved.     
 *                                                                       
 * This file is part of the PIXIL Operating Environment                 
 *                                                                       
 * The use, copying and distribution of this file is governed by one    
 * of two licenses, the PIXIL Commercial License, or the GNU General    
 * Public License, version 2.                                           
 *                                                                       
 * Licensees holding a valid PIXIL Commercial License may use this file 
 * in accordance with the PIXIL Commercial License Agreement provided   
 * with the Software. Others are governed under the terms of the GNU   
 * General Public License version 2.                                    
 *                                                                       
 * This file may be distributed and/or modified under the terms of the  
 * GNU General Public License version 2 as published by the Free        
 * Software Foundation and appearing in the file LICENSE.GPL included   
 * in the packaging of this file.                                      
 *                                                                       
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING  
 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A            
 * PARTICULAR PURPOSE.                                                  
 *                                                                       
 * RESTRICTED RIGHTS LEGEND                                             
 *                                                                     
 * Use, duplication, or disclosure by the government is subject to      
 * restriction as set forth in paragraph (b)(3)(b) of the Rights in     
 * Technical Data and Computer Software clause in DAR 7-104.9(a).       
 *                                                                      
 * See http://embedded.centurysoftware.com/gpl/ for GPL licensing       
 * information.                                                         
 *                                                                      
 * See http://embedded.centurysoftware.com/license.html or              
 * email cetsales at centurysoftware.com for information about the PIXIL   
 * Commercial License Agreement, or if any conditions of this licensing 
 * are not clear to you.                                                
 */


#ifndef _DECODE_MSG_
#define _DECODE_MSG_

#include <vector>
#include <string>

using namespace std;

class MsgCoder
{

  public:
    string set_token;
    vector < string > vmessages;
    MsgCoder():set_token("^")
    {
    }
    MsgCoder(string token):set_token(token)
    {
    }
    ~MsgCoder() {
    }
    void DecodeMsg(const string msg_packet);
    void DecodeMsg(const string msg_packet, short int &msg_id, int &msg_len);
    string EncodeMsg(const int msgid, const vector < string > *vstr = 0,
		     const string data = "-1");
    string Ok();
    string EndPimSync();
    string EndTable();
    string EndOfTables();
    string Flip();
    string Commit();
    string Err(const int err_code, const string & msg = "");
    string Info(const int info_code, const string & msg = "");
    string BeginPimSync(const string & app_id);
    string RowData(const int status, const int key, vector < string > &data);
    string TableSchema(int table_num, const vector < char >&col_type,
		       const vector < int >&col_size);
    string Abort();
#ifndef CONFIG_X11
    string Status();
#endif
    string BeginSync(const string & app_id);
    string EndSync(const string & app_id);

};

#endif

--- NEW FILE: info_defs.h ---
/*                                                                       
 * Copyright (c) 2003 Century Software, Inc.   All Rights Reserved.     
 *                                                                       
 * This file is part of the PIXIL Operating Environment                 
 *                                                                       
 * The use, copying and distribution of this file is governed by one    
 * of two licenses, the PIXIL Commercial License, or the GNU General    
 * Public License, version 2.                                           
 *                                                                       
 * Licensees holding a valid PIXIL Commercial License may use this file 
 * in accordance with the PIXIL Commercial License Agreement provided   
 * with the Software. Others are governed under the terms of the GNU   
 * General Public License version 2.                                    
 *                                                                       
 * This file may be distributed and/or modified under the terms of the  
 * GNU General Public License version 2 as published by the Free        
 * Software Foundation and appearing in the file LICENSE.GPL included   
 * in the packaging of this file.                                      
 *                                                                       
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING  
 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A            
 * PARTICULAR PURPOSE.                                                  
 *                                                                       
 * RESTRICTED RIGHTS LEGEND                                             
 *                                                                     
 * Use, duplication, or disclosure by the government is subject to      
 * restriction as set forth in paragraph (b)(3)(b) of the Rights in     
 * Technical Data and Computer Software clause in DAR 7-104.9(a).       
 *                                                                      
 * See http://embedded.centurysoftware.com/gpl/ for GPL licensing       
 * information.                                                         
 *                                                                      
 * See http://embedded.centurysoftware.com/license.html or              
 * email cetsales at centurysoftware.com for information about the PIXIL   
 * Commercial License Agreement, or if any conditions of this licensing 
 * are not clear to you.                                                
 */


#ifndef _INFO_H_
#define _INFO_H_

#define MERGE	0
#define PDAOVR	1
#define DTOVR	2
#define NOSYNC	3

#endif




More information about the dslinux-commit mailing list