IPC API
3.30.01.12
|
Multi-Media derived Remote Procedure Call.
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | MmRpc_Param |
MmRpc_Param type. More... | |
struct | MmRpc_Xlt |
struct | MmRpc_FxnCtx |
Function call context structure. More... | |
union | MmRpc_BufDesc |
Memory buffer descriptor. More... | |
struct | MmRpc_Params |
Instance create parameters. More... | |
Macros | |
#define | MmRpc_S_SUCCESS (0) |
Operation is successful. More... | |
#define | MmRpc_E_FAIL (-1) |
Operation failed. More... | |
#define | MmRpc_E_INVALIDPARAM (-2) |
Invalid parameter type. More... | |
#define | MmRpc_E_NOMEM (-3) |
Memory allocation failed. More... | |
#define | MmRpc_E_SYS (-4) |
A system call failed. More... | |
#define | MmRpc_MAX_PARAMS (10) |
Size of parameter array in function context structure. More... | |
#define | MmRpc_MAX_TRANSLATIONS (1024) |
Maximum size of translation array in function context structure. More... | |
#define | MmRpc_OFFSET(base, field) ((unsigned int)(field)-(unsigned int)(base)) |
Macro for computing offset to a field of a structure. More... | |
Typedefs | |
typedef struct MmRpc_Object * | MmRpc_Handle |
MmRpc_Handle type. More... | |
Enumerations | |
enum | MmRpc_ParamType { MmRpc_ParamType_Scalar = 1, MmRpc_ParamType_Ptr, MmRpc_ParamType_OffPtr, MmRpc_ParamType_Elem } |
MmRpc_ParamType enum. More... | |
enum | MmRpc_BufType { MmRpc_BufType_Handle, MmRpc_BufType_Ptr } |
Memory buffer types. More... | |
Functions | |
int | MmRpc_call (MmRpc_Handle handle, MmRpc_FxnCtx *ctx, int32_t *ret) |
Invoke a remote procedure call. More... | |
int | MmRpc_create (const char *service, const MmRpc_Params *params, MmRpc_Handle *handlePtr) |
Create an MmRpc instance. More... | |
int | MmRpc_delete (MmRpc_Handle *handlePtr) |
Delete an MmRpc instance. More... | |
int | MmRpc_release (MmRpc_Handle handle, MmRpc_BufType type, int num, MmRpc_BufDesc *desc) |
Release buffers which were declared in use. More... | |
int | MmRpc_use (MmRpc_Handle handle, MmRpc_BufType type, int num, MmRpc_BufDesc *desc) |
Declare the use of the given buffers. More... | |
void | MmRpc_Params_init (MmRpc_Params *params) |
Initialize the instance create parameter structure. More... | |
#define MmRpc_S_SUCCESS (0) |
Operation is successful.
#define MmRpc_E_FAIL (-1) |
Operation failed.
#define MmRpc_E_INVALIDPARAM (-2) |
Invalid parameter type.
#define MmRpc_E_NOMEM (-3) |
Memory allocation failed.
#define MmRpc_E_SYS (-4) |
A system call failed.
#define MmRpc_MAX_PARAMS (10) |
Size of parameter array in function context structure.
#define MmRpc_MAX_TRANSLATIONS (1024) |
Maximum size of translation array in function context structure.
#define MmRpc_OFFSET | ( | base, | |
field | |||
) | ((unsigned int)(field)-(unsigned int)(base)) |
Macro for computing offset to a field of a structure.
typedef struct MmRpc_Object* MmRpc_Handle |
MmRpc_Handle type.
enum MmRpc_ParamType |
enum MmRpc_BufType |
int MmRpc_call | ( | MmRpc_Handle | handle, |
MmRpc_FxnCtx * | ctx, | ||
int32_t * | ret | ||
) |
Invoke a remote procedure call.
[in] | handle | MmRpc handle, obtained from MmRpc_create() |
[in] | ctx | Context with which to invoke the remote service |
[in,out] | ret | Return value from the remotely invoked service |
handle
must be a valid handle for the service instance returned by an earlier call to MmRpc_create().int MmRpc_create | ( | const char * | service, |
const MmRpc_Params * | params, | ||
MmRpc_Handle * | handlePtr | ||
) |
Create an MmRpc instance.
[in] | service | Name of the service to create |
[in] | params | Initialized MmRpc parameters |
[in,out] | handlePtr | Space to hold the MmRpc handle |
MmRpc_S_SUCCESS | Operation is successful. |
MmRpc_E_FAIL | Operation failed. |
int MmRpc_delete | ( | MmRpc_Handle * | handlePtr | ) |
Delete an MmRpc instance.
[in] | handlePtr | MmRpc handle, obtained from MmRpc_create() |
handlePtr
must be a valid handle for the service instance returned by an earlier call to MmRpc_create()int MmRpc_release | ( | MmRpc_Handle | handle, |
MmRpc_BufType | type, | ||
int | num, | ||
MmRpc_BufDesc * | desc | ||
) |
Release buffers which were declared in use.
[in] | handle | Service handle returned by MmRpc_create() |
[in] | type | Buffer descriptor type |
[in] | num | Number of elements in desc array |
[in] | desc | Pointer to array of buffer descriptors |
handle
must be a valid handle for the service instance returned by an earlier call to MmRpc_create().MmRpc_S_SUCCESS | Operation is successful. |
MmRpc_E_INVALIDPARAM | Invalid parameter type. |
MmRpc_E_NOMEM | Memory allocation failed. |
MmRpc_E_SYS | A system call failed. |
int MmRpc_use | ( | MmRpc_Handle | handle, |
MmRpc_BufType | type, | ||
int | num, | ||
MmRpc_BufDesc * | desc | ||
) |
Declare the use of the given buffers.
[in] | handle | Service handle returned by MmRpc_create() |
[in] | type | Buffer descriptor type |
[in] | num | Number of elements in desc array |
[in] | desc | Pointer to array of buffer descriptors |
handle
must be a valid handle for the service instance returned by an earlier call to MmRpc_create().MmRpc_S_SUCCESS | Operation is successful. |
MmRpc_E_INVALIDPARAM | Invalid parameter type. |
MmRpc_E_NOMEM | Memory allocation failed. |
MmRpc_E_SYS | A system call failed. |
void MmRpc_Params_init | ( | MmRpc_Params * | params | ) |
Initialize the instance create parameter structure.