2 * Copyright (c) 2005 Zmanda, Inc. All Rights Reserved.
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 2.1 as
6 * published by the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
11 * License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17 * Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120
18 * Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
21 #ifndef __S3_DEVICE_H__
22 #define __S3_DEVICE_H__
24 #include <curl/curl.h>
25 #include <glib-object.h>
33 * Type checking and casting macros
35 #define TYPE_S3_DEVICE (s3_device_get_type())
36 #define S3_DEVICE(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), s3_device_get_type(), S3Device)
37 #define S3_DEVICE_CONST(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), s3_device_get_type(), S3Device const)
38 #define S3_DEVICE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), s3_device_get_type(), S3DeviceClass)
39 #define IS_S3_DEVICE(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), s3_device_get_type ())
41 #define S3_DEVICE_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS((obj), s3_device_get_type(), S3DeviceClass)
44 * Main object structure
46 typedef struct _S3MetadataFile S3MetadataFile;
48 #ifndef __TYPEDEF_S3_DEVICE__
49 #define __TYPEDEF_S3_DEVICE__
50 typedef struct _S3Device S3Device;
55 /* The "easy" curl handle we use to access Amazon S3 */
58 /* S3 access information */
62 /* The S3 access information. */
69 /* a cache for unsuccessful reads (where we get the file but the caller
70 * doesn't have space for it or doesn't want it), where we expect the
71 * next call will request the same file.
77 /* Produce verbose output? */
79 /* Set to FALSE once s3_device_open_device is finished. */
80 gboolean initializing;
86 typedef struct _S3DeviceClass S3DeviceClass;
87 struct _S3DeviceClass {
88 DeviceClass __parent__;
95 GType s3_device_get_type (void);
96 void s3_device_register (void);