diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-02-18 03:41:05 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-02-18 03:41:05 +0100 |
| commit | b39e1a10c731fd0e61a566a0668abc33ae821b49 (patch) | |
| tree | 6e2e48b5e56a2cf4b4f966b6f2e014c446a242a1 /common/src/api.rs | |
| parent | 95606a9deed45ae285c2d4dee01de9d21a43b044 (diff) | |
| download | jellything-b39e1a10c731fd0e61a566a0668abc33ae821b49.tar jellything-b39e1a10c731fd0e61a566a0668abc33ae821b49.tar.bz2 jellything-b39e1a10c731fd0e61a566a0668abc33ae821b49.tar.zst | |
use fourcc as object tags (bad idea); store type info within objects
Diffstat (limited to 'common/src/api.rs')
| -rw-r--r-- | common/src/api.rs | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/common/src/api.rs b/common/src/api.rs index 2aac57b..13962a3 100644 --- a/common/src/api.rs +++ b/common/src/api.rs @@ -7,54 +7,54 @@ use jellyobject::{Object, Tag, enums, fields}; fields! { - QUERY_PARENT: u64 = 2000 "parent"; - QUERY_SEARCH: &str = 2001 "search"; - QUERY_KIND: Tag = 2004 "kind"; // multi - QUERY_SORT: Tag = 2002 "sort"; // one of RTYP_*, NU_RATING, NO_DURATION, NO_NAME - QUERY_SORT_ASCENDING: () = 2003 "sort_ascending"; + QUERY_PARENT: u64 = b"prnt"; + QUERY_SEARCH: &str = b"sear"; + QUERY_KIND: Tag = b"kind"; // multi + QUERY_SORT: Tag = b"sort"; // one of RTYP_*, NU_RATING, NO_DURATION, NO_NAME + QUERY_SORT_ASCENDING: () = b"sasc"; - VIEW_TITLE: &str = 2005 "title"; - VIEW_MESSAGE: Object = 2010 "message"; - VIEW_NODE_PAGE: Object = 2011 "node_page"; - VIEW_NODE_LIST: Object = 2012 "node_list"; // multi - VIEW_PLAYER: u64 = 2028 "player"; - VIEW_STATGROUP: Object = 2041 "statgroup"; - VIEW_STATTEXT: Object = 2042 "stattext"; - VIEW_ACCOUNT_LOGIN: () = 2043 "account_login"; - VIEW_ACCOUNT_LOGOUT: () = 2044 "account_logout"; - VIEW_ACCOUNT_SET_PASSWORD: &str = 2045 "account_set_password"; - VIEW_ADMIN_DASHBOARD: () = 2046 "admin_dashboard"; - VIEW_ADMIN_IMPORT: Object = 2047 "admin_import"; + VIEW_TITLE: &str = b"titl"; + VIEW_MESSAGE: Object = b"mesg"; + VIEW_NODE_PAGE: Object = b"npag"; + VIEW_NODE_LIST: Object = b"nlis"; // multi + VIEW_PLAYER: u64 = b"play"; + VIEW_STATGROUP: Object = b"stag"; + VIEW_STATTEXT: Object = b"stat"; + VIEW_ACCOUNT_LOGIN: () = b"acli"; + VIEW_ACCOUNT_LOGOUT: () = b"aclo"; + VIEW_ACCOUNT_SET_PASSWORD: &str = b"acsp"; + VIEW_ADMIN_DASHBOARD: () = b"adda"; + VIEW_ADMIN_IMPORT: Object = b"adim"; - ADMIN_IMPORT_BUSY: () = 2048 "busy"; - ADMIN_IMPORT_ERROR: &str = 2049 "error"; // multi + ADMIN_IMPORT_BUSY: () = b"busy"; + ADMIN_IMPORT_ERROR: &str = b"erro"; // multi - NKU_NODE: Object = 2025 "node"; - NKU_UDATA: Object = 2026 "udata"; - NKU_ROLE: &str = 2027 "role"; + NKU_NODE: Object = b"node"; + NKU_UDATA: Object = b"udat"; + NKU_ROLE: &str = b"role"; - NODELIST_TITLE: &str = 2007 "title"; - NODELIST_DISPLAYSTYLE: Tag = 2008 "displaystyle"; - NODELIST_ITEM: Object = 2009 "item"; + NODELIST_TITLE: &str = b"titl"; + NODELIST_DISPLAYSTYLE: Tag = b"dsty"; + NODELIST_ITEM: Object = b"item"; - MESSAGE_KIND: &str = 2029 "kind"; - MESSAGE_TEXT: &str = 2030 "text"; + MESSAGE_KIND: &str = b"kind"; + MESSAGE_TEXT: &str = b"text"; - STATGROUP_TITLE: &str = 2039 "title"; - STATGROUP_BIN: Object = 2040 "bin"; + STATGROUP_TITLE: &str = b"titl"; + STATGROUP_BIN: Object = b"bin1"; - STAT_NAME: &str = 2038 "name"; - STAT_COUNT: u64 = 2031 "count"; - STAT_TOTAL_SIZE: u64 = 2032 "total_size"; - STAT_TOTAL_DURATION: f64 = 2033 "total_duration"; - STAT_MAX_SIZE: u64 = 2036 "max_size"; - STAT_MAX_DURATION: f64 = 2037 "max_duration"; + STAT_NAME: &str = b"name"; + STAT_COUNT: u64 = b"cont"; + STAT_TOTAL_SIZE: u64 = b"tlsz"; + STAT_TOTAL_DURATION: f64 = b"tldu"; + STAT_MAX_SIZE: u64 = b"mxsz"; + STAT_MAX_DURATION: f64 = b"mxdu"; } enums! { - NLSTYLE_GRID = 1023 "grid"; - NLSTYLE_INLINE = 1024 "inline"; - NLSTYLE_LIST = 1025 "list"; + NLSTYLE_GRID = b"grid"; + NLSTYLE_INLINE = b"inli"; + NLSTYLE_LIST = b"list"; } // use crate::user::{NodeUserData, User}; |