All pastes #606578 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-07-06 22:57 UTC
rendered paste body
/******************************************************************************
 * embx.h
 *
 * This is an embx emulation header, that allows the codec modules/engines
 * to run in a monolithic user level linux environment.
 *
 ******************************************************************************
 * Copyright (c) 2004 STMicroelectronics Limited, All rights reserved.
 *****************************************************************************/
#ifndef _EMBX_H_
#define _EMBX_H_

#include "embx_types.h"

#ifdef __cplusplus
extern "C" {
#endif

#define DLLEXPORT

DLLEXPORT EMBX_ERROR  EMBX_Init   (EMBX_VOID);
DLLEXPORT EMBX_ERROR  EMBX_Deinit (EMBX_VOID);

DLLEXPORT EMBX_ERROR EMBX_RegisterTransport   (EMBX_TransportFactory_fn *fn, EMBX_VOID *arg, EMBX_UINT argSize, EMBX_FACTORY *hFactory);
DLLEXPORT EMBX_ERROR EMBX_GetFirstTransport   (EMBX_TPINFO *tpinfo);
DLLEXPORT EMBX_ERROR EMBX_GetNextTransport    (EMBX_TPINFO *tpinfo);

DLLEXPORT EMBX_ERROR EMBX_OpenTransport       (const EMBX_CHAR *name, EMBX_TRANSPORT *tp);
DLLEXPORT EMBX_ERROR EMBX_CloseTransport      (EMBX_TRANSPORT tp);

DLLEXPORT EMBX_ERROR EMBX_Alloc (EMBX_TRANSPORT tp, EMBX_UINT size, EMBX_VOID **buffer);
DLLEXPORT EMBX_ERROR EMBX_Free  (EMBX_VOID *buffer);

DLLEXPORT EMBX_ERROR EMBX_RegisterObject   (EMBX_TRANSPORT tp, EMBX_VOID  *object, EMBX_UINT size, EMBX_HANDLE *handle);
DLLEXPORT EMBX_ERROR EMBX_DeregisterObject (EMBX_TRANSPORT tp, EMBX_HANDLE handle);
DLLEXPORT EMBX_ERROR EMBX_GetObject        (EMBX_TRANSPORT tp, EMBX_HANDLE handle, EMBX_VOID **object, EMBX_UINT *size);

DLLEXPORT EMBX_ERROR EMBX_CreatePort     (EMBX_TRANSPORT tp, const EMBX_CHAR *portName, EMBX_PORT *port);
DLLEXPORT EMBX_ERROR EMBX_Connect        (EMBX_TRANSPORT tp, const EMBX_CHAR *portName, EMBX_PORT *port);
DLLEXPORT EMBX_ERROR EMBX_ConnectBlock   (EMBX_TRANSPORT tp, const EMBX_CHAR *portName, EMBX_PORT *port);
DLLEXPORT EMBX_ERROR EMBX_ClosePort      (EMBX_PORT port);

DLLEXPORT EMBX_ERROR EMBX_Receive      (EMBX_PORT port, EMBX_RECEIVE_EVENT *);
DLLEXPORT EMBX_ERROR EMBX_ReceiveBlock (EMBX_PORT port, EMBX_RECEIVE_EVENT *);

DLLEXPORT EMBX_ERROR EMBX_SendMessage  (EMBX_PORT port, EMBX_VOID *buffer,  EMBX_UINT size);

DLLEXPORT EMBX_ERROR EMBX_UpdateObject (EMBX_PORT port, EMBX_HANDLE handle, EMBX_UINT offset, EMBX_UINT size);



#ifdef __cplusplus
}
#endif
#endif