GENERIC_SERVER  0.0.0.9
A light-weight, cross-platform, pluggable, extensible and secure framework for deploying C++ plug-ins.
 All Classes Files Functions Variables Typedefs Pages
sample.h
Go to the documentation of this file.
1 /*
2  Copyright 2013 Broadcom Corporation
3 
4  This program is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License version 2.1 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Lesser General Public License for more details.
12 
13  You should have received a copy of the GNU Lesser General Public
14  License along with this library; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
30 //$Author: suraj $
31 
32 #ifndef SAMPLE_H_
33 #define SAMPLE_H_
34 #include "generic_plugin.h"
35 
36 #define PLUGIN_VERSION "1_0_0_0"
37 class sample_plugin : public generic_plugin
39 {
40 private:
41  string db_name,db_passwd;
42 public:
43  sample_plugin(void);
44  sample_plugin(char *,int);
45  int shutdown_plugin(void);
46  int plugin_init(int);
47  int server_init(void);
48  int server_shutdown(void);
49  int process_request(void *,void *,unsigned int &);
50  int init(void);
51  int init(int);
52  string get_plugin_version(void);
53  int get_plugin_params(string line);
54  sample_plugin &operator=(const sample_plugin &);
55  string bootstrap_name(void);
56  bool bootstrap_init(string);
57  bool bootstrap_terminate(string);
58  ~sample_plugin() {};
59 };
60 typedef sample_plugin SAMPLE;
61 #endif
int process_request(void *, void *, unsigned int &)
Definition: sample.cpp:169
int get_plugin_params(string line)
Definition: sample.cpp:195
string bootstrap_name(void)
Definition: sample.cpp:212
Derived from GENERIC_PLUGIN. Implements virtual functions and all plug-in specific functionality...
Definition: sample.h:38
This component provides functionality that are common across plug-ins. Framework would instantiate an...
bool bootstrap_init(string)
Definition: sample.cpp:218
bool bootstrap_terminate(string)
Definition: sample.cpp:226
int shutdown_plugin(void)
Definition: sample.cpp:110
int server_shutdown(void)
Definition: sample.cpp:150
This is the base class for all plugins. All plug-ins should derive from this class. This class has a bunch of virtual functions that all plug-in could/should implement. In addition to virtual functions, this class also provides a lot of utility functions for all plug-ins.
int plugin_init(int)
Definition: sample.cpp:79
int server_init(void)
Definition: sample.cpp:131