X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=userapps%2Fopensource%2Fnet-snmp%2Finclude%2Fnet-snmp%2Flibrary%2Ffactory.h;fp=userapps%2Fopensource%2Fnet-snmp%2Finclude%2Fnet-snmp%2Flibrary%2Ffactory.h;h=0000000000000000000000000000000000000000;hb=cf3b25a5003e531e4599b2a56fa007f272198570;hp=e6cd3e2cfb5ee5e951f5c377ec125d62b988428b;hpb=59e02c1be2c9b373846b0789fbd5b7ef46f0927f;p=bcm963xx.git diff --git a/userapps/opensource/net-snmp/include/net-snmp/library/factory.h b/userapps/opensource/net-snmp/include/net-snmp/library/factory.h deleted file mode 100755 index e6cd3e2c..00000000 --- a/userapps/opensource/net-snmp/include/net-snmp/library/factory.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef NETSNMP_FACTORY_H -#define NETSNMP_FACTORY_H - - -#ifdef __cplusplus -extern "C" { -#endif - - typedef void * (netsnmp_factory_produce_f)(void); - typedef int (netsnmp_factory_produce_noalloc_f)(void *); - - typedef struct netsnmp_factory_s { - /* - * a string describing the product the factory creates - */ - const char *product; - - /* - * a function to create an object in newly allcoated memory - */ - netsnmp_factory_produce_f *produce; - - /* - * a function to create an object in previously allcoated memory - */ - netsnmp_factory_produce_noalloc_f *produce_noalloc; - - } netsnmp_factory; - - /* - * init factory registry - */ - void netsnmp_factory_init(void); - - /* - * register a factory type - */ - int netsnmp_factory_register(netsnmp_factory *f); - - /* - * get a factory - */ - netsnmp_factory* netsnmp_factory_get(const char* product); - - /* - * ask a factory to produce an object - */ - void * netsnmp_factory_produce(const char* product); - - /* - * ask a factory to produce an object in the provided memory - */ - int netsnmp_factory_produce_noalloc(const char *product, void *memory); - - /* - * factory return codes - */ - enum { - FACTORY_NOERROR = 0, - FACTORY_EXISTS, - FACTORY_NOTFOUND, - FACTORY_NOMEMORY, - FACTORY_GENERR, - FACTORY_MAXIMUM_ERROR - }; - -#ifdef __cplusplus -}; -#endif - - -#endif /* NETSNMP_FACTORY_H */