Changeset 5317:6b1045321fd6 in roaraudio for include


Ignore:
Timestamp:
12/01/11 19:38:56 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

updated plugin infrastructre

Location:
include/libroar
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/libroar.h

    r5031 r5317  
    123123#include "env.h" 
    124124#include "roardl.h" 
     125#include "plugincontainer.h" 
    125126#include "debug.h" 
    126127#include "memmgr.h" 
  • include/libroar/roardl.h

    r5313 r5317  
    3939#include "libroar.h" 
    4040 
    41 #define ROAR_DL_FLAG_DEFAUTS           -1 
     41#define ROAR_DL_FLAG_DEFAULTS          -1 
     42#define ROAR_DL_FLAG_NONE               0x0000 
     43#define ROAR_DL_FLAG_STATIC             0x0001 /* plugins are linked statically -lfoo */ 
    4244 
    4345#define ROAR_DL_HANDLE_DEFAULT          ((struct roar_dl_lhandle*)(void*)0) 
     
    5759#define ROAR_DL_FN_PROTO               11 
    5860#define ROAR_DL_FN_NOTIFY              12 
     61#define ROAR_DL_FN_INIT                13 /* global plugin instance init. should be avoided */ 
    5962//#define ROAR_DL_FN_               9 
    6063#define ROAR_DL_FN_MAX                 24 
     
    99102#define ROAR_DL_PLUGIN_REG(fn, funcptr) (lib.func[(fn)] = (funcptr)) 
    100103#define ROAR_DL_PLUGIN_REG_UNLOAD(func) (lib.unload = (func)) 
     104#define ROAR_DL_PLUGIN_REG_APPSCHED(sched) (lib.appsched = (sched)) 
    101105#define ROAR_DL_PLUGIN_REG_GLOBAL_DATA(ptr,init) lib.global_data_len = sizeof((init)); \ 
    102106                                                 lib.global_data_init = &(init);       \ 
     
    132136                            // which introduced the current ABI. 
    133137                            // Examples: libroar2, 0.5.1 
     138 struct roar_notify_core * notifycore; 
    134139}; 
    135140 
     
    138143 size_t   len; 
    139144 const char * name;        //Format: shortname 
    140  const char * libversion;  //Format: Product/Version <VendorID/VendorName> (comments) 
     145 const char * libname;     //This is the same as appname in struct roar_dl_librarypara. 
     146                           //Format: Product <VendorID/VendorName> (comments) 
     147 const char * libversion;  //This is the pure version number of the library. 
     148 const char * abiversion;  //This is the same as abiversion in struct roar_dl_librarypara. 
     149                           //Format: Version 
    141150 const char * description; //Free form. 
    142151 const char * contact;     //Format: first ["']nick["'] last (comment) <email>/OpenPGPkey/Phone/Room 
     
    144153 const char * license;     //Format: LicenseName-Version (options) 
    145154                           //Examples: GPL-3.0, LGPL-2.1, LGPL-3.0 (or later). 
     155}; 
     156 
     157struct roar_dl_librarydep { 
     158 int      version; 
     159 size_t   len; 
     160 const char * name; 
     161 const char * libname; 
     162 const char * abiversion; 
    146163}; 
    147164 
     
    155172 void *  global_data_init; 
    156173 void ** global_data_pointer; 
     174 struct roar_dl_librarydep * libdep; 
     175 size_t libdep_len; 
     176 struct roar_dl_appsched * appsched; 
    157177}; 
    158178 
    159179struct roar_dl_appsched { 
    160  int (*init)  (struct roar_dl_librarypara * para, struct roar_dl_libraryinst * lib); 
    161  int (*free)  (struct roar_dl_librarypara * para, struct roar_dl_libraryinst * lib); 
    162  int (*update)(struct roar_dl_librarypara * para, struct roar_dl_libraryinst * lib); 
     180 int (*init)  (struct roar_dl_librarypara * para); 
     181 int (*free)  (struct roar_dl_librarypara * para); 
     182 int (*update)(struct roar_dl_librarypara * para); 
     183}; 
     184 
     185enum roar_dl_appsched_trigger { 
     186 ROAR_DL_APPSCHED_INIT = 1, 
     187#define ROAR_DL_APPSCHED_INIT ROAR_DL_APPSCHED_INIT 
     188 ROAR_DL_APPSCHED_FREE, 
     189#define ROAR_DL_APPSCHED_FREE ROAR_DL_APPSCHED_FREE 
     190 ROAR_DL_APPSCHED_UPDATE 
     191#define ROAR_DL_APPSCHED_UPDATE ROAR_DL_APPSCHED_UPDATE 
    163192}; 
    164193 
     
    194223int                      roar_dl_context_store(struct roar_dl_lhandle * lhandle); 
    195224 
     225// appsched: 
     226int                      roar_dl_appsched_trigger(struct roar_dl_lhandle * lhandle, enum roar_dl_appsched_trigger trigger); 
     227 
    196228#endif 
    197229 
Note: See TracChangeset for help on using the changeset viewer.