Main Page   Modules   Data Structures   File List   Data Fields   Examples  

ELF Resources
[The Manipulate ELF library.]


Data Structures

struct  _Elf32_Res
 Elf resource. More...


Typedefs

typedef enum _Elf32_ResType Elf32_ResType
 Elf resource types. More...

typedef _Elf32_Res Elf32_Res
 Elf resource. More...


Enumerations

enum  _Elf32_ResType { ELF_RES_TYPE_UNKNOWN = 0, ELF_RES_TYPE_STRING = 1, ELF_RES_TYPE_BINARY = 2 }
 Elf resource types. More...


Functions

ELF_SPEC_HEADERmelf_resOpen (MELF *melf)
ELF_SPEC_HEADERmelf_resCreate (MELF *melf)
void melf_resInitializeEntryList (MELF *melf, ELF_SPEC_HEADER *sect)
void melf_resSynchronizeEntryList (MELF *melf, ELF_SPEC_HEADER *sect)
unsigned char melf_resEnum (MELF *melf, ELF_SPEC_HEADER *resTable, unsigned long index, Elf32_Res *res)
unsigned char melf_resGetType (MELF *melf, ELF_SPEC_HEADER *resTable, Elf32_ResType type, Elf32_Res *res)
unsigned char melf_resGetId (MELF *melf, ELF_SPEC_HEADER *resTable, unsigned long id, Elf32_Res *res)
unsigned char melf_resAdd (MELF *melf, ELF_SPEC_HEADER *resTable, Elf32_ResType type, unsigned long length, unsigned long id, void *data)
unsigned char melf_resUpdate (MELF *melf, ELF_SPEC_HEADER *resTable, Elf32_ResType type, unsigned long length, unsigned long id, void *data)
unsigned char melf_resRemove (MELF *melf, ELF_SPEC_HEADER *resTable, Elf32_Res *res)
void melf_resClose (MELF *melf, ELF_SPEC_HEADER *resTable)

Typedef Documentation

typedef struct _Elf32_Res Elf32_Res
 

Elf resource.

Elf resource object for an individual resource.

typedef enum _Elf32_ResType Elf32_ResType
 

Elf resource types.

Enumeration of resource types


Enumeration Type Documentation

enum _Elf32_ResType
 

Elf resource types.

Enumeration of resource types

Enumeration values:
ELF_RES_TYPE_UNKNOWN  Unknown resource
ELF_RES_TYPE_STRING  String resource
ELF_RES_TYPE_BINARY  Binary resource


Function Documentation

unsigned char melf_resAdd MELF   melf,
ELF_SPEC_HEADER   resTable,
Elf32_ResType    type,
unsigned long    length,
unsigned long    id,
void *    data
 

Adds a new resource to the resource table. Resource identifiers must be unique.

Parameters:
melf  [in] The melf context.
resTable  [in] The resource table section.
type  [in] The resource type.
length  [in] The length of the data buffer passed in.
id  [in] The identifier to associate this resource with.
data  [in] The arbitrary data.
Returns:
On success, 1 is returned, otherwise 0 is returned.

void melf_resClose MELF   melf,
ELF_SPEC_HEADER   resTable
 

Closes a resource table. This currently has no operation.

Parameters:
melf  [in] The melf context.
resTable  [in] The resource table section.

ELF_SPEC_HEADER* melf_resCreate MELF   melf
 

Creates a new resource section, or opens an existing one if one exists.

Parameters:
melf  [in] The melf context.
Returns:
On success, the corresponding section is returned, otherwise NULL.

unsigned char melf_resEnum MELF   melf,
ELF_SPEC_HEADER   resTable,
unsigned long    index,
Elf32_Res   res
 

Enumerates the resources in a given resource section.

Parameters:
melf  [in] The melf context.
resTable  [in] The resource table section.
index  [in] The current enumeration index.
res  [out] The buffer to hold the resource.
Returns:
If there is a resource at the given index, 1 is returned, otherwise 0 is returned.

unsigned char melf_resGetId MELF   melf,
ELF_SPEC_HEADER   resTable,
unsigned long    id,
Elf32_Res   res
 

Gets a resource entry by a specified identifier.

Parameters:
melf  [in] The melf context.
resTable  [in] The resource table section.
id  [in] The identifier to search for.
res  [out] The buffer to hold the resource.
Returns:
On success, 1 is returned, otherwise 0 is returned.

unsigned char melf_resGetType MELF   melf,
ELF_SPEC_HEADER   resTable,
Elf32_ResType    type,
Elf32_Res   res
 

Gets a resource entry by a specified type.

Parameters:
melf  [in] The melf context.
resTable  [in] The resource table section.
type  [in] The type to search for.
res  [out] The buffer to hold the resource.
Returns:
On success, 1 is returned, otherwise 0 is returned.

void melf_resInitializeEntryList MELF   melf,
ELF_SPEC_HEADER   sect
 

Initializes the entry list for the given section. It is not recommended that this function be called directly.

Parameters:
melf  [in] The melf context.
sect  [in] The section that is being operated on.

ELF_SPEC_HEADER* melf_resOpen MELF   melf
 

Opens an existing resource section, if one exists.

Parameters:
melf  [in] The melf context.
Returns:
On success, the corresponding section is returned, otherwise NULL.

unsigned char melf_resRemove MELF   melf,
ELF_SPEC_HEADER   resTable,
Elf32_Res   res
 

Removes a resource to the resource table. Resource identifiers must be unique.

Parameters:
melf  [in] The melf context.
resTable  [in] The resource table section.
res  [in] The resource to remove.
Returns:
On success, 1 is returned, otherwise 0 is returned.

void melf_resSynchronizeEntryList MELF   melf,
ELF_SPEC_HEADER   sect
 

Synchronizes the entry list for the given section. It is not recommended that this function be called directly.

Parameters:
melf  [in] The melf context.
sect  [in] The section that is being operated on.

unsigned char melf_resUpdate MELF   melf,
ELF_SPEC_HEADER   resTable,
Elf32_ResType    type,
unsigned long    length,
unsigned long    id,
void *    data
 

Updates a resource to the resource table. Resource identifiers must be unique. If the resource does not exist it is created.

Parameters:
melf  [in] The melf context.
resTable  [in] The resource table section.
type  [in] The resource type.
length  [in] The length of the data buffer passed in.
id  [in] The identifier to associate this resource with.
data  [in] The arbitrary data.
Returns:
On success, 1 is returned, otherwise 0 is returned.


Generated on Tue May 4 00:14:34 2004 for libmelf by doxygen1.2.15