summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendlocaltest.h
blob: f603404c60f7fa459dac0e9e318e3b68a4c58733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* GIO - GLib Input, Output and Streaming Library
 *   Local testing backend wrapping error injection 
 * 
 * Copyright (C) 2006-2007 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
 * Public License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 * Author: Tomas Bzatek <tbzatek@redhat.com>
 */

#ifndef __G_VFS_BACKEND_LOCALTEST_H__
#define __G_VFS_BACKEND_LOCALTEST_H__

#include <gvfsbackend.h>
#include <gmountspec.h>

G_BEGIN_DECLS

#define G_VFS_TYPE_BACKEND_LOCALTEST         (g_vfs_backend_localtest_get_type ())
#define G_VFS_BACKEND_LOCALTEST(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_VFS_TYPE_BACKEND_LOCALTEST, GVfsBackendLocalTest))
#define G_VFS_BACKEND_LOCALTEST_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), G_VFS_TYPE_BACKEND_LOCALTEST, GVfsBackendLocalTestClass))
#define G_VFS_IS_BACKEND_LOCALTEST(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_VFS_TYPE_BACKEND_LOCALTEST))
#define G_VFS_IS_BACKEND_LOCALTEST_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), G_VFS_TYPE_BACKEND_LOCALTEST))
#define G_VFS_BACKEND_LOCALTEST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_VFS_TYPE_BACKEND_LOCALTEST, GVfsBackendLocalTestClass))

typedef struct _GVfsBackendLocalTest        GVfsBackendLocalTest;
typedef struct _GVfsBackendLocalTestClass   GVfsBackendLocalTestClass;



typedef enum {
  GVFS_JOB_UNMOUNT = 1<<0,
  GVFS_JOB_MOUNT = 1<<1,
  GVFS_JOB_OPEN_FOR_READ = 1<<2,
  GVFS_JOB_CLOSE_READ = 1<<3,
  GVFS_JOB_READ = 1<<4,
  GVFS_JOB_SEEK_ON_READ = 1<<5,
  GVFS_JOB_CREATE = 1<<6,
  GVFS_JOB_APPEND_TO = 1<<7,
  GVFS_JOB_REPLACE = 1<<8,
  GVFS_JOB_CLOSE_WRITE = 1<<9,
  GVFS_JOB_WRITE = 1<<10,
  GVFS_JOB_SEEK_ON_WRITE = 1<<11,
  GVFS_JOB_QUERY_INFO = 1<<12,
  GVFS_JOB_QUERY_FS_INFO = 1<<13,
  GVFS_JOB_ENUMERATE = 1<<14,
  GVFS_JOB_SET_DISPLAY_NAME = 1<<15,
  GVFS_JOB_DELETE = 1<<16,
  GVFS_JOB_TRASH = 1<<17,
  GVFS_JOB_MAKE_DIRECTORY = 1<<18,
  GVFS_JOB_MAKE_SYMLINK = 1<<19,
  GVFS_JOB_COPY = 1<<20,
  GVFS_JOB_MOVE = 1<<21,
  GVFS_JOB_SET_ATTRIBUTE = 1<<22,
  GVFS_JOB_CREATE_DIR_MONITOR = 1<<23,
  GVFS_JOB_CREATE_FILE_MONITOR = 1<<24,
  GVFS_JOB_QUERY_SETTABLE_ATTRIBUTES = 1<<25,
  GVFS_JOB_QUERY_WRITABLE_NAMESPACES = 1<<26,
  GVFS_JOB_TRUNCATE = 1<<27,
} GVfsJobType;



struct _GVfsBackendLocalTest
{
	  GVfsBackend parent_instance;
	  const gchar *test;
	  GMountSpec *mount_spec;
	  int errorneous;
	  GVfsJobType inject_op_types;
};

struct _GVfsBackendLocalTestClass
{
  GVfsBackendClass parent_class;
};

GType g_vfs_backend_localtest_get_type (void) G_GNUC_CONST;

G_END_DECLS

#endif /* __G_VFS_BACKEND_LOCALTEST_H__ */