summaryrefslogtreecommitdiff
path: root/cmd.h
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2008-03-24 01:09:39 +0100
committerLars Hjemli <hjemli@gmail.com>2008-03-24 01:43:48 +0100
commite0e4478e7b4812f822d60a13a33525f8e529e1e8 (patch)
tree577c3927deb9b122f940b69ca7db66afe2422814 /cmd.h
parentb608e88adb6f77328288afb6dd0eddf674fc9b5b (diff)
downloadcgit-e0e4478e7b4812f822d60a13a33525f8e529e1e8.tar.gz
cgit-e0e4478e7b4812f822d60a13a33525f8e529e1e8.tar.bz2
cgit-e0e4478e7b4812f822d60a13a33525f8e529e1e8.zip
Add command dispatcher
This simplifies the code in cgit.c and makes it easier to extend cgit with new pages/commands. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cmd.h')
-rw-r--r--cmd.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd.h b/cmd.h
new file mode 100644
index 0000000..ec9e691
--- /dev/null
+++ b/cmd.h
@@ -0,0 +1,15 @@
+#ifndef CMD_H
+#define CMD_H
+
+typedef void (*cgit_cmd_fn)(struct cgit_context *ctx);
+
+struct cgit_cmd {
+ const char *name;
+ cgit_cmd_fn fn;
+ unsigned int want_repo:1,
+ want_layout:1;
+};
+
+extern struct cgit_cmd *cgit_get_cmd(struct cgit_context *ctx);
+
+#endif /* CMD_H */
ivist/prefixes.py?id=2a5bb9afb2cea4e10aae0e3187e5361869e4109c&follow=1'>Some renamingRené 'Necoro' Neumann3-4/+4 2017-03-12Upgrade to peewee-2.9.1, remove now fixed workaroundRené 'Necoro' Neumann2-15/+3 2017-03-12Split document content into its own table to avoid having to load it each tim...René 'Necoro' Neumann2-15/+22 2017-03-12Whitespace fixesRené 'Necoro' Neumann3-8/+8 2017-03-12Implement finding documents by tagsRené 'Necoro' Neumann1-0/+43 2017-03-12Make field part virtual prefixes to explicitly be int for the moment.René 'Necoro' Neumann1-1/+1 2017-03-12Fix handling of composite pks in peewee.René 'Necoro' Neumann3-2/+17 2017-03-12Misc fixesRené 'Necoro' Neumann1-3/+6 2017-03-11Upgrade to peewee-2.9 and drop our customizationsRené 'Necoro' Neumann3-120/+9 2017-03-11Remove useless requirements.txtRené 'Necoro' Neumann1-2/+0 2017-03-11A tag with a prefix implies the prefixes default tagRené 'Necoro' Neumann1-5/+13 2017-03-11Roll our own version of create_or_get, replacing the one broken/removed one f...René 'Necoro' Neumann1-0/+25 2017-03-11Minor fixesRené 'Necoro' Neumann1-3/+3 2017-03-11Remove peewee import to allow import on global levelRené 'Necoro' Neumann2-2/+6 2017-03-04Prefixes, Tags, and ImplicationsRené 'Necoro' Neumann2-12/+74 2017-03-04Allow to add implications for tagsRené 'Necoro' Neumann1-12/+30 2017-03-04FixesRené 'Necoro' Neumann1-8/+5 2017-03-04Fix Peewee Model.get() (cf. PR #1202)René 'Necoro' Neumann1-1/+25 2017-03-04Remove "builtin" and "pseudo" columns; use "virtual" insteadRené 'Necoro' Neumann3-10/+4 2017-02-27Inserting DocumentsRené 'Necoro' Neumann4-16/+91 2017-02-26Refined the EnumFieldRené 'Necoro' Neumann2-24/+34 2017-02-26Introduce enum fieldsRené 'Necoro' Neumann1-2/+31 2017-02-26Introduce the closureRené 'Necoro' Neumann2-3/+102 2017-02-26Some repr and str improvements on the modelRené 'Necoro' Neumann1-3/+25 2017-02-26Move logging to extra functionRené 'Necoro' Neumann1-5/+7 2017-02-26Include sqllite closure extension in build processRené 'Necoro' Neumann4-2/+1001 2017-02-26More tag handlingRené 'Necoro' Neumann2-3/+82 2017-02-25More prefix workRené 'Necoro' Neumann3-9/+96 2017-02-25Use Peewee instead of SQLAlchemyRené 'Necoro' Neumann5-121/+96 2016-08-16FixRené 'Necoro' Neumann1-1/+1 2016-08-16Use current setuputils flowRené 'Necoro' Neumann2-0/+17 2016-08-16Basic CLIRené 'Necoro' Neumann3-0/+33 2016-08-15Initial model and sqlalchemy setupRené 'Necoro' Neumann3-0/+104