-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated mpg.pl to generate BufferFilter stubs
* Updated app.cpp to have placeholders for BufferFilter includes/instances
- Loading branch information
1 parent
6ae6b4f
commit c52cd6d
Showing
4 changed files
with
214 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#include "MyFilter.h" | ||
|
||
#include "madara/utility/Utility.h" | ||
|
||
#include "madara/logger/GlobalLogger.h" | ||
|
||
filters::MyFilter::MyFilter() | ||
{ | ||
} | ||
|
||
filters::MyFilter::~MyFilter() | ||
{ | ||
} | ||
|
||
int filters::MyFilter::encode( | ||
char* source, int size, int max_size) const | ||
{ | ||
int encoded_size = 0; | ||
|
||
return encoded_size; | ||
} | ||
|
||
int filters::MyFilter::decode( | ||
char* source, int size, int max_size) const | ||
{ | ||
int decoded_size = 0; | ||
|
||
return decoded_size; | ||
} | ||
|
||
std::string filters::MyFilter::get_id(void) | ||
{ | ||
return "MyFilter"; | ||
} | ||
|
||
/** | ||
* Gets the version of the filter. @see madara::utility::get_uint_version | ||
* for one way to get this from a string version | ||
**/ | ||
uint32_t filters::MyFilter::get_version(void) | ||
{ | ||
return madara::utility::get_uint_version("1.0.0"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
|
||
|
||
#ifndef _FILTERS_MYFILTER_H_ | ||
#define _FILTERS_MYFILTER_H_ | ||
|
||
/** | ||
* @file MyFilter.h | ||
* @author Your name <handle@youremail.com> | ||
* | ||
* This file contains a filter functor generated by gpl.pl | ||
**/ | ||
|
||
#include <string> | ||
#include "madara/filters/BufferFilter.h" | ||
|
||
namespace filters | ||
{ | ||
/** | ||
* @class MyFilter | ||
* @brief A new filter generated by gpl.pl | ||
*/ | ||
class MyFilter : public madara::filters::BufferFilter | ||
{ | ||
public: | ||
/** | ||
* Constructor | ||
**/ | ||
MyFilter(); | ||
|
||
/** | ||
* Destructor | ||
**/ | ||
virtual ~MyFilter(); | ||
|
||
/** | ||
* Encodes the buffer in place using AES encryption | ||
* @param source the source and destination buffer | ||
* @param size the amount of data in the buffer in bytes | ||
* @param max_size the amount of bytes the buffer can hold | ||
* @return the new size after encoding | ||
**/ | ||
virtual int encode(char* source, int size, int max_size) const; | ||
|
||
/** | ||
* Decodes the buffer in place using AES encryption | ||
* @param source the source and destination buffer | ||
* @param size the amount of data in the buffer in bytes | ||
* @param max_size the amount of bytes the buffer can hold | ||
* @return the new size after decoding | ||
**/ | ||
virtual int decode(char* source, int size, int max_size) const; | ||
|
||
/** | ||
* Gets the id of the filter. This is used in the serialization process | ||
* for transports and checkpoints to identify which filter is used. | ||
**/ | ||
virtual std::string get_id(void); | ||
|
||
/** | ||
* Gets the version of the filter. @see madara::utility::get_uint_version | ||
* for one way to get this from a string version | ||
**/ | ||
virtual uint32_t get_version(void); | ||
|
||
private: | ||
|
||
}; | ||
} | ||
|
||
#endif // _MADARA_FILTERS_SSL_AES_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters