summaryrefslogtreecommitdiff
path: root/src/user/lib/tce/Folder.c
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-01 23:48:56 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-01 23:48:56 +0200
commit43d0bb8e3997022e5270f7f75f615a47819c929e (patch)
tree937992d286966edecf81b405e414230c85d19bad /src/user/lib/tce/Folder.c
parente9683297bf480f9590b0e5796f4520fb430e2e03 (diff)
downloadTCE-43d0bb8e3997022e5270f7f75f615a47819c929e.tar.gz
TCE-43d0bb8e3997022e5270f7f75f615a47819c929e.zip
Basic object system - THIS IS STILL A LONG WAY TO GO!!
Diffstat (limited to 'src/user/lib/tce/Folder.c')
-rw-r--r--src/user/lib/tce/Folder.c24
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);
+}