src/data_object.c File Reference

Implementation of the base data_object_t ADT and interface mechanism. More...

#include <stdlib.h>
#include <errno.h>
#include "data_object.h"
#include "data_object_internal.h"
#include "debug.h"
Include dependency graph for data_object.c:

Go to the source code of this file.

Functions

int data_object_create_impl (data_object_t **obj, void *impl, struct data_object_funcs *funcs)
 Creates a data_object_t using a specific implementation.
void * data_object_get_impl (data_object_t *obj)
 Gets the private implementation data of a data_object_t,.
int data_object_get_data (data_object_t *obj, void **buf, off_t offset, off_t *length, data_object_flags flags)
 Gets a pointer to data from the data object.
int data_object_free (data_object_t *obj)
 Frees the data object and its resources.
int data_object_update_usage (void *obj, int change)
 Updates the usage count of this data object.
int data_object_get_size (data_object_t *obj, off_t *size)
 Gets the size of the data object.
int data_object_compare (int *result, data_object_t *obj1, data_object_t *obj2)
 Compares the data held by two data objects.

Detailed Description

Implementation of the base data_object_t ADT and interface mechanism.

Definition in file data_object.c.


Function Documentation

int data_object_create_impl ( data_object_t **  obj,
void *  impl,
struct data_object_funcs funcs 
)

Creates a data_object_t using a specific implementation.

This functions is for use by the various data_object_t implementations.

Parameters:
[out] obj the created data_object_t
impl the implementation private data
funcs function pointers to the implementations' functions
Returns:
the operation status code

Definition at line 54 of file data_object.c.

Referenced by data_object_file_new(), and data_object_memory_new().

Here is the caller graph for this function:


Generated on Sun Nov 15 15:27:45 2009 for libbls by  doxygen 1.6.1