4 #include "../../gsmstate.h" 10 #if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX) || defined(GSM_ENABLE_ATOBEX) 12 #include "../../gsmcomon.h" 13 #include "../../misc/coding/coding.h" 17 int MsgLength,
int type)
19 unsigned char *buffer=NULL;
22 buffer = (
unsigned char *)malloc(MsgLength + 3);
24 OBEXAddBlock(buffer, &length, type, MsgBuffer, MsgLength);
111 void OBEXAddBlock(
char *Buffer,
int *Pos,
unsigned char ID,
const char *AddData,
int AddLength)
113 Buffer[(*Pos)++] = ID;
114 Buffer[(*Pos)++] = (AddLength+3)/256;
115 Buffer[(*Pos)++] = (AddLength+3)%256;
116 if (AddData != NULL) {
117 memcpy(Buffer+(*Pos),AddData,AddLength);
void GSM_DumpMessageBinary(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type)
struct GSM_Protocol::@1 Data
void OBEXAddBlock(char *Buffer, int *Pos, unsigned char ID, const char *AddData, int AddLength)
int(* WriteDevice)(GSM_StateMachine *s, const void *buf, size_t nbytes)
GSM_Device_Functions * Functions
GSM_Phone_Functions * Functions
GSM_Error(* DispatchMessage)(GSM_StateMachine *s)
GSM_Protocol_Message * RequestMsg
void GSM_DumpMessageText(GSM_StateMachine *s, unsigned const char *message, size_t messagesize, int type)