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

Go to the source code of this file.

Classes

struct  _MapeGroupClass
 
struct  _MapeGroup
 

Macros

#define MAPE_TYPE_GROUP   (mape_group_get_type())
 
#define MAPE_GROUP(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), MAPE_TYPE_GROUP, MapeGroup))
 
#define MAPE_GROUP_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), MAPE_TYPE_GROUP, MapeGroupClass))
 
#define MAPE_IS_GROUP(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj), MAPE_TYPE_GROUP))
 
#define MAPE_IS_GROUP_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), MAPE_TYPE_GROUP))
 
#define MAPE_GROUP_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), MAPE_TYPE_GROUP, MapeGroupClass))
 

Typedefs

typedef struct _MapeGroup MapeGroup
 
typedef struct _MapeGroupClass MapeGroupClass
 
typedef enum _MapeGroupError MapeGroupError
 

Enumerations

enum  _MapeGroupError { MAPE_GROUP_ERROR_OPEN , MAPE_GROUP_ERROR_ACCESS , MAPE_GROUP_ERROR_READ }
 

Functions

GType mape_group_get_type (void) G_GNUC_CONST
 
MapeGroupmape_group_new (void)
 
gboolean mape_group_is_open (MapeGroup *group)
 
gboolean mape_group_open (MapeGroup *group, const gchar *path, GError **error)
 
MapeGroupmape_group_open_child (MapeGroup *group, const gchar *entry, GError **error)
 
void mape_group_close (MapeGroup *group)
 
const gchar * mape_group_get_name (MapeGroup *group)
 
gchar * mape_group_get_full_name (MapeGroup *group)
 
gboolean mape_group_has_entry (MapeGroup *group, const gchar *entry)
 
void mape_group_rewind (MapeGroup *group)
 
gchar * mape_group_get_next_entry (MapeGroup *group)
 
guchar * mape_group_load_entry (MapeGroup *group, const gchar *entry, gsize *size, GError **error)
 
gboolean mape_group_is_folder (MapeGroup *group)
 
gboolean mape_group_is_drive_container (MapeGroup *group)
 
gboolean mape_group_is_child_folder (MapeGroup *group, const gchar *child)
 

Class Documentation

◆ _MapeGroupClass

struct _MapeGroupClass

MapeGroupClass:

This structure does not contain any public fields.

Definition at line 53 of file group.h.

Class Members
GObjectClass parent_class

◆ _MapeGroup

struct _MapeGroup

MapeGroup:

MapeGroup is an opaque data type. You should only access it via the public API functions.

Definition at line 64 of file group.h.

Class Members
GObject parent

Macro Definition Documentation

◆ MAPE_GROUP

#define MAPE_GROUP (   obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), MAPE_TYPE_GROUP, MapeGroup))

Definition at line 24 of file group.h.

◆ MAPE_GROUP_CLASS

#define MAPE_GROUP_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), MAPE_TYPE_GROUP, MapeGroupClass))

Definition at line 25 of file group.h.

◆ MAPE_GROUP_GET_CLASS

#define MAPE_GROUP_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), MAPE_TYPE_GROUP, MapeGroupClass))

Definition at line 28 of file group.h.

◆ MAPE_IS_GROUP

#define MAPE_IS_GROUP (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE((obj), MAPE_TYPE_GROUP))

Definition at line 26 of file group.h.

◆ MAPE_IS_GROUP_CLASS

#define MAPE_IS_GROUP_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), MAPE_TYPE_GROUP))

Definition at line 27 of file group.h.

◆ MAPE_TYPE_GROUP

#define MAPE_TYPE_GROUP   (mape_group_get_type())

Definition at line 23 of file group.h.

Typedef Documentation

◆ MapeGroup

typedef struct _MapeGroup MapeGroup

Definition at line 21 of file group.h.

◆ MapeGroupClass

Definition at line 21 of file group.h.

◆ MapeGroupError

MapeGroupError: @MAPE_GROUP_ERROR_OPEN: An error occured when attempting to open the group. @MAPE_GROUP_ERROR_ACCESS: An error occurred when accessing a group element. @MAPE_GROUP_ERROR_READ: An error occured when reading from the group.

