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
sample2.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 SAMPLE2_H_
33 #define SAMPLE2_H_
34 #include "generic_plugin.h"
35 
36 #define PLUGIN_VERSION "1_0_0_0"
37 #define SET_FILENAME 1
38 #define FILE_DATA 2
39 #define CLOSE_FILE 3
40 class sample2_plugin : public generic_plugin
42 {
43 private:
44  ofstream new_file;
45  string ftp_dir,fname;
46 public:
47 
48  sample2_plugin(void);
49  sample2_plugin(char *,int);
50  int shutdown_plugin(void);
51  int plugin_init(int);
52  int server_init(void);
53  int server_shutdown(void);
54  int process_request(void *,void *,unsigned int &);
55  int init(void);
56  int init(int);
57  string get_plugin_version(void);
58  int get_plugin_params(string line);
59  sample2_plugin &operator=(const sample2_plugin &);
60  ~sample2_plugin() {};
61 };
62 typedef sample2_plugin SAMPLE2;
63 #endif
int plugin_init(int)
Definition: sample2.cpp:79
int process_request(void *, void *, unsigned int &)
Definition: sample2.cpp:168
This component provides functionality that are common across plug-ins. Framework would instantiate an...
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 shutdown_plugin(void)
Definition: sample2.cpp:109
int server_init(void)
Definition: sample2.cpp:130
int get_plugin_params(string line)
Definition: sample2.cpp:227
int server_shutdown(void)
Definition: sample2.cpp:149
Derived from GENERIC_PLUGIN. Implements virtual functions and all plug-in specific functionality...
Definition: sample2.h:41