Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
plugins.h
Go to the documentation of this file.
1 /*
2  * plugins.h
3  * Copyright 2010 John Lindgren
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  * this list of conditions, and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright notice,
12  * this list of conditions, and the following disclaimer in the documentation
13  * provided with the distribution.
14  *
15  * This software is provided "as is" and without any warranty, express or
16  * implied. In no event shall the authors be liable for any damages arising from
17  * the use of this software.
18  */
19 
20 #ifndef AUDACIOUS_PLUGINS_H
21 #define AUDACIOUS_PLUGINS_H
22 
23 #include <audacious/api.h>
24 #include <audacious/types.h>
25 #include <libaudcore/core.h>
26 
27 typedef bool_t (* PluginForEachFunc) (PluginHandle * plugin, void * data);
28 
29 #define AUD_API_NAME PluginsAPI
30 #define AUD_API_SYMBOL plugins_api
31 
32 #ifdef _AUDACIOUS_CORE
33 
34 #include "api-local-begin.h"
35 #include "plugins-api.h"
36 #include "api-local-end.h"
37 
38 enum {
39  INPUT_KEY_SCHEME,
40  INPUT_KEY_EXTENSION,
41  INPUT_KEY_MIME,
42  INPUT_KEYS};
43 
44 typedef struct {
45  void * about_window;
46  void * config_window;
47 } PluginMiscData;
48 
49 /* plugin-init.c */
50 void start_plugins_one (void);
51 void start_plugins_two (void);
52 void stop_plugins_two (void);
53 void stop_plugins_one (void);
54 
55 /* plugin-registry.c */
56 void plugin_registry_load (void);
57 void plugin_registry_prune (void);
58 void plugin_registry_save (void);
59 
60 void plugin_register (const char * path);
61 void plugin_register_loaded (const char * path, Plugin * header);
62 
65 PluginMiscData * plugin_get_misc_data (PluginHandle * plugin);
66 
67 PluginHandle * transport_plugin_for_scheme (const char * scheme);
68 PluginHandle * playlist_plugin_for_extension (const char * extension);
69 void input_plugin_for_key (int key, const char * value, PluginForEachFunc
70  func, void * data);
75 
76 /* pluginenum.c */
77 void plugin_system_init (void);
78 void plugin_system_cleanup (void);
79 void plugin_load (const char * path);
80 
81 #else
82 
84 #include <audacious/plugins-api.h>
86 
88 #include <audacious/plugins-api.h>
90 
91 #endif
92 
93 #undef AUD_API_NAME
94 #undef AUD_API_SYMBOL
95 
96 #endif
97 
98 #ifdef AUD_API_DECLARE
99 
100 #define AUD_API_NAME PluginsAPI
101 #define AUD_API_SYMBOL plugins_api
102 
103 #include "api-define-begin.h"
104 #include "plugins-api.h"
105 #include "api-define-end.h"
106 
107 #include "api-declare-begin.h"
108 #include "plugins-api.h"
109 #include "api-declare-end.h"
110 
111 #undef AUD_API_NAME
112 #undef AUD_API_SYMBOL
113 
114 #endif