OpenClonk
group-handle.h File Reference
#include <glib.h>
Include dependency graph for group-handle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef typedefG_BEGIN_DECLS struct _C4GroupHandle C4GroupHandle
 

Functions

C4GroupHandlec4_group_handle_new (void)
 
void c4_group_handle_free (C4GroupHandle *handle)
 
const gchar * c4_group_handle_get_error (C4GroupHandle *handle)
 
gboolean c4_group_handle_open (C4GroupHandle *handle, const gchar *path, gboolean create)
 
gboolean c4_group_handle_open_as_child (C4GroupHandle *handle, C4GroupHandle *mother, const gchar *name, gboolean exclusive, gboolean create)
 
const gchar * c4_group_handle_get_name (C4GroupHandle *handle)
 
gchar * c4_group_handle_get_full_name (C4GroupHandle *handle)
 
void c4_group_handle_reset_search (C4GroupHandle *handle)
 
gboolean c4_group_handle_find_next_entry (C4GroupHandle *handle, const gchar *wildcard, gsize *size, gchar *filename, gboolean start_at_filename)
 
gboolean c4_group_handle_access_next_entry (C4GroupHandle *handle, const gchar *wildcard, gsize *size, gchar *filename, gboolean start_at_filename)
 
gboolean c4_group_handle_access_entry (C4GroupHandle *handle, const gchar *wildcard, gsize *size, gchar *filename, gboolean needs_to_be_a_group)
 
gsize c4_group_handle_accessed_entry_size (C4GroupHandle *handle)
 
gboolean c4_group_handle_read (C4GroupHandle *handle, gpointer buffer, gsize size)
 
gboolean c4_group_handle_is_folder (C4GroupHandle *handle)
 

Typedef Documentation

◆ C4GroupHandle

typedef typedefG_BEGIN_DECLS struct _C4GroupHandle C4GroupHandle

Definition at line 21 of file group-handle.h.

Function Documentation

◆ c4_group_handle_access_entry()

gboolean c4_group_handle_access_entry ( C4GroupHandle handle,
const gchar *  wildcard,
gsize *  size,
gchar *  filename,
gboolean  needs_to_be_a_group 
)

Definition at line 79 of file group-handle.cpp.

80 {
81  return HANDLE_TO_GROUP(handle)->AccessEntry(wildcard, size, filename, needs_to_be_a_group);
82 }
#define HANDLE_TO_GROUP(handle)

References HANDLE_TO_GROUP.

Referenced by mape_group_load_entry().

Here is the caller graph for this function:

◆ c4_group_handle_access_next_entry()

gboolean c4_group_handle_access_next_entry ( C4GroupHandle handle,
const gchar *  wildcard,
gsize *  size,
gchar *  filename,
gboolean  start_at_filename 
)

Definition at line 74 of file group-handle.cpp.

75 {
76  return HANDLE_TO_GROUP(handle)->AccessNextEntry(wildcard, size, filename, start_at_filename);
77 }

References HANDLE_TO_GROUP.

◆ c4_group_handle_accessed_entry_size()

gsize c4_group_handle_accessed_entry_size ( C4GroupHandle handle)

Definition at line 84 of file group-handle.cpp.

85 {
86  return HANDLE_TO_GROUP(handle)->AccessedEntrySize();
87 }

References HANDLE_TO_GROUP.

◆ c4_group_handle_find_next_entry()

gboolean c4_group_handle_find_next_entry ( C4GroupHandle handle,
const gchar *  wildcard,
gsize *  size,
gchar *  filename,
gboolean  start_at_filename 
)

Definition at line 69 of file group-handle.cpp.

70 {
71  return HANDLE_TO_GROUP(handle)->FindNextEntry(wildcard, filename, size, start_at_filename);
72 }

References HANDLE_TO_GROUP.

Referenced by mape_group_get_next_entry(), and mape_group_has_entry().

Here is the caller graph for this function:

◆ c4_group_handle_free()

void c4_group_handle_free ( C4GroupHandle handle)

Definition at line 30 of file group-handle.cpp.

31 {
32  delete HANDLE_TO_GROUP(handle);
33 }

