Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

queue.h: Abstract queue class
[platform independant portions of code]


Data Structures

struct  _Object
struct  _ObjectSymbol
struct  _ObjectRelocation
struct  _ObjectSection
struct  _ObjectParser

Typedefs

typedef _ObjectObject
typedef _ObjectParserObjectParser
typedef _ObjectSectionObjectSection
typedef _ObjectSymbolObjectSymbol
typedef _ObjectRelocationObjectRelocation
typedef ErrorCode(* ObjectParserCreateFunction )(Object obj, void *buffer, uint32 length)
typedef ErrorCode(* ObjectParserDestroyFunction )(Object obj)
typedef _Queue * Queue

Functions

ErrorCode objectCreate (Object *obj, String name, void *buffer, uint32 length)
ErrorCode objectCreateEmpty (Object *obj)
ErrorCode objectDestroy (Object *obj)
ErrorCode objectGetImportList (Object obj, List *imports)
ErrorCode objectGetExportList (Object obj, List *exports)
ErrorCode objectGetSectionIterator (Object obj, ListIterator *iterator)
ErrorCode objectGetSectionList (Object obj, List *sections)
ErrorCode objectSetBase (Object obj, void *base)
ErrorCode objectLink (Object obj1, Object obj2)
ErrorCode objectDump (Object obj)
ErrorCode objectParserInit (void)
ErrorCode objectParserFinal (void)
ErrorCode objectParserAdd (String formatName, ObjectParserCreateFunction create, ObjectParserDestroyFunction destroy)
ErrorCode objectParserRemove (ObjectParser parser)
ErrorCode objectParserCreateSection (ObjectSection *section, String name, uint32 id, uint32 offset, uint32 length, uint32 alignment)
ErrorCode objectParserAddSection (Object obj, ObjectSection section)
ErrorCode objectParserGetSection (Object obj, String name, ObjectSection *section)
ErrorCode objectParserGetSectionById (Object obj, uint32 id, ObjectSection *section)
ErrorCode objectParserCreateSymbol (ObjectSymbol *symbol, String name, uint32 id, uint32 location)
ErrorCode objectParserAddImport (Object obj, ObjectSymbol import)
ErrorCode objectParserAddExport (Object obj, ObjectSymbol export, ObjectSection section)
ErrorCode objectParserGetImportById (Object obj, uint32 id, ObjectSymbol *symbol)
ErrorCode objectParserGetExportById (Object obj, uint32 id, ObjectSymbol *symbol)
ErrorCode objectParserGetImportByName (Object obj, String name, ObjectSymbol *symbol)
ErrorCode objectParserGetExportByName (Object obj, String name, ObjectSymbol *symbol)
ErrorCode objectParserCreateSymbolRelocation (ObjectRelocation *reloc, ObjectSection sourceSection, uint32 offset, ObjectSymbol symbol, uint8 length, Boolean relative)
ErrorCode objectParserCreateSectionRelocation (ObjectRelocation *reloc, ObjectSection sourceSection, uint32 offset, ObjectSection section, uint8 length, Boolean relative)
ErrorCode objectParserAddRelocation (Object obj, ObjectRelocation rec)
ErrorCode objectParserSetPrivateData (Object obj, void *privateData)
ErrorCode objectParserGetPrivateData (Object obj, void **privateData)
ErrorCode queueCreate (Queue *q, uint32 size)
ErrorCode queueAdd (Queue q, Pointer item)
ErrorCode queueGet (Queue q, Pointer *item)
ErrorCode queuePeek (Queue q, Pointer *item)
ErrorCode queueGetSize (Queue q, uint32 *size)
ErrorCode queueGetRemaining (Queue q, uint32 *rem)
ErrorCode queueDestroy (Queue *q)

Detailed Description

This file defines a interface for working with simple queues

Typedef Documentation

typedef struct _Object* Object
 

: cleanup this header! Divide it into Object and ObjectParser, possibly also adding an ObjectSection and ObjectSymbol API

Definition at line 27 of file object.h.

typedef struct _ObjectParser* ObjectParser
 

Definition at line 28 of file object.h.

typedef ErrorCode(* ObjectParserCreateFunction)(Object obj, void *buffer, uint32 length)
 

Definition at line 81 of file object.h.

typedef ErrorCode(* ObjectParserDestroyFunction)(Object obj)
 