These errors are from the MAPE_GROUP_ERROR error domain. They can occur when opening, seeking or reading from a group, respectively.

Enumeration Type Documentation

◆ _MapeGroupError

MapeGroupError: @MAPE_GROUP_ERROR_OPEN: An error occured when attempting to open the group. @MAPE_GROUP_ERROR_ACCESS: An error occurred when accessing a group element. @MAPE_GROUP_ERROR_READ: An error occured when reading from the group.

These errors are from the MAPE_GROUP_ERROR error domain. They can occur when opening, seeking or reading from a group, respectively.

Enumerator
MAPE_GROUP_ERROR_OPEN 
MAPE_GROUP_ERROR_ACCESS 
MAPE_GROUP_ERROR_READ 

Definition at line 42 of file group.h.

42  {
@ MAPE_GROUP_ERROR_OPEN
Definition: group.h:43
@ MAPE_GROUP_ERROR_ACCESS
Definition: group.h:44
@ MAPE_GROUP_ERROR_READ
Definition: group.h:45
enum _MapeGroupError MapeGroupError

Function Documentation

◆ mape_group_close()

void mape_group_close ( MapeGroup group)

mape_group_close: @group: A MapeGroup.

Closes an open group. The group can be reopened afterwards.

Definition at line 355 of file group.c.

356 {
357  MapeGroupPrivate* priv;
358 
359  g_return_if_fail(MAPE_IS_GROUP(group));
360  g_return_if_fail(mape_group_is_open(group) == FALSE);
361 
362  priv = MAPE_GROUP_PRIVATE(group);
363 
364 #ifdef G_OS_WIN32
365  priv->drive = 0;
366 #endif
367 
368  if(priv->handle != NULL)
369  {
371  priv->handle = NULL;
372 
373  /* Don't notify when only drive was reset, as name and full-name are
374  * not specified for these anyway (yet). */
375  g_object_notify(G_OBJECT(group), "name");
376  g_object_notify(G_OBJECT(group), "full-name");
377  }
378 }
void c4_group_handle_free(C4GroupHandle *handle)
C4GroupHandle * handle
Definition: group.c:43
#define MAPE_GROUP_PRIVATE(obj)
Definition: group.c:63
gboolean mape_group_is_open(MapeGroup *group)
Definition: group.c:220
#define MAPE_IS_GROUP(obj)
Definition: group.h:26

References c4_group_handle_free(), _MapeGroupPrivate::handle, mape_group_is_open(), MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Here is the call graph for this function:

◆ mape_group_get_full_name()

gchar* mape_group_get_full_name ( MapeGroup group)

mape_group_get_full_name: @group: An open MapeGroup.

Returns the full path to the group.

Return Value: The group path. Free with g_free() when no longer needed.

Definition at line 407 of file group.c.

408 {
409  g_return_val_if_fail(MAPE_IS_GROUP(group), NULL);
410  g_return_val_if_fail(mape_group_is_open(group), NULL);
411 
412  return c4_group_handle_get_full_name(MAPE_GROUP_PRIVATE(group)->handle);
413 }
gchar * c4_group_handle_get_full_name(C4GroupHandle *handle)

References c4_group_handle_get_full_name(), mape_group_is_open(), MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Here is the call graph for this function:

◆ mape_group_get_name()

const gchar* mape_group_get_name ( MapeGroup group)

mape_group_get_name: @group: An open MapeGroup.

Returns the name of the group.

Return Value: The group's name. The name is owned by the group and must not be freed.

Definition at line 390 of file group.c.

391 {
392  g_return_val_if_fail(MAPE_IS_GROUP(group), NULL);
393  g_return_val_if_fail(mape_group_is_open(group), NULL);
394 
395  return c4_group_handle_get_name(MAPE_GROUP_PRIVATE(group)->handle);
396 }
const gchar * c4_group_handle_get_name(C4GroupHandle *handle)

References c4_group_handle_get_name(), mape_group_is_open(), MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Here is the call graph for this function:

◆ mape_group_get_next_entry()

gchar* mape_group_get_next_entry ( MapeGroup group)

mape_group_get_next_entry: @group: An open MapeGroup. @error: Location to store error information, if any.

Advances the group's internal iterator by one and returns the name of the entry it now points to. Use mape_group_load_entry() to load its contents into memory, or mape_group_open_child() if you expect the entry to be a subgroup. If there are no more entries in the group, the function returns NULL.

Returns: The name of the next entry, or NULL if there is no next entry.

Definition at line 496 of file group.c.

497 {
498  MapeGroupPrivate* priv;
499  gchar* buf;
500 #ifdef G_OS_WIN32
501  DWORD drv_c;
502  guint drive;
503 #endif
504 
505  g_return_val_if_fail(MAPE_IS_GROUP(group), NULL);
506  g_return_val_if_fail(mape_group_is_open(group), NULL);
507 
508  priv = MAPE_GROUP_PRIVATE(group);
509 
510 #ifdef G_OS_WIN32
511  static const guint DRV_C_SUPPORT = 26;
512  if(priv->handle == NULL)
513  {
514  drv_c = GetLogicalDrives();
515 
516  /* Find next available drive or wait for overflow */
517  drive = priv->drive - 1;
518  while( (drive < DRV_C_SUPPORT) && ((~drv_c & (1 << drive)) != 0))
519  ++drive;
520  if(drive >= DRV_C_SUPPORT) return NULL;
521 
522  buf = g_malloc(3 * sizeof(gchar));
523  buf[0] = 'A' + drive;
524  buf[1] = ':';
525  buf[2] = '\0';
526  priv->drive = drive + 2;
527 
528  return buf;
529  }
530 #endif
531 
532  buf = g_malloc(512 * sizeof(gchar));
533  if(!c4_group_handle_find_next_entry(priv->handle, "*", NULL, buf, FALSE))
534  {
535  g_free(buf);
536  buf = NULL;
537  }
538 
539  return buf;
540 }
uint32_t DWORD
gboolean c4_group_handle_find_next_entry(C4GroupHandle *handle, const gchar *wildcard, gsize *size, gchar *filename, gboolean start_at_filename)

References c4_group_handle_find_next_entry(), _MapeGroupPrivate::handle, mape_group_is_open(), MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Referenced by mape_texture_map_load_textures().

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

◆ mape_group_get_type()

GType mape_group_get_type ( void  )

◆ mape_group_has_entry()

gboolean mape_group_has_entry ( MapeGroup group,
const gchar *  entry 
)

mape_group_has_entry: @group: An open MapeGroup. @entry: The entry name to check.

Returns TRUE if @group contains an entry with the given name, and FALSE otherwise.

Definition at line 424 of file group.c.

426 {
427  MapeGroupPrivate* priv;
428 #ifdef G_OS_WIN32
429  DWORD chk_drv;
430 #endif
431 
432  g_return_val_if_fail(MAPE_IS_GROUP(group), FALSE);
433  g_return_val_if_fail(mape_group_is_open(group), FALSE);
434  g_return_val_if_fail(entry != NULL, FALSE);
435 
436  priv = MAPE_GROUP_PRIVATE(group);
437 
438 #ifdef G_OS_WIN32
439  if(priv->handle == NULL)
440  {
441  if(entry[0] == '\0') return FALSE;
442  if(entry[1] != ':') return FALSE;
443 
444  chk_drv = 1 << (entry[0] - 'A');
445  return (GetLogicalDrives() & chk_drv) != 0;
446  }
447 #endif
448 
450  return c4_group_handle_find_next_entry(priv->handle, entry,
451  NULL, NULL, FALSE);
452 }
void c4_group_handle_reset_search(C4GroupHandle *handle)

References c4_group_handle_find_next_entry(), c4_group_handle_reset_search(), _MapeGroupPrivate::handle, mape_group_is_open(), MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Here is the call graph for this function:

◆ mape_group_is_child_folder()

gboolean mape_group_is_child_folder ( MapeGroup group,
const gchar *  child 
)

Definition at line 631 of file group.c.

633 {
634  MapeGroupPrivate* priv;
635  const gchar* ext;
636  gchar* fullname;
637  gchar* filename;
638  gboolean result;
639 
640  g_return_val_if_fail(MAPE_IS_GROUP(group), FALSE);
641  g_return_val_if_fail(mape_group_is_open(group), FALSE);
642  g_return_val_if_fail(child != NULL, FALSE);
643 
644  priv = MAPE_GROUP_PRIVATE(group);
645 
646 #ifdef G_OS_WIN32
647  /* Drives are always folders */
648  if(priv->handle == NULL)
649  return TRUE;
650 #endif
651 
652  /* Guess on extension */
653  ext = strrchr(child, '.');
654  if(ext != NULL)
655  {
656  if(g_ascii_strcasecmp(ext, ".ocs") == 0 ||
657  g_ascii_strcasecmp(ext, ".ocd") == 0 ||
658  g_ascii_strcasecmp(ext, ".ocf") == 0 ||
659  g_ascii_strcasecmp(ext, ".ocg") == 0)
660  {
661  return TRUE;
662  }
663  }
664 
665  /* Otherwise assume it's not a subgroup */
667  return FALSE;
668 
669  /* It is an open directory - check for regular directory */
670  fullname = c4_group_handle_get_full_name(priv->handle);
671  filename = g_build_filename(fullname, child, NULL);
672  g_free(fullname);
673 
674  result = g_file_test(filename, G_FILE_TEST_IS_DIR);
675  g_free(filename);
676 
677  return result;
678 }
gboolean c4_group_handle_is_folder(C4GroupHandle *handle)

References c4_group_handle_get_full_name(), c4_group_handle_is_folder(), _MapeGroupPrivate::handle, mape_group_is_open(), MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Here is the call graph for this function:

◆ mape_group_is_drive_container()

gboolean mape_group_is_drive_container ( MapeGroup group)

Definition at line 603 of file group.c.

604 {
605  g_return_val_if_fail(MAPE_IS_GROUP(group), FALSE);
606  g_return_val_if_fail(mape_group_is_open(group), FALSE);
607 
608 #ifdef G_OS_WIN32
609  {
610  MapeGroupPrivate* priv = MAPE_GROUP_PRIVATE(group);
611  if(priv->handle == NULL)
612  return TRUE;
613  }
614 #endif
615 
616  return FALSE;
617 }

References _MapeGroupPrivate::handle, mape_group_is_open(), MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Here is the call graph for this function:

◆ mape_group_is_folder()

gboolean mape_group_is_folder ( MapeGroup group)

◆ mape_group_is_open()

gboolean mape_group_is_open ( MapeGroup group)

mape_group_is_open: @group: A MapeGroup.

Returns whether @group is open or not.

Returns: Whether @group is open.

Definition at line 220 of file group.c.

221 {
222  MapeGroupPrivate* priv;
223 
224  g_return_val_if_fail(MAPE_IS_GROUP(group), FALSE);
225 
226  priv = MAPE_GROUP_PRIVATE(group);
227 
228  if(priv->handle != NULL) return TRUE;
229 #ifdef G_OS_WIN32
230  if(priv->drive != 0) return TRUE;
231 #endif
232  return FALSE;
233 }

References _MapeGroupPrivate::handle, MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Referenced by mape_group_close(), mape_group_get_full_name(), mape_group_get_name(), mape_group_get_next_entry(), mape_group_has_entry(), mape_group_is_child_folder(), mape_group_is_drive_container(), mape_group_load_entry(), mape_group_open(), mape_group_open_child(), mape_group_rewind(), and mape_material_map_load().

Here is the caller graph for this function:

◆ mape_group_load_entry()

guchar* mape_group_load_entry ( MapeGroup group,
const gchar *  entry,
gsize *  size,
GError **  error 
)

mape_group_load_entry: @group: An open MapeGroup. @entry: The name of the file to open. @size: Location to store the size of the entry in, or NULL. @error: Location to store error information, if any.

Attempts to load the entry with the given name into memory. If @size is non-NULL, the size of the entry will be stored at the location @size points to. On error, NULL is returned, @error is set and @size is left untouched.

Returns: A pointer pointing to the loaded entry's contents.

Definition at line 557 of file group.c.

561 {
562  MapeGroupPrivate* priv;
563  gsize s;
564  guchar* res;
565 
566  g_return_val_if_fail(MAPE_IS_GROUP(group), NULL);
567  g_return_val_if_fail(mape_group_is_open(group), NULL);
568  g_return_val_if_fail(error == NULL || *error == NULL, NULL);
569 
570  priv = MAPE_GROUP_PRIVATE(group);
571  if(!c4_group_handle_access_entry(priv->handle, entry, &s, NULL, FALSE))
572  {
573  g_set_error(error, mape_group_error_quark, MAPE_GROUP_ERROR_ACCESS,
574  "%s", c4_group_handle_get_error(priv->handle));
575  return NULL;
576  }
577 
578  res = g_malloc(s);
579  if(!c4_group_handle_read(priv->handle, (char*)res, s))
580  {
581  g_set_error(error, mape_group_error_quark, MAPE_GROUP_ERROR_READ,
582  "%s", c4_group_handle_get_error(priv->handle));
583  g_free(res);
584  return NULL;
585  }
586 
587  if(size != NULL) *size = s;
588  return res;
589 }
#define s
const gchar * c4_group_handle_get_error(C4GroupHandle *handle)
gboolean c4_group_handle_access_entry(C4GroupHandle *handle, const gchar *wildcard, gsize *size, gchar *filename, gboolean needs_to_be_a_group)
gboolean c4_group_handle_read(C4GroupHandle *handle, gpointer buffer, gsize size)

References c4_group_handle_access_entry(), _MapeGroupPrivate::handle, mape_group_is_open(), MAPE_GROUP_PRIVATE, MAPE_IS_GROUP, and s.

Referenced by mape_texture_map_load_textures().

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

◆ mape_group_new()

MapeGroup* mape_group_new ( void  )

mape_group_new:

Creates a new group object. The group object is initially closed. Open it with mape_group_open(). To open a child group from an existing group, use mape_group_open_child() instead of this function.

Return Value: A new MapeGroup. Free with g_object_unref().

Definition at line 206 of file group.c.

207 {
208  return MAPE_GROUP(g_object_new(MAPE_TYPE_GROUP, NULL));
209 }
#define MAPE_TYPE_GROUP
Definition: group.h:23
#define MAPE_GROUP(obj)
Definition: group.h:24

References MAPE_GROUP, and MAPE_TYPE_GROUP.

Referenced by mape_group_open_child().

Here is the caller graph for this function:

◆ mape_group_open()

gboolean mape_group_open ( MapeGroup group,
const gchar *  path,
GError **  error 
)

mape_group_open: @group: A MapeGroup. @path: A path leading to a non-packed C4Group file or a directory on disk. @error: Location to store error information, if any.

@group must not be open yet. Upon success, @group has been opened and its content can be read via mape_group_get_next_entry() and mape_group_load_entry(). On error, the function returns FALSE and @error will be set.

Return Value: TRUE on success, and FALSE on error.

Definition at line 249 of file group.c.

252 {
253  MapeGroupPrivate* priv;
254 
255  g_return_val_if_fail(MAPE_IS_GROUP(group), FALSE);
256  g_return_val_if_fail(path != NULL, FALSE);
257  g_return_val_if_fail(error == NULL || *error == NULL, FALSE);
258  g_return_val_if_fail(mape_group_is_open(group) == FALSE, FALSE);
259 
260  priv = MAPE_GROUP_PRIVATE(group);
261 
262 #ifdef G_OS_WIN32
263  if(strcmp(path, "/") == 0)
264  {
265  priv->drive = 1;
266  return TRUE;
267  }
268 #endif
269 
270  priv->handle = c4_group_handle_new();
271  if(c4_group_handle_open(priv->handle, path, FALSE) == FALSE)
272  {
273  g_set_error(error, mape_group_error_quark, MAPE_GROUP_ERROR_OPEN,
274  "Could not open '%s': %s", path,
277  priv->handle = NULL;
278  return FALSE;
279  }
280 
281  g_object_notify(G_OBJECT(group), "name");
282  g_object_notify(G_OBJECT(group), "full-name");
283 
284  return TRUE;
285 }
C4GroupHandle * c4_group_handle_new(void)
gboolean c4_group_handle_open(C4GroupHandle *handle, const gchar *path, gboolean create)

References c4_group_handle_new(), c4_group_handle_open(), _MapeGroupPrivate::handle, mape_group_is_open(), MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Referenced by mape_group_open_child().

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

◆ mape_group_open_child()

MapeGroup* mape_group_open_child ( MapeGroup group,
const gchar *  entry,
GError **  error 
)

mape_group_open_child: @group: A MapeGroup. @entry: A subgroup entry in @group. @error: Location to store error information, if any.

This function attempts to open a child group which is contained in @group, named @entry. On success the new, opened group is returned. On failure, the function returns NULL and @error is set.

Returns: A new group to be freed with g_object_unref() when no longer needed, or NULL on error.

Definition at line 301 of file group.c.

304 {
305  MapeGroupPrivate* parent_priv;
306  MapeGroup* child;
307  MapeGroupPrivate* child_priv;
308  C4GroupHandle* child_handle;
309 
310  g_return_val_if_fail(MAPE_IS_GROUP(group), NULL);
311  g_return_val_if_fail(entry != NULL, NULL);
312  g_return_val_if_fail(error == NULL || *error == NULL, NULL);
313  g_return_val_if_fail(mape_group_is_open(group) == TRUE, NULL);
314 
315  parent_priv = MAPE_GROUP_PRIVATE(group);
316 #ifdef G_OS_WIN32
317  if(parent_priv->handle == NULL)
318  {
319  child = mape_group_new();
320  if(!mape_group_open(child, entry, error))
321  {
322  g_object_unref(child);
323  return NULL;
324  }
325 
326  return child;
327  }
328 #endif
329 
330  child_handle = c4_group_handle_new();
331  if(!c4_group_handle_open_as_child(child_handle, parent_priv->handle,
332  entry, FALSE, FALSE))
333  {
334  g_set_error(error, mape_group_error_quark, MAPE_GROUP_ERROR_OPEN,
335  "Could not open '%s': %s", entry,
336  c4_group_handle_get_error(child_handle));
337  c4_group_handle_free(child_handle);
338  return NULL;
339  }
340 
341  child = mape_group_new();
342  child_priv = MAPE_GROUP_PRIVATE(child);
343  child_priv->handle = child_handle;
344 
345  return child;
346 }
gboolean c4_group_handle_open_as_child(C4GroupHandle *handle, C4GroupHandle *mother, const gchar *name, gboolean exclusive, gboolean create)
typedefG_BEGIN_DECLS struct _C4GroupHandle C4GroupHandle
Definition: group-handle.h:23
MapeGroup * mape_group_new(void)
Definition: group.c:206
gboolean mape_group_open(MapeGroup *group, const gchar *path, GError **error)
Definition: group.c:249

References c4_group_handle_new(), c4_group_handle_open_as_child(), _MapeGroupPrivate::handle, mape_group_is_open(), mape_group_new(), mape_group_open(), MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Referenced by mape_mapgen_set_root_group().

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

◆ mape_group_rewind()

void mape_group_rewind ( MapeGroup group)

mape_group_rewind: @group: An open MapeGroup.

Resets the group's internal iterator. The next call to mape_group_get_next_entry() will return the first entry in the group again.

Definition at line 462 of file group.c.

463 {
464  MapeGroupPrivate* priv;
465 
466  g_return_if_fail(MAPE_IS_GROUP(group));
467  g_return_if_fail(mape_group_is_open(group));
468 
469  priv = MAPE_GROUP_PRIVATE(group);
470 
471 #ifdef G_OS_WIN32
472  if(priv->handle == NULL)
473  {
474  priv->drive = 1;
475  return;
476  }
477 #endif
478 
480 }

References c4_group_handle_reset_search(), _MapeGroupPrivate::handle, mape_group_is_open(), MAPE_GROUP_PRIVATE, and MAPE_IS_GROUP.

Referenced by mape_texture_map_load_textures().

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