cbf_binary.h

Go to the documentation of this file.
00001 
00002 #ifndef CBF_BINARY_H
00003 #define CBF_BINARY_H
00004 
00005 #ifdef __cplusplus
00006 
00007 extern "C" {
00008 
00009 #endif
00010 
00011 #include "cbf_tree.h"
00012 
00013 
00014   /* Parse a binary text value */
00015   
00016 int cbf_get_bintext (cbf_node  *column, unsigned int row,
00017                      int       *type,
00018                      int       *id, 
00019                      cbf_file **file,
00020                      long      *start,
00021                      size_t    *size,
00022                      int       *checked_digest,
00023                      char      *digest,
00024                      int       *elsize,
00025                      int       *elsign,
00026             unsigned int       *compression);
00027    
00028 
00029   /* Set a binary text value */
00030   
00031 int cbf_set_bintext (cbf_node *column, unsigned int row,
00032                      int         type,
00033                      int         id, 
00034                      cbf_file   *file,
00035                      long        start,
00036                      long        size,
00037                      int         checked_digest,
00038                      const char *digest,
00039                      int         elsize,
00040                      int         elsign,
00041             unsigned int         compression);
00042 
00043 
00044   /* Check for a binary value */
00045 
00046 int cbf_is_binary (cbf_node *column, unsigned int row);
00047 
00048 
00049   /* Is this an encoded binary value? */
00050 
00051 int cbf_is_mimebinary (cbf_node *column, unsigned int row);
00052 
00053 
00054   /* Free a value */
00055 
00056 int cbf_free_value (cbf_context *context, cbf_node *column, unsigned int row);
00057 
00058 
00059   /* Set a binary value */
00060   
00061 int cbf_set_binary (cbf_node *column, unsigned int row,
00062                     unsigned int compression,
00063                     int binary_id, void *value, size_t elsize, int elsign,
00064                     size_t nelem);
00065 
00066                     
00067   /* Get the parameters of a binary value */
00068   
00069 int cbf_binary_parameters (cbf_node *column, 
00070                            unsigned int row, unsigned int *compression,
00071                            int *binary_id, 
00072                            int *eltype, size_t *elsize, 
00073                            int *elsigned, 
00074                            int *elunsigned,
00075                            size_t *nelem,
00076                            int *minelem, int *maxelem);
00077 
00078                     
00079   /* Get a binary value */
00080   
00081 int cbf_get_binary (cbf_node *column, unsigned int row, int *binary_id,
00082                     void *value, size_t elsize, int elsign,
00083                     size_t nelem, size_t *nelem_read);
00084 
00085                     
00086 #ifdef __cplusplus
00087 
00088 }
00089 
00090 #endif
00091 
00092 #endif /* CBF_BINARY_H */
00093