Definition at line 82 of file object.h.

typedef struct _ObjectRelocation * ObjectRelocation
 

typedef struct _ObjectSection* ObjectSection
 

Definition at line 29 of file object.h.

typedef struct _ObjectSymbol * ObjectSymbol
 

typedef struct _Queue* Queue
 

Definition at line 24 of file queue.h.


Function Documentation

ErrorCode objectCreate Object obj,
String  name,
void *  buffer,
uint32  length
 

objectCreate() will take the C object code pointed to by 'buffer' and gather all the appropriate information from it (symbols, sections, etc)

ErrorCode objectCreateEmpty Object obj  ) 
 

ErrorCode objectDestroy Object obj  ) 
 

ErrorCode objectDump Object  obj  ) 
 

ErrorCode objectGetExportList Object  obj,
List exports
 

ErrorCode objectGetImportList Object  obj,
List imports
 

ErrorCode objectGetSectionIterator Object  obj,
ListIterator iterator
 

ErrorCode objectGetSectionList Object  obj,
List sections
 

ErrorCode objectLink Object  obj1,
Object  obj2
 

ErrorCode objectParserAdd String  formatName,
ObjectParserCreateFunction  create,
ObjectParserDestroyFunction  destroy
 

ErrorCode objectParserAddExport Object  obj,
ObjectSymbol  export,
ObjectSection  section
 

ErrorCode objectParserAddImport Object  obj,
ObjectSymbol  import
 

ErrorCode objectParserAddRelocation Object  obj,
ObjectRelocation  rec
 

ErrorCode objectParserAddSection Object  obj,
ObjectSection  section
 

ErrorCode objectParserCreateSection ObjectSection section,
String  name,
uint32  id,
uint32  offset,
uint32  length,
uint32  alignment
 

ErrorCode objectParserCreateSectionRelocation ObjectRelocation reloc,
ObjectSection  sourceSection,
uint32  offset,
ObjectSection  section,
uint8  length,
Boolean  relative
 

ErrorCode objectParserCreateSymbol ObjectSymbol symbol,
String  name,
uint32  id,
uint32  location
 

ErrorCode objectParserCreateSymbolRelocation ObjectRelocation reloc,
ObjectSection  sourceSection,
uint32  offset,
ObjectSymbol  symbol,
uint8  length,
Boolean  relative
 

Create a relocation record for a symbol at a certain location and length. This relocation can be relative, or absolute.

Parameters:
reloc The relocation to create
section The section where this relocation exists
symbol A symbol which this object has defined as an import
location The location where this relocation should be, relative to section start
length The length, in bytes, of the symbol relocation
relative True if this relocation is relative to the current instruction, or false is absolute.

ErrorCode objectParserFinal void   ) 
 

ErrorCode objectParserGetExportById Object  obj,
uint32  id,
ObjectSymbol symbol
 

ErrorCode objectParserGetExportByName Object  obj,
String  name,
ObjectSymbol symbol
 

ErrorCode objectParserGetImportById Object  obj,
uint32  id,
ObjectSymbol symbol
 

ErrorCode objectParserGetImportByName Object  obj,
String  name,
ObjectSymbol symbol
 

ErrorCode objectParserGetPrivateData Object  obj,
void **  privateData
 

ErrorCode objectParserGetSection Object  obj,
String  name,
ObjectSection section
 

ErrorCode objectParserGetSectionById Object  obj,
uint32  id,
ObjectSection section
 

ErrorCode objectParserInit void   ) 
 

ErrorCode objectParserRemove ObjectParser  parser  ) 
 

ErrorCode objectParserSetPrivateData Object  obj,
void *  privateData
 

ErrorCode objectSetBase Object  obj,
void *  base
 

ErrorCode queueAdd Queue  q,
Pointer  item
 

ErrorCode queueCreate Queue q,
uint32  size
 

ErrorCode queueDestroy Queue q  ) 
 

ErrorCode queueGet Queue  q,
Pointer item
 

ErrorCode queueGetRemaining Queue  q,
uint32 rem
 

ErrorCode queueGetSize Queue  q,
uint32 size
 

ErrorCode queuePeek Queue  q,
Pointer item
 


Generated on Wed Mar 22 20:36:34 2006 for ndk by  doxygen 1.4.4