]> code.citadel.org Git - citadel.git/blobdiff - webcit/subst.h
* implement ITERATE:THISROOM:GNET
[citadel.git] / webcit / subst.h
index ba27b21c3cbdcc8692c47a80e3ad9b722f85b2a5..52cd30eedd703b46bc50085227efa761b94093ca 100644 (file)
@@ -211,6 +211,14 @@ void GetTemplateTokenString(StrBuf *Target,
                            int N,
                            const char **Value, 
                            long *len);
+/**
+ * @return whether @ref GetTemplateTokenString would be able to give you a string
+ */
+int HaveTemplateTokenString(StrBuf *Target, 
+                           WCTemplputParams *TP,
+                           int N,
+                           const char **Value, 
+                           long *len);
 
 
 
@@ -294,6 +302,21 @@ void RegisterConditional(const char *Name, long len,
  */
 void RegisterTokenParamDefine(const char *Name, long len, 
                              long Value);
+/**
+ * teh r0x0r! forward your favourite define from C to the templates with one easy call!
+ */
+#define REGISTERTokenParamDefine(a) RegisterTokenParamDefine(#a, sizeof(#a) - 1, a);
+
+/**
+ * @brief retrieve the long value of a registered string define
+ * @param Name The name of the define
+ * @param len length of Name
+ * @param Value the value to return if not found
+ */
+long GetTokenDefine(const char *Name, 
+                   long len, 
+                   long DefValue);
+
 
 #define IT_NOFLAG 0
 #define IT_FLAG_DETECT_GROUPCHANGE (1<<0)