libmongo-client 0.1.4
src/sync-gridfs-stream.h
Go to the documentation of this file.
00001 /* sync-gridfs-stream.h - libmong-client GridFS streaming 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_STREAM_H
00025 #define LIBMONGO_SYNC_GRIDFS_STREAM_H 1
00026 
00027 #include <sync-gridfs.h>
00028 #include <glib.h>
00029 
00030 G_BEGIN_DECLS
00031 
00050 typedef struct _mongo_sync_gridfs_stream mongo_sync_gridfs_stream;
00051 
00064 mongo_sync_gridfs_stream *mongo_sync_gridfs_stream_find (mongo_sync_gridfs *gfs,
00065                                                          const bson *query);
00066 
00078 mongo_sync_gridfs_stream *mongo_sync_gridfs_stream_new (mongo_sync_gridfs *gfs,
00079                                                         const bson *metadata);
00080 
00092 gint64 mongo_sync_gridfs_stream_read (mongo_sync_gridfs_stream *stream,
00093                                       guint8 *buffer,
00094                                       gint64 size);
00095 
00104 gboolean mongo_sync_gridfs_stream_write (mongo_sync_gridfs_stream *stream,
00105                                          const guint8 *buffer,
00106                                          gint64 size);
00107 
00119 gboolean mongo_sync_gridfs_stream_seek (mongo_sync_gridfs_stream *stream,
00120                                         gint64 pos,
00121                                         gint whence);
00122 
00133 gboolean mongo_sync_gridfs_stream_close (mongo_sync_gridfs_stream *stream);
00134 
00137 G_END_DECLS
00138 
00141 #endif
 All Data Structures Files Functions Variables Enumerations Enumerator Defines