You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(19) |
May
(23) |
Jun
(24) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Kidong L. <bri...@us...> - 2004-05-24 01:34:16
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10631/src/sml/inc Modified Files: sml.h smldef.h smldevinfdtd.h smldtd.h smlerr.h smlmetinfdtd.h Log Message: Modified comments to doxygen-readable Removed duplicated comments Index: smlerr.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/smlerr.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** smlerr.h 2 May 2003 22:05:06 -0000 1.2 --- smlerr.h 24 May 2004 01:33:34 -0000 1.3 *************** *** 1,13 **** ! /*************************************************************************/ ! /* module: ErrorLibrary */ ! /* */ ! /* file: smlerr.h */ ! /* target system: all */ ! /* target OS: all */ ! /* */ ! /* Description: */ ! /* Definition of the used Error Codes */ ! /*************************************************************************/ ! --- 1,10 ---- ! /** ! * @file ! * ErrorLibrary ! * ! * @target_system all ! * @target_os all ! * @description Definition of the used Error Codes ! */ *************** *** 60,132 **** ! /** * No error, success code ! **/ ! #define SML_ERR_OK 0x00 // OK ! /** * SyncML Common Error Codes ! **/ // general errors ! #define SML_ERR_UNSPECIFIC 0x10 // unspecific error ! #define SML_ERR_NOT_ENOUGH_SPACE 0x11 // not enough memory to perform this operation ! #define SML_ERR_WRONG_USAGE 0x13 // function was called in wrong context // wrong parameters ! #define SML_ERR_WRONG_PARAM 0x20 // wrong parameter ! #define SML_ERR_INVALID_SIZE 0x21 // param has an invalid size ! #define SML_ERR_INVALID_HANDLE 0x22 // if handle is invalid/unknown ! #define SML_ERR_INVALID_OPTIONS 0x23 // unkown or unallowed options ! /** * SyncML Mgr Error Codes ! **/ ! #define SML_ERR_A_MGR_ERROR 0x1001 // a template ! #define SML_ERR_MGR_INVALID_INSTANCE_INFO 0x1002 // a invalid Instance Info structure is used ! #define SML_ERR_COMMAND_NOT_HANDLED 0x1003 // no callback function is available to handle this command ! #define SML_ERR_ALREADY_INITIALIZED 0x1004 // Mgr allready initialized ! /** * SyncML Xlt Error Codes ! **/ ! #define SML_ERR_XLT_MISSING_CONT 0x2001 // required field content missing ! #define SML_ERR_XLT_BUF_ERR 0x2002 // Buffer too small ! #define SML_ERR_XLT_INVAL_PCDATA_TYPE 0x2003 // Invalid (WBXML) Element Type (STR_I etc.) ! #define SML_ERR_XLT_INVAL_LIST_TYPE 0x2004 // Invalid List Type (COL_LIST etc.) ! #define SML_ERR_XLT_INVAL_TAG_TYPE 0x2005 // Invalid Tag Type (TT_BEG etc.) ! #define SML_ERR_XLT_ENC_UNK 0x2007 // Unknown Encoding (WBXML, XML) ! #define SML_ERR_XLT_INVAL_PROTO_ELEM 0x2008 // Invalid Protocol Element (ADD, Delete, ...) ! #define SML_ERR_MISSING_LIST_ELEM 0x2009 // Missing Content of List Elements ! #define SML_ERR_XLT_INCOMP_WBXML_VERS 0x200A // Incompatible WBXML Content Format Version ! #define SML_ERR_XLT_INVAL_SYNCML_DOC 0x200B // Document does not conform to SyncML DTD ! #define SML_ERR_XLT_INVAL_PCDATA 0x200C // Invalid PCData elem (e.g. not encoded as OPAQUE data) ! #define SML_ERR_XLT_TOKENIZER_ERROR 0x200D // Unspecified tokenizer error ! #define SML_ERR_XLT_INVAL_WBXML_DOC 0x200E // Document does not conform to WBXML specification ! #define SML_ERR_XLT_WBXML_UKN_TOK 0x200F // Document contains unknown WBXML token ! #define SML_ERR_XLT_MISSING_END_TAG 0x2010 // Non-empty start tag without matching end tag ! #define SML_ERR_XLT_INVALID_CODEPAGE 0x2011 // WBXML document uses unspecified code page ! #define SML_ERR_XLT_END_OF_BUFFER 0x2012 // End of buffer reached ! #define SML_ERR_XLT_INVAL_XML_DOC 0x2013 // Document does not conform to XML 1.0 specification ! #define SML_ERR_XLT_XML_UKN_TAG 0x2014 // Document contains unknown XML tag ! #define SML_ERR_XLT_INVAL_PUB_IDENT 0x2015 // Invalid Public Identifier ! #define SML_ERR_XLT_INVAL_EXT 0x2016 // Invalid Codepage Extension ! #define SML_ERR_XLT_NO_MATCHING_CODEPAGE 0x2017 // No matching Codepage could be found ! #define SML_ERR_XLT_INVAL_INPUT_DATA 0x2018 // Data missing in input structure ! /** * SyncML Wsm Error Codes ! **/ ! #define SML_ERR_WSM_BUF_TABLE_FULL 0x3001 // no more empty entries in buffer table available ! /** * SyncML Util Error Codes ! **/ #define SML_ERR_A_UTI_UNKNOWN_PROTO_ELEMENT 0x7001 --- 57,129 ---- ! /* * No error, success code ! */ ! #define SML_ERR_OK 0x00 /**< OK */ ! /* * SyncML Common Error Codes ! */ // general errors ! #define SML_ERR_UNSPECIFIC 0x10 /**< unspecific error */ ! #define SML_ERR_NOT_ENOUGH_SPACE 0x11 /**< not enough memory to perform this operation */ ! #define SML_ERR_WRONG_USAGE 0x13 /**< function was called in wrong context */ // wrong parameters ! #define SML_ERR_WRONG_PARAM 0x20 /**< wrong parameter */ ! #define SML_ERR_INVALID_SIZE 0x21 /**< param has an invalid size */ ! #define SML_ERR_INVALID_HANDLE 0x22 /**< if handle is invalid/unknown */ ! #define SML_ERR_INVALID_OPTIONS 0x23 /**< unkown or unallowed options */ ! /* * SyncML Mgr Error Codes ! */ ! #define SML_ERR_A_MGR_ERROR 0x1001 /**< a template */ ! #define SML_ERR_MGR_INVALID_INSTANCE_INFO 0x1002 /**< a invalid Instance Info structure is used */ ! #define SML_ERR_COMMAND_NOT_HANDLED 0x1003 /**< no callback function is available to handle this command */ ! #define SML_ERR_ALREADY_INITIALIZED 0x1004 /**< Mgr allready initialized */ ! /* * SyncML Xlt Error Codes ! */ ! #define SML_ERR_XLT_MISSING_CONT 0x2001 /**< required field content missing */ ! #define SML_ERR_XLT_BUF_ERR 0x2002 /**< Buffer too small */ ! #define SML_ERR_XLT_INVAL_PCDATA_TYPE 0x2003 /**< Invalid (WBXML) Element Type (STR_I etc.) */ ! #define SML_ERR_XLT_INVAL_LIST_TYPE 0x2004 /**< Invalid List Type (COL_LIST etc.) */ ! #define SML_ERR_XLT_INVAL_TAG_TYPE 0x2005 /**< Invalid Tag Type (TT_BEG etc.) */ ! #define SML_ERR_XLT_ENC_UNK 0x2007 /**< Unknown Encoding (WBXML, XML) */ ! #define SML_ERR_XLT_INVAL_PROTO_ELEM 0x2008 /**< Invalid Protocol Element (ADD, Delete, ...) */ ! #define SML_ERR_MISSING_LIST_ELEM 0x2009 /**< Missing Content of List Elements */ ! #define SML_ERR_XLT_INCOMP_WBXML_VERS 0x200A /**< Incompatible WBXML Content Format Version */ ! #define SML_ERR_XLT_INVAL_SYNCML_DOC 0x200B /**< Document does not conform to SyncML DTD */ ! #define SML_ERR_XLT_INVAL_PCDATA 0x200C /**< Invalid PCData elem (e.g. not encoded as OPAQUE data) */ ! #define SML_ERR_XLT_TOKENIZER_ERROR 0x200D /**< Unspecified tokenizer error */ ! #define SML_ERR_XLT_INVAL_WBXML_DOC 0x200E /**< Document does not conform to WBXML specification */ ! #define SML_ERR_XLT_WBXML_UKN_TOK 0x200F /**< Document contains unknown WBXML token */ ! #define SML_ERR_XLT_MISSING_END_TAG 0x2010 /**< Non-empty start tag without matching end tag */ ! #define SML_ERR_XLT_INVALID_CODEPAGE 0x2011 /**< WBXML document uses unspecified code page */ ! #define SML_ERR_XLT_END_OF_BUFFER 0x2012 /**< End of buffer reached */ ! #define SML_ERR_XLT_INVAL_XML_DOC 0x2013 /**< Document does not conform to XML 1.0 specification */ ! #define SML_ERR_XLT_XML_UKN_TAG 0x2014 /**< Document contains unknown XML tag */ ! #define SML_ERR_XLT_INVAL_PUB_IDENT 0x2015 /**< Invalid Public Identifier */ ! #define SML_ERR_XLT_INVAL_EXT 0x2016 /**< Invalid Codepage Extension */ ! #define SML_ERR_XLT_NO_MATCHING_CODEPAGE 0x2017 /**< No matching Codepage could be found */ ! #define SML_ERR_XLT_INVAL_INPUT_DATA 0x2018 /**< Data missing in input structure */ ! /* * SyncML Wsm Error Codes ! */ ! #define SML_ERR_WSM_BUF_TABLE_FULL 0x3001 /**< no more empty entries in buffer table available */ ! /* * SyncML Util Error Codes ! */ #define SML_ERR_A_UTI_UNKNOWN_PROTO_ELEMENT 0x7001 *************** *** 134,136 **** #endif - --- 131,132 ---- Index: smldevinfdtd.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/smldevinfdtd.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** smldevinfdtd.h 14 Nov 2003 09:43:25 -0000 1.3 --- smldevinfdtd.h 24 May 2004 01:33:34 -0000 1.4 *************** *** 1,14 **** ! /*****************************************************************************/ ! /* module: SyncML Device Information DTD specific type definitions */ ! /* */ ! /* file: smldevinfdtd.h */ ! /* target system: all */ ! /* target OS: all */ ! /* */ ! /* Description: */ ! /* Definition of structures representing DevInf DTD elements */ ! /* This file reflects DevInf as specified in the document */ ! /* http://www.syncml.org/docs/syncml_devinf_v10_20001207.pdf */ ! /*****************************************************************************/ --- 1,12 ---- ! /** ! * @file ! * SyncML Device Information DTD specific type definitions ! * ! * @target_system all ! * @target_os all ! * @description Definition of structures representing DevInf DTD elements ! * This file reflects DevInf as specified in the document ! * http://www.openmobilealliance.org/tech/affiliates/syncml/syncml_devinf_v101_20010615.pdf ! */ Index: sml.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/sml.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sml.h 22 Oct 2003 16:22:35 -0000 1.4 --- sml.h 24 May 2004 01:33:34 -0000 1.5 *************** *** 1,13 **** ! /*************************************************************************/ ! /* module: External SyncML API */ ! /* */ ! /* file: sml.h */ ! /* target system: all */ ! /* target OS: all */ ! /* */ ! /* Description: */ ! /* Platform independent definition of the SyncML API functions */ ! /* This is the external API exposed to applications using SyncML */ ! /*************************************************************************/ --- 1,11 ---- ! /** ! * @file ! * External SyncML API ! * ! * @target_system all ! * @target_os all ! * @description Platform independent definition of the SyncML API functions ! * This is the external API exposed to applications using SyncML ! */ *************** *** 69,77 **** #if !defined(NOWSM) || !__LINK_TOOLKIT_STATIC__ ! /** * ============================ * General SyncML Functions * ============================ ! **/ SML_API_DEF Ret_t smlInit(SmlOptionsPtr_t pOptions); SML_API_DEF Ret_t smlSetSyncMLOptions (SmlOptionsPtr_t pOptions); --- 67,75 ---- #if !defined(NOWSM) || !__LINK_TOOLKIT_STATIC__ ! /* * ============================ * General SyncML Functions * ============================ ! */ SML_API_DEF Ret_t smlInit(SmlOptionsPtr_t pOptions); SML_API_DEF Ret_t smlSetSyncMLOptions (SmlOptionsPtr_t pOptions); *************** *** 81,90 **** ! /** * ============================ * Workspace Handling Functions * ============================ ! **/ ! SML_API_DEF Ret_t smlLockReadBuffer(InstanceID_t id, MemPtr_t *pReadPosition, MemSize_t *usedSize); SML_API_DEF Ret_t smlUnlockReadBuffer(InstanceID_t id, MemSize_t processedBytes); --- 79,87 ---- ! /* * ============================ * Workspace Handling Functions * ============================ ! */ SML_API_DEF Ret_t smlLockReadBuffer(InstanceID_t id, MemPtr_t *pReadPosition, MemSize_t *usedSize); SML_API_DEF Ret_t smlUnlockReadBuffer(InstanceID_t id, MemSize_t processedBytes); *************** *** 98,106 **** ! /** * =========================================== * Protocol Element Building Functions (for Originator) * =========================================== ! **/ /* Protocol Management */ --- 95,103 ---- ! /* * =========================================== * Protocol Element Building Functions (for Originator) * =========================================== ! */ /* Protocol Management */ *************** *** 148,166 **** ! /** * ============================================ * Command Dispatching Functions (for Receiver) * ============================================ ! **/ ! SML_API_DEF Ret_t smlProcessData(InstanceID_t id, SmlProcessMode_t mode); ! /** * ==================================================== * Callback Functions to be implemented by the Receiver * ==================================================== ! **/ /* Protocol Management */ --- 145,162 ---- ! /* * ============================================ * Command Dispatching Functions (for Receiver) * ============================================ ! */ SML_API_DEF Ret_t smlProcessData(InstanceID_t id, SmlProcessMode_t mode); ! /* * ==================================================== * Callback Functions to be implemented by the Receiver * ==================================================== ! */ /* Protocol Management */ *************** *** 260,268 **** ! /** * ============================ * Instance Management Functions * ============================ ! **/ SML_API_DEF Ret_t smlInitInstance(SmlCallbacksPtr_t pCallbacks, SmlInstanceOptionsPtr_t pOptions, VoidPtr_t pUserData, InstanceID_t *pId); --- 256,264 ---- ! /* * ============================ * Instance Management Functions * ============================ ! */ SML_API_DEF Ret_t smlInitInstance(SmlCallbacksPtr_t pCallbacks, SmlInstanceOptionsPtr_t pOptions, VoidPtr_t pUserData, InstanceID_t *pId); *************** *** 280,288 **** ! /** * =================================== * Some Helper Functions and Utilities * =================================== ! **/ SML_API_DEF Ret_t smlFreeProtoElement(VoidPtr_t pProtoElement); --- 276,284 ---- ! /* * =================================== * Some Helper Functions and Utilities * =================================== ! */ SML_API_DEF Ret_t smlFreeProtoElement(VoidPtr_t pProtoElement); Index: smlmetinfdtd.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/smlmetinfdtd.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** smlmetinfdtd.h 2 May 2003 22:05:06 -0000 1.2 --- smlmetinfdtd.h 24 May 2004 01:33:34 -0000 1.3 *************** *** 1,16 **** ! /*****************************************************************************/ ! /* module: SyncML Meta Information DTD specific type definitions */ ! /* */ ! /* file: smlmetinfdtd.h */ ! /* target system: all */ ! /* target OS: all */ ! /* */ ! /* Description: */ ! /* Definition of structures representing MetInf DTD elements */ ! /*****************************************************************************/ /**************************************************************************/ ! /* NOTE: */ /* These definitions are based on the MetInf DTD dated from Aug, 29th, 00 */ /**************************************************************************/ --- 1,14 ---- ! /** ! * @file ! * SyncML Meta Information DTD specific type definitions ! * ! * @target_system all ! * @target_os all ! * @description Definition of structures representing MetInf DTD elements ! */ /**************************************************************************/ ! /* @note */ /* These definitions are based on the MetInf DTD dated from Aug, 29th, 00 */ /**************************************************************************/ Index: smldef.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/smldef.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** smldef.h 15 Apr 2004 12:06:15 -0000 1.4 --- smldef.h 24 May 2004 01:33:34 -0000 1.5 *************** *** 1,12 **** ! /*************************************************************************/ ! /* module: Type definitions for SyncML */ ! /* */ ! /* file: SMLDef.h */ ! /* target system: all */ ! /* target OS: all */ ! /* */ ! /* Description: */ ! /* Platform independent header with syncML types and definitions */ ! /*************************************************************************/ --- 1,11 ---- ! /** ! * @file ! * Type definitions for SyncML ! * ! * @target_system all ! * @target_os all ! * ! * @description Platform independent header with syncML types and definitions ! */ *************** *** 63,126 **** /** * include target/compiler specific defines/options/settings ! **/ #include <define.h> ! /** * =================================== * Common all-purpose type definitions * =================================== ! **/ ! /** * ================================== * Basic data types * ================================== ! **/ ! typedef short Short_t; // short integer, 16 Bytes ! typedef long Long_t; // long integer, 32 Bytes ! typedef char* String_t; // String pointer, ! typedef unsigned char Byte_t; // a single byte ! typedef Byte_t Boolean_t; // a boolean ! #ifndef NULL // a NULL pointer #define NULL (void*) 0 #endif ! typedef Short_t Ret_t; // Return Type of API Commands ! typedef Long_t Length_t; // System dependent string length ! typedef Short_t MemHandle_t; // Memory object Handle ! typedef unsigned char *MemPtr_t; // Memory object Pointer ! typedef void *VoidPtr_t; // Void Pointer ! typedef Long_t MemSize_t; // System dependent memory object size ! typedef unsigned char MemByte_t; // Memory element ! typedef unsigned int Flag_t; // A generic flag type. This type is used to ! // declare variables in structures wherever ! // flags are used. ! ! ! /** * ================================== * Definitions used in the SyncML API * ================================== ! **/ ! /** * Application callback function displaying output strings to the user ! **/ typedef void (*smlPrintFunc) (String_t outputString); - /** * structure describing the options and setting of this syncml process ! **/ typedef struct sml_options_s { ! smlPrintFunc defaultPrintFunc; // default application callback for displaying strings, ! MemSize_t maxWorkspaceAvailMem; // size which all workspaces in total MUST not exceed } *SmlOptionsPtr_t, SmlOptions_t; --- 62,122 ---- /** * include target/compiler specific defines/options/settings ! */ #include <define.h> ! /* * =================================== * Common all-purpose type definitions * =================================== ! */ ! /* * ================================== * Basic data types * ================================== ! */ ! typedef short Short_t; /**< short integer, 16 Bytes */ ! typedef long Long_t; /**< long integer, 32 Bytes */ ! typedef char* String_t; /**< String pointer, */ ! typedef unsigned char Byte_t; /**< a single byte */ ! typedef Byte_t Boolean_t; /**< a boolean */ ! #ifndef NULL /**< a NULL pointer */ #define NULL (void*) 0 #endif ! typedef Short_t Ret_t; /**< Return Type of API Commands */ ! typedef Long_t Length_t; /**< System dependent string length */ ! typedef Short_t MemHandle_t; /**< Memory object Handle */ ! typedef unsigned char *MemPtr_t; /**< Memory object Pointer */ ! typedef void *VoidPtr_t; /**< Void Pointer */ ! typedef Long_t MemSize_t; /**< System dependent memory object size */ ! typedef unsigned char MemByte_t; /**< Memory element */ ! typedef unsigned int Flag_t; /**< A generic flag type. This type is ! * used to declare variables in structures ! * wherever flags are used. ! */ ! /* * ================================== * Definitions used in the SyncML API * ================================== ! */ /** * Application callback function displaying output strings to the user ! */ typedef void (*smlPrintFunc) (String_t outputString); /** * structure describing the options and setting of this syncml process ! */ typedef struct sml_options_s { ! smlPrintFunc defaultPrintFunc; /**< default application callback for displaying strings, */ ! MemSize_t maxWorkspaceAvailMem; /**< size which all workspaces in total MUST not exceed */ } *SmlOptionsPtr_t, SmlOptions_t; *************** *** 128,142 **** /** * Reference of an instance ! **/ #ifdef NOWSM ! typedef void *InstanceID_t; // without wsm, instance ID is direct pointer to instance info #else ! typedef MemHandle_t InstanceID_t; // Handle, used as a unique ID of ! #endif // an synchronization instance /** * Type of used encoding ! **/ typedef enum { SML_UNDEF = 0, --- 124,140 ---- /** * Reference of an instance ! */ #ifdef NOWSM ! typedef void *InstanceID_t; /**< without wsm, instance ID is direct pointer to instance info */ #else ! typedef MemHandle_t InstanceID_t; /**< Handle, used as a unique ID of ! * an synchronization instance ! */ ! #endif /** * Type of used encoding ! */ typedef enum { SML_UNDEF = 0, *************** *** 146,152 **** ! /** %%% added luz 2003-07-31: * SyncML version ! **/ typedef enum { SML_VERS_UNDEF = 0, --- 144,151 ---- ! /** * SyncML version ! */ ! // %%% added luz 2003-07-31: typedef enum { SML_VERS_UNDEF = 0, *************** *** 158,169 **** /** * structure describing the options of an instance, ! **/ typedef struct sml_instance_options_s { ! SmlEncoding_t encoding; // Used encoding type, ! MemSize_t workspaceSize; // size of the workspace to allocate (instance buffer size if NOWSM defined) #ifndef NOWSM ! String_t workspaceName; // name of the workspace #else ! MemSize_t maxOutgoingSize; // max size of outgoing message, 0 if no restriction #endif } *SmlInstanceOptionsPtr_t, SmlInstanceOptions_t; --- 157,168 ---- /** * structure describing the options of an instance, ! */ typedef struct sml_instance_options_s { ! SmlEncoding_t encoding; /**< Used encoding type, */ ! MemSize_t workspaceSize; /**< size of the workspace to allocate (instance buffer size if NOWSM defined) */ #ifndef NOWSM ! String_t workspaceName; /**< name of the workspace */ #else ! MemSize_t maxOutgoingSize; /**< max size of outgoing message, 0 if no restriction */ #endif } *SmlInstanceOptionsPtr_t, SmlInstanceOptions_t; *************** *** 172,176 **** /** * Processing modes ! **/ typedef enum { SML_DO_NOTHING = 0, --- 171,175 ---- /** * Processing modes ! */ typedef enum { SML_DO_NOTHING = 0, *************** *** 184,188 **** /** * Requested buffer pointer position ! **/ typedef enum { SML_FIRST_DATA_ITEM = 0, --- 183,187 ---- /** * Requested buffer pointer position ! */ typedef enum { SML_FIRST_DATA_ITEM = 0, *************** *** 194,198 **** /** * SyncML Protocol Management and Command Elements (PE) ! **/ typedef enum { SML_PE_UNDEF = 0, --- 193,197 ---- /** * SyncML Protocol Management and Command Elements (PE) ! */ typedef enum { SML_PE_UNDEF = 0, Index: smldtd.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/smldtd.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** smldtd.h 2 May 2003 22:05:06 -0000 1.2 --- smldtd.h 24 May 2004 01:33:34 -0000 1.3 *************** *** 1,16 **** ! /*************************************************************************/ ! /* module: SyncML DTD specific type definitions */ ! /* */ ! /* file: smldtd.h */ ! /* target system: all */ ! /* target OS: all */ ! /* */ ! /* Description: */ ! /* Definition of structures representing DTD elements */ ! /*************************************************************************/ /********************************************************************/ ! /* NOTE: */ /* These definitions are based on the DTD dated from July, 7th, 00 */ /********************************************************************/ --- 1,14 ---- ! /** ! * @file ! * SyncML DTD specific type definitions ! * ! * @target_system all ! * @target_os all ! * @description Definition of structures representing DTD elements ! */ /********************************************************************/ ! /* @note */ /* These definitions are based on the DTD dated from July, 7th, 00 */ /********************************************************************/ *************** *** 77,87 **** /** * PCDATA - types of synchronization data which SyncML supports ! **/ typedef enum { SML_PCDATA_UNDEFINED = 0, ! SML_PCDATA_STRING, // String type ! SML_PCDATA_OPAQUE, // Opaque type ! SML_PCDATA_EXTENSION, // Extention type - specified by PcdataExtension_t ! SML_PCDATA_CDATA // XML CDATA type } SmlPcdataType_t; --- 75,85 ---- /** * PCDATA - types of synchronization data which SyncML supports ! */ typedef enum { SML_PCDATA_UNDEFINED = 0, ! SML_PCDATA_STRING, /**< String type */ ! SML_PCDATA_OPAQUE, /**< Opaque type */ ! SML_PCDATA_EXTENSION, /**< Extention type - specified by PcdataExtension_t */ ! SML_PCDATA_CDATA /**< XML CDATA type */ } SmlPcdataType_t; *************** *** 92,98 **** typedef enum { SML_EXT_UNDEFINED = 0, ! SML_EXT_METINF, // Meta Information ! SML_EXT_DEVINF, // Device Information ! SML_EXT_LAST // last codepage, needed for loops! } SmlPcdataExtension_t; --- 90,96 ---- typedef enum { SML_EXT_UNDEFINED = 0, ! SML_EXT_METINF, /**< Meta Information */ ! SML_EXT_DEVINF, /**< Device Information */ ! SML_EXT_LAST /**< last codepage, needed for loops! */ } SmlPcdataExtension_t; *************** *** 101,113 **** /** * PCDATA - into this structure SyncML wraps the synchronization data itself ! **/ typedef struct sml_pcdata_s { ! SmlPcdataType_t contentType; // The type of data which a PCDATA structure contains ! SmlPcdataExtension_t extension; // PCData Extension type ! MemSize_t length; // length of the data in this PCDATA structure ! VoidPtr_t content; // Pointer to the data itself } *SmlPcdataPtr_t, SmlPcdata_t; ! /* generic list of PCData elements */ typedef struct sml_pcdata_list_s { SmlPcdataPtr_t data; --- 99,111 ---- /** * PCDATA - into this structure SyncML wraps the synchronization data itself ! */ typedef struct sml_pcdata_s { ! SmlPcdataType_t contentType; /**< The type of data which a PCDATA structure contains */ ! SmlPcdataExtension_t extension; /**< PCData Extension type */ ! MemSize_t length; /**< length of the data in this PCDATA structure */ ! VoidPtr_t content; /**< Pointer to the data itself */ } *SmlPcdataPtr_t, SmlPcdata_t; ! /** generic list of PCData elements */ typedef struct sml_pcdata_list_s { SmlPcdataPtr_t data; *************** *** 115,138 **** } *SmlPcdataListPtr_t, SmlPcdataList_t; ! /** * Various flags which are actually declared and (EMPTY) elements in * SyncML. This assumes at least a 16-bit architecture for the * underlying OS. We need to review this if that is deemed a problem. ! **/ ! #define SmlArchive_f 0x8000 // Delete flags ! #define SmlSftDel_f 0x4000 // Delete flags ! #define SmlMoreData_f 0x0400 // MoreData flag ! #define SmlNoResults_f 0x0200 // No Results flag ! #define SmlNoResp_f 0x0100 // No Response flag ! #define SmlFinal_f 0x0001 // Header flag #ifdef __USE_METINF__ ! #define SmlMetInfSharedMem_f 0x0002 // MetInf Shared Memory Flag #endif #ifdef __USE_DEVINF__ ! #define SmlDevInfSharedMem_f 0x0004 // DevInf Shared Memory Flag /* SCTSTK - 18/03/2002, S.H. 2002-04-05 : SyncML 1.1 */ ! #define SmlDevInfUTC_f 0x0001 // DevInf utc Flag ! #define SmlDevInfNOfM_f 0x0002 // DevInf support n of m Flag ! #define SmlDevInfLargeObject_f 0x0008 // DevInf support large object Flag #endif --- 113,136 ---- } *SmlPcdataListPtr_t, SmlPcdataList_t; ! /* * Various flags which are actually declared and (EMPTY) elements in * SyncML. This assumes at least a 16-bit architecture for the * underlying OS. We need to review this if that is deemed a problem. ! */ ! #define SmlArchive_f 0x8000 /**< Delete flags */ ! #define SmlSftDel_f 0x4000 /**< Delete flags */ ! #define SmlMoreData_f 0x0400 /**< MoreData flag */ ! #define SmlNoResults_f 0x0200 /**< No Results flag */ ! #define SmlNoResp_f 0x0100 /**< No Response flag */ ! #define SmlFinal_f 0x0001 /**< Header flag */ #ifdef __USE_METINF__ ! #define SmlMetInfSharedMem_f 0x0002 /**< MetInf Shared Memory Flag */ #endif #ifdef __USE_DEVINF__ ! #define SmlDevInfSharedMem_f 0x0004 /**< DevInf Shared Memory Flag */ /* SCTSTK - 18/03/2002, S.H. 2002-04-05 : SyncML 1.1 */ ! #define SmlDevInfUTC_f 0x0001 /**< DevInf utc Flag */ ! #define SmlDevInfNOfM_f 0x0002 /**< DevInf support n of m Flag */ ! #define SmlDevInfLargeObject_f 0x0008 /**< DevInf support large object Flag */ #endif *************** *** 140,144 **** /** * Chal ! **/ typedef struct sml_chal_s { SmlPcdataPtr_t meta; --- 138,142 ---- /** * Chal ! */ typedef struct sml_chal_s { SmlPcdataPtr_t meta; *************** *** 147,151 **** /** * Credentials ! **/ typedef struct sml_cred_s { SmlPcdataPtr_t meta; // opt. --- 145,149 ---- /** * Credentials ! */ typedef struct sml_cred_s { SmlPcdataPtr_t meta; // opt. *************** *** 154,161 **** - /** * Source or target location ! **/ typedef struct sml_source_or_target_s { SmlPcdataPtr_t locURI; --- 152,158 ---- /** * Source or target location ! */ typedef struct sml_source_or_target_s { SmlPcdataPtr_t locURI; *************** *** 171,179 **** ! /** * ============================== * SyncML Message Header Elements * ============================== ! **/ --- 168,176 ---- ! /* * ============================== * SyncML Message Header Elements * ============================== ! */ *************** *** 182,186 **** * As the header is needed for each SyncML message, it's also the parameter * of the startMessage call. ! **/ typedef struct sml_sync_hdr_s { SmlProtoElement_t elementType; // Internal Toolkit Field --- 179,183 ---- * As the header is needed for each SyncML message, it's also the parameter * of the startMessage call. ! */ typedef struct sml_sync_hdr_s { SmlProtoElement_t elementType; // Internal Toolkit Field *************** *** 203,216 **** ! /** * ========================= * Data description elements * ========================= ! **/ /** * Data in SyncML is encapsulated in an "item" element. ! **/ typedef struct sml_item_s { SmlTargetPtr_t target; // opt. --- 200,213 ---- ! /* * ========================= * Data description elements * ========================= ! */ /** * Data in SyncML is encapsulated in an "item" element. ! */ typedef struct sml_item_s { SmlTargetPtr_t target; // opt. *************** *** 227,242 **** ! /** * ============================================== * SyncML Commands (Protocol Management Elements) * ============================================== ! **/ ! ! /** * Generic commands: * Add, Copy, Replace, Delete ! **/ typedef struct sml_generic_s { SmlProtoElement_t elementType; // Internal Toolkit Field --- 224,237 ---- ! /* * ============================================== * SyncML Commands (Protocol Management Elements) * ============================================== ! */ /** * Generic commands: * Add, Copy, Replace, Delete ! */ typedef struct sml_generic_s { SmlProtoElement_t elementType; // Internal Toolkit Field *************** *** 254,258 **** /** * Alert command: ! **/ typedef struct sml_alert_s { SmlProtoElement_t elementType; // Internal Toolkit Field --- 249,253 ---- /** * Alert command: ! */ typedef struct sml_alert_s { SmlProtoElement_t elementType; // Internal Toolkit Field *************** *** 267,271 **** /** * Atomic/Sequence command: ! **/ typedef struct sml_atomic_s { SmlProtoElement_t elementType; // Internal Toolkit Field --- 262,266 ---- /** * Atomic/Sequence command: ! */ typedef struct sml_atomic_s { SmlProtoElement_t elementType; // Internal Toolkit Field *************** *** 279,283 **** /** * Sync command: ! **/ typedef struct sml_sync_s { SmlProtoElement_t elementType; // Internal Toolkit Field --- 274,278 ---- /** * Sync command: ! */ typedef struct sml_sync_s { SmlProtoElement_t elementType; // Internal Toolkit Field *************** *** 294,298 **** /** * Exec command: ! **/ typedef struct sml_exec_s { SmlProtoElement_t elementType; --- 289,293 ---- /** * Exec command: ! */ typedef struct sml_exec_s { SmlProtoElement_t elementType; *************** *** 307,311 **** /** * Get and Put command: ! **/ typedef struct sml_get_put_s { SmlProtoElement_t elementType; // Internal Toolkit Field --- 302,306 ---- /** * Get and Put command: ! */ typedef struct sml_get_put_s { SmlProtoElement_t elementType; // Internal Toolkit Field *************** *** 322,326 **** /** * Map command: ! **/ typedef struct sml_map_item_s { SmlTargetPtr_t target; --- 317,321 ---- /** * Map command: ! */ typedef struct sml_map_item_s { SmlTargetPtr_t target; *************** *** 344,351 **** - /** * Results command: ! **/ typedef struct sml_results_s { SmlProtoElement_t elementType; // Internal Toolkit Field --- 339,345 ---- /** * Results command: ! */ typedef struct sml_results_s { SmlProtoElement_t elementType; // Internal Toolkit Field *************** *** 362,366 **** /** * Search command: ! **/ typedef struct sml_search_s { SmlProtoElement_t elementType; // Internal Toolkit Field --- 356,360 ---- /** * Search command: ! */ typedef struct sml_search_s { SmlProtoElement_t elementType; // Internal Toolkit Field *************** *** 378,383 **** /** * Status command: ! **/ ! typedef struct sml_target_ref_list_s { SmlPcdataPtr_t targetRef; --- 372,376 ---- /** * Status command: ! */ typedef struct sml_target_ref_list_s { SmlPcdataPtr_t targetRef; *************** *** 407,411 **** /** * a little helper for typecasting ! **/ typedef struct sml_unknown_proto_element_s { SmlProtoElement_t elementType; // Internal Toolkit Field --- 400,404 ---- /** * a little helper for typecasting ! */ typedef struct sml_unknown_proto_element_s { SmlProtoElement_t elementType; // Internal Toolkit Field |
From: Kidong L. <bri...@us...> - 2004-05-24 01:34:15
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/sml/lib/all In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10631/src/sml/lib/all Modified Files: liblock.c libmem.c libstr.c libutil.c Log Message: Modified comments to doxygen-readable Removed duplicated comments Index: liblock.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/lib/all/liblock.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** liblock.c 2 May 2003 22:05:07 -0000 1.1 --- liblock.c 24 May 2004 01:33:35 -0000 1.2 *************** *** 1,3 **** ! /* thread-locking library, RTK addition by lu...@sy... */ #include "syncml_tk_prefix_file.h" // %%% luz: needed for precompiled headers in eVC++ --- 1,10 ---- ! /** ! * @file ! * Library for Thread Locking Functions ! * ! * @target_system ALL ! * @target_os ALL ! * @description thread-locking library, RTK addition by lu...@sy... ! */ #include "syncml_tk_prefix_file.h" // %%% luz: needed for precompiled headers in eVC++ *************** *** 66,68 **** #endif ! /* eof */ \ No newline at end of file --- 73,75 ---- #endif ! /* eof */ Index: libstr.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/lib/all/libstr.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** libstr.c 2 May 2003 22:05:07 -0000 1.2 --- libstr.c 24 May 2004 01:33:35 -0000 1.3 *************** *** 1,12 **** ! /*************************************************************************/ ! /* module: Library for String Functions */ ! /* */ ! /* file: libstr.c */ ! /* target system: ALL */ ! /* target OS: ALL */ ! /* */ ! /* Description: */ ! /* implementation of common string-handling functions */ ! /*************************************************************************/ /* --- 1,10 ---- ! /** ! * @file ! * Library for String Functions ! * ! * @target_system ALL ! * @target_os ALL ! * @description implementation of common string-handling functions ! */ /* *************** *** 71,82 **** /** - * FUNCTION: smlLibStrdup - * * Duplicates the String "constStringP". * Returns a pointer to the new copy of "constStringP". * ! * IN: String_t constStringP string, which is duplicated ! * RETURN: String_t pointer to the new copy, ! * null, if no copy could be allocated */ SML_API String_t smlLibStrdup (const char *constStringP) --- 69,79 ---- /** * Duplicates the String "constStringP". * Returns a pointer to the new copy of "constStringP". * ! * @param constStringP (IN) ! * string which is duplicated ! * @return pointer to the new copy,\n ! * NULL if no copy could be allocated */ SML_API String_t smlLibStrdup (const char *constStringP) Index: libutil.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/lib/all/libutil.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** libutil.c 2 May 2003 22:05:07 -0000 1.2 --- libutil.c 24 May 2004 01:33:35 -0000 1.3 *************** *** 1,12 **** ! /*************************************************************************/ ! /* module: Library for IO Functions */ ! /* */ ! /* file: libio.c */ ! /* target system: ALL */ ! /* target OS: ALL */ ! /* */ ! /* Description: */ ! /* Utility I/O functions */ ! /*************************************************************************/ --- 1,10 ---- ! /** ! * @file ! * Library for IO Functions ! * ! * @target_system ALL ! * @target_os ALL ! * @description Utility I/O functions ! */ *************** *** 99,118 **** /** - * FUNCTION: smlLibPrint - * * Assembles a formatted textstring out of a list of argument. This string is * passed to a callback function, which is implementated by the application * for output to the user * ! * IN: A printf like format text string with multiple ! * arguments to be formatted as specified ! * Supported are: ! * %d, %i, %u, %x, %s, %c ! * +, -, <space>, *, <number>, h, l, L ! * ! * RETURN: - - - */ - - SML_API void smlLibPrint(const char *text, ...) { --- 97,111 ---- /** * Assembles a formatted textstring out of a list of argument. This string is * passed to a callback function, which is implementated by the application * for output to the user * ! * @param text (IN) ! * printf like format text string with multiple ! * arguments to be formatted as specified\n ! * Supported are: ! * \%d, \%i, \%u, \%x, \%s, \%c\n ! * +, -, \<space\>, *, \<number\>, h, l, L */ SML_API void smlLibPrint(const char *text, ...) { Index: libmem.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/lib/all/libmem.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** libmem.c 15 Sep 2003 12:52:24 -0000 1.3 --- libmem.c 24 May 2004 01:33:35 -0000 1.4 *************** *** 1,12 **** ! /*************************************************************************/ ! /* module: Library for Memory Functions */ ! /* */ ! /* file: libmem.c */ ! /* target system: ALL */ ! /* target OS: ALL */ ! /* */ ! /* Description: */ ! /* Header for the implementation of common memory handling functions */ ! /*************************************************************************/ /* --- 1,11 ---- ! /** ! * @file ! * Library for Memory Functions ! * ! * @target_system ALL ! * @target_os ALL ! * @description Header for the implementation of common memory handling ! * functions ! */ /* *************** *** 69,74 **** /** - * FUNCTION: smlLibFree - * * Deallocates the memory of object "pObject", which has been allocated * previously. --- 68,71 ---- *************** *** 95,100 **** /** - * FUNCTION: smlLibRealloc - * * Changes size of preallocated space for memory object "pObject" * to the new size specified by "constSize". --- 92,95 ---- *************** *** 118,127 **** * without changing the memory object "pObject" (Nothing happens to the content). * ! * IN/OUT void *pObject, memory object, which size should be changed ! * IN: MemSize_t constSize new size the memory object shall use ! * RETURN: void* Pointer to memory object, which size has been ! * be changed ! * NULL, if not successfull or ! * if constSize==0 */ SML_API void *smlLibRealloc(void *pObject, MemSize_t constSize) --- 113,122 ---- * without changing the memory object "pObject" (Nothing happens to the content). * ! * @param pObject (IN/OUT) ! * memory object, which size should be changed ! * @param constSize (IN) ! * new size the memory object shall use ! * @return void pointer to memory object, which size has been be changed\n ! * NULL, if not successfull or if constSize==0 */ SML_API void *smlLibRealloc(void *pObject, MemSize_t constSize) |
From: Kidong L. <bri...@us...> - 2004-05-24 01:34:15
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/palm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10631/src/sml/inc/palm Modified Files: define.h Log Message: Modified comments to doxygen-readable Removed duplicated comments Index: define.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/palm/define.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** define.h 6 Aug 2002 20:42:50 -0000 1.1 --- define.h 24 May 2004 01:33:34 -0000 1.2 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: Compiler Flag Definition File */ ! /* file: define.h */ ! /* target system: palm */ ! /* target OS: palm */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * Compiler Flag Definition File ! * ! * @target_system palm ! * @target_os palm ! */ /* |
From: Kidong L. <bri...@us...> - 2004-05-24 01:34:15
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10631/src/sml/inc/win Modified Files: define.h Log Message: Modified comments to doxygen-readable Removed duplicated comments Index: define.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/win/define.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** define.h 7 Apr 2004 06:51:06 -0000 1.3 --- define.h 24 May 2004 01:33:35 -0000 1.4 *************** *** 1,8 **** ! /*************************************************************************/ ! /* module: Compiler Flag Definition File */ ! /* file: define.h */ ! /* target system: win */ ! /* target OS: win */ ! /*************************************************************************/ /* --- 1,9 ---- ! /** ! * @file ! * Compiler Flag Definition File ! * ! * @target_system win ! * @target_os win ! */ /* |
From: Kidong L. <bri...@us...> - 2004-05-24 01:34:14
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10631/src/examples Modified Files: builder_wrapper.c builder_wrapper.h callback_handler.c callback_handler.h receiver.c sender.c Log Message: Modified comments to doxygen-readable Removed duplicated comments Index: receiver.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/receiver.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** receiver.c 14 Apr 2004 18:11:27 -0000 1.2 --- receiver.c 24 May 2004 01:33:33 -0000 1.3 *************** *** 1,4 **** /** ! * @file Receiver exmple */ #include <stdio.h> --- 1,5 ---- /** ! * @file ! * SyncML API example - Receiver */ #include <stdio.h> Index: callback_handler.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/callback_handler.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** callback_handler.h 11 Apr 2004 15:17:21 -0000 1.1 --- callback_handler.h 24 May 2004 01:33:33 -0000 1.2 *************** *** 1,2 **** --- 1,6 ---- + /** + * @file + * Sync Command Calling Callback Implementations - Header + */ #ifndef _CALLBACK_HANDLER_H #define _CALLBACK_HANDLER_H Index: sender.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/sender.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sender.c 14 Apr 2004 18:11:27 -0000 1.2 --- sender.c 24 May 2004 01:33:33 -0000 1.3 *************** *** 1,4 **** /** ! * @file Sender exmple */ #include <stdio.h> --- 1,5 ---- /** ! * @file ! * SyncML API example - Sender */ #include <stdio.h> *************** *** 17,20 **** --- 18,22 ---- * * @param id instance ID + * @param serviceID transport service ID * @return return value of xptSendData * @see xptSendData *************** *** 60,64 **** char receiveBuf[10000 + 1] = ""; ! /* NOTE: Should receive at least more than one data */ C(xptReceiveData(conn, receiveBuf, 1, &bytesReceived)); } --- 62,66 ---- char receiveBuf[10000 + 1] = ""; ! /* Should receive at least more than one byte */ C(xptReceiveData(conn, receiveBuf, 1, &bytesReceived)); } Index: callback_handler.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/callback_handler.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** callback_handler.c 17 Apr 2004 12:05:00 -0000 1.2 --- callback_handler.c 24 May 2004 01:33:33 -0000 1.3 *************** *** 1,4 **** /** ! * @file Callback implementations */ #include "callback_handler.h" --- 1,5 ---- /** ! * @file ! * Sync Command Calling Callback Implementations */ #include "callback_handler.h" *************** *** 11,20 **** /** ! * Callback handling <SyncHdr> tag * * @param id instance ID ! * @param pSync pointer containing infomation about <SyncHdr> block ! * @return SML_ERR_OK(=0) ! * @see smlInitInstance */ Ret_t myHandleStartMessage(InstanceID_t id, VoidPtr_t userData, --- 12,22 ---- /** ! * Callback handling \<SyncHdr\> tag * * @param id instance ID ! * @param userData user defined data, not used here ! * @param pSyncHdr pointer containing infomation about \<SyncHdr\> block ! * @return SML_ERR_OK ! * @see smlStartMessageFunc */ Ret_t myHandleStartMessage(InstanceID_t id, VoidPtr_t userData, *************** *** 42,51 **** /** ! * Callback handling <Sync> command * * @param id instance ID ! * @param pSync pointer containing infomation about <Sync> block ! * @return SML_ERR_OK(=0) ! * @see smlInitInstance */ Ret_t myHandleStartSync(InstanceID_t id, VoidPtr_t userData, --- 44,54 ---- /** ! * Callback handling \<Sync\> tag * * @param id instance ID ! * @param userData user defined data, not used here ! * @param pSync pointer containing infomation about \<Sync\> block ! * @return SML_ERR_OK ! * @see smlStartSyncFunc */ Ret_t myHandleStartSync(InstanceID_t id, VoidPtr_t userData, *************** *** 64,73 **** /** ! * Callback handling <Add> command * * @param id instance ID ! * @param pSync pointer containing infomation about <Add> command ! * @return SML_ERR_OK(=0) ! * @see smlInitInstance */ Ret_t myHandleAdd(InstanceID_t id, VoidPtr_t userData, SmlAddPtr_t pAdd) --- 67,77 ---- /** ! * Callback handling \<Add\> command * * @param id instance ID ! * @param userData user defined data, not used here ! * @param pAdd pointer containing infomation about \<Add\> command ! * @return SML_ERR_OK ! * @see smlAddCmdFunc */ Ret_t myHandleAdd(InstanceID_t id, VoidPtr_t userData, SmlAddPtr_t pAdd) *************** *** 93,96 **** --- 97,108 ---- } + /** + * Callback handling \</Sync\> tag + * + * @param id instance ID + * @param userData user defined data, not used here + * @return SML_ERR_OK + * @see smlEndSyncFunc + */ Ret_t myHandleEndSync(InstanceID_t id, VoidPtr_t userData) { *************** *** 99,102 **** --- 111,123 ---- } + /** + * Callback handling \</SyncHdr\> tag + * + * @param id instance ID + * @param userData user defined data, not used here + * @param final Final Flag indicates last message within a package + * @return SML_ERR_OK + * @see smlEndMessageFunc + */ Ret_t myHandleEndMessage(InstanceID_t id, VoidPtr_t userData, Boolean_t final) { Index: builder_wrapper.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/builder_wrapper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** builder_wrapper.h 11 Apr 2004 15:17:21 -0000 1.1 --- builder_wrapper.h 24 May 2004 01:33:33 -0000 1.2 *************** *** 1,2 **** --- 1,6 ---- + /** + * @file + * Sync Command Builder Wrapper - Header + */ #ifndef _BUILDER_WRAPPER_H #define _BUILDER_WRAPPER_H *************** *** 16,20 **** Ret_t myInitInstance(InstanceID_t * pID); Ret_t myStartMessage(InstanceID_t id); - Ret_t myAlertCmd(InstanceID_t id); Ret_t myStartSync(InstanceID_t id); Ret_t myAddCmd(InstanceID_t id); --- 20,23 ---- Index: builder_wrapper.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/builder_wrapper.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** builder_wrapper.c 17 Apr 2004 12:05:00 -0000 1.2 --- builder_wrapper.c 24 May 2004 01:33:33 -0000 1.3 *************** *** 1,4 **** /** ! * @file Command builder wrapper */ #include "builder_wrapper.h" --- 1,5 ---- /** ! * @file ! * Sync Command Builder Wrapper */ #include "builder_wrapper.h" |
From: Kidong L. <bri...@us...> - 2004-05-24 01:34:12
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10631/src Modified Files: syncml_tk_prefix_file.h Log Message: Modified comments to doxygen-readable Removed duplicated comments Index: syncml_tk_prefix_file.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/syncml_tk_prefix_file.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** syncml_tk_prefix_file.h 14 Nov 2003 09:43:26 -0000 1.3 --- syncml_tk_prefix_file.h 24 May 2004 01:33:16 -0000 1.4 *************** *** 1,2 **** --- 1,7 ---- + /** + * @file + * Global RTK options + */ + // prefix file, used to include global defines with compilers // that don't allow global switches on the command line or *************** *** 24,28 **** // instead. //#define NOWSM 1 ! //#define TRACE_TO_STDOUT 1 // - causes that the opaque data type gets --- 29,33 ---- // instead. //#define NOWSM 1 ! #define TRACE_TO_STDOUT 1 // - causes that the opaque data type gets |
From: Kidong L. <bri...@us...> - 2004-05-24 01:33:42
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/bld In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10631/src/bld Added Files: Doxyfile Log Message: Modified comments to doxygen-readable Removed duplicated comments --- NEW FILE: Doxyfile --- # Doxyfile 1.3.6 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. [...1078 lines suppressed...] # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO |
From: Peter T. <pth...@us...> - 2004-05-09 18:04:52
|
Update of /cvsroot/syncml-ctoolkit/toolkit/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv699 Added Files: ReadmeMaintenance4_4.doc Log Message: Updated with 4.4 information. --- NEW FILE: ReadmeMaintenance4_4.doc --- (This appears to be a binary file; contents omitted.) |
From: Peter T. <pth...@us...> - 2004-05-09 17:50:36
|
Update of /cvsroot/syncml-ctoolkit/toolkit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30488 Added Files: opensource_license.txt Log Message: Moved license to a more visible location. --- NEW FILE: opensource_license.txt --- LICENSE The Copyright Holders of this software, including all accompanying documentation ("Software"), hereby grant, royalty free and for any purpose, permission to use, copy, modify and prepare derivative works therefrom, distribute, publish, sublicense and sell copies of the Software and to permit persons to whom the Software is furnished to do the same, all subject to the following conditions: 1. The complete text of the following noticeshall be reproduced on each copy or substantial copy of the Software in a location readily viewable to users of the Software: NOTICE Copyright (c) Ericsson, IBM, Lotus, Matsushita Communication Industrial Co., Ltd., Motorola, Nokia, Openwave Systems, Inc., Palm, Inc., Psion, Starfish Software, Symbian, Ltd. (2001-2002). All Rights Reserved. Implementation of all or part of any Software may require licenses under third party intellectual property rights, including without limitation, patent rights. The Copyright Holders are not responsible and shall not be held responsible in any manner for identifying or failing to identify any or all such third party intellectual property rights. THIS DOCUMENT AND THE INFORMATION CONTAINED HEREIN ARE PROVIDED ON AN "AS IS" BASIS WITHOUT WARRANTY OF ANY KIND AND ERICSSON, IBM, LOTUS, MATSUSHITA COMMUNICATION INDUSTRIAL CO. LTD, MOTOROLA, NOKIA, OPENWAVE, PALM INC., PSION, STARFISH SOFTWARE, SYMBIAN AND ALL OTHER SYNCML SPONSORS DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL ERICSSON, IBM, LOTUS, MATSUSHITA COMMUNICATION INDUSTRIAL CO., LTD, MOTOROLA, NOKIA, OPENWAVE, PALM INC., PSION, STARFISH SOFTWARE. SYMBIAN OR ANY OTHER SYNCML SPONSOR BE LIABLE TO ANY PARTY FOR ANY LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN CONNECTION WITH THIS DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE. |
From: Kidong L. <bri...@us...> - 2004-04-17 12:59:59
|
Update of /cvsroot/syncml-ctoolkit/toolkit/bin/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22744/win Removed Files: iobex.dll libiobex.a libsml.a libxpt.a libxptawsp.a sml.dll xpt.dll xptawsp.dll xpthttp.dll xptobex.dll xptwsp.dll Log Message: Removed win32 binaries because they are obsolute and need to be recompiled --- xptobex.dll DELETED --- --- libxpt.a DELETED --- --- libxptawsp.a DELETED --- --- xpthttp.dll DELETED --- --- sml.dll DELETED --- --- xptwsp.dll DELETED --- --- iobex.dll DELETED --- --- libiobex.a DELETED --- --- xptawsp.dll DELETED --- --- libsml.a DELETED --- --- xpt.dll DELETED --- |
From: Kidong L. <bri...@us...> - 2004-04-17 12:05:10
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14448/examples Modified Files: Makefile builder_wrapper.c callback_handler.c Log Message: Fixed compilation error on Win32/MinGW in examples Index: callback_handler.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/callback_handler.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** callback_handler.c 11 Apr 2004 15:17:21 -0000 1.1 --- callback_handler.c 17 Apr 2004 12:05:00 -0000 1.2 *************** *** 53,61 **** { printf("Calling %s() at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); ! printf("Sync.CmdID = %s\n", smlPcdata2String(pSync->cmdID)); ! printf("Sync.Target.LocURI = %s\n", smlPcdata2String(pSync->target->locURI)); ! printf("Sync.Source.LocURI = %s\n", smlPcdata2String(pSync->source->locURI)); return SML_ERR_OK; } --- 53,63 ---- { printf("Calling %s() at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); ! printf("Sync.CmdID = %s\n", smlPcdata2String(pSync->cmdID)); ! printf("Sync.Target.LocURI = %s\n", smlPcdata2String(pSync->target->locURI)); ! printf("Sync.Source.LocURI = %s\n", smlPcdata2String(pSync->source->locURI)); + printf("Sync.NumberOfChange = %s\n", + smlPcdata2String(pSync->noc)); return SML_ERR_OK; } Index: Makefile =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 11 Apr 2004 15:17:21 -0000 1.1 --- Makefile 17 Apr 2004 12:05:00 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + CC = gcc INC = -I../sml/inc \ -I../sml/inc/win \ *************** *** 5,9 **** -I../xpt/manager/linux ! LDFLAGS = -L../../bin/linux -lsml -lxpt #-lefence CFLAGS = $(INC) -Wall -g -O2 -pedantic --- 6,10 ---- -I../xpt/manager/linux ! LIBS = -L../../bin/linux -L../../bin/win -Wl,-rpath -Wl,../../bin/linux -Wl,-rpath -Wl,..\..\bin\win -lsml -lxpt CFLAGS = $(INC) -Wall -g -O2 -pedantic *************** *** 20,26 **** $(TARGET_SENDER) : $(OBJS_SENDER) ! $(TARGET_RECEIVER) : $(OBJS_RECEIVER) ! clean : rm -rf *.o $(TARGET) core *~ --- 21,29 ---- $(TARGET_SENDER) : $(OBJS_SENDER) ! $(CC) $(OBJS_SENDER) -o $@ $(LIBS) ! $(TARGET_RECEIVER) : $(OBJS_RECEIVER) ! $(CC) $(OBJS_RECEIVER) -o $@ $(LIBS) ! clean : rm -rf *.o $(TARGET) core *~ Index: builder_wrapper.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/builder_wrapper.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** builder_wrapper.c 11 Apr 2004 15:17:21 -0000 1.1 --- builder_wrapper.c 17 Apr 2004 12:05:00 -0000 1.2 *************** *** 129,132 **** --- 129,133 ---- sync.cred = NULL; + sync.noc = smlString2Pcdata("1"); return smlStartSync(id, &sync); |
From: Kidong L. <bri...@us...> - 2004-04-17 09:30:51
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/sml/mgr/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23750/sml/mgr/inc Modified Files: mgr.h Log Message: Fixed bug declaring a variable with inappropriate type in struct instance_info_s Index: mgr.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/mgr/inc/mgr.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mgr.h 2 May 2003 22:05:07 -0000 1.2 --- mgr.h 17 Apr 2004 09:30:41 -0000 1.3 *************** *** 102,106 **** MemPtr_t writePointer; // write pointer MemPtr_t outgoingMsgStart; // set whenever a smlStartMessage is issued, NULL when invalid ! Byte_t maxOutgoingSize; // if<>0, smlXXXCmd will not modify the buffer when there's not enough room #endif InstanceStatus_t status; // current internal state of instance --- 102,106 ---- MemPtr_t writePointer; // write pointer MemPtr_t outgoingMsgStart; // set whenever a smlStartMessage is issued, NULL when invalid ! MemSize_t maxOutgoingSize; // if<>0, smlXXXCmd will not modify the buffer when there's not enough room #endif InstanceStatus_t status; // current internal state of instance |
From: Kidong L. <bri...@us...> - 2004-04-15 12:06:39
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv574/inc Modified Files: smldef.h Log Message: Fix compilation error if NOWSM macro is defined Index: smldef.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/smldef.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** smldef.h 14 Aug 2003 12:48:37 -0000 1.3 --- smldef.h 15 Apr 2004 12:06:15 -0000 1.4 *************** *** 117,121 **** - #ifndef NOWSM /** * structure describing the options and setting of this syncml process --- 117,120 ---- *************** *** 125,130 **** MemSize_t maxWorkspaceAvailMem; // size which all workspaces in total MUST not exceed } *SmlOptionsPtr_t, SmlOptions_t; - #endif - --- 124,127 ---- |
From: Kidong L. <bri...@us...> - 2004-04-15 12:06:34
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/sml/mgr/all In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv574/mgr/all Modified Files: mgr.c Log Message: Fix compilation error if NOWSM macro is defined Index: mgr.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/mgr/all/mgr.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mgr.c 22 Oct 2003 16:22:58 -0000 1.3 --- mgr.c 15 Apr 2004 12:06:15 -0000 1.4 *************** *** 56,59 **** --- 56,63 ---- #include "syncml_tk_prefix_file.h" // %%% luz: needed for precompiled headers in eVC++ + /* Include Headers */ + #include <sml.h> + #include <smldef.h> + #include <smlerr.h> #if defined(NOWSM) && !__LINK_TOOLKIT_STATIC__ *************** *** 66,73 **** #ifndef NOWSM - /* Include Headers */ - #include <smldef.h> - #include <sml.h> - #include <smlerr.h> #include "libmem.h" #include "liblock.h" --- 70,73 ---- |
From: Kidong L. <bri...@us...> - 2004-04-14 18:11:36
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29359 Modified Files: receiver.c sender.c Log Message: Increased response buffer size Index: receiver.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/receiver.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** receiver.c 11 Apr 2004 15:17:21 -0000 1.1 --- receiver.c 14 Apr 2004 18:11:27 -0000 1.2 *************** *** 66,70 **** /* TODO: Should send real response */ { ! char sendBuffer[100 + 1] = ""; size_t bytesSent = 0; --- 66,70 ---- /* TODO: Should send real response */ { ! char sendBuffer[10000 + 1] = ""; size_t bytesSent = 0; Index: sender.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/examples/sender.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sender.c 11 Apr 2004 15:17:21 -0000 1.1 --- sender.c 14 Apr 2004 18:11:27 -0000 1.2 *************** *** 58,62 **** { size_t bytesReceived = 0; ! char receiveBuf[100 + 1] = ""; /* NOTE: Should receive at least more than one data */ --- 58,62 ---- { size_t bytesReceived = 0; ! char receiveBuf[10000 + 1] = ""; /* NOTE: Should receive at least more than one data */ |
From: Kidong L. <bri...@us...> - 2004-04-11 15:31:01
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31132/examples Added Files: Makefile README builder_wrapper.c builder_wrapper.h callback_handler.c callback_handler.h dynamicTransports receiver.c sender.c Log Message: Added examples, sender and receiver --- NEW FILE: receiver.c --- /** * @file Receiver exmple */ #include <stdio.h> /* Include header files required in any SyncML session */ #include <sml.h> #include <smldef.h> #include <smldtd.h> #include <xpt.h> #include "builder_wrapper.h" /** * Receive the SyncML document from the transport layer * * @param id instance ID * @param serviceID transport service ID * @see xptReceiveData */ void myReceiveData(InstanceID_t id, XptServiceID_t serviceID) { XptCommunicationID_t conn = 0; MemPtr_t writeBuffer = NULL; MemSize_t bytesWritten = 0; size_t bytesReceived = 0; VoidPtr_t userData = NULL; XptCommunicationInfo_t docInfo; /* Lock the workspace buffer to write the received document into (from the transport layer) */ smlLockWriteBuffer(id, &writeBuffer, &bytesWritten); C(xptOpenCommunication(serviceID, XPT_REQUEST_RECEIVER, &conn)); C(xptBeginExchange(conn)); C(xptGetDocumentInfo(conn, &docInfo)); /* Receive bytes from the transport layer */ C(xptReceiveData(conn, writeBuffer, bytesWritten, &bytesReceived)); printf("Received Data = '%s'\n", writeBuffer); /* Turn the workspace buffer over to SyncML for document processing */ smlUnlockWriteBuffer(id, bytesReceived); /* Prepare the callback parameter userData here! userData is a void pointer handed over to every callback function as one of the function arguments. The Toolkit doesn't touch the content of this structure. For instance, this mechanism can be used by the application to pass data to the callback routines. */ C(smlSetUserData(id, &userData)); /* --- Parse commands & invoke callback routines of the application -- */ C(smlProcessData(id, SML_ALL_COMMANDS)); docInfo.cbSize = sizeof(docInfo); docInfo.cbLength = 0; docInfo.auth = NULL; strcpy(docInfo.mimeType, "application/vnd.syncml+xml"); strcpy(docInfo.docName, "sync"); C(xptSetDocumentInfo(conn, &docInfo)); /* Send zero-byte response to the transport layer */ /* TODO: Should send real response */ { char sendBuffer[100 + 1] = ""; size_t bytesSent = 0; C(xptSendData(conn, sendBuffer, strlen(sendBuffer), &bytesSent)); } C(xptSendComplete(conn)); C(xptEndExchange(conn)); C(xptCloseCommunication(conn)); } int main(void) { /* Declare vars for instance id and for options structures */ /* (both per-Toolkit-session and per-instance) */ InstanceID_t id; XptServiceID_t serviceID; const struct XptProtocolInfo *xptProtocolInfo; /* --- Initialize SyncML Reference Toolkit --- */ C(myInit()); /* Initialize the SyncML instance; set up callbacks and options */ /* and get an instance Id "id" */ C(myInitInstance(&id)); C(xptGetProtocol("HTTP", &xptProtocolInfo)); C(xptSelectProtocol(xptProtocolInfo->id, "SERVERPORT=8080", XPT_SERVER, &serviceID)); while (1) { /* --- Receive the SyncML document --- */ myReceiveData(id, serviceID); } C(xptDeselectProtocol(serviceID)); /* --- Close SyncML instance and Toolkit session -- */ C(myTerminateInstance(id)); C(myTerminate()); return 0; } --- NEW FILE: callback_handler.h --- #ifndef _CALLBACK_HANDLER_H #define _CALLBACK_HANDLER_H #include <smlerr.h> #include <smldtd.h> #include <smldef.h> Ret_t myHandleStartMessage(InstanceID_t id, VoidPtr_t userData, SmlSyncHdrPtr_t pSyncHdr); Ret_t myHandleStartSync(InstanceID_t id, VoidPtr_t userData, SmlSyncPtr_t pSync); Ret_t myHandleAdd(InstanceID_t id, VoidPtr_t userData, SmlAddPtr_t pAdd); Ret_t myHandleEndSync(InstanceID_t id, VoidPtr_t userData); Ret_t myHandleEndMessage(InstanceID_t id, VoidPtr_t userData, Boolean_t final); #endif /* _CALLBACK_HANDLER_H */ --- NEW FILE: dynamicTransports --- xpthttp --- NEW FILE: sender.c --- /** * @file Sender exmple */ #include <stdio.h> /* Include header files required in any SyncML session */ #include <sml.h> #include <smldef.h> #include <smldtd.h> #include <xpt.h> #include "builder_wrapper.h" /** * Send the SyncML document to the transport layer * * @param id instance ID * @return return value of xptSendData * @see xptSendData */ Ret_t mySendData(InstanceID_t id, XptServiceID_t serviceID) { XptCommunicationID_t conn = 0; MemPtr_t readBuffer = NULL; MemSize_t bytesRead = 0; size_t bytesSent = 0; XptCommunicationInfo_t docInfo; /* Lock the workspace for reading the assembled SyncML document */ smlLockReadBuffer(id, &readBuffer, &bytesRead); C(xptOpenCommunication(serviceID, XPT_REQUEST_SENDER, &conn)); C(xptBeginExchange(conn)); docInfo.cbSize = sizeof(docInfo); docInfo.cbLength = bytesRead; docInfo.auth = NULL; docInfo.hmacInfo = NULL; strcpy(docInfo.mimeType, "application/vnd.syncml+xml"); strcpy(docInfo.docName, "sync"); C(xptSetDocumentInfo(conn, &docInfo)); /* Pass data (the SyncML document in the buffer) to transport layer */ C(xptSendData(conn, readBuffer, bytesRead, &bytesSent)); C(xptSendComplete(conn)); printf("Sent Data = '%s'\n", readBuffer); /* Unlock the workspace so the Toolkit controls it again */ C(smlUnlockReadBuffer(id, bytesSent)); C(xptGetDocumentInfo(conn, &docInfo)); /* Receive zero-byte response from transport binding */ { size_t bytesReceived = 0; char receiveBuf[100 + 1] = ""; /* NOTE: Should receive at least more than one data */ C(xptReceiveData(conn, receiveBuf, 1, &bytesReceived)); } C(xptEndExchange(conn)); C(xptCloseCommunication(conn)); return SML_ERR_OK; } int main(void) { InstanceID_t id; XptServiceID_t serviceID; const struct XptProtocolInfo *xptProtocolInfo; /* --- Initialize SyncML reference toolkit --- */ /* Initialize SyncML Reference Toolkit */ C(myInit()); /* Initialize the SyncML instance */ C(myInitInstance(&id)); /* --- Start building SyncML document --- */ /* Start a new message using the syncHdr proto element */ C(myStartMessage(id)); /* Continue adding SyncML commands to the workspace. The proto element structures holding the parameters associated with each command need to be allocated and set to appropriate values before usage. */ /* Start sync cmd */ C(myStartSync(id)); /* Start add cmd */ C(myAddCmd(id)); /* End the sync block */ C(myEndSync(id)); /* --- End message --- */ C(myEndMessage(id)); /* --- Send the SyncML document --- */ C(xptGetProtocol("HTTP", &xptProtocolInfo)); C(xptSelectProtocol(xptProtocolInfo->id, "HOST=127.0.0.1:8080", XPT_CLIENT, &serviceID)); C(mySendData(id, serviceID)); C(xptDeselectProtocol(serviceID)); /* --- Close SyncML instance and Toolkit session --- */ C(myTerminateInstance(id)); C(myTerminate()); return 0; } --- NEW FILE: README --- This examples shows usage about SyncML C Toolkit API. It's based on sample scenarios in SyncML Reference Toolkit Manual. Sender sends a message adding a vCard to receiver. And receiver shows the received message from sender. How to run sender and receiver 1. After building examples, you can get sender and receiver binaries. 2. Run the receiver > receiver (on DOS prompt) $ ./receiver (on Unix shell) 3. Run the sender on another DOS prompt or Unix shell > sender (on DOS prompt) $ ./sender (on Unix shell) --- NEW FILE: callback_handler.c --- /** * @file Callback implementations */ #include "callback_handler.h" #include <stdio.h> #include <smlmetinfdtd.h> #include <smldevinfdtd.h> #include <mgrutil.h> /** * Callback handling <SyncHdr> tag * * @param id instance ID * @param pSync pointer containing infomation about <SyncHdr> block * @return SML_ERR_OK(=0) * @see smlInitInstance */ Ret_t myHandleStartMessage(InstanceID_t id, VoidPtr_t userData, SmlSyncHdrPtr_t pSyncHdr) { printf("Calling %s() at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); printf("SyncHdr.VerDTD = %s\n", (char *) smlPcdata2String(pSyncHdr->version)); printf("SyncHdr.VerProto = %s\n", smlPcdata2String(pSyncHdr->proto)); printf("SyncHdr.SessionID = %s\n", smlPcdata2String(pSyncHdr->sessionID)); printf("SyncHdr.MsgID = %s\n", smlPcdata2String(pSyncHdr->msgID)); printf("SyncHdr.Flags = %d\n", pSyncHdr->flags); printf("SyncHdr.Target.locURI = %s\n", smlPcdata2String(pSyncHdr->target->locURI)); printf("SyncHdr.Source.locURI = %s\n", smlPcdata2String(pSyncHdr->source->locURI)); printf("SyncHdr.RespURI = %s\n", smlPcdata2String(pSyncHdr->respURI)); /* Skipped SyncHdr.Cred */ printf("SyncHdr.Meta = %s\n", smlPcdata2String(pSyncHdr->meta)); return SML_ERR_OK; } /** * Callback handling <Sync> command * * @param id instance ID * @param pSync pointer containing infomation about <Sync> block * @return SML_ERR_OK(=0) * @see smlInitInstance */ Ret_t myHandleStartSync(InstanceID_t id, VoidPtr_t userData, SmlSyncPtr_t pSync) { printf("Calling %s() at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); printf("Sync.CmdID = %s\n", smlPcdata2String(pSync->cmdID)); printf("Sync.Target.LocURI = %s\n", smlPcdata2String(pSync->target->locURI)); printf("Sync.Source.LocURI = %s\n", smlPcdata2String(pSync->source->locURI)); return SML_ERR_OK; } /** * Callback handling <Add> command * * @param id instance ID * @param pSync pointer containing infomation about <Add> command * @return SML_ERR_OK(=0) * @see smlInitInstance */ Ret_t myHandleAdd(InstanceID_t id, VoidPtr_t userData, SmlAddPtr_t pAdd) { SmlItemListPtr_t ele; printf("Calling %s() at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); printf("Add.CmdID = %s\n", smlPcdata2String(pAdd->cmdID)); printf("Add.Flags = %d\n", pAdd->flags); printf("Add.Meta = %s\n", smlPcdata2String(pAdd->meta)); ele = pAdd->itemList; while (ele != NULL) { printf("Add.ItemList.Item.Source.LocURI = %s\n", smlPcdata2String(ele->item->source->locURI)); printf("Add.ItemList.Item.Data = %s\n", smlPcdata2String(ele->item->data)); /* putInDB(ele->item); */ ele = ele->next; } return SML_ERR_OK; } Ret_t myHandleEndSync(InstanceID_t id, VoidPtr_t userData) { printf("Calling %s() at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); return SML_ERR_OK; } Ret_t myHandleEndMessage(InstanceID_t id, VoidPtr_t userData, Boolean_t final) { printf("Calling %s() at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); return SML_ERR_OK; } --- NEW FILE: Makefile --- INC = -I../sml/inc \ -I../sml/inc/win \ -I../sml/mgr/inc \ -I../xpt/manager/inc \ -I../xpt/manager/linux LDFLAGS = -L../../bin/linux -lsml -lxpt #-lefence CFLAGS = $(INC) -Wall -g -O2 -pedantic OBJS_COMMON = callback_handler.o builder_wrapper.o OBJS_SENDER = sender.o $(OBJS_COMMON) OBJS_RECEIVER = receiver.o $(OBJS_COMMON) TARGET_SENDER = sender TARGET_RECEIVER = receiver TARGET = $(TARGET_SENDER) $(TARGET_RECEIVER) all : $(TARGET) $(TARGET_SENDER) : $(OBJS_SENDER) $(TARGET_RECEIVER) : $(OBJS_RECEIVER) clean : rm -rf *.o $(TARGET) core *~ new : $(MAKE) clean $(MAKE) --- NEW FILE: builder_wrapper.h --- #ifndef _BUILDER_WRAPPER_H #define _BUILDER_WRAPPER_H #include <smldef.h> #define C(X) { \ int rc = SML_ERR_OK; \ rc = X; \ if (rc != SML_ERR_OK) \ { \ printf("%s:%d:rc = %d, hex(rc) = %x\n", __FILE__, __LINE__, rc, rc); \ } \ } Ret_t myInit(void); Ret_t myInitInstance(InstanceID_t * pID); Ret_t myStartMessage(InstanceID_t id); Ret_t myAlertCmd(InstanceID_t id); Ret_t myStartSync(InstanceID_t id); Ret_t myAddCmd(InstanceID_t id); Ret_t myEndSync(InstanceID_t id); Ret_t myEndMessage(InstanceID_t id); Ret_t myTerminateInstance(InstanceID_t id); Ret_t myTerminate(void); #endif /* _BUILDER_WRAPPER_H */ --- NEW FILE: builder_wrapper.c --- /** * @file Command builder wrapper */ #include "builder_wrapper.h" #include <stdio.h> #include <sml.h> #include <smldef.h> #include <smldtd.h> #include <smlmetinfdtd.h> #include <smldevinfdtd.h> #include <mgrutil.h> #include <xpt.h> #include "callback_handler.h" /** * Initialize SyncML Reference Toolkit * * @return return value of smlInit * @see smlInit */ Ret_t myInit(void) { SmlOptions_t options; /* Set Toolkit options structure */ options.defaultPrintFunc = NULL; options.maxWorkspaceAvailMem = 100000; /* Initialize SyncML Toolkit */ return smlInit(&options); } /** * Initialize the SyncML instance * * @param pID pointer to instance ID * @return return value of smlInitInstance * @see smlInitInstance */ Ret_t myInitInstance(InstanceID_t * pID) { SmlCallbacks_t callbacks; SmlInstanceOptions_t options; /* Set instance */ options.encoding = SML_XML; options.workspaceName = "MyWorkSpace"; options.workspaceSize = 10000; /* Allocate for callbacks structure */ callbacks.startMessageFunc = myHandleStartMessage; callbacks.startSyncFunc = myHandleStartSync; callbacks.addCmdFunc = myHandleAdd; callbacks.endSyncFunc = myHandleEndSync; callbacks.endMessageFunc = myHandleEndMessage; /* Initialize the SyncML instance; set up callbacks and options */ /* and get an instance Id "id" */ return smlInitInstance(&callbacks, &options, NULL, pID); } /** * Start building SyncML document * * @param id instance ID * @return return value of smlStartMessage * @see smlStartMessage * @see smlStartMessageExt */ Ret_t myStartMessage(InstanceID_t id) { SmlSyncHdr_t hdr; SmlSource_t source; SmlTarget_t target; /* Create SyncML proto element for message header */ hdr.elementType = SML_PE_HEADER; hdr.version = smlString2Pcdata("1.1"); hdr.proto = smlString2Pcdata("SyncML/1.1"); hdr.sessionID = smlString2Pcdata("1"); hdr.msgID = smlString2Pcdata("1000"); hdr.flags = SmlNoResp_f; target.locURI = smlString2Pcdata("http://data.sync.server.url"); target.locName = smlString2Pcdata("Data Sync Server"); hdr.target = ⌖ source.locURI = smlString2Pcdata("data_sync_client"); source.locName = smlString2Pcdata("Data Sync Client"); hdr.source = &source; hdr.cred = NULL; hdr.meta = NULL; hdr.respURI = NULL; /* Start a new message using the SyncHdr proto element */ return smlStartMessageExt(id, &hdr, SML_VERS_1_1); } /** * Start building Sync command * * @param id instance ID * @return return value of smlStartSync * @see smlStartSync */ Ret_t myStartSync(InstanceID_t id) { SmlSync_t sync; SmlSource_t source; SmlTarget_t target; /* Start sync cmd */ sync.elementType = SML_PE_SYNC_START; sync.cmdID = smlString2Pcdata("1"); target.locURI = smlString2Pcdata("./contacts_server"); target.locName = smlString2Pcdata("Sync Server Database"); sync.target = ⌖ source.locURI = smlString2Pcdata("./contacts_client"); source.locName = smlString2Pcdata("Sync Client Database"); sync.source = &source; sync.cred = NULL; return smlStartSync(id, &sync); } /** * Start building Add command * * @param id instance ID * @return return value of smlAddCmd * @see smlAddCmd */ Ret_t myAddCmd(InstanceID_t id) { SmlAdd_t add; SmlItem_t item; SmlItemList_t itemList; SmlSource_t source; SmlTarget_t target; /* Add cmd */ add.elementType = SML_PE_ADD; add.cmdID = smlString2Pcdata("2"); add.cred = NULL; add.meta = smlString2Pcdata("<Type xmlns='syncml:metinf'>text/x-vcard</Type>"); add.flags = SmlNoResp_f; target.locURI = smlString2Pcdata("1"); target.locName = smlString2Pcdata("Element ID at Target"); item.target = ⌖ source.locURI = smlString2Pcdata("2"); source.locName = smlString2Pcdata("Element ID at Source"); item.source = &source; item.data = smlString2Pcdata("BEGIN:VCARD\n" "VERSION:2.1\n" "N:Puppy;Dusty\n" "ORG:Columbia Internet\n" "EMAIL:dus...@us...\n" "URL:http://www.userfriendly.org\n" "TEL;WORK:+123 456 78 9012\n" "END:VCARD\n"); item.meta = NULL; itemList.item = &item; itemList.next = NULL; add.itemList = &itemList; return smlAddCmd(id, &add); } /** * End the sync block * * @param id instance ID * @return return value of smlEndSync * @see smlEndSync */ Ret_t myEndSync(InstanceID_t id) { return smlEndSync(id); } /** * End the sync message * * @param id instance ID * @return return value of smlEndMessage * @see smlEndMessage */ Ret_t myEndMessage(InstanceID_t id) { /* This ends the SyncML document ... it has been assembled */ /* SmlFinal_f says this is the last message in the SyncML package */ /* (since it's the only one) */ return smlEndMessage(id, SmlFinal_f); } /** * Close SyncML instance * * @param id instance ID * @return return value of smlTerminateInstance * @see smlTerminateInstance */ Ret_t myTerminateInstance(InstanceID_t id) { return smlTerminateInstance(id); } /** * Close SyncML Toolkit session * * @return return value of smlTerminate * @see smlTerminate */ Ret_t myTerminate(void) { return smlTerminate(); } |
From: Kidong L. <bri...@us...> - 2004-04-11 15:28:11
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30722/examples Log Message: Directory /cvsroot/syncml-ctoolkit/toolkit/src/examples added to the repository |
From: Peter T. <pth...@us...> - 2004-04-10 03:11:31
|
Update of /cvsroot/syncml-ctoolkit/manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10717 Modified Files: TM_COPY.HTM Log Message: Fixed copyright statement. Index: TM_COPY.HTM =================================================================== RCS file: /cvsroot/syncml-ctoolkit/manual/TM_COPY.HTM,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TM_COPY.HTM 6 Aug 2002 21:22:49 -0000 1.1 --- TM_COPY.HTM 10 Apr 2004 02:58:02 -0000 1.2 *************** *** 11,36 **** <HR NOSHADE ALIGN=LEFT WIDTH=740 SIZE=1> <P> ! Copyright © Ericsson, IBM, Lotus, Matsushita Communications Industrial Co., Motorola, Nokia, Palm, Inc., Psion, Starfish Software (1999 - 2001). All Rights Reserved.</P> ! <P> ! This document may be copied solely for use in internal evaluations and for no other purpose unless otherwise provided ! in the SyncML Specification Sponsor Agreement or the SyncML Specification Supporter Agreement ! signed by the receiving party and a SyncML sponsor. ! This document contains the confidential information of the copyright holders and its use and disclosure are restricted. ! The party receiving this document must sign a written non-disclosure agreement pertaining to this document ! with Ericsson, IBM, Lotus, Matsushita Communications Industrial Co., Motorola, Nokia, Palm, Inc., Psion, Starfish Software or another SyncML Sponsor ! prior to accessing its contents. </P> <P> ! THIS DOCUMENT AND THE INFORMATION CONTAINED HEREIN ARE PROVIDED ON AN "AS IS" BASIS ! WITHOUT WARRANTY OF ANY KIND AND ERICSSON, IBM, LOTUS, MATSUSHITA COMMUNICATIONS INDUSTRIAL CO., ! MOTOROLA, NOKIA, PALM, INC., PSION, STARFISH SOFTWARE AND ALL OTHER SYNCML SPONSORS ! DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY ! THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES ! OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL ERICSSON, IBM, LOTUS, ! MATSUSHITA COMMUNICATIONS INDUSTRIAL CO., MOTOROLA, NOKIA, PALM, INC., PSION, STARFISH SOFTWARE ! OR ANY OTHER SYNCML SPONSOR BE LIABLE TO ANY PARTY FOR ANY LOSS OF PROFITS, LOSS OF BUSINESS, ! LOSS OF USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, ! INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN CONNECTION WITH THIS DOCUMENT ! OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE. </P> <P> --- 11,43 ---- <HR NOSHADE ALIGN=LEFT WIDTH=740 SIZE=1> <P> ! Copyright (c) Ericsson, IBM, Lotus, Matsushita Communication ! Industrial Co., Ltd., Motorola, Nokia, Openwave Systems, Inc., ! Palm, Inc., Psion, Starfish Software, Symbian, Ltd. (2001). ! All Rights Reserved. ! Implementation of all or part of any Specification may require ! licenses under third party intellectual property rights, ! including without limitation, patent rights (such a third party ! may or may not be a Supporter). The Sponsors of the Specification ! are not responsible and shall not be held responsible in any ! manner for identifying or failing to identify any or all such ! third party intellectual property rights. </P> <P> ! THIS DOCUMENT AND THE INFORMATION CONTAINED HEREIN ARE PROVIDED ! ON AN "AS IS" BASIS WITHOUT WARRANTY OF ANY KIND AND ERICSSON, IBM, ! LOTUS, MATSUSHITA COMMUNICATION INDUSTRIAL CO. LTD, MOTOROLA, ! NOKIA, PALM INC., PSION, STARFISH SOFTWARE AND ALL OTHER SYNCML ! SPONSORS DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ! BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION ! HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF ! MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT ! SHALL ERICSSON, IBM, LOTUS, MATSUSHITA COMMUNICATION INDUSTRIAL CO., ! LTD, MOTOROLA, NOKIA, PALM INC., PSION, STARFISH SOFTWARE OR ANY ! OTHER SYNCML SPONSOR BE LIABLE TO ANY PARTY FOR ANY LOSS OF ! PROFITS, LOSS OF BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF ! BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTAL, ! PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN CONNECTION WITH ! THIS DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED ! OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE. </P> <P> |
From: Kidong L. <bri...@us...> - 2004-04-07 07:04:34
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/xpt/bindings/common/all In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17505/src/xpt/bindings/common/all Modified Files: xpt-auth.c Log Message: Added -Wall to CFLAGS, Removed unused variables and functions Index: xpt-auth.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/xpt/bindings/common/all/xpt-auth.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** xpt-auth.c 2 May 2003 22:05:09 -0000 1.2 --- xpt-auth.c 7 Apr 2004 06:51:06 -0000 1.3 *************** *** 97,102 **** HttpAuthenticationPtr_t authInit (void) { - int iCount = 0; - /************************/ /* Create objext stores */ --- 97,100 ---- |
From: Kidong L. <bri...@us...> - 2004-04-07 07:04:34
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17505/src/sml/xlt/all Modified Files: xltdevinf.c Log Message: Added -Wall to CFLAGS, Removed unused variables and functions Index: xltdevinf.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/xlt/all/xltdevinf.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** xltdevinf.c 22 Oct 2003 16:19:31 -0000 1.4 --- xltdevinf.c 7 Apr 2004 06:51:06 -0000 1.5 *************** *** 537,540 **** --- 537,542 ---- rc = buildPCData(pDecoder, (VoidPtr_t)&pProp->data->prop->size); break; + default: + break; } } else { *************** *** 557,560 **** --- 559,564 ---- rc = buildPCData(pDecoder, (VoidPtr_t)&pParam->data->size); break; + default: + break; } } |
From: Kidong L. <bri...@us...> - 2004-04-07 07:04:33
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/xpt/bindings/common/tcp/all In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17505/src/xpt/bindings/common/tcp/all Modified Files: xpt-tcp.c Log Message: Added -Wall to CFLAGS, Removed unused variables and functions Index: xpt-tcp.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/xpt/bindings/common/tcp/all/xpt-tcp.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xpt-tcp.c 15 Sep 2003 12:52:24 -0000 1.3 --- xpt-tcp.c 7 Apr 2004 06:51:07 -0000 1.4 *************** *** 47,50 **** --- 47,51 ---- * */ + #include <ctype.h> #include "syncml_tk_prefix_file.h" // %%% luz: needed for precompiled headers in eVC++ |
From: Kidong L. <bri...@us...> - 2004-04-07 07:04:33
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/bld/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17505/src/bld/linux Modified Files: Makefile Makefile.xpt Log Message: Added -Wall to CFLAGS, Removed unused variables and functions Index: Makefile =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/bld/linux/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 14 Nov 2003 09:25:20 -0000 1.2 --- Makefile 7 Apr 2004 06:51:05 -0000 1.3 *************** *** 43,47 **** # some flags ! CFLAGS = # --- 43,47 ---- # some flags ! CFLAGS = -g -Wall # Index: Makefile.xpt =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/bld/linux/Makefile.xpt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.xpt 3 Apr 2004 12:05:10 -0000 1.2 --- Makefile.xpt 7 Apr 2004 06:51:05 -0000 1.3 *************** *** 46,50 **** # Flags that apply to everything built by this Makefile ! ALL_CFLAGS = -g -fPIC -DTRACE # Add -DTRACE_TO_STDOUT to the above options to send debugging output directly # to the screen instead of to smlLibPrint(). --- 46,50 ---- # Flags that apply to everything built by this Makefile ! ALL_CFLAGS = -g -fPIC -DTRACE -Wall # Add -DTRACE_TO_STDOUT to the above options to send debugging output directly # to the screen instead of to smlLibPrint(). |
From: Kidong L. <bri...@us...> - 2004-04-07 07:04:33
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17505/src/sml/inc/win Modified Files: define.h Log Message: Added -Wall to CFLAGS, Removed unused variables and functions Index: define.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/sml/inc/win/define.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** define.h 2 May 2003 22:05:06 -0000 1.2 --- define.h 7 Apr 2004 06:51:06 -0000 1.3 *************** *** 52,57 **** /* thread safety (added by lu...@sy..., 2001-10-29) */ ! /* Note: moved define of this to target_options.h of every target ! #undef __MAKE_THREADSAFE /* enable Alloc helpers */ --- 52,57 ---- /* thread safety (added by lu...@sy..., 2001-10-29) */ ! /* Note: moved define of this to target_options.h of every target */ ! //#undef __MAKE_THREADSAFE /* enable Alloc helpers */ |
From: Kidong L. <bri...@us...> - 2004-04-07 07:04:07
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/xpt/bindings/http/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17505/src/xpt/bindings/http/linux Modified Files: xptihttp.h Log Message: Added -Wall to CFLAGS, Removed unused variables and functions Index: xptihttp.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/xpt/bindings/http/linux/xptihttp.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xptihttp.h 6 Aug 2002 21:03:21 -0000 1.1 --- xptihttp.h 7 Apr 2004 06:51:07 -0000 1.2 *************** *** 65,69 **** #define itoa(i,a,b) (((b) == 16) ? sprintf((a), "%x", (i)) : sprintf((a), "%d", (i))) ! #define ltoa(i,a,b) (((b) == 16) ? sprintf((a), "%x", (i)) : sprintf((a), "%d", (i))) CString_t _getTime (StringBuffer_t pchBuffer) // in: buffer to a chunk of memory --- 65,69 ---- #define itoa(i,a,b) (((b) == 16) ? sprintf((a), "%x", (i)) : sprintf((a), "%d", (i))) ! #define ltoa(i,a,b) (((b) == 16) ? sprintf((a), "%lx", (i)) : sprintf((a), "%ld", (i))) CString_t _getTime (StringBuffer_t pchBuffer) // in: buffer to a chunk of memory |
From: Kidong L. <bri...@us...> - 2004-04-07 07:04:07
|
Update of /cvsroot/syncml-ctoolkit/toolkit/src/xpt/bindings/obex/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17505/src/xpt/bindings/obex/win Modified Files: obexbinding.c obexbinding.h Log Message: Added -Wall to CFLAGS, Removed unused variables and functions Index: obexbinding.h =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/xpt/bindings/obex/win/obexbinding.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** obexbinding.h 2 May 2003 22:05:10 -0000 1.2 --- obexbinding.h 7 Apr 2004 06:51:09 -0000 1.3 *************** *** 488,496 **** /* - ** Flow obex request - */ - static Ret_t obxFlowObexRequest( ObxConnectionBlock *cblock, ObxObject *obj ); - - /* ** Flow obex handshaking for client mode */ --- 488,491 ---- *************** *** 498,506 **** /* - ** Flow obex handshaking for shutting down client mode - */ - static void obxTerminateForClientMode( ObxConnectionBlock *cblock ); - - /* ** Flow obex handshaking for server mode */ --- 493,496 ---- *************** *** 508,528 **** /* - ** Flow obex handshaking for shutting down server mode - */ - static void obxTerminateForServerMode( ObxConnectionBlock *cblock ); - - /* - ** When we're in server mode, this call blocks on an accept... returns - ** after a 'client' has attached to us. - ** On return, success: OBX_RC_OK - */ - static Ret_t obxAccept( ObxConnectionBlock *connection ); - - /* - ** Client becomes server, Server becomes client. - */ - static Ret_t obxModeSwap( ObxConnectionBlock *connection ); - - /* ** Queue the inbound buffer for a later send. */ --- 498,501 ---- *************** *** 535,544 **** /* - ** Takes an ObxList returned from ObxGetHeaderList and returns a - ** pointer to the specified header or NULL if header does not exist. - */ - static ObxHeader *obxGetHeader( ObxList *headers, unsigned char type ); - - /* ** Register the underlying OBEX transporta */ --- 508,511 ---- *************** *** 552,557 **** static Ret_t obxSendObexConnect( ObxConnectionBlock *ocb ); - static Ret_t obxSendDocinfo( ObxConnectionBlock *ocb); - static Ret_t obxSendObexDisconnect( ObxConnectionBlock *ocb ); --- 519,522 ---- *************** *** 559,564 **** static ObxObject *obxWaitForObexResponse( ObxConnectionBlock *ocb ); - static Ret_t obxProcessObexObject( ObxConnectionBlock *ocb, ObxObject *response ); - /* ** Record errors with xpt layer --- 524,527 ---- *************** *** 569,573 **** * Parse the value string of the header field XSyncmlHmac */ ! unsigned char *splitParmValue (unsigned char *pszLine, // i: line unsigned char **ppszParm, // o: ptr to extracted parameter unsigned char **ppszValue); // o: ptr to extracted parameter value --- 532,536 ---- * Parse the value string of the header field XSyncmlHmac */ ! static unsigned char *splitParmValue (unsigned char *pszLine, // i: line unsigned char **ppszParm, // o: ptr to extracted parameter unsigned char **ppszValue); // o: ptr to extracted parameter value Index: obexbinding.c =================================================================== RCS file: /cvsroot/syncml-ctoolkit/toolkit/src/xpt/bindings/obex/win/obexbinding.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** obexbinding.c 3 Apr 2004 12:05:11 -0000 1.4 --- obexbinding.c 7 Apr 2004 06:51:09 -0000 1.5 *************** *** 619,631 **** Ret_t rc = OBX_RC_OK; ! int len = 0, length = 0; - ObxHeader *body = NULL; - ObxBuffer *bodyBuf = NULL; ObxObject *response = NULL; ! ObxObject *request = NULL, *result=NULL; ! ObxHeader *hName = NULL, *hLength = NULL; ! ObxBuffer *bName = NULL; ObxIterator *iterator; ObxHeader *header; --- 619,627 ---- Ret_t rc = OBX_RC_OK; ! int length = 0; ObxObject *response = NULL; ! ObxObject *request = NULL; ObxIterator *iterator; ObxHeader *header; *************** *** 1047,1058 **** ObxConnectionBlock *ocb = (ObxConnectionBlock *)privateConnectionInfo; - - Ret_t rc = OBX_RC_OK; int length = 0; - ObxObject *response = NULL; - ObxHeader *body = NULL; - ObxBuffer *bodyBuf = NULL; - XPTDEBUG(("OBX obxReceiveData()\n")); --- 1043,1048 ---- *************** *** 1234,1239 **** Ret_t rc = OBX_RC_OK; - unsigned int creatorId = OBX_DEFAULT_CREATORID; - ObxConnectionBlock *ocb = (ObxConnectionBlock *)privateConnectionInfo; --- 1224,1227 ---- *************** *** 1903,1907 **** */ static Ret_t obxInitializeForClientMode( ObxConnectionBlock *ocb ) { - Ret_t rc = OBX_RC_OK; XPTDEBUG(("OBX obxInitializeForClientMode()\n")); --- 1891,1894 ---- *************** *** 1926,1936 **** /* - ** Flow obex handshaking for shutting down client mode - */ - static void obxTerminateForClientMode( ObxConnectionBlock *ocb ) { - XPTDEBUG(("OBX obxTerminateForClientMode()\n")); - } - - /* ** Flow obex handshaking for server mode ** Really this means we put up an accept and block. --- 1913,1916 ---- *************** *** 1963,2023 **** /* - ** Flow obex handshaking for shutting down server mode - */ - static void obxTerminateForServerMode( ObxConnectionBlock *ocb ) { - XPTDEBUG(("OBX obxTerminateForServerMode()\n")); - } - - /* - ** Client becomes server, Server becomes client.... mostly. - */ - static Ret_t obxModeSwap( ObxConnectionBlock *connection ) { - Ret_t rc = OBX_RC_OK; - - XPTDEBUG(("OBX obxModeSwap call ignored -> no longer needed\n")); - return OBX_RC_OK; - - switch ( connection->currentRole ) { - // Current role UNSPECIFIED - case OBX_REQUEST_ROLE_UNSPECIFIED: - XPTDEBUG(("OBX obxModeSwap(): Role is UNSPECIFIED")); - // How was connection orginally opened? - switch ( connection->role ) { - case XPT_REQUEST_RECEIVER: - connection->currentRole = OBX_REQUEST_ROLE_RECEIVER; - XPTDEBUG((" switching to RECEIVER\n")); - rc = obxInitializeForServerMode( connection ); // accept() - break; - case XPT_REQUEST_SENDER: - connection->currentRole = OBX_REQUEST_ROLE_SENDER; - XPTDEBUG((" switching to SENDER\n")); - rc = obxInitializeForClientMode( connection ); // connect() to peer - break; - } - break; - - // Current role RECEIVER - case OBX_REQUEST_ROLE_RECEIVER: - XPTDEBUG(("OBX obxModeSwap(): Role is RECEIVER switching to SENDER\n")); - - oSleep( 2 ); // let Palm get his 'accept()' up - - connection->currentRole = OBX_REQUEST_ROLE_SENDER; - obxTerminateForServerMode( connection ); - rc = obxInitializeForClientMode( connection ); // connect() to peer - break; - - // Current role SENDER - case OBX_REQUEST_ROLE_SENDER: - XPTDEBUG(("OBX obxModeSwap(): Role is SENDER switching to RECEIVER\n")); - connection->currentRole = OBX_REQUEST_ROLE_RECEIVER; - obxTerminateForClientMode( connection ); - rc = obxInitializeForServerMode( connection ); // accept() - break; - } - return rc; - } - - /* ** Queue the inbound buffer for a later send. */ --- 1943,1946 ---- *************** *** 2080,2084 **** static int obxGetBufferForSend( ObxConnectionBlock *connection, ObxBuffer **body ) { - ObxBuf *oBuf = NULL; ObxBuffer *buffer = NULL; ObxSequenceNode *cursor = NULL; --- 2003,2006 ---- *************** *** 2118,2148 **** - /* - ** Takes an ObxList returned from ObxGetHeaderList and returns a - ** pointer to the specified header or NULL if header does not exist. - */ - static ObxHeader *obxGetHeader( ObxList *headers, unsigned char type ) { - - ObxIterator *iterator = NULL; - ObxHeader *header = NULL; - int found = 0; - - XPTDEBUG(("OBX obxGetHeader(), header = %02X\n",type)); - - if ( headers != NULL ) { - iterator = ObxListGetIterator( headers ); - while ( ObxIteratorHasNext( iterator ) && !found ) { - header = (ObxHeader *)ObxIteratorNext( iterator ); - if ( header->identifier == type ) { - found = 1; - } // end if - } // end while - ObxIteratorFree( iterator ); - } // end if - - return ( found ? header : NULL ); - - } // obxGetHeader() - static Ret_t obxSendObexConnect( ObxConnectionBlock *ocb ) { ObxObject *request; --- 2040,2043 ---- *************** *** 2321,2425 **** } // obxWaitForObexResponse() - - static Ret_t obxProcessObexObject( ObxConnectionBlock *ocb, ObxObject *response ) { - - int length; - - unsigned char *buffer; - - ObxHeader *header = NULL; - ObxBuffer *headerBuf = NULL; - ObxList *headerList = NULL; - - XPTDEBUG(("OBX obxProcessObexObject()\n")); - - CHECK_PARM( ocb, "obxProcessObexObject()", "ocb" ); - CHECK_PARM( response, "obxProcessObexObject()", "response" ); - - headerList = ObxGetHeaderList( ocb->obxHandle, response ); - if ( headerList == NULL ) { - return OBX_RC_GENERAL_ERROR; - } // end if - - if ( ocb->docInfo == NULL ) { - ocb->docInfo = (XptCommunicationInfo_t *)ALLOC_MEM( sizeof( XptCommunicationInfo_t ) ); - if ( ocb->docInfo == NULL ) { - return OBX_RC_GENERAL_ERROR; - } // end if - } // end if - - // Populate the docInfo structure - header = obxGetHeader( headerList, OBEX_HEADER_NAME ); - if ( header == NULL ) { - return OBX_RC_GENERAL_ERROR; - } // end if - length = ObxBufSize( header->value.unicodeValue ); - buffer = (unsigned char *)malloc( length ); - ObxBufRead( header->value.unicodeValue, buffer, length ); - headerBuf = ObxUnicodeToUTF8( buffer, length ); - ObxBufRead( headerBuf, ocb->docInfo->docName, ObxBufSize( headerBuf ) ); - ObxBufFree( headerBuf ); - free( buffer ); - headerBuf = NULL; - buffer = NULL; - - // Since the Palm does NOT set the mimeType, use description, if present. - header = obxGetHeader( headerList, OBEX_HEADER_DESCRIPTION ); - if ( header == NULL ) { - header = obxGetHeader( headerList, OBEX_HEADER_TYPE ); - if ( header == NULL ) { - return OBX_RC_GENERAL_ERROR; - } // end if - ObxBufRead( header->value.byteSequenceValue, ocb->docInfo->mimeType, ObxBufSize( header->value.byteSequenceValue ) ); - } // end if - else { - length = ObxBufSize( header->value.unicodeValue ); - buffer = (unsigned char *)malloc( length ); - ObxBufRead( header->value.unicodeValue, buffer, length ); - headerBuf = ObxUnicodeToUTF8( buffer, length ); - ObxBufRead( headerBuf, ocb->docInfo->mimeType, ObxBufSize( headerBuf ) ); - ObxBufFree( headerBuf ); - free( buffer ); - headerBuf = NULL; - buffer = NULL; - } // end else - - // Get the LENGTH header - header = obxGetHeader( headerList, OBEX_HEADER_LENGTH ); - if ( header == NULL ) { - return OBX_RC_GENERAL_ERROR; - } // end if - ocb->docInfo->cbLength = header->value.fourBytevalue; - - if ( ocb->dataToRead == NULL ) { - ocb->dataToRead = (ObxBuf *)ALLOC_MEM( sizeof( ObxBuf ) ); - if ( ocb->dataToRead == NULL ) { - return OBX_RC_GENERAL_ERROR; - } // end if - } // end if - - // Populate the dataToRead structure - header = obxGetHeader( headerList, OBEX_HEADER_BODY ); - if ( header == NULL ) { - ocb->dataToRead->buf = NULL; - ocb->dataToRead->cursor = NULL; - ocb->dataToRead->length = 0; - return OBX_RC_GENERAL_ERROR; - } // end if - else { - headerBuf = header->value.byteSequenceValue; - ocb->dataToRead->buf = (unsigned char *)ALLOC_MEM( ObxBufSize( headerBuf ) ); - if ( ocb->dataToRead->buf == NULL ) { - return OBX_RC_GENERAL_ERROR; - } // end if - ocb->dataToRead->cursor = ocb->dataToRead->buf; - ocb->dataToRead->length = ObxBufSize( headerBuf ); - ObxBufRead( headerBuf, ocb->dataToRead->buf, ocb->dataToRead->length ); - } // end else - - return OBX_RC_OK; - - } // obxProcessObexObject() - /* ** Record any errors. --- 2216,2219 ---- |