libmongo-client 0.1.4
src/sync-gridfs-chunk.h
Go to the documentation of this file.
00001 /* sync-gridfs-chunk.h - libmong-client GridFS chunk API
00002  * Copyright 2011 Gergely Nagy <algernon@balabit.hu>
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00024 #ifndef LIBMONGO_SYNC_GRIDFS_CHUNK_H
00025 #define LIBMONGO_SYNC_GRIDFS_CHUNK_H 1
00026 
00027 #include <sync-gridfs.h>
00028 #include <glib.h>
00029 
00030 G_BEGIN_DECLS
00031 
00047 typedef struct _mongo_sync_gridfs_chunked_file mongo_sync_gridfs_chunked_file;
00048 
00061 mongo_sync_gridfs_chunked_file *mongo_sync_gridfs_chunked_find (mongo_sync_gridfs *gfs,
00062                                                                 const bson *query);
00063 
00082 mongo_sync_gridfs_chunked_file *mongo_sync_gridfs_chunked_file_new_from_buffer (mongo_sync_gridfs *gfs,
00083                                                                                 const bson *metadata,
00084                                                                                 const guint8 *data,
00085                                                                                 gint64 size);
00090 void mongo_sync_gridfs_chunked_file_free (mongo_sync_gridfs_chunked_file *gfile);
00091 
00092 /* Data access */
00093 
00108 mongo_sync_cursor *mongo_sync_gridfs_chunked_file_cursor_new (mongo_sync_gridfs_chunked_file *gfile,
00109                                                               gint start, gint num);
00110 
00125 guint8 *mongo_sync_gridfs_chunked_file_cursor_get_chunk (mongo_sync_cursor *cursor,
00126                                                          gint32 *size);
00127 
00130 G_END_DECLS
00131 
00134 #endif
 All Data Structures Files Functions Variables Enumerations Enumerator Defines