Index: ChangeLog
===================================================================
--- ChangeLog	(revision 5834)
+++ ChangeLog	(revision 5836)
@@ -7,4 +7,6 @@
 	* Improved CSI: Make it easier to register and access services.
 	* Allow seperation of plugin's stdvios (See: #296)
+	* Added half of the support for AppSched Triggers
+	  ABOUT, HELP and PREFERENCES.
 
 v. 1.0beta8 - Mon Dec 10 2012 12:42 CET
Index: doc/man1/roarpluginrunner.1
===================================================================
--- doc/man1/roarpluginrunner.1	(revision 5801)
+++ doc/man1/roarpluginrunner.1	(revision 5836)
@@ -79,4 +79,38 @@
 Set plugin arguments.
 
+.SH "RUNNER OPTIONS"
+
+.TP
+\fB--option-touch\fR
+Do not keep the plugin running: Do a single UPDATE cycle.
+
+.TP
+\fB--option-no-touch\fR
+Disable touch option.
+
+.TP
+\fB--option-about\fR
+Show an about dialog after startup.
+
+.TP
+\fB--option-no-about\fR
+Disable about option.
+
+.TP
+\fB--option-help\fR
+Show onlion help after startup.
+
+.TP
+\fB--option-no-help\fR
+Disable help option.
+
+.TP
+\fB--option-preferences\fR
+Show preferences dialog after startup.
+
+.TP
+\fB--option-no-preferences\fR
+Disable preferences option.
+
 .SH "CPI OPTIONS"
 
Index: include/libroar/roardl.h
===================================================================
--- include/libroar/roardl.h	(revision 5823)
+++ include/libroar/roardl.h	(revision 5836)
@@ -274,6 +274,12 @@
  ROAR_DL_APPSCHED_TICK,
 #define ROAR_DL_APPSCHED_TICK ROAR_DL_APPSCHED_TICK
- ROAR_DL_APPSCHED_WAIT
+ ROAR_DL_APPSCHED_WAIT,
 #define ROAR_DL_APPSCHED_WAIT ROAR_DL_APPSCHED_WAIT
+ ROAR_DL_APPSCHED_ABOUT,
+#define ROAR_DL_APPSCHED_ABOUT ROAR_DL_APPSCHED_ABOUT
+ ROAR_DL_APPSCHED_HELP,
+#define ROAR_DL_APPSCHED_HELP ROAR_DL_APPSCHED_HELP
+ ROAR_DL_APPSCHED_PREFERENCES
+#define ROAR_DL_APPSCHED_PREFERENCES ROAR_DL_APPSCHED_PREFERENCES
 };
 
Index: include/libroar/services.h
===================================================================
--- include/libroar/services.h	(revision 5823)
+++ include/libroar/services.h	(revision 5836)
@@ -64,4 +64,6 @@
 
 // help:
+#define ROAR_SERVICE_HELP_NAME "help"
+#define ROAR_SERVICE_HELP_ABI  "1.0beta9"
 struct roar_service_help {
  int (*show)(const struct roar_dl_libraryname * libname, const char * topic);
Index: libroar/roardl.c
===================================================================
--- libroar/roardl.c	(revision 5835)
+++ libroar/roardl.c	(revision 5836)
@@ -820,4 +820,41 @@
 }
 
+int                      roar_dl_appsched_trigger__handle_about(struct roar_dl_lhandle * lhandle) {
+ libroar_dl_service_apitype(roar_service_about) api;
+ int ret, err;
+
+ if ( roar_dl_service_get_api(NULL, ROAR_SERVICE_ABOUT_NAME, ROAR_SERVICE_ABOUT_ABI, &api) == -1 )
+  return -1;
+
+ ret = libroar_dl_service_run_func(api, show, int, roar_dl_getlibname(lhandle));
+ err = roar_error;
+
+ libroar_dl_service_free_api(api);
+
+ roar_error = err;
+ return ret;
+}
+
+int                      roar_dl_appsched_trigger__handle_help(struct roar_dl_lhandle * lhandle) {
+ libroar_dl_service_apitype(roar_service_help) api;
+ int ret, err;
+
+ if ( roar_dl_service_get_api(NULL, ROAR_SERVICE_HELP_NAME, ROAR_SERVICE_HELP_ABI, &api) == -1 )
+  return -1;
+
+ ret = libroar_dl_service_run_func(api, show, int, roar_dl_getlibname(lhandle), NULL);
+ err = roar_error;
+
+ libroar_dl_service_free_api(api);
+
+ roar_error = err;
+ return ret;
+}
+
+int                      roar_dl_appsched_trigger__handle_preferences(struct roar_dl_lhandle * lhandle) {
+ roar_err_set(ROAR_ERROR_NOSYS);
+ return -1;
+}
+
 int                      roar_dl_appsched_trigger(struct roar_dl_lhandle * lhandle, enum roar_dl_appsched_trigger trigger) {
  int (*func)  (struct roar_dl_librarypara * para) = NULL;
@@ -849,4 +886,11 @@
   _trig(tick, TICK);
   _trig(wait, WAIT);
+
+  // not yet supported by struct roar_dl_appsched.
+  case ROAR_DL_APPSCHED_ABOUT:
+  case ROAR_DL_APPSCHED_HELP:
+  case ROAR_DL_APPSCHED_PREFERENCES:
+    func = NULL;
+   break;
 // use ifndef here so warnings of unhandled enum values will be shown in DEBUG mode.
 #ifndef DEBUG
@@ -866,6 +910,19 @@
    lhandle->runtime_flags -= RTF_APPSCHED_INITED;
   }
