diff options
author | alcoheca <alcoheca@svn> | 2010-03-28 15:22:32 +0000 |
---|---|---|
committer | alcoheca <alcoheca@svn> | 2010-03-28 15:22:32 +0000 |
commit | 54b8a22d1972765e8b65b39fcd7a29c7b1760def (patch) | |
tree | d566b516b5ae3f4c5186c1765d19e4d21fbcddbb /lib/cpluff/libcpluff | |
parent | 06da69d046857293fd6b2e43c7aee3d9f863e16e (diff) |
Revert "changed: modified cpluff to externally describe plugins as addons"
Best not to modify the cpluff handling, summaries can easily be managed
with a property of the extension schema
This reverts commit 2f8a0de76188a8a3f48b9fa640438affd4395a79.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@28911 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'lib/cpluff/libcpluff')
-rw-r--r-- | lib/cpluff/libcpluff/cpluff.h | 7 | ||||
-rw-r--r-- | lib/cpluff/libcpluff/pcontrol.c | 1 | ||||
-rw-r--r-- | lib/cpluff/libcpluff/ploader.c | 18 |
3 files changed, 7 insertions, 19 deletions
diff --git a/lib/cpluff/libcpluff/cpluff.h b/lib/cpluff/libcpluff/cpluff.h index 27ee7162de..0f9797d37a 100644 --- a/lib/cpluff/libcpluff/cpluff.h +++ b/lib/cpluff/libcpluff/cpluff.h @@ -405,13 +405,6 @@ struct cp_plugin_info_t { char *identifier; /** - * A mandatory summary of the addon's features. - * This corresponds to the @a summary attribute of the @a plugin element in - * a plug-in descriptor. - */ - char *summary; - - /** * An optional plug-in name. NULL if not available. The plug-in name is * intended only for display purposes and the value can be localized. * This corresponds to the @a name attribute of the @a plugin element in diff --git a/lib/cpluff/libcpluff/pcontrol.c b/lib/cpluff/libcpluff/pcontrol.c index c5a3310a0d..83a24cbf2c 100644 --- a/lib/cpluff/libcpluff/pcontrol.c +++ b/lib/cpluff/libcpluff/pcontrol.c @@ -1109,7 +1109,6 @@ CP_HIDDEN void cpi_free_plugin(cp_plugin_info_t *plugin) { assert(plugin != NULL); free(plugin->name); - free(plugin->summary); free(plugin->identifier); free(plugin->version); free(plugin->provider_name); diff --git a/lib/cpluff/libcpluff/ploader.c b/lib/cpluff/libcpluff/ploader.c index d6ea187d99..648c2bb326 100644 --- a/lib/cpluff/libcpluff/ploader.c +++ b/lib/cpluff/libcpluff/ploader.c @@ -57,7 +57,7 @@ #define CP_CFG_ELEMENT_VALUE_INITSIZE 64 /// Plugin descriptor name -#define CP_PLUGIN_DESCRIPTOR "addon.xml" +#define CP_PLUGIN_DESCRIPTOR "plugin.xml" /* ------------------------------------------------------------------------ @@ -514,13 +514,13 @@ static void CP_XMLCALL character_data_handler( */ static void CP_XMLCALL start_element_handler( void *userData, const XML_Char *name, const XML_Char **atts) { - static const XML_Char * const req_plugin_atts[] = { "id", "summary", "version", NULL }; - static const XML_Char * const opt_plugin_atts[] = { "name", "provider-name", NULL }; + static const XML_Char * const req_plugin_atts[] = { "id", NULL }; + static const XML_Char * const opt_plugin_atts[] = { "name", "version", "provider-name", NULL }; static const XML_Char * const req_bwcompatibility_atts[] = { NULL }; static const XML_Char * const opt_bwcompatibility_atts[] = { "abi", "api", NULL }; static const XML_Char * const req_cpluff_atts[] = { "version", NULL }; static const XML_Char * const opt_cpluff_atts[] = { NULL }; - static const XML_Char * const req_import_atts[] = { "addon", NULL }; + static const XML_Char * const req_import_atts[] = { "plugin", NULL }; static const XML_Char * const opt_import_atts[] = { "version", "optional", NULL }; static const XML_Char * const req_runtime_atts[] = { "library", NULL }; static const XML_Char * const opt_runtime_atts[] = { "funcs", NULL }; @@ -535,7 +535,7 @@ static void CP_XMLCALL start_element_handler( switch (plcontext->state) { case PARSER_BEGIN: - if (!strcmp(name, "addon")) { + if (!strcmp(name, "plugin")) { plcontext->state = PARSER_PLUGIN; if (!check_attributes(plcontext, name, atts, req_plugin_atts, opt_plugin_atts)) { @@ -548,9 +548,6 @@ static void CP_XMLCALL start_element_handler( } else if (!strcmp(atts[i], "id")) { plcontext->plugin->identifier = parser_strdup(plcontext, atts[i+1]); - } else if (!strcmp(atts[i], "summary")) { - plcontext->plugin->summary - = parser_strdup(plcontext, atts[i+1]); } else if (!strcmp(atts[i], "version")) { plcontext->plugin->version = parser_strdup(plcontext, atts[i+1]); @@ -748,7 +745,7 @@ static void CP_XMLCALL start_element_handler( import->plugin_id = NULL; import->version = NULL; for (i = 0; atts[i] != NULL; i += 2) { - if (!strcmp(atts[i], "addon")) { + if (!strcmp(atts[i], "plugin")) { import->plugin_id = parser_strdup(plcontext, atts[i+1]); } else if (!strcmp(atts[i], "version")) { @@ -831,7 +828,7 @@ static void CP_XMLCALL end_element_handler( switch (plcontext->state) { case PARSER_PLUGIN: - if (!strcmp(name, "addon")) { + if (!strcmp(name, "plugin")) { // Readjust memory allocated for extension points, if necessary if (plcontext->ext_points_size != plcontext->plugin->num_ext_points) { @@ -1046,7 +1043,6 @@ CP_C_API cp_plugin_info_t * cp_load_plugin_descriptor(cp_context_t *context, con plcontext->state = PARSER_BEGIN; memset(plcontext->plugin, 0, sizeof(cp_plugin_info_t)); plcontext->plugin->name = NULL; - plcontext->plugin->summary = NULL; plcontext->plugin->identifier = NULL; plcontext->plugin->version = NULL; plcontext->plugin->provider_name = NULL; |