libvideosite: move definition of remote_api and add default reset function
authorRalf Ertzinger <ralf@skytale.net>
Fri, 3 May 2013 19:46:03 +0000 (21:46 +0200)
committerRalf Ertzinger <ralf@skytale.net>
Fri, 3 May 2013 19:46:03 +0000 (21:46 +0200)
libvideosite.pm

index bc41e5c..426b0d2 100644 (file)
@@ -51,6 +51,24 @@ my $defaultconfig = {
 };
 
 #
 };
 
 #
+# This is a list of default values for the remote API. These
+# are used if the values are not registered by the library user.
+#
+my $remote_api = {
+    io => sub { print @_, "\n" },
+    config_init => \&_builtin_config_init,
+    config_get => \&_builtin_config_get,
+    config_set => \&_builtin_config_set,
+    config_has => \&_builtin_config_has,
+    config_save => \&_builtin_config_save,
+    config_del => \&_builtin_config_del,
+    color => sub { return '' },
+    module_path => sub { return dirname(realpath($0)) },
+    quote => sub { return $_ },
+    reset => sub {},
+};
+
+#
 # List of known commands and handlers
 #
 my $videosite_commands = {
 # List of known commands and handlers
 #
 my $videosite_commands = {
@@ -112,23 +130,6 @@ my $videosite_commands = {
 };
 
 #
 };
 
 #
-# This is a list of default values for the remote API. These
-# are used if the values are not registered by the library user.
-#
-my $remote_api = {
-    io => sub { print @_, "\n" },
-    config_init => \&_builtin_config_init,
-    config_get => \&_builtin_config_get,
-    config_set => \&_builtin_config_set,
-    config_has => \&_builtin_config_has,
-    config_save => \&_builtin_config_save,
-    config_del => \&_builtin_config_del,
-    color => sub { return '' },
-    module_path => sub { return dirname(realpath($0)) },
-    quote => sub { return $_ },
-};
-
-#
 # Output a string on the client.
 # Works like (s)printf in that it takes a format string and a list of
 # values to be replaced. Undefined values will be printed as '(undef)'
 # Output a string on the client.
 # Works like (s)printf in that it takes a format string and a list of
 # values to be replaced. Undefined values will be printed as '(undef)'