-  roar_err_set(ROAR_ERROR_NOENT);
-  return -1;
+  switch (trigger) {
+   case ROAR_DL_APPSCHED_ABOUT:
+     return roar_dl_appsched_trigger__handle_about(lhandle);
+    break;
+   case ROAR_DL_APPSCHED_HELP:
+     return roar_dl_appsched_trigger__handle_help(lhandle);
+    break;
+   case ROAR_DL_APPSCHED_PREFERENCES:
+     return roar_dl_appsched_trigger__handle_preferences(lhandle);
+    break;
+   default:
+     roar_err_set(ROAR_ERROR_NOENT);
+     return -1;
+    break;
+  }
  }
 
Index: roarclients/roarpluginrunner.c
===================================================================
--- roarclients/roarpluginrunner.c	(revision 5823)
+++ roarclients/roarpluginrunner.c	(revision 5836)
@@ -35,4 +35,10 @@
 };
 
+#define OPTION_NONE        0x0000
+#define OPTION_TOUCH       0x0001
+#define OPTION_ABOUT       0x0100
+#define OPTION_HELP        0x0200
+#define OPTION_PREFERENCES 0x0400
+
 static struct roar_dl_librarypara * g_para  = NULL;
 static struct roar_scheduler      * g_sched = NULL;
@@ -56,4 +62,17 @@
         );
 
+ fprintf(stderr, "\nRunner Options:\n\n");
+ fprintf(stderr, "    --option-touch       - Do not keep the plugin running:"
+                 "                           Do a single UPDATE cycle.\n"
+                 "    --option-no-touch    - Disable touch option.\n"
+                 "    --option-about       - Show an about dialog after startup.\n"
+                 "    --option-no-about    - Disable about option.\n"
+                 "    --option-help        - Show onlion help after startup.\n"
+                 "    --option-no-help     - Disable help option.\n"
+                 "    --option-preferences - Show preferences dialog after startup.\n"
+                 "    --option-no-preferences\n"
+                 "                         - Disable preferences option.\n"
+        );
+
  fprintf(stderr, "\nCPI Options:\n\n");
  fprintf(stderr, " -t --tcp                - Use TCP listen socket\n"
@@ -69,5 +88,5 @@
 }
 
-static int do_run(const char * name) {
+static int do_run(const char * name, int options) {
  struct roar_scheduler_source s_container;
  struct roar_plugincontainer * cont = roar_plugincontainer_new(g_para);
@@ -92,5 +111,25 @@
  roar_plugincontainer_appsched_trigger(cont, ROAR_DL_APPSCHED_INIT);
 
- roar_scheduler_run(g_sched);
+ if ( options & OPTION_ABOUT ) {
+  if ( roar_plugincontainer_appsched_trigger(cont, ROAR_DL_APPSCHED_ABOUT) == -1 ) {
+   ROAR_WARN("Can not call ABOUT trigger: %s", roar_errorstring);
+  }
+ }
+
+ if ( options & OPTION_HELP ) {
+  if ( roar_plugincontainer_appsched_trigger(cont, ROAR_DL_APPSCHED_HELP) == -1 ) {
+   ROAR_WARN("Can not call HELP trigger: %s", roar_errorstring);
+  }
+ }
+
+ if ( options & OPTION_PREFERENCES ) {
+  if ( roar_plugincontainer_appsched_trigger(cont, ROAR_DL_APPSCHED_PREFERENCES) == -1 ) {
+   ROAR_WARN("Can not call PREFERENCES trigger: %s", roar_errorstring);
+  }
+ }
+
+
+ if ( !(options & OPTION_TOUCH) )
+  roar_scheduler_run(g_sched);
 
  roar_plugincontainer_appsched_trigger(cont, ROAR_DL_APPSCHED_UPDATE);
@@ -303,5 +342,5 @@
 }
 
-static int do_plugin(enum action action, const char * name) {
+static int do_plugin(enum action action, const char * name, int options) {
  switch (action) {
   case EXPLAIN:
@@ -310,5 +349,5 @@
   case RUN:
   case RUN_AS_APPLICATION:
-    return do_run(name);
+    return do_run(name, options);
    break;
   default:
@@ -558,4 +597,5 @@
  int cpi_touched = 0;
  const char * cpi_host = NULL;
+ int options = OPTION_NONE;
 
  g_sched = roar_scheduler_new(ROAR_SCHEDULER_FLAG_NONE, ROAR_SCHEDULER_STRATEGY_DEFAULT);
@@ -618,4 +658,16 @@
    }
 
+#define _option(name) \
+  } else if ( !strcasecmp(k, "--option-" #name) ) { \
+   options |= OPTION_ ## name; \
+  } else if ( !strcasecmp(k, "--option-no-" #name) ) { \
+   options |= OPTION_ ## name; \
+   options -= OPTION_ ## name;
+#define __fix_vim_syntax_highlight }
+  _option(TOUCH)
+  _option(ABOUT)
+  _option(HELP)
+  _option(PREFERENCES)
+
   } else if ( !strcmp(k, "--appname") ) {
    appname = argv[++i];
@@ -640,5 +692,5 @@
    } else {
     roar_err_set(ROAR_ERROR_NONE);
-    if ( do_plugin(action, k) == -1 ) {
+    if ( do_plugin(action, k, options) == -1 ) {
      fprintf(stderr, "Error loading plugin: %s\n",
                      roar_error != ROAR_ERROR_NONE ? roar_error2str(roar_error) : roar_dl_errstr(NULL));
