diff options
Diffstat (limited to 'src/user/lib/tce/Folder.c')
-rw-r--r-- | src/user/lib/tce/Folder.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/user/lib/tce/Folder.c b/src/user/lib/tce/Folder.c new file mode 100644 index 0000000..9b0a773 --- /dev/null +++ b/src/user/lib/tce/Folder.c @@ -0,0 +1,24 @@ +#include <tce/Folder.h> +#include <stdio.h> + +static struct FolderMethods _folderMethods = { 0 }; + +struct FolderMethods *Folder_getMethods() { + int i; + if (_folderMethods.GetChildNameAt == -1) return 0; + if (_folderMethods.GetChildNameAt == 0) { + i = get_methods("Folder", (int*)&_folderMethods); + if (i < 0) { + _folderMethods.GetChildNameAt = -1; + return 0; + } + } + return &_folderMethods; +} + +int Folder_GetChildNameAt(Object object, int pos, char *to) { + struct FolderMethods *folder = Folder_getMethods(); + if (folder == 0) return E_NOT_IMPLEMENTED; + + return Call(folder->GetChildNameAt, object, pos, to, 0, 0); +} |