From: Olaf Wintermann Date: Tue, 20 May 2025 18:26:51 +0000 (+0200) Subject: add resource object ptr to notebook type X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=a89e4b27680fa0941b209054e8687241033a1dce;p=note.git add resource object ptr to notebook type --- diff --git a/application/types.c b/application/types.c index c3f39d9..34fcf19 100644 --- a/application/types.c +++ b/application/types.c @@ -76,6 +76,7 @@ void register_types() { dbuClassAdd(notebook_class, Notebook, repository_id); dbuClassAdd(notebook_class, Notebook, type); dbuClassAdd(notebook_class, Notebook, position); + dbuClassAddObj(notebook_class, "resource_id", offsetof(Notebook, resource), resource_class); repository_class = dbuRegisterClass(ctx, "repositories", Repository, repository_id); dbuClassAdd(repository_class, Repository, name); diff --git a/application/types.h b/application/types.h index 993dbdf..c83f6d0 100644 --- a/application/types.h +++ b/application/types.h @@ -107,6 +107,8 @@ struct Notebook { int64_t repository_id; int type; int position; + + Resource *resource; }; struct Note {