diff options
| author | Markus Mittendrein <git@maxmitti.tk> | 2020-04-21 00:54:38 +0200 |
|---|---|---|
| committer | Markus Mittendrein <git@maxmitti.tk> | 2020-04-21 00:54:38 +0200 |
| commit | 20f8542d2730654ba7140dc59240c8d477476e77 (patch) | |
| tree | 2c48120a8882e70142fea964906e50f95d08d171 /src/cc4group.h | |
| parent | 830ee22b85f1e91c547354435af2b6a79578f7ce (diff) | |
| download | cc4group-20f8542d2730654ba7140dc59240c8d477476e77.tar.gz cc4group-20f8542d2730654ba7140dc59240c8d477476e77.zip | |
Add cc4group.getName and cc4group.getFullName
Diffstat (limited to 'src/cc4group.h')
| -rw-r--r-- | src/cc4group.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cc4group.h b/src/cc4group.h index 732aa0c..6365f82 100644 --- a/src/cc4group.h +++ b/src/cc4group.h @@ -29,7 +29,7 @@ // the directory separator used for all entry paths in cc4group is "/" _regardless of the platform_. yes, you better watch out Windows users! // in contrast to paths names are only the the name of the entry itself, not the whole path // - to free all resources used by the group when it is not needed anymore, call cc4group.delete with the group pointer and discard it afterwards (i.e. don't use it anymore) -// - all functions, except cc4group.new, cc4group.setLazy, cc4group.openAsChild, cc4group.isChild, cc4group.delete, cc4group.setWarningCallback and cc4group.setTmpMemoryStrategy (where the latter three can't fail) follow the same scheme +// - most functions follow the same scheme // all of them can fail, either caused by wrong arguments or by things outside of the applications control // they all return _true_ if everything went well and _false_ if any error occured // information about the error (incredibly useful for debugging or asking for help with problems) can be obtained by using one of the cc4group.getError* functions @@ -434,6 +434,16 @@ typedef struct { // returns wether this group has been opend with cc4group.openAsChild // NOTE: this function can't fail, thus the return value is the result value, not the success indication bool (*isChild)(const CC4Group* const this); + + + // returns the filename of the group file, if known, or directory name of the child-root entry for openAsChild groups + // might return NULL if not determinable (e.g. if not opened from file) + const char* (*getName)(const CC4Group* const this); + + // returns the full absolute path of the group file, including the path inside the real group file for openAsChild groups + // the returned value must be freed by the caller + // might return NULL if not determinable (e.g. if not opened from file) + char* (*getFullName)(const CC4Group* const this); } const CC4Group_API; |