References HANDLE_TO_GROUP.

Referenced by mape_group_close().

Here is the caller graph for this function:

◆ c4_group_handle_get_error()

const gchar* c4_group_handle_get_error ( C4GroupHandle handle)

Definition at line 35 of file group-handle.cpp.

36 {
37  return HANDLE_TO_GROUP(handle)->GetError();
38 }

References HANDLE_TO_GROUP.

◆ c4_group_handle_get_full_name()

gchar* c4_group_handle_get_full_name ( C4GroupHandle handle)

Definition at line 56 of file group-handle.cpp.

57 {
58  StdStrBuf buf(HANDLE_TO_GROUP(handle)->GetFullName());
59  gchar* res = static_cast<gchar*>(g_malloc(buf.getSize()*sizeof(gchar)));
60  memcpy(res, buf.getData(), buf.getSize());
61  return res;
62 }

References StdStrBuf::getData(), StdStrBuf::getSize(), and HANDLE_TO_GROUP.

Referenced by mape_group_get_full_name(), and mape_group_is_child_folder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ c4_group_handle_get_name()

const gchar* c4_group_handle_get_name ( C4GroupHandle handle)

Definition at line 51 of file group-handle.cpp.

52 {
53  return HANDLE_TO_GROUP(handle)->GetName();
54 }

References HANDLE_TO_GROUP.

Referenced by mape_group_get_name().

Here is the caller graph for this function:

◆ c4_group_handle_is_folder()

gboolean c4_group_handle_is_folder ( C4GroupHandle handle)

Definition at line 94 of file group-handle.cpp.

95 {
96  C4Group *group = HANDLE_TO_GROUP(handle);
97  return group->IsOpen() && !group->IsPacked();
98 }
bool IsPacked() const
Definition: C4Group.cpp:2541
bool IsOpen() const
Definition: C4Group.cpp:2373

References HANDLE_TO_GROUP, C4Group::IsOpen(), and C4Group::IsPacked().

Referenced by mape_group_is_child_folder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ c4_group_handle_new()

C4GroupHandle* c4_group_handle_new ( void  )

Definition at line 25 of file group-handle.cpp.

26 {
27  return GROUP_TO_HANDLE(new C4Group);
28 }
#define GROUP_TO_HANDLE(group)

References GROUP_TO_HANDLE.

Referenced by mape_group_open(), and mape_group_open_child().

Here is the caller graph for this function:

◆ c4_group_handle_open()

gboolean c4_group_handle_open ( C4GroupHandle handle,
const gchar *  path,
gboolean  create 
)

Definition at line 40 of file group-handle.cpp.

41 {
42  return HANDLE_TO_GROUP(handle)->Open(path, create);
43 }

References HANDLE_TO_GROUP.

Referenced by mape_group_open().

Here is the caller graph for this function:

◆ c4_group_handle_open_as_child()

gboolean c4_group_handle_open_as_child ( C4GroupHandle handle,
C4GroupHandle mother,
const gchar *  name,
gboolean  exclusive,
gboolean  create 
)

Definition at line 45 of file group-handle.cpp.

46 {
47  return HANDLE_TO_GROUP(handle)->OpenAsChild(HANDLE_TO_GROUP(mother),
48  name, exclusive, create);
49 }

References HANDLE_TO_GROUP.

Referenced by mape_group_open_child().

Here is the caller graph for this function:

◆ c4_group_handle_read()

gboolean c4_group_handle_read ( C4GroupHandle handle,
gpointer  buffer,
gsize  size 
)

Definition at line 89 of file group-handle.cpp.

90 {
91  return HANDLE_TO_GROUP(handle)->Read(buffer, size);
92 }

References HANDLE_TO_GROUP.

◆ c4_group_handle_reset_search()

void c4_group_handle_reset_search ( C4GroupHandle handle)

Definition at line 64 of file group-handle.cpp.

65 {
66  HANDLE_TO_GROUP(handle)->ResetSearch();
67 }

References HANDLE_TO_GROUP.

Referenced by mape_group_has_entry(), and mape_group_rewind().

Here is the caller graph for this function: