[Xfce4-commits] <squeeze:master> Cleanup support-template files
Stephan Arts
noreply at xfce.org
Mon Oct 3 00:16:01 CEST 2011
Updating branch refs/heads/master
to 3120ecf68a1953f8a34dfd539fcebedbd4ab5230 (commit)
from 535bf84577de0e2125cc2a6caf2560507232c08c (commit)
commit 3120ecf68a1953f8a34dfd539fcebedbd4ab5230
Author: Stephan Arts <stephan at xfce.org>
Date: Mon Oct 3 00:15:23 2011 +0200
Cleanup support-template files
libsqueeze/support-template.c | 48 ++++++++++++++++++---------
libsqueeze/support-template.h | 73 ++++++++++++++++++++++-------------------
2 files changed, 71 insertions(+), 50 deletions(-)
diff --git a/libsqueeze/support-template.c b/libsqueeze/support-template.c
index 2257d6c..e3116cb 100644
--- a/libsqueeze/support-template.c
+++ b/libsqueeze/support-template.c
@@ -29,42 +29,58 @@
#include "support-template.h"
GType
-lsq_support_template_get_property_type(LSQSupportTemplate *templ, guint nr)
+lsq_support_template_get_property_type (
+ LSQSupportTemplate *templ,
+ guint nr)
{
- g_return_val_if_fail(templ->parser, G_TYPE_NONE);
+ g_return_val_if_fail(templ->parser, G_TYPE_NONE);
+
return lsq_parser_get_property_type(templ->parser, nr);
}
guint
-lsq_support_template_get_property_offset(LSQSupportTemplate *templ, guint nr)
+lsq_support_template_get_property_offset (
+ LSQSupportTemplate *templ,
+ guint nr )
{
- g_return_val_if_fail(templ->parser, 0);
- return lsq_parser_get_property_offset(templ->parser, nr);
+ g_return_val_if_fail(templ->parser, 0);
+
+ return lsq_parser_get_property_offset(templ->parser, nr);
}
const gchar *
-lsq_support_template_get_property_name(LSQSupportTemplate *templ, guint nr)
+lsq_support_template_get_property_name (
+ LSQSupportTemplate *templ,
+ guint nr )
{
g_return_val_if_fail(nr < templ->n_properties, NULL);
+
return templ->property_names[nr];
}
guint
-lsq_support_template_get_n_properties (LSQSupportTemplate *templ)
+lsq_support_template_get_n_properties (
+ LSQSupportTemplate *templ )
{
- guint n_props;
+ guint n_props;
+
#ifdef DEBUG
- g_return_val_if_fail(templ, 0);
+ g_return_val_if_fail(templ, 0);
#endif
- n_props = lsq_parser_n_properties(templ->parser);
- if(templ->n_properties > n_props)
- n_props = templ->n_properties;
- return n_props;
+
+ n_props = lsq_parser_n_properties ( templ->parser );
+
+ if ( templ->n_properties > n_props )
+ {
+ n_props = templ->n_properties;
+ }
+ return n_props;
}
guint
-lsq_support_template_get_properties_size(LSQSupportTemplate *templ)
+lsq_support_template_get_properties_size (
+ LSQSupportTemplate *templ )
{
- g_return_val_if_fail(templ->parser, 0);
- return lsq_parser_get_properties_size(templ->parser);
+ g_return_val_if_fail ( templ->parser, 0 );
+ return lsq_parser_get_properties_size ( templ->parser );
}
diff --git a/libsqueeze/support-template.h b/libsqueeze/support-template.h
index 4b479fc..d9c18e9 100644
--- a/libsqueeze/support-template.h
+++ b/libsqueeze/support-template.h
@@ -19,62 +19,67 @@
typedef enum
{
- LSQ_SUPPORT_FILES = 1 << 0x0,
- LSQ_SUPPORT_FOLDERS = 1 << 0x1,
- LSQ_SUPPORT_MANY = 1 << 0x2
+ LSQ_SUPPORT_FILES = 1 << 0x0,
+ LSQ_SUPPORT_FOLDERS = 1 << 0x1,
+ LSQ_SUPPORT_MANY = 1 << 0x2
} LSQSupportType;
typedef enum
{
- LSQ_COMMAND_TYPE_ADD,
- LSQ_COMMAND_TYPE_REMOVE,
- LSQ_COMMAND_TYPE_EXTRACT,
- LSQ_COMMAND_TYPE_REFRESH,
- LSQ_COMMAND_TYPE_OPEN,
- LSQ_COMMAND_TYPE_TEST
+ LSQ_COMMAND_TYPE_ADD,
+ LSQ_COMMAND_TYPE_REMOVE,
+ LSQ_COMMAND_TYPE_EXTRACT,
+ LSQ_COMMAND_TYPE_REFRESH,
+ LSQ_COMMAND_TYPE_OPEN,
+ LSQ_COMMAND_TYPE_TEST
} LSQCommandType;
-#ifndef LSQParser
typedef struct _LSQParser LSQParser;
-#endif
-#ifndef LSQCommandQueue
+
typedef struct _LSQCommandQueue LSQCommandQueue;
-#endif
typedef struct _LSQSupportTemplate LSQSupportTemplate;
struct _LSQSupportTemplate
{
- const gchar *id;
- gchar **required_apps;
- gboolean supported;
- gchar *content_type;
+ const gchar *id;
+ gchar **required_apps;
+ gboolean supported;
+ gchar *content_type;
- guint n_properties;
- gchar **property_names;
- LSQParser *parser;
+ guint n_properties;
+ gchar **property_names;
+ LSQParser *parser;
- LSQCommandQueue *new_cmd_queue;
- LSQCommandQueue *add_cmd_queue;
- LSQCommandOption **add_options;
- LSQCommandQueue *remove_cmd_queue;
- LSQCommandOption **remove_options;
- LSQCommandQueue *extract_cmd_queue;
- LSQCommandOption **extract_options;
- LSQCommandQueue *refresh_cmd_queue;
- LSQSupportType support_mask;
+ LSQCommandQueue *new_cmd_queue;
+ LSQCommandQueue *add_cmd_queue;
+ LSQCommandOption **add_options;
+ LSQCommandQueue *remove_cmd_queue;
+ LSQCommandOption **remove_options;
+ LSQCommandQueue *extract_cmd_queue;
+ LSQCommandOption **extract_options;
+ LSQCommandQueue *refresh_cmd_queue;
+ LSQSupportType support_mask;
};
GType
-lsq_support_template_get_property_type(LSQSupportTemplate *s_template, guint n);
+lsq_support_template_get_property_type (
+ LSQSupportTemplate *s_template,
+ guint n);
guint
-lsq_support_template_get_property_offset(LSQSupportTemplate *s_template, guint n);
+lsq_support_template_get_property_offset (
+ LSQSupportTemplate *s_template,
+ guint n);
const gchar *
-lsq_support_template_get_property_name(LSQSupportTemplate *s_template, guint n);
+lsq_support_template_get_property_name (
+ LSQSupportTemplate *s_template,
+ guint n );
guint
-lsq_support_template_get_n_properties (LSQSupportTemplate *s_template);
+lsq_support_template_get_n_properties (
+ LSQSupportTemplate *s_template );
guint
-lsq_support_template_get_properties_size (LSQSupportTemplate *s_template);
+lsq_support_template_get_properties_size (
+ LSQSupportTemplate *s_template );
#endif /* __SUPPORT_TEMPLATE_H__ */
More information about the Xfce4-commits
mailing list