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, int timestamp);
61 
63 PluginMiscData * plugin_get_misc_data (PluginHandle * plugin);
64 
65 PluginHandle * transport_plugin_for_scheme (const char * scheme);
66 PluginHandle * playlist_plugin_for_extension (const char * extension);
67 void input_plugin_for_key (int key, const char * value, PluginForEachFunc
68  func, void * data);
73 
74 /* pluginenum.c */
75 void plugin_system_init (void);
76 void plugin_system_cleanup (void);
77 Plugin * plugin_load (const char * path);
78 
79 #else
80 
82 #include <audacious/plugins-api.h>
84 
86 #include <audacious/plugins-api.h>
88 
89 #endif
90 
91 #undef AUD_API_NAME
92 #undef AUD_API_SYMBOL
93 
94 #endif
95 
96 #ifdef AUD_API_DECLARE
97 
98 #define AUD_API_NAME PluginsAPI
99 #define AUD_API_SYMBOL plugins_api
100 
101 #include "api-define-begin.h"
102 #include "plugins-api.h"
103 #include "api-define-end.h"
104 
105 #include "api-declare-begin.h"
106 #include "plugins-api.h"
107 #include "api-declare-end.h"
108 
109 #undef AUD_API_NAME
110 #undef AUD_API_SYMBOL
111 
112 #endif