2002-10-17 09:53:50 +04:00
|
|
|
#ifdef _buildsym
|
|
|
|
// This section is included by each module to rename all of its symbols,
|
|
|
|
// in order to avoid duplicate symbols in different modules. From the
|
|
|
|
// libtool docs: "Although some platforms support having the same symbols
|
|
|
|
// defined more than once it is generally not portable."
|
|
|
|
|
|
|
|
#define module_init _buildsym(module_init)
|
|
|
|
#define operate _buildsym(operate)
|
2002-10-16 19:04:44 +04:00
|
|
|
extern "C" {
|
2002-10-17 09:53:50 +04:00
|
|
|
// the extern "C" prevents C++ name mangling
|
2002-10-16 19:04:44 +04:00
|
|
|
class DeviceInterface * module_init ();
|
2002-10-17 09:53:50 +04:00
|
|
|
int operate (int a, int b);
|
2002-10-16 19:04:44 +04:00
|
|
|
};
|
2002-10-17 09:53:50 +04:00
|
|
|
#endif
|
2002-10-16 19:04:44 +04:00
|
|
|
|
|
|
|
typedef class DeviceInterface* (*modload_func)(void);
|
|
|
|
|
|
|
|
class DeviceInterface {
|
|
|
|
public:
|
|
|
|
virtual const char* getName () = 0;
|
|
|
|
virtual const char* getFeatures () = 0;
|
|
|
|
virtual void print(FILE *) = 0;
|
|
|
|
};
|