first commit

This commit is contained in:
2019-05-31 11:26:35 -04:00
commit c403ba19f7
5075 changed files with 965209 additions and 0 deletions
+235
View File
@@ -0,0 +1,235 @@
//****************************************************************************
// Filename: XmlElements.h
// Copyright 1999 Daniel X. Pape. All rights reserved.
//
// Description: A set of classes for reading and parsing simple XML files.
//
//****************************************************************************
// Revision History:
// Thursday, July 08, 1999 - Original. Heavily based on "A Simple XML
// Parser" by Sebastien Andrivet. See Documentation.
//****************************************************************************
#ifndef _XMLELEMENTS_H_
#define _XMLELEMENTS_H_
#ifdef _MSC_VER
// Disable stupid MSVC warning about identifiers > 255 chars long
#pragma warning (disable: 4786)
#endif
// STL
#include <memory>
#include "XmlFwdDecls.h"
namespace SimpleXMLParser
{
//////////////////////////////////////////////////////////////////////
class Attribute;
class Element;
class ElementNull;
typedef std::map<std::string, std::string> Attributes;
typedef std::vector<Element*> Elements;
// ***************************************************************************
// Class: Attribute
// Desc:
// ***************************************************************************
class Attribute
{
std::string name_;
std::string value_;
public:
Attribute(const std::string& name, const std::string& value);
const std::string& GetName() const;
const std::string& GetValue() const;
};
// ***************************************************************************
// Class: Value
// Desc:
// ***************************************************************************
class Value
{
std::string value_;
public:
void Add(const std::string& text);
void Add(char c);
// Conversion operator
operator const std::string&() const;
};
// ***************************************************************************
// Class: Element
// Desc: Abstract base class for markup tags
// ***************************************************************************
class Element
{
private:
const std::string name_;
Value value_;
public:
static ElementNull& nullElem; // null element (singleton)
Element(const std::string& strName);
virtual ~Element() { }
void AddValue(const std::string& strText);
void AddValue(char c);
const std::string& GetName() const;
const Value& GetValue() const;
const Element& operator()(const char * szName, int nIndex = 0) const;
virtual bool IsNull() const;
virtual bool AddChild(Element* pChild) = 0;
virtual const Elements* GetChildren() const = 0;
virtual const Element& GetChild(const char * szName,
int nIndex = 0) const = 0;
virtual const Attributes* GetAttributes() const = 0;
virtual const std::string GetAttributeValue(const std::string&) const = 0;
};
// ***************************************************************************
// Class: ElementTag
// Desc: Element of the form <name>...</name> or <name/>. Can
// contain other elements and may have attributes
// ***************************************************************************
class ElementTag : public Element
{
public:
ElementTag(const std::string& strName);
~ElementTag();
void AddAttribute(std::string& strName, std::string& strValue);
virtual bool AddChild(Element* pChild);
virtual const Elements* GetChildren() const;
virtual const Element& GetChild(const char * szName, int nIndex = 0) const;
virtual const Attributes* GetAttributes() const;
virtual const std::string GetAttributeValue(const std::string&) const;
private:
bool FindChild(const char * szName, Elements::const_iterator& it) const;
Attributes attributes_;
Elements children_;
};
// ***************************************************************************
// Class: ElementSimple
// Desc: Element without children (like comments)
// ***************************************************************************
class ElementSimple: public Element
{
public:
ElementSimple(const std::string& strName);
virtual bool AddChild(Element* pChild);
virtual const Elements* GetChildren() const;
virtual const Element& GetChild(const char * szName, int nIndex = 0) const;
virtual const Attributes* GetAttributes() const;
virtual const std::string GetAttributeValue(const std::string&) const;
};
// ***************************************************************************
// Class: ElementComment
// Desc: Element named "!"
// ***************************************************************************
class ElementComment : public ElementSimple
{
public:
ElementComment(const std::string& strComment);
};
// ***************************************************************************
// Class: ElementNull
// Desc: Element::nullElem
// ***************************************************************************
class ElementNull : public ElementSimple
{
public:
ElementNull();
private:
virtual bool IsNull() const;
};
//////////////////////////////////////////////////////////////////////
// Attribute of a tag
//////////////////////////////////////////////////////////////////////
inline const std::string& Attribute::GetName() const
{
return(name_);
}
inline const std::string& Attribute::GetValue() const
{
return(value_);
}
//////////////////////////////////////////////////////////////////////
// Element
//////////////////////////////////////////////////////////////////////
inline const std::string& Element::GetName() const
{
return(name_);
}
inline const Value& Element::GetValue() const
{
return(value_);
}
inline void Element::AddValue(const std::string& strText)
{
value_.Add(strText);
}
inline void Element::AddValue(char c)
{
value_.Add(c);
}
inline const Element&
Element::operator()(const char * szName, int nIndex) const
{
return(GetChild(szName, nIndex));
}
inline void
ElementTag::AddAttribute(std::string& strName, std::string& strValue)
{
attributes_[strName] = strValue;
}
}
#endif
+33
View File
@@ -0,0 +1,33 @@
//****************************************************************************
// Filename: XmlFwdDecls.h
// Copyright 1999 Daniel X. Pape. All rights reserved.
//
// Description: Just some forward declarations for external classes to
// include.
//
//****************************************************************************
// Revision History:
// Tuesday, September 28, 1999 - Original
//****************************************************************************
#ifndef _XMLFWDDECLS_H_
#define _XMLFWDDECLS_H_
#include <vector>
#include <map>
#include <string>
namespace SimpleXMLParser
{
class Attribute;
class Element;
class ElementNull;
typedef std::map<std::string, std::string> Attributes;
typedef std::vector<Element*> Elements;
}
#endif
+282
View File
@@ -0,0 +1,282 @@
//****************************************************************************
// Filename: XmlParser.h
// Copyright 1999 Daniel X. Pape. All rights reserved.
//
// Description: A set of classes for reading and parsing simple XML files.
//
//****************************************************************************
// Revision History:
// Thursday, July 08, 1999 - Original. Heavily based on "A Simple XML
// Parser" by Sebastien Andrivet. See Documentation.
//****************************************************************************
#ifndef _XMLPARSER_H_
#define _XMLPARSER_H_
#ifdef _MSC_VER
// Disable stupid MSVC warning about identifiers > 255 chars long
#pragma warning (disable: 4786)
#endif
// STL
#include <memory>
#include <vector>
#include <map>
#include <string>
#include "XmlElements.h"
namespace SimpleXMLParser
{
// ***************************************************************************
// Class: XmlException
// Desc: parsing error
// ***************************************************************************
class XmlException
{
public:
XmlException(int line, int column);
int GetLine() const;
int GetColumn() const;
private:
int line_;
int column_;
};
// ***************************************************************************
// Class: XmlParser
// Desc:
// ***************************************************************************
class XmlParser
{
public:
XmlParser();
Element& Parse(const char * szSource, int nSourceSize);
private:
XmlParser(const XmlParser&);
XmlParser& operator=(const XmlParser&);
// ***********************************************************************
// Class: Bookmark
// Desc: record the current position in the document
// ***********************************************************************
class Bookmark
{
private:
Bookmark(const Bookmark&);
Bookmark& operator=(const Bookmark&);
XmlParser& parser_; // XmlParser
const char* sourceCurrent_; // Position recorded
int line_; // Line recorded
int column_; // Column recorded
public:
Bookmark(XmlParser& reader);
// Change back the position
void Restore();
// Get the sub-string between the current and
// the recorded positions
void GetSubString(std::string& strString, int nNumEndSkip = 0);
// Record the current position
void Reset();
};
friend class Bookmark;
const char* source_; // XML document
const char* sourceCurrent_; // Current position
const char* sourceEnd_; // End of the document
int line_; // Current line
int column_; // Current column
std::string xmlVersion_; // Version of XML used in doc.
std::auto_ptr<Element> rootElem_; // Root element
// parsing
char NextChar();
void PreviousChar();
// All of these following member functions can throw exceptions
bool ParseSpaces();
bool ParseString(const char* pString);
bool ParseStringNoCase(const char* pString);
bool ParseNumber(int& nNum);
bool ParseHexNumber(int& nNum);
bool ParseChar(char c);
bool ParseName(std::string& strName);
bool ParseDeclBegining(const char * szString);
bool ParseXMLDecl();
bool ParseEq();
bool ParseVersionInfo(std::string& strVersion);
bool ParseVersionNum(std::string& strVersion);
bool ParseEncodingDecl();
bool ParseEncName();
void ParseMiscs();
bool ParseReference(char& c);
bool ParseAttValue(std::string& strValue);
bool ParseAttribute(ElementTag* pElem);
bool ParseETag(Element& element);
void ParseContentETag(ElementTag& element);
bool ParseMarkup(Element& element);
bool ParseCDATA(Element& element);
ElementComment* ParseComment();
ElementTag* ParseTagBegining();
ElementTag* ParseElement();
Element* ParseDocument();
bool MapReferenceName(const std::string& strName, char& c);
void SyntaxError();
};
inline XmlException::XmlException(int line, int column)
: line_(line), column_(column)
{
}
inline int XmlException::GetLine() const
{
return(line_);
}
inline int XmlException::GetColumn() const
{
return(column_);
}
inline XmlParser::Bookmark::Bookmark(XmlParser& reader)
: parser_(reader), sourceCurrent_(reader.sourceCurrent_),
line_(0), column_(0)
{
}
// ***************************************************************************
// Function: Restore
// Desc: Change back the position
// ***************************************************************************
inline void XmlParser::Bookmark::Restore()
{
parser_.sourceCurrent_ = sourceCurrent_;
}
// ***************************************************************************
// Function: GetSubString
// Desc: Get the sub-string between the current and the recorded positions
// ***************************************************************************
inline void XmlParser::Bookmark::GetSubString(std::string& strString, int nNumEndSkip)
{
// ASSERT(parser_.sourceCurrent_ + nNumEndSkip >= sourceCurrent_);
strString = std::string(sourceCurrent_, parser_.sourceCurrent_ -
sourceCurrent_ - nNumEndSkip);
}
inline void XmlParser::Bookmark::Reset()
{
sourceCurrent_ = parser_.sourceCurrent_;
}
// ***************************************************************************
// Function: IsSpace
// Desc: Space, tabulation, line feed or return
// ***************************************************************************
inline bool IsSpace(char c)
{
return(c == ' ' || c == '\t' || c == '\r' || c == '\n');
}
// ***************************************************************************
// Function: IsAlpha
// Desc: [a-zA-Z]
// ***************************************************************************
inline bool IsAlpha(char c)
{
return((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
}
// ***************************************************************************
// Function: IsDigit
// Desc: [0-9]
// ***************************************************************************
inline bool IsDigit(char c)
{
return(c >= '0' && c <= '9');
}
// ***************************************************************************
// Function: IsHexDigit
// Desc: [0-9a-fA-F]
// ***************************************************************************
inline bool IsHexDigit(char c)
{
return(IsDigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'));
}
// ***************************************************************************
// Function: HexDigitValue
// Desc: [0-9a-fA-F]
// ***************************************************************************
inline int HexDigitValue(char c)
{
return((c >= '0' && c <= '9') ? c - '0'
: ((c >= 'a' && c <= 'f') ? c - 'a' + 10
: c - 'A' + 10));
}
// ***************************************************************************
// Function: IsAlphaDigit
// Desc: [a-zA-Z0-9]
// ***************************************************************************
inline bool IsAlphaDigit(char c)
{
return(IsAlpha(c) || IsDigit(c));
}
// ***************************************************************************
// Function: IsAlphaDigitEx
// Desc: [a-zA-Z0-9_.:] | '-'
// ***************************************************************************
inline bool IsAlphaDigitEx(char c)
{
return(IsAlphaDigit(c) || c == '_' || c == '.' || c == ':' || c == '-');
}
// ***************************************************************************
// Function: LowCase
// Desc:
// ***************************************************************************
inline char LowCase(char c)
{
return(c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c);
}
// ***************************************************************************
// Function: IsXmlChar
// Desc:
// ***************************************************************************
inline bool IsXmlChar(char c)
{
return(c == 0x9 || c == 0xa || c == 0xd || c >= 0x20);
}
}
#endif
+41
View File
@@ -0,0 +1,41 @@
#ifndef __mx_account_h__
#define __mx_account_h__
#include "vars.h"
long account_calls(CVars in, CVars &out);
long LoginWrenchBoardAccount( CVars in, CVars &out );
long LoginWrenchBoardFacebook( CVars in, CVars &out );
long SessionCheck(long uid, const char *sessionid, int create );
long account_session_check(CVars in, CVars out);
long VerifySession(CVars in, CVars &out);
long CompleteAddCustomerBalance(CVars in, CVars &out);
long InitiateAddCustomerBalance(CVars in, CVars &out);
long DeliverMobilseEtisalat(CVars in, CVars &out);
long GateDeliverMobilseEtisalat(CVars in, CVars &out);
long ETSL_configure(CVars in, CVars &out);
long AddMobileTopuNumber(CVars in, CVars &out);
long WrenchSendRefer(CVars in, CVars &out);
long WrenchSendReferLoadLink(CVars in, CVars &out);
long LogManagerAction(CVars in, CVars &out);
long WrenchUpdateProfile(CVars in, CVars &out);
long WrenchUpdateAccountTerms(CVars in, CVars &out);
long WrenchUpdateAccountDescription(CVars in, CVars &out);
long LogWrenchBoardMember(CVars in, CVars &out);
long WrenchResetMemberPass(CVars in, CVars &out);
long WrenchResetPass(CVars in, CVars &out);
long WrenchSaveSkill(CVars in, CVars &out);
long WrenchDeleteSaveSkill(CVars in, CVars &out);
long WrenchUpdateSiteGallery(CVars in, CVars &out);
long WrenchReturnStartJobList(CVars in, CVars &out);
long WrenchLoadDashData(CVars in, CVars &out);
#endif
+17
View File
@@ -0,0 +1,17 @@
#ifndef __mx_account_mngt_h__
#define __mx_account_mngt_h__
#include "vars.h"
long CreateMobileWrenchBoardAccount(CVars in, CVars &out);
long CreateWrenchBoardAccount(CVars in, CVars &out);
long CreateWrenchBoardAccountPending(CVars in, CVars &out);
long CompleteMobileAccountCreation(CVars in, CVars &out);
long WrenchReturnJobList(CVars in, CVars &out);
long WrenchReturnMemberMessages(CVars in, CVars &out);
long WrenchMemberActiveJobs(CVars in, CVars &out);
long WrenchReturnMemberPaymentHx(CVars in, CVars &out);
long WrenchReturnMemberBankAccount(CVars in, CVars &out);
#endif
+11
View File
@@ -0,0 +1,11 @@
#ifndef __mx_bko_h__
#define __mx_bko_h__
#include "vars.h"
long bko_calls(CVars in, CVars &out);
long LoginBkoAdmin(CVars in, CVars &out);
#endif
+11
View File
@@ -0,0 +1,11 @@
#ifndef CFG_H
#define CFG_H
#include "php_wrenchboard_config.h"
void CfgReadConfig();
long CfgReadLong(const char* key);
//std::string CfgReadString(const char* key);
const char* CfgReadChar(const char* key);
#endif
+280
View File
@@ -0,0 +1,280 @@
#ifndef __dew_cgi_lib
#define __dew_cgi_lib
#include "php_tmpl_prefix.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <utime.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/timeb.h>
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <ctype.h> // for tolower(char)
#include <string.h>
#include <sqltypes.h>
#include "config.h"
#include "clog.h"
#include "list.h"
#include "cvariables.h"
#define CGI_FLAG_CLEAR (char*)-1
#define EMAIL_PREFIX TMPL_PREFIX
enum { METHOD_NONE, METHOD_GET, METHOD_POST };
enum { SEQ_NONE, SEQ_REVERSE };
int Min0(int a, int b, bool & EOS); // Returns the smaller of the two; if it's < 0, returns 0
// a = how many to copy; b = limit;
void strncpy_(char * dst, char * src, int n);
int GetParam(char * params, char _name[], char value[], int valuelen, char ** end = NULL);
void CatFile( char * fname, FILE * fout );
/************************************************************************
* *
* Classes *
* *
* - Class CVariables defines a set of routines for handling internal *
* variables, which are stored by using a linked list *
* *
* - Class CGIList implements the functionality in template rendering *
* by which one can define lists of unknown length from within *
* a template. *
* *
* - Class C_CGI_Form is the most essential class for the CGI interface. *
* It enables to obtain variables passed from the browser *
* and renders complex templates using CVariables and CGIList *
* *
*************************************************************************/
// The following deals with getting variables from forms
typedef struct
{
char * mask, * explanation;
} pattern_t;
typedef
enum { CGI_STRING, CGI_RADIO,
CGI_SELECT,
CGI_SELECT_LOOKUP,
CGI_CHECKBOX,
CGI_CHECKBOXLIST, // bit-encoded ULONG
CGI_LONG,
CGI_FLOAT,
CGI_CHECKBOXLIST_ARRAY, // array of ULONGs
CGI_RADIO_INT,
CGI_SELECT_MUL, // multiple select box
CGI_RADIO_INT2, // CGI_RADIO_INT that uses first two letters of the variable name for referencing values
CGI_AMOUNT, // currency amount, converts to unsigned long
}
CGI_VAR_TYPE;
typedef struct
{
char *name;
CGI_VAR_TYPE type;
// Matching
int minlen, maxlen;
pattern_t *pattern; // ext regular expression; NULL for skip
char **radio; // for radio buttons, NULL otherwise
unsigned char nradio; // number of elements
// return portion
void *target; // Where the result should be stored
int size; // Don't exceed this !
// corresponding SQL type
int sql_type;
// more return data
bool match;
} CGI_Variable;
//
class CGIList;
typedef struct
{
char * pre, * post;
int pre_n, post_n;
} Tprepost;
class C_CGI_Form : public CVariables {
public:
friend class CGIList;
C_CGI_Form( char * _dir, char * _template_file, char * _global_template=NULL, int _argc=0, char **_argv = NULL );
// Instantiates a C_CGI_Form object.
// _dir - template directory
// _template_file - initial/default template file
// _global_template - used to encapsulate templates in a global template
// _arc - argc from main()
// _argv - argv from main()
~C_CGI_Form( );
void Email( char * fname, char * from=NULL );
bool Form( FILE * fout ); // Render output from current template into opened file 'fout'
bool Form( FILE * fout, char * template_file );
char * FormFile( char * fname ); // Render output from current template into 'fname'
char * FormBuffer( char * buf );
/* bool FormBuffer( char * buf, FILE * fout, char * listname = NULL, int listi = 0 );
// Render output from current template into buffer*/
char * RFormBuffer( char * buf, char * listname = NULL, int listi = 0 );
// Render output from current template into buffer using recursion
#ifdef WITH_LANGUAGE
char *translate( char * buf, const char *template_file );
#endif
// int GetParam( char name[], char value[], int valuelen );
// Scan 'params' for 'name' and return its value in 'value'
int GetParam( char name[], char value[], int valuelen, char ** end = NULL, char *start = NULL );
int GetParamMul( char name[], TList ** list );
int GetScreen( char * screens[], int n, const char * scrs = NULL );
// Returns current screen index as passed by the browser
// and looked up in screens[]
int GetCommand( char * commands[], int n );
// Returns current command index as passed by the browser
// and looked up in commands[]
void Template( char * _template_file )
// Sets the default template to '_template_file'
{
free( template_file );
template_file = (char*)malloc( strlen(TMPL_PREFIX)+1+strlen(_template_file)+1 );
sprintf( template_file, "%s/%s", TMPL_PREFIX, _template_file );
}
void GlobalTemplate( char * _template_file )
// Sets the global template to '_template_file'
{
if ( global_template ) free( global_template );
global_template = strdup(_template_file);
}
// void ParseGlobalTemplate(); // Parse the global template file and set 'sectionX' variables
void ParseGlobalTemplate( char * fname = NULL );
bool ParseNewTemplate( char * fname = NULL );
void MatchVariable( CGI_Variable * var, bool optional = false, bool flag_if_mismatch = true );
// Provides CGI variable mapping and matching functionality
// can match against regular expressions etc
void SetVariable( CGI_Variable * var );
// Sets a variable that may be used in a template
void Flag( CGI_Variable * var );
// Mark variable as invalid input
void Flag( char * var, char * explanation = NULL );
// Mark variable as invalid input
void ClearVariable( CGI_Variable var );
void GetNextVariable( TList * &cur, char * &c1, char * &c, char * listname, int listi );
CGIList * lists[50];
int nlists;
char * params;
char * template_file;
char * global_template;
unsigned char method, sequence;
private:
char * dir;
char * form;
#ifdef WITH_LANGUAGE
char language[10];
#endif
int argc;
char** argv;
};
class CGIList
{
public:
friend class C_CGI_Form;
CGIList( C_CGI_Form * _form, char * name );
// Instantiates a CGI_List object
// _form points to the parent form object
// name - name of the list as used in template
~CGIList() { free( listname ); if (form) form->lists[listn] = 0; };
int CloseElement() { return ++n; };
// Move on to the next element in the list.
void LetStr( char * var, char * value );
// Set a CGI list variable using the list name and element number as part of the name
void LetStrf( char * var, const char * format, ... );
void LetInt16( char * var, int value );
// Set a CGI list variable using the list name and element number as part of the name
char * GetVariable( char * var, char * result, int size );
// Obtain a CGI list variable value using the list name and element number as part of the name
void LetStr( char * var, const char * format, ... );
int n;
private:
C_CGI_Form * form;
int listn;
char * listname;
};
class CInputError : public CVariables {
public:
void Add( bool text, const char * name, const char * explanation, ... );
char * Get( const char * name, bool *text );
void Log();
};
#endif
+191
View File
@@ -0,0 +1,191 @@
#ifndef __CLOG_H__
#define __CLOG_H__
#include "php_wrenchboard_log.h"
#include "php_filelog_max_level.h"
#include <sstream>
#include <string>
#include <cstdio>
#include <stdarg.h>
#include <sys/types.h>
#include <unistd.h>
inline std::string NowTime();
enum TLogLevel {logERROR, logWARNING, logINFO, logDEBUG, logDEBUG1, logDEBUG2, logDEBUG3, logDEBUG4, logSQL, FLOG_MAX};
void logfmt( TLogLevel level, const char * format, ... );
template <typename T>
class Log
{
public:
Log();
virtual ~Log();
std::ostringstream& Get(TLogLevel level = logINFO);
public:
static TLogLevel& ReportingLevel();
static std::string ToString(TLogLevel level);
static TLogLevel FromString(const std::string& level);
protected:
std::ostringstream os;
private:
Log(const Log&);
Log& operator =(const Log&);
};
template <typename T>
Log<T>::Log()
{
}
template <typename T>
std::ostringstream& Log<T>::Get(TLogLevel level)
{
os << "- " << NowTime();
os << " " << ToString(level);
os << " [" << getpid() << "]: ";
os << std::string(level > logDEBUG ? level - logDEBUG : 0, '\t');
return os;
}
template <typename T>
Log<T>::~Log()
{
os << std::endl;
T::Output(os.str());
}
template <typename T>
TLogLevel& Log<T>::ReportingLevel()
{
static TLogLevel reportingLevel = FLOG_MAX;
return reportingLevel;
}
template <typename T>
std::string Log<T>::ToString(TLogLevel level)
{
static const char* const buffer[] = {"ERROR", "WARNING", "INFO", "DEBUG", "DEBUG1", "DEBUG2", "DEBUG3", "DEBUG4", "SQL", "FLOG_MAX"};
return buffer[level];
}
template <typename T>
TLogLevel Log<T>::FromString(const std::string& level)
{
if (level == "FLOG_MAX")
return FLOG_MAX;
if (level == "SQL")
return logSQL;
if (level == "DEBUG4")
return logDEBUG4;
if (level == "DEBUG3")
return logDEBUG3;
if (level == "DEBUG2")
return logDEBUG2;
if (level == "DEBUG1")
return logDEBUG1;
if (level == "DEBUG")
return logDEBUG;
if (level == "INFO")
return logINFO;
if (level == "WARNING")
return logWARNING;
if (level == "ERROR")
return logERROR;
Log<T>().Get(logWARNING) << "Unknown logging level '" << level << "'. Using INFO level as default.";
return logINFO;
}
class Output2FILE
{
public:
static FILE*& Stream();
static void Output(const std::string& msg);
};
inline FILE*& Output2FILE::Stream()
{
static FILE* pStream = stderr;
return pStream;
}
inline void Output2FILE::Output(const std::string& msg)
{
FILE* pStream = Stream();
if (!pStream)
return;
fprintf(pStream, "%s", msg.c_str());
fflush(pStream);
}
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
# if defined (BUILDING_FILELOG_DLL)
# define FILELOG_DECLSPEC __declspec (dllexport)
# elif defined (USING_FILELOG_DLL)
# define FILELOG_DECLSPEC __declspec (dllimport)
# else
# define FILELOG_DECLSPEC
# endif // BUILDING_DBSIMPLE_DLL
#else
# define FILELOG_DECLSPEC
#endif // _WIN32
class FILELOG_DECLSPEC FILELog : public Log<Output2FILE> {};
//typedef Log<Output2FILE> FILELog;
#ifndef FILELOG_MAX_LEVEL
#define FILELOG_MAX_LEVEL FLOG_MAX
#endif
#define FILE_LOG(level) \
if (level > FILELOG_MAX_LEVEL) ;\
else if (level > FILELog::ReportingLevel() || !Output2FILE::Stream()) ; \
else FILELog().Get(level)
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
#include <windows.h>
inline std::string NowTime()
{
const int MAX_LEN = 200;
char buffer[MAX_LEN];
if (GetTimeFormatA(LOCALE_USER_DEFAULT, 0, 0,
"HH':'mm':'ss", buffer, MAX_LEN) == 0)
return "Error in NowTime()";
char result[100] = {0};
static DWORD first = GetTickCount();
std::sprintf(result, "%s.%03ld", buffer, (long)(GetTickCount() - first) % 1000);
return result;
}
#else
#include <sys/time.h>
inline std::string NowTime()
{
char buffer[11];
time_t t;
time(&t);
tm r = {0};
strftime(buffer, sizeof(buffer), "%X", localtime_r(&t, &r));
struct timeval tv;
gettimeofday(&tv, 0);
char result[100] = {0};
std::sprintf(result, "%s.%03ld", buffer, (long)tv.tv_usec / 1000);
return result;
}
#endif //WIN32
#endif //__LOG_H__
/*
vi:ts=2
*/
+10
View File
@@ -0,0 +1,10 @@
#ifndef __mx_common_tool_h__
#define __mx_common_tool_h__
#include "vars.h"
void Confirmation( unsigned long payment_id, char * number, int sz );
void GetOfferCode( unsigned long offer_id, char * number, int sz );
#endif
+10
View File
@@ -0,0 +1,10 @@
#ifndef __mx_common_tool_h__
#define __mx_common_tool_h__
#include "vars.h"
void Confirmation( unsigned long payment_id, char * number, int sz );
void GetOfferCode( unsigned long offer_id, char * number, int sz );
#endif
+59
View File
@@ -0,0 +1,59 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.in by autoheader. */
/* Whether to build wrenchboard_api as dynamic module */
#define COMPILE_DL_WRENCHBOARD_API 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
+11
View File
@@ -0,0 +1,11 @@
#ifndef __mx_contract_h__
#define __mx_contract_h__
#include "vars.h"
long contract_calls(CVars in, CVars &out);
long WrenchContractMessage( CVars in, CVars &out );
long WrenchContractStatus( CVars in, CVars &out );
#endif
+10
View File
@@ -0,0 +1,10 @@
#ifndef __mx_creditcards_h__
#define __mx_creditcards_h__
#include "vars.h"
long save_creditcard(CVars in, CVars &out);
#endif
+61
View File
@@ -0,0 +1,61 @@
#ifndef __cvariables__
#define __cvariables__
#include "stdarg.h"
#include <stdio.h>
#define MAX_CGI_VAR_LEN 50
typedef struct _L_Variables
{
char name[MAX_CGI_VAR_LEN+1];
char * value;
int opts; // options? used by some decendants
struct _L_Variables * next;
} L_Variables;
class CVariables
{
public:
friend class CGIList;
CVariables( );
~CVariables( );
void RenameVariable( const char * name, const char * newname );
void LetInt16( char * var, const int value ); // Set the variable to an integer value
void LetStr( const char * var, const char * value ); // Set the variable to a string value
void LetStrf( char * var, const char * format, ... );
void vLetStrf( char * var, const char * format, va_list ap );
void LetStr( char * var, const char * value, int len );
// Set the variable to a string value and truncate to len
void StrCat( char * var, const char * format, ... );
void StrCatf( char * var, const char * format, ... );
char * GetVariable( const char * var ); // Obtain the variable value and return its temp location
char * GetVariable( const char * var, char * result, int size );
// Obtain the variable value and return it in 'result'
char * GetVariable( const char * var, bool test, char * section = "" );
long GetVariableLong( char * name, bool *valid = NULL );
long GetVariableLong( char * name, bool test, char * section = "" );
bool GetBool( char * var, bool test = false, char * section = "" );
void PrintVars( FILE * f = stdout ); // Print out all variables to file pointed to by 'f'
void Cleanup();
L_Variables * var, * var_top;
L_Variables * FindVariable( const char * var, bool create=false );
// Obtains the next variable during the template parsing process
};
#endif
+46
View File
@@ -0,0 +1,46 @@
#ifndef __mx_email_h__
#define __mx_email_h__
#include "vars.h"
long AccountPendingMail(CVars in);
long WelcomeAccountMail(CVars in);
long GroupCreateMemberMail(CVars in);
long CreateWrenchBoardGroupMail(CVars in);
long JobAddedMail(CVars in);
long AlertActions(CVars in);
long ContactMessage(CVars in);
long send_email(CVars in, CVars &out);
long SystemStatus();
long VirtualAirSaleAlert(CVars in);
void SendAccountCreateAlert(long customer_id);
long VirtualAirSaleCustomer(CVars in);
void CustomerBalanceEmail(CVars in);
void PaymentAlert(CVars in);
void BalanceUpdateAlert(CVars in);
void CustomerEmailWelcome(CVars in);
long CustomerAirSale(CVars in);
long CustomerAirSalePayment(CVars in);
long CustomerAirBonus(CVars in);
long CustomerBalanceBonusEmail(CVars in);
long StartPassResetEmail(CVars in);
long CompletePassResetEmail(CVars in);
long SendPromoEmail(CVars in);
long SendBalanceRequestAlert(CVars in);
long SendBalanceCompleteAlert(CVars in);
long account_email(long mailtype, CVars in, CVars &out);
long job_email(long mailtype, CVars in, CVars &out);
long project_email(long mailtype, CVars in, CVars &out);
long test_email(CVars in, CVars &out);
long sendmoney_email(long mailtype, CVars in, CVars &out);
long alert_email(long mailtype, CVars in, CVars &out) ;
long SendmarketMessage(CVars in, CVars &out);
long cron_email(long mailtype, CVars in, CVars &out);
long SignupPendingAlertMailfile(CVars in);
long SignupCompletedAlertMailfile(CVars in);
#endif
+378
View File
@@ -0,0 +1,378 @@
/* envH.h
Generated by gSOAP 2.8.16 from env.h
Copyright(C) 2000-2013, Robert van Engelen, Genivia Inc. All Rights Reserved.
The generated code is released under one of the following licenses:
GPL or Genivia's license for commercial use.
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
*/
#ifndef envH_H
#define envH_H
#include "envStub.h"
#ifndef WITH_NOIDREF
#ifdef __cplusplus
extern "C" {
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_markelement(struct soap*, const void*, int);
#ifdef __cplusplus
}
#endif
SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap*);
SOAP_FMAC3 int SOAP_FMAC4 soap_getindependent(struct soap*);
#endif
#ifdef __cplusplus
extern "C" {
#endif
SOAP_FMAC3 void *SOAP_FMAC4 soap_getelement(struct soap*, int*);
SOAP_FMAC3 int SOAP_FMAC4 soap_putelement(struct soap*, const void*, const char*, int, int);
#ifdef __cplusplus
}
#endif
SOAP_FMAC3 int SOAP_FMAC4 soap_ignore_element(struct soap*);
SOAP_FMAC3 const char ** SOAP_FMAC4 soap_faultcode(struct soap *soap);
SOAP_FMAC3 void * SOAP_FMAC4 env_instantiate(struct soap*, int, const char*, const char*, size_t*);
SOAP_FMAC3 int SOAP_FMAC4 env_fdelete(struct soap_clist*);
SOAP_FMAC3 void* SOAP_FMAC4 soap_class_id_enter(struct soap*, const char*, void*, int, size_t, const char*, const char*);
#ifndef SOAP_TYPE_byte
#define SOAP_TYPE_byte (3)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_default_byte(struct soap*, char *);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_byte(struct soap*, const char*, int, const char *, const char*);
SOAP_FMAC3 char * SOAP_FMAC4 soap_in_byte(struct soap*, const char*, char *, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_byte(struct soap*, const char *, const char*, const char*);
#ifndef soap_write_byte
#define soap_write_byte(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_byte(soap, data),0) || soap_put_byte(soap, data, "byte", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 char * SOAP_FMAC4 soap_get_byte(struct soap*, char *, const char*, const char*);
#ifndef soap_read_byte
#define soap_read_byte(soap, data) ( soap_begin_recv(soap) || !soap_get_byte(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
#ifndef SOAP_TYPE_int
#define SOAP_TYPE_int (1)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_default_int(struct soap*, int *);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_int(struct soap*, const char*, int, const int *, const char*);
SOAP_FMAC3 int * SOAP_FMAC4 soap_in_int(struct soap*, const char*, int *, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_int(struct soap*, const int *, const char*, const char*);
#ifndef soap_write_int
#define soap_write_int(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_int(soap, data),0) || soap_put_int(soap, data, "int", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 int * SOAP_FMAC4 soap_get_int(struct soap*, int *, const char*, const char*);
#ifndef soap_read_int
#define soap_read_int(soap, data) ( soap_begin_recv(soap) || !soap_get_int(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_SOAP_ENV__Fault
#define SOAP_TYPE_SOAP_ENV__Fault (14)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *);
SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Fault(struct soap*, const char*, int, const struct SOAP_ENV__Fault *, const char*);
SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct soap*, const char*, struct SOAP_ENV__Fault *, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Fault(struct soap*, const struct SOAP_ENV__Fault *, const char*, const char*);
#ifndef soap_write_SOAP_ENV__Fault
#define soap_write_SOAP_ENV__Fault(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Fault(soap, data),0) || soap_put_SOAP_ENV__Fault(soap, data, "SOAP-ENV:Fault", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 struct SOAP_ENV__Fault * SOAP_FMAC4 soap_get_SOAP_ENV__Fault(struct soap*, struct SOAP_ENV__Fault *, const char*, const char*);
#ifndef soap_read_SOAP_ENV__Fault
#define soap_read_SOAP_ENV__Fault(soap, data) ( soap_begin_recv(soap) || !soap_get_SOAP_ENV__Fault(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
SOAP_FMAC1 struct SOAP_ENV__Fault * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Fault(struct soap*, int, const char*, const char*, size_t*);
inline struct SOAP_ENV__Fault * soap_new_SOAP_ENV__Fault(struct soap *soap, int n = -1) { return soap_instantiate_SOAP_ENV__Fault(soap, n, NULL, NULL, NULL); }
inline struct SOAP_ENV__Fault * soap_new_req_SOAP_ENV__Fault(struct soap *soap) { struct SOAP_ENV__Fault *_p = soap_instantiate_SOAP_ENV__Fault(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Fault(soap, _p); } return _p; }
inline struct SOAP_ENV__Fault * soap_new_set_SOAP_ENV__Fault(struct soap *soap, char *faultcode, char *faultstring, char *faultactor, struct SOAP_ENV__Detail *detail, struct SOAP_ENV__Code *SOAP_ENV__Code, struct SOAP_ENV__Reason *SOAP_ENV__Reason, char *SOAP_ENV__Node, char *SOAP_ENV__Role, struct SOAP_ENV__Detail *SOAP_ENV__Detail) { struct SOAP_ENV__Fault *_p = soap_instantiate_SOAP_ENV__Fault(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Fault(soap, _p); _p->faultcode = faultcode; _p->faultstring = faultstring; _p->faultactor = faultactor; _p->detail = detail; _p->SOAP_ENV__Code = SOAP_ENV__Code; _p->SOAP_ENV__Reason = SOAP_ENV__Reason; _p->SOAP_ENV__Node = SOAP_ENV__Node; _p->SOAP_ENV__Role = SOAP_ENV__Role; _p->SOAP_ENV__Detail = SOAP_ENV__Detail; } return _p; }
inline void soap_delete_SOAP_ENV__Fault(struct soap *soap, struct SOAP_ENV__Fault *p) { soap_delete(soap, p); }
SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Fault(struct soap*, int, int, void*, size_t, const void*, size_t);
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_SOAP_ENV__Reason
#define SOAP_TYPE_SOAP_ENV__Reason (13)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *);
SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Reason(struct soap*, const struct SOAP_ENV__Reason *);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Reason(struct soap*, const char*, int, const struct SOAP_ENV__Reason *, const char*);
SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct soap*, const char*, struct SOAP_ENV__Reason *, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Reason(struct soap*, const struct SOAP_ENV__Reason *, const char*, const char*);
#ifndef soap_write_SOAP_ENV__Reason
#define soap_write_SOAP_ENV__Reason(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Reason(soap, data),0) || soap_put_SOAP_ENV__Reason(soap, data, "SOAP-ENV:Reason", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 struct SOAP_ENV__Reason * SOAP_FMAC4 soap_get_SOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *, const char*, const char*);
#ifndef soap_read_SOAP_ENV__Reason
#define soap_read_SOAP_ENV__Reason(soap, data) ( soap_begin_recv(soap) || !soap_get_SOAP_ENV__Reason(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
SOAP_FMAC1 struct SOAP_ENV__Reason * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Reason(struct soap*, int, const char*, const char*, size_t*);
inline struct SOAP_ENV__Reason * soap_new_SOAP_ENV__Reason(struct soap *soap, int n = -1) { return soap_instantiate_SOAP_ENV__Reason(soap, n, NULL, NULL, NULL); }
inline struct SOAP_ENV__Reason * soap_new_req_SOAP_ENV__Reason(struct soap *soap) { struct SOAP_ENV__Reason *_p = soap_instantiate_SOAP_ENV__Reason(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Reason(soap, _p); } return _p; }
inline struct SOAP_ENV__Reason * soap_new_set_SOAP_ENV__Reason(struct soap *soap, char *SOAP_ENV__Text) { struct SOAP_ENV__Reason *_p = soap_instantiate_SOAP_ENV__Reason(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Reason(soap, _p); _p->SOAP_ENV__Text = SOAP_ENV__Text; } return _p; }
inline void soap_delete_SOAP_ENV__Reason(struct soap *soap, struct SOAP_ENV__Reason *p) { soap_delete(soap, p); }
SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Reason(struct soap*, int, int, void*, size_t, const void*, size_t);
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_SOAP_ENV__Detail
#define SOAP_TYPE_SOAP_ENV__Detail (10)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *);
SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Detail(struct soap*, const char*, int, const struct SOAP_ENV__Detail *, const char*);
SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail *, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Detail(struct soap*, const struct SOAP_ENV__Detail *, const char*, const char*);
#ifndef soap_write_SOAP_ENV__Detail
#define soap_write_SOAP_ENV__Detail(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Detail(soap, data),0) || soap_put_SOAP_ENV__Detail(soap, data, "SOAP-ENV:Detail", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 struct SOAP_ENV__Detail * SOAP_FMAC4 soap_get_SOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *, const char*, const char*);
#ifndef soap_read_SOAP_ENV__Detail
#define soap_read_SOAP_ENV__Detail(soap, data) ( soap_begin_recv(soap) || !soap_get_SOAP_ENV__Detail(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
SOAP_FMAC1 struct SOAP_ENV__Detail * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Detail(struct soap*, int, const char*, const char*, size_t*);
inline struct SOAP_ENV__Detail * soap_new_SOAP_ENV__Detail(struct soap *soap, int n = -1) { return soap_instantiate_SOAP_ENV__Detail(soap, n, NULL, NULL, NULL); }
inline struct SOAP_ENV__Detail * soap_new_req_SOAP_ENV__Detail(struct soap *soap, int __type, void *fault) { struct SOAP_ENV__Detail *_p = soap_instantiate_SOAP_ENV__Detail(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Detail(soap, _p); _p->__type = __type; _p->fault = fault; } return _p; }
inline struct SOAP_ENV__Detail * soap_new_set_SOAP_ENV__Detail(struct soap *soap, char *__any, int __type, void *fault) { struct SOAP_ENV__Detail *_p = soap_instantiate_SOAP_ENV__Detail(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Detail(soap, _p); _p->__any = __any; _p->__type = __type; _p->fault = fault; } return _p; }
inline void soap_delete_SOAP_ENV__Detail(struct soap *soap, struct SOAP_ENV__Detail *p) { soap_delete(soap, p); }
SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Detail(struct soap*, int, int, void*, size_t, const void*, size_t);
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_SOAP_ENV__Code
#define SOAP_TYPE_SOAP_ENV__Code (8)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *);
SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Code(struct soap*, const char*, int, const struct SOAP_ENV__Code *, const char*);
SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code *, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Code(struct soap*, const struct SOAP_ENV__Code *, const char*, const char*);
#ifndef soap_write_SOAP_ENV__Code
#define soap_write_SOAP_ENV__Code(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Code(soap, data),0) || soap_put_SOAP_ENV__Code(soap, data, "SOAP-ENV:Code", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 struct SOAP_ENV__Code * SOAP_FMAC4 soap_get_SOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *, const char*, const char*);
#ifndef soap_read_SOAP_ENV__Code
#define soap_read_SOAP_ENV__Code(soap, data) ( soap_begin_recv(soap) || !soap_get_SOAP_ENV__Code(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
SOAP_FMAC1 struct SOAP_ENV__Code * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Code(struct soap*, int, const char*, const char*, size_t*);
inline struct SOAP_ENV__Code * soap_new_SOAP_ENV__Code(struct soap *soap, int n = -1) { return soap_instantiate_SOAP_ENV__Code(soap, n, NULL, NULL, NULL); }
inline struct SOAP_ENV__Code * soap_new_req_SOAP_ENV__Code(struct soap *soap) { struct SOAP_ENV__Code *_p = soap_instantiate_SOAP_ENV__Code(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Code(soap, _p); } return _p; }
inline struct SOAP_ENV__Code * soap_new_set_SOAP_ENV__Code(struct soap *soap, char *SOAP_ENV__Value, struct SOAP_ENV__Code *SOAP_ENV__Subcode) { struct SOAP_ENV__Code *_p = soap_instantiate_SOAP_ENV__Code(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Code(soap, _p); _p->SOAP_ENV__Value = SOAP_ENV__Value; _p->SOAP_ENV__Subcode = SOAP_ENV__Subcode; } return _p; }
inline void soap_delete_SOAP_ENV__Code(struct soap *soap, struct SOAP_ENV__Code *p) { soap_delete(soap, p); }
SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Code(struct soap*, int, int, void*, size_t, const void*, size_t);
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_SOAP_ENV__Header
#define SOAP_TYPE_SOAP_ENV__Header (7)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_default_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *);
SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap*, const char*, int, const struct SOAP_ENV__Header *, const char*);
SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_in_SOAP_ENV__Header(struct soap*, const char*, struct SOAP_ENV__Header *, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_SOAP_ENV__Header(struct soap*, const struct SOAP_ENV__Header *, const char*, const char*);
#ifndef soap_write_SOAP_ENV__Header
#define soap_write_SOAP_ENV__Header(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_SOAP_ENV__Header(soap, data),0) || soap_put_SOAP_ENV__Header(soap, data, "SOAP-ENV:Header", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 struct SOAP_ENV__Header * SOAP_FMAC4 soap_get_SOAP_ENV__Header(struct soap*, struct SOAP_ENV__Header *, const char*, const char*);
#ifndef soap_read_SOAP_ENV__Header
#define soap_read_SOAP_ENV__Header(soap, data) ( soap_begin_recv(soap) || !soap_get_SOAP_ENV__Header(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
SOAP_FMAC1 struct SOAP_ENV__Header * SOAP_FMAC2 soap_instantiate_SOAP_ENV__Header(struct soap*, int, const char*, const char*, size_t*);
inline struct SOAP_ENV__Header * soap_new_SOAP_ENV__Header(struct soap *soap, int n = -1) { return soap_instantiate_SOAP_ENV__Header(soap, n, NULL, NULL, NULL); }
inline struct SOAP_ENV__Header * soap_new_req_SOAP_ENV__Header(struct soap *soap) { struct SOAP_ENV__Header *_p = soap_instantiate_SOAP_ENV__Header(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Header(soap, _p); } return _p; }
inline struct SOAP_ENV__Header * soap_new_set_SOAP_ENV__Header(struct soap *soap) { struct SOAP_ENV__Header *_p = soap_instantiate_SOAP_ENV__Header(soap, -1, NULL, NULL, NULL); if (_p) { soap_default_SOAP_ENV__Header(soap, _p); } return _p; }
inline void soap_delete_SOAP_ENV__Header(struct soap *soap, struct SOAP_ENV__Header *p) { soap_delete(soap, p); }
SOAP_FMAC3 void SOAP_FMAC4 soap_copy_SOAP_ENV__Header(struct soap*, int, int, void*, size_t, const void*, size_t);
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_PointerToSOAP_ENV__Reason
#define SOAP_TYPE_PointerToSOAP_ENV__Reason (16)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *const*);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Reason(struct soap*, const char *, int, struct SOAP_ENV__Reason *const*, const char *);
SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Reason(struct soap*, const char*, struct SOAP_ENV__Reason **, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason *const*, const char*, const char*);
#ifndef soap_write_PointerToSOAP_ENV__Reason
#define soap_write_PointerToSOAP_ENV__Reason(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_PointerToSOAP_ENV__Reason(soap, data),0) || soap_put_PointerToSOAP_ENV__Reason(soap, data, "SOAP-ENV:Reason", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 struct SOAP_ENV__Reason ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Reason(struct soap*, struct SOAP_ENV__Reason **, const char*, const char*);
#ifndef soap_read_PointerToSOAP_ENV__Reason
#define soap_read_PointerToSOAP_ENV__Reason(soap, data) ( soap_begin_recv(soap) || !soap_get_PointerToSOAP_ENV__Reason(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_PointerToSOAP_ENV__Detail
#define SOAP_TYPE_PointerToSOAP_ENV__Detail (15)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Detail(struct soap*, const char *, int, struct SOAP_ENV__Detail *const*, const char *);
SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Detail(struct soap*, const char*, struct SOAP_ENV__Detail **, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail *const*, const char*, const char*);
#ifndef soap_write_PointerToSOAP_ENV__Detail
#define soap_write_PointerToSOAP_ENV__Detail(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_PointerToSOAP_ENV__Detail(soap, data),0) || soap_put_PointerToSOAP_ENV__Detail(soap, data, "SOAP-ENV:Detail", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 struct SOAP_ENV__Detail ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Detail(struct soap*, struct SOAP_ENV__Detail **, const char*, const char*);
#ifndef soap_read_PointerToSOAP_ENV__Detail
#define soap_read_PointerToSOAP_ENV__Detail(soap, data) ( soap_begin_recv(soap) || !soap_get_PointerToSOAP_ENV__Detail(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_PointerToSOAP_ENV__Code
#define SOAP_TYPE_PointerToSOAP_ENV__Code (9)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_PointerToSOAP_ENV__Code(struct soap*, const char *, int, struct SOAP_ENV__Code *const*, const char *);
SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_in_PointerToSOAP_ENV__Code(struct soap*, const char*, struct SOAP_ENV__Code **, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code *const*, const char*, const char*);
#ifndef soap_write_PointerToSOAP_ENV__Code
#define soap_write_PointerToSOAP_ENV__Code(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_PointerToSOAP_ENV__Code(soap, data),0) || soap_put_PointerToSOAP_ENV__Code(soap, data, "SOAP-ENV:Code", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 struct SOAP_ENV__Code ** SOAP_FMAC4 soap_get_PointerToSOAP_ENV__Code(struct soap*, struct SOAP_ENV__Code **, const char*, const char*);
#ifndef soap_read_PointerToSOAP_ENV__Code
#define soap_read_PointerToSOAP_ENV__Code(soap, data) ( soap_begin_recv(soap) || !soap_get_PointerToSOAP_ENV__Code(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
#endif
#ifndef SOAP_TYPE__QName
#define SOAP_TYPE__QName (5)
#endif
#define soap_default__QName(soap, a) soap_default_string(soap, a)
SOAP_FMAC3 void SOAP_FMAC4 soap_serialize__QName(struct soap*, char *const*);
SOAP_FMAC3 int SOAP_FMAC4 soap_out__QName(struct soap*, const char*, int, char*const*, const char*);
SOAP_FMAC3 char * * SOAP_FMAC4 soap_in__QName(struct soap*, const char*, char **, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put__QName(struct soap*, char *const*, const char*, const char*);
#ifndef soap_write__QName
#define soap_write__QName(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize__QName(soap, data),0) || soap_put__QName(soap, data, "byte", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 char ** SOAP_FMAC4 soap_get__QName(struct soap*, char **, const char*, const char*);
#ifndef soap_read__QName
#define soap_read__QName(soap, data) ( soap_begin_recv(soap) || !soap_get__QName(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
#ifndef SOAP_TYPE_string
#define SOAP_TYPE_string (4)
#endif
SOAP_FMAC3 void SOAP_FMAC4 soap_default_string(struct soap*, char **);
SOAP_FMAC3 void SOAP_FMAC4 soap_serialize_string(struct soap*, char *const*);
SOAP_FMAC3 int SOAP_FMAC4 soap_out_string(struct soap*, const char*, int, char*const*, const char*);
SOAP_FMAC3 char * * SOAP_FMAC4 soap_in_string(struct soap*, const char*, char **, const char*);
SOAP_FMAC3 int SOAP_FMAC4 soap_put_string(struct soap*, char *const*, const char*, const char*);
#ifndef soap_write_string
#define soap_write_string(soap, data) ( soap_free_temp(soap), soap_begin_send(soap) || (soap_serialize_string(soap, data),0) || soap_put_string(soap, data, "byte", NULL) || soap_end_send(soap), (soap)->error )
#endif
SOAP_FMAC3 char ** SOAP_FMAC4 soap_get_string(struct soap*, char **, const char*, const char*);
#ifndef soap_read_string
#define soap_read_string(soap, data) ( soap_begin_recv(soap) || !soap_get_string(soap, data, NULL, NULL) || soap_end_recv(soap), (soap)->error )
#endif
#endif
/* End of envH.h */
+163
View File
@@ -0,0 +1,163 @@
/* envStub.h
Generated by gSOAP 2.8.16 from env.h
Copyright(C) 2000-2013, Robert van Engelen, Genivia Inc. All Rights Reserved.
The generated code is released under one of the following licenses:
GPL or Genivia's license for commercial use.
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
*/
#ifndef envStub_H
#define envStub_H
#include "stdsoap2.h"
#if GSOAP_VERSION != 20816
# error "GSOAP VERSION MISMATCH IN GENERATED CODE: PLEASE REINSTALL PACKAGE"
#endif
/******************************************************************************\
* *
* Enumerations *
* *
\******************************************************************************/
/******************************************************************************\
* *
* Types with Custom Serializers *
* *
\******************************************************************************/
/******************************************************************************\
* *
* Classes and Structs *
* *
\******************************************************************************/
#if 0 /* volatile type: do not declare here, declared elsewhere */
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_SOAP_ENV__Header
#define SOAP_TYPE_SOAP_ENV__Header (7)
/* SOAP Header: */
struct SOAP_ENV__Header
{
public:
int soap_type() const { return 7; } /* = unique id SOAP_TYPE_SOAP_ENV__Header */
#ifdef WITH_NOEMPTYSTRUCT
private:
char dummy; /* dummy member to enable compilation */
#endif
};
#endif
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_SOAP_ENV__Code
#define SOAP_TYPE_SOAP_ENV__Code (8)
/* SOAP Fault Code: */
struct SOAP_ENV__Code
{
public:
char *SOAP_ENV__Value; /* optional element of type xsd:QName */
struct SOAP_ENV__Code *SOAP_ENV__Subcode; /* optional element of type SOAP-ENV:Code */
public:
int soap_type() const { return 8; } /* = unique id SOAP_TYPE_SOAP_ENV__Code */
};
#endif
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_SOAP_ENV__Detail
#define SOAP_TYPE_SOAP_ENV__Detail (10)
/* SOAP-ENV:Detail */
struct SOAP_ENV__Detail
{
public:
char *__any;
int __type; /* any type of element <fault> (defined below) */
void *fault; /* transient */
public:
int soap_type() const { return 10; } /* = unique id SOAP_TYPE_SOAP_ENV__Detail */
};
#endif
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_SOAP_ENV__Reason
#define SOAP_TYPE_SOAP_ENV__Reason (13)
/* SOAP-ENV:Reason */
struct SOAP_ENV__Reason
{
public:
char *SOAP_ENV__Text; /* optional element of type xsd:string */
public:
int soap_type() const { return 13; } /* = unique id SOAP_TYPE_SOAP_ENV__Reason */
};
#endif
#endif
#ifndef WITH_NOGLOBAL
#ifndef SOAP_TYPE_SOAP_ENV__Fault
#define SOAP_TYPE_SOAP_ENV__Fault (14)
/* SOAP Fault: */
struct SOAP_ENV__Fault
{
public:
char *faultcode; /* optional element of type xsd:QName */
char *faultstring; /* optional element of type xsd:string */
char *faultactor; /* optional element of type xsd:string */
struct SOAP_ENV__Detail *detail; /* optional element of type SOAP-ENV:Detail */
struct SOAP_ENV__Code *SOAP_ENV__Code; /* optional element of type SOAP-ENV:Code */
struct SOAP_ENV__Reason *SOAP_ENV__Reason; /* optional element of type SOAP-ENV:Reason */
char *SOAP_ENV__Node; /* optional element of type xsd:string */
char *SOAP_ENV__Role; /* optional element of type xsd:string */
struct SOAP_ENV__Detail *SOAP_ENV__Detail; /* optional element of type SOAP-ENV:Detail */
public:
int soap_type() const { return 14; } /* = unique id SOAP_TYPE_SOAP_ENV__Fault */
};
#endif
#endif
/******************************************************************************\
* *
* Typedefs *
* *
\******************************************************************************/
#ifndef SOAP_TYPE__QName
#define SOAP_TYPE__QName (5)
typedef char *_QName;
#endif
#ifndef SOAP_TYPE__XML
#define SOAP_TYPE__XML (6)
typedef char *_XML;
#endif
/******************************************************************************\
* *
* Externals *
* *
\******************************************************************************/
#endif
/* End of envStub.h */
+20
View File
@@ -0,0 +1,20 @@
#ifndef __EXCEPTIONS_H__
#define __EXCEPTIONS_H__
#include "vars.h"
class bad_parameter{
public:
bad_parameter( CVars &out, const char *name );
};
class err : public std::exception
{
public:
err( char *msg );
};
#endif
+13
View File
@@ -0,0 +1,13 @@
#ifndef __mx_groups_h__
#define __mx_groups_h__
#include "vars.h"
long groups_calls(CVars in, CVars &out);
long CreateWrenchBoardGroup(CVars in, CVars &out);
long WrenchBoardGroupCreateMember(CVars in, CVars &out);
#endif
+140
View File
@@ -0,0 +1,140 @@
/*-
* HMAC-SHA-224/256/384/512 implementation
* Last update: 06/15/2005
* Issue date: 06/15/2005
*
* Copyright (C) 2005 Olivier Gay <olivier.gay@a3.epfl.ch>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef _HMAC_SHA2_H
#define _HMAC_SHA2_H
#include "sha2.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
sha224_ctx ctx_inside;
sha224_ctx ctx_outside;
/* for hmac_reinit */
sha224_ctx ctx_inside_reinit;
sha224_ctx ctx_outside_reinit;
unsigned char block_ipad[SHA224_BLOCK_SIZE];
unsigned char block_opad[SHA224_BLOCK_SIZE];
} hmac_sha224_ctx;
typedef struct {
sha256_ctx ctx_inside;
sha256_ctx ctx_outside;
/* for hmac_reinit */
sha256_ctx ctx_inside_reinit;
sha256_ctx ctx_outside_reinit;
unsigned char block_ipad[SHA256_BLOCK_SIZE];
unsigned char block_opad[SHA256_BLOCK_SIZE];
} hmac_sha256_ctx;
typedef struct {
sha384_ctx ctx_inside;
sha384_ctx ctx_outside;
/* for hmac_reinit */
sha384_ctx ctx_inside_reinit;
sha384_ctx ctx_outside_reinit;
unsigned char block_ipad[SHA384_BLOCK_SIZE];
unsigned char block_opad[SHA384_BLOCK_SIZE];
} hmac_sha384_ctx;
typedef struct {
sha512_ctx ctx_inside;
sha512_ctx ctx_outside;
/* for hmac_reinit */
sha512_ctx ctx_inside_reinit;
sha512_ctx ctx_outside_reinit;
unsigned char block_ipad[SHA512_BLOCK_SIZE];
unsigned char block_opad[SHA512_BLOCK_SIZE];
} hmac_sha512_ctx;
void hmac_sha224_init(hmac_sha224_ctx *ctx, unsigned char *key,
unsigned int key_size);
void hmac_sha224_reinit(hmac_sha224_ctx *ctx);
void hmac_sha224_update(hmac_sha224_ctx *ctx, unsigned char *message,
unsigned int message_len);
void hmac_sha224_final(hmac_sha224_ctx *ctx, unsigned char *mac,
unsigned int mac_size);
void hmac_sha224(unsigned char *key, unsigned int key_size,
unsigned char *message, unsigned int message_len,
unsigned char *mac, unsigned mac_size);
void hmac_sha256_init(hmac_sha256_ctx *ctx, unsigned char *key,
unsigned int key_size);
void hmac_sha256_reinit(hmac_sha256_ctx *ctx);
void hmac_sha256_update(hmac_sha256_ctx *ctx, unsigned char *message,
unsigned int message_len);
void hmac_sha256_final(hmac_sha256_ctx *ctx, unsigned char *mac,
unsigned int mac_size);
void hmac_sha256(unsigned char *key, unsigned int key_size,
unsigned char *message, unsigned int message_len,
unsigned char *mac, unsigned mac_size);
void hmac_sha384_init(hmac_sha384_ctx *ctx, unsigned char *key,
unsigned int key_size);
void hmac_sha384_reinit(hmac_sha384_ctx *ctx);
void hmac_sha384_update(hmac_sha384_ctx *ctx, unsigned char *message,
unsigned int message_len);
void hmac_sha384_final(hmac_sha384_ctx *ctx, unsigned char *mac,
unsigned int mac_size);
void hmac_sha384(unsigned char *key, unsigned int key_size,
unsigned char *message, unsigned int message_len,
unsigned char *mac, unsigned mac_size);
void hmac_sha512_init(hmac_sha512_ctx *ctx, unsigned char *key,
unsigned int key_size);
void hmac_sha512_reinit(hmac_sha512_ctx *ctx);
void hmac_sha512_update(hmac_sha512_ctx *ctx, unsigned char *message,
unsigned int message_len);
void hmac_sha512_final(hmac_sha512_ctx *ctx, unsigned char *mac,
unsigned int mac_size);
void hmac_sha512(unsigned char *key, unsigned int key_size,
unsigned char *message, unsigned int message_len,
unsigned char *mac, unsigned mac_size);
#ifdef __cplusplus
}
#endif
#endif /* ! _HMAC_SHA2_H */
+15
View File
@@ -0,0 +1,15 @@
#ifndef __INPUT_H__
#define __INPUT_H__
#include "vars.h"
#include "exceptions.h"
void REQ_STRING( CVars &in, const char * name, int min_len, int max_len, const char *regex ) throw (bad_parameter);
long REQ_LONG( CVars &in, const char *name, long min, long max );
bool OptionalSpecified( CVars &in, const char * name );
#define OPTIONAL(mapname, var) \
if ( OptionalSpecified(mapname,var) )
#endif
+37
View File
@@ -0,0 +1,37 @@
#ifndef __INTERSWITCH_H__
#define __INTERSWITCH_H__
#include "vars.h"
#include <cstring>
#include <ext/hash_map>
using namespace std;
using namespace __gnu_cxx;
/*****************************************************************************/
struct eqstr{
bool operator()(const char* s1, const char* s2) const {
return strcmp(s1,s2)==0;
}
};
/*****************************************************************************/
long interswitch_config_ssl(const char *keyfile, const char *password, const char *cacert, long version);
long interswitch_getBillers(const char *endpoint, const char *tid, int billerId, int categoryId, int channelId, const char *billerName, char *status, long(*save)(hash_map<const char*, const char*, hash<const char*>, eqstr>));
long interswitch_getBillerPaymentItems(const char *endpoint, const char *tid, int billerId, char *status, long(*save)(const char*, hash_map<const char*, const char*, hash<const char*>, eqstr>));
long interswitch_getBillerCategories(const char *endpoint, char *error, long(*save)(hash_map<const char*, const char*, hash<const char*>, eqstr>));
string interswitch_getBankCodes(const char *endpoint, const char *tid, char *status);
string interswitch_queryTransaction(const char *endpoint, const char *tid, const char *transferCode, const char *requestReference, char *status, char *transactionResponseCode);
long interswitch_getBalance(const char *endpoint, const char *tid, const char *mkey, const char *pin, char *status);
string interswitch_transferFunds(const char *endpoint, const char *tid, const char *mkey, const char *pin, char *error, const char *account, const char *uniqueRef, const char *bankCode, long currency, long amount ,CVars trans_info);
string interswitch_SendBillPaymentAdvice(const char *endpoint, const char *tid, long amount, const char *paymentCode, long customerId, const char *requestReference, char *status, char *transactionRef,char *customer_mobile,char *customer_email);
string interswitch_doTransfer(const char *endpoint, const char *tid, CVars trans_info, char *error);
//char * interswitch_pinChange(const char *tid, const char *mkey, const char *pin, char *status);
long interswitch_test();
#endif
/*
vi:ts=2
*/
+12
View File
@@ -0,0 +1,12 @@
#include "interswitchH.h"
SOAP_NMAC struct Namespace interswitch_namespaces[] =
{
{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://schemas.xmlsoap.org/soap/envelope/", NULL},
{"SOAP-ENC", "http://www.w3.org/2003/05/soap-encoding", "http://www.w3.org/2003/05/soap-encoding", NULL},
{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
{"interswitch2", "http://schemas.microsoft.com/2003/10/Serialization/", NULL, NULL},
{"interswitch", "http://services.interswitchng.com/quicktellerservice/", NULL, NULL},
{NULL, NULL, NULL, NULL}
};
@@ -0,0 +1,171 @@
/* interswitchBasicHttpBinding_USCOREQuickTellerServiceProxy.h
Generated by gSOAP 2.7.16 from QuickTellerService.h
Copyright(C) 2000-2010, Robert van Engelen, Genivia Inc. All Rights Reserved.
This part of the software is released under one of the following licenses:
GPL, the gSOAP public license, or Genivia's license for commercial use.
*/
#ifndef interswitchBasicHttpBinding_USCOREQuickTellerServiceProxy_H
#define interswitchBasicHttpBinding_USCOREQuickTellerServiceProxy_H
#include "interswitchH.h"
namespace interswitch {
class SOAP_CMAC BasicHttpBinding_USCOREQuickTellerServiceProxy : public soap
{ public:
/// Endpoint URL of service 'BasicHttpBinding_USCOREQuickTellerServiceProxy' (change as needed)
const char *soap_endpoint;
/// Constructor
BasicHttpBinding_USCOREQuickTellerServiceProxy();
/// Constructor with copy of another engine state
BasicHttpBinding_USCOREQuickTellerServiceProxy(const struct soap&);
/// Constructor with engine input+output mode control
BasicHttpBinding_USCOREQuickTellerServiceProxy(soap_mode iomode);
/// Constructor with engine input and output mode control
BasicHttpBinding_USCOREQuickTellerServiceProxy(soap_mode imode, soap_mode omode);
/// Destructor frees deserialized data
virtual ~BasicHttpBinding_USCOREQuickTellerServiceProxy();
/// Initializer used by constructors
virtual void BasicHttpBinding_USCOREQuickTellerServiceProxy_init(soap_mode imode, soap_mode omode);
/// Delete all deserialized data (uses soap_destroy and soap_end)
virtual void destroy();
/// Disables and removes SOAP Header from message
virtual void soap_noheader();
/// Get SOAP Fault structure (NULL when absent)
virtual const SOAP_ENV__Fault *soap_fault();
/// Get SOAP Fault string (NULL when absent)
virtual const char *soap_fault_string();
/// Get SOAP Fault detail as string (NULL when absent)
virtual const char *soap_fault_detail();
/// Force close connection (normally automatic, except for send_X ops)
virtual int soap_close_socket();
/// Print fault
virtual void soap_print_fault(FILE*);
#ifndef WITH_LEAN
/// Print fault to stream
virtual void soap_stream_fault(std::ostream&);
/// Put fault into buffer
virtual char *soap_sprint_fault(char *buf, size_t len);
#endif
/// Web service operation 'ValidateCustomer' (returns error code or SOAP_OK)
virtual int ValidateCustomer(_interswitch__ValidateCustomer *interswitch__ValidateCustomer, _interswitch__ValidateCustomerResponse *interswitch__ValidateCustomerResponse);
/// Web service operation 'DoTransfer' (returns error code or SOAP_OK)
virtual int DoTransfer(_interswitch__DoTransfer *interswitch__DoTransfer, _interswitch__DoTransferResponse *interswitch__DoTransferResponse);
/// Web service operation 'CancelTransfer' (returns error code or SOAP_OK)
virtual int CancelTransfer(_interswitch__CancelTransfer *interswitch__CancelTransfer, _interswitch__CancelTransferResponse *interswitch__CancelTransferResponse);
/// Web service operation 'SendSessionKey' (returns error code or SOAP_OK)
virtual int SendSessionKey(_interswitch__SendSessionKey *interswitch__SendSessionKey, _interswitch__SendSessionKeyResponse *interswitch__SendSessionKeyResponse);
/// Web service operation 'QueryTransfer' (returns error code or SOAP_OK)
virtual int QueryTransfer(_interswitch__QueryTransfer *interswitch__QueryTransfer, _interswitch__QueryTransferResponse *interswitch__QueryTransferResponse);
/// Web service operation 'AuthoriseCashOut' (returns error code or SOAP_OK)
virtual int AuthoriseCashOut(_interswitch__AuthoriseCashOut *interswitch__AuthoriseCashOut, _interswitch__AuthoriseCashOutResponse *interswitch__AuthoriseCashOutResponse);
/// Web service operation 'AuthoriseAccountCashOut' (returns error code or SOAP_OK)
virtual int AuthoriseAccountCashOut(_interswitch__AuthoriseAccountCashOut *interswitch__AuthoriseAccountCashOut, _interswitch__AuthoriseAccountCashOutResponse *interswitch__AuthoriseAccountCashOutResponse);
/// Web service operation 'ReverseCashOut' (returns error code or SOAP_OK)
virtual int ReverseCashOut(_interswitch__ReverseCashOut *interswitch__ReverseCashOut, _interswitch__ReverseCashOutResponse *interswitch__ReverseCashOutResponse);
/// Web service operation 'StatusCheck' (returns error code or SOAP_OK)
virtual int StatusCheck(_interswitch__StatusCheck *interswitch__StatusCheck, _interswitch__StatusCheckResponse *interswitch__StatusCheckResponse);
/// Web service operation 'QueryTransaction' (returns error code or SOAP_OK)
virtual int QueryTransaction(_interswitch__QueryTransaction *interswitch__QueryTransaction, _interswitch__QueryTransactionResponse *interswitch__QueryTransactionResponse);
/// Web service operation 'GetSystemSettings' (returns error code or SOAP_OK)
virtual int GetSystemSettings(_interswitch__GetSystemSettings *interswitch__GetSystemSettings, _interswitch__GetSystemSettingsResponse *interswitch__GetSystemSettingsResponse);
/// Web service operation 'CreateUser' (returns error code or SOAP_OK)
virtual int CreateUser(_interswitch__CreateUser *interswitch__CreateUser, _interswitch__CreateUserResponse *interswitch__CreateUserResponse);
/// Web service operation 'ActivateUser' (returns error code or SOAP_OK)
virtual int ActivateUser(_interswitch__ActivateUser *interswitch__ActivateUser, _interswitch__ActivateUserResponse *interswitch__ActivateUserResponse);
/// Web service operation 'UpdateUser' (returns error code or SOAP_OK)
virtual int UpdateUser(_interswitch__UpdateUser *interswitch__UpdateUser, _interswitch__UpdateUserResponse *interswitch__UpdateUserResponse);
/// Web service operation 'ChangePassword' (returns error code or SOAP_OK)
virtual int ChangePassword(_interswitch__ChangePassword *interswitch__ChangePassword, _interswitch__ChangePasswordResponse *interswitch__ChangePasswordResponse);
/// Web service operation 'ResetPassword' (returns error code or SOAP_OK)
virtual int ResetPassword(_interswitch__ResetPassword *interswitch__ResetPassword, _interswitch__ResetPasswordResponse *interswitch__ResetPasswordResponse);
/// Web service operation 'AuthenticateUser' (returns error code or SOAP_OK)
virtual int AuthenticateUser(_interswitch__AuthenticateUser *interswitch__AuthenticateUser, _interswitch__AuthenticateUserResponse *interswitch__AuthenticateUserResponse);
/// Web service operation 'AuthenticateUserSecurityToken' (returns error code or SOAP_OK)
virtual int AuthenticateUserSecurityToken(_interswitch__AuthenticateUserSecurityToken *interswitch__AuthenticateUserSecurityToken, _interswitch__AuthenticateUserSecurityTokenResponse *interswitch__AuthenticateUserSecurityTokenResponse);
/// Web service operation 'GetUser' (returns error code or SOAP_OK)
virtual int GetUser(_interswitch__GetUser *interswitch__GetUser, _interswitch__GetUserResponse *interswitch__GetUserResponse);
/// Web service operation 'GetBillers' (returns error code or SOAP_OK)
virtual int GetBillers(_interswitch__GetBillers *interswitch__GetBillers, _interswitch__GetBillersResponse *interswitch__GetBillersResponse);
/// Web service operation 'GetLatestBillers' (returns error code or SOAP_OK)
virtual int GetLatestBillers(_interswitch__GetLatestBillers *interswitch__GetLatestBillers, _interswitch__GetLatestBillersResponse *interswitch__GetLatestBillersResponse);
/// Web service operation 'GetFeaturedBillers' (returns error code or SOAP_OK)
virtual int GetFeaturedBillers(_interswitch__GetFeaturedBillers *interswitch__GetFeaturedBillers, _interswitch__GetFeaturedBillersResponse *interswitch__GetFeaturedBillersResponse);
/// Web service operation 'GetBillerPaymentItems' (returns error code or SOAP_OK)
virtual int GetBillerPaymentItems(_interswitch__GetBillerPaymentItems *interswitch__GetBillerPaymentItems, _interswitch__GetBillerPaymentItemsResponse *interswitch__GetBillerPaymentItemsResponse);
/// Web service operation 'GetBillerCategories' (returns error code or SOAP_OK)
virtual int GetBillerCategories(_interswitch__GetBillerCategories *interswitch__GetBillerCategories, _interswitch__GetBillerCategoriesResponse *interswitch__GetBillerCategoriesResponse);
/// Web service operation 'DoBillPaymentInquiry' (returns error code or SOAP_OK)
virtual int DoBillPaymentInquiry(_interswitch__DoBillPaymentInquiry *interswitch__DoBillPaymentInquiry, _interswitch__DoBillPaymentInquiryResponse *interswitch__DoBillPaymentInquiryResponse);
/// Web service operation 'AuthenticateCustomer' (returns error code or SOAP_OK)
virtual int AuthenticateCustomer(_interswitch__AuthenticateCustomer *interswitch__AuthenticateCustomer, _interswitch__AuthenticateCustomerResponse *interswitch__AuthenticateCustomerResponse);
/// Web service operation 'SendBillPaymentAdvice' (returns error code or SOAP_OK)
virtual int SendBillPaymentAdvice(_interswitch__SendBillPaymentAdvice *interswitch__SendBillPaymentAdvice, _interswitch__SendBillPaymentAdviceResponse *interswitch__SendBillPaymentAdviceResponse);
/// Web service operation 'SendPayments' (returns error code or SOAP_OK)
virtual int SendPayments(_interswitch__SendPayments *interswitch__SendPayments, _interswitch__SendPaymentsResponse *interswitch__SendPaymentsResponse);
/// Web service operation 'AddCustomerBillerAccount' (returns error code or SOAP_OK)
virtual int AddCustomerBillerAccount(_interswitch__AddCustomerBillerAccount *interswitch__AddCustomerBillerAccount, _interswitch__AddCustomerBillerAccountResponse *interswitch__AddCustomerBillerAccountResponse);
/// Web service operation 'GetCustomerBillerAccounts' (returns error code or SOAP_OK)
virtual int GetCustomerBillerAccounts(_interswitch__GetCustomerBillerAccounts *interswitch__GetCustomerBillerAccounts, _interswitch__GetCustomerBillerAccountsResponse *interswitch__GetCustomerBillerAccountsResponse);
/// Web service operation 'GetCustomerPayments' (returns error code or SOAP_OK)
virtual int GetCustomerPayments(_interswitch__GetCustomerPayments *interswitch__GetCustomerPayments, _interswitch__GetCustomerPaymentsResponse *interswitch__GetCustomerPaymentsResponse);
/// Web service operation 'AddBillerCustomer' (returns error code or SOAP_OK)
virtual int AddBillerCustomer(_interswitch__AddBillerCustomer *interswitch__AddBillerCustomer, _interswitch__AddBillerCustomerResponse *interswitch__AddBillerCustomerResponse);
/// Web service operation 'GetCollectionsAccount' (returns error code or SOAP_OK)
virtual int GetCollectionsAccount(_interswitch__GetCollectionsAccount *interswitch__GetCollectionsAccount, _interswitch__GetCollectionsAccountResponse *interswitch__GetCollectionsAccountResponse);
/// Web service operation 'GetBillersCollectionsAccount' (returns error code or SOAP_OK)
virtual int GetBillersCollectionsAccount(_interswitch__GetBillersCollectionsAccount *interswitch__GetBillersCollectionsAccount, _interswitch__GetBillersCollectionsAccountResponse *interswitch__GetBillersCollectionsAccountResponse);
/// Web service operation 'EditCustomerBillerAccount' (returns error code or SOAP_OK)
virtual int EditCustomerBillerAccount(_interswitch__EditCustomerBillerAccount *interswitch__EditCustomerBillerAccount, _interswitch__EditCustomerBillerAccountResponse *interswitch__EditCustomerBillerAccountResponse);
/// Web service operation 'ResendActivationToken' (returns error code or SOAP_OK)
virtual int ResendActivationToken(_interswitch__ResendActivationToken *interswitch__ResendActivationToken, _interswitch__ResendActivationTokenResponse *interswitch__ResendActivationTokenResponse);
/// Web service operation 'DoCustomProcessing' (returns error code or SOAP_OK)
virtual int DoCustomProcessing(_interswitch__DoCustomProcessing *interswitch__DoCustomProcessing, _interswitch__DoCustomProcessingResponse *interswitch__DoCustomProcessingResponse);
/// Web service operation 'CreateBiller' (returns error code or SOAP_OK)
virtual int CreateBiller(_interswitch__CreateBiller *interswitch__CreateBiller, _interswitch__CreateBillerResponse *interswitch__CreateBillerResponse);
/// Web service operation 'VerifyBiller' (returns error code or SOAP_OK)
virtual int VerifyBiller(_interswitch__VerifyBiller *interswitch__VerifyBiller, _interswitch__VerifyBillerResponse *interswitch__VerifyBillerResponse);
};
} // namespace interswitch
#endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,28 @@
#ifndef __INTERSITCH_SENDMONEY_H__
#define __INTERSITCH_SENDMONEY_H__
#include <stdarg.h>
#include "vars.h"
#include "interswitch.h"
extern "C" {
long INTW_configure(CVars in, CVars &out);
long INTW_getBillersSave(hash_map<const char*, const char*, hash<const char*>, eqstr> saveData);
long INTW_getBillers(CVars in, CVars &out);
long INTW_getSaveGeneric(const char *table, hash_map<const char*, const char*, hash<const char*>, eqstr> saveData);
long INTW_getBillerPaymentItems(CVars in, CVars &out);
long INTW_getBillerCategories(CVars in, CVars &out );
long INTW_sendBillPaymentAdvice(CVars in, CVars &out );
long INTW_doTransfer(CVars in, CVars &out );
long INTW_queryTransaction(CVars in, CVars &out );
long INTW_doServiceTransfer(CVars in, CVars &out );
long do_transferPayment(CVars pm);
long INTW_querySendMoneyTransaction(CVars in, CVars &out);
long INTW_doCompleteSavedTransfer(CVars in, CVars &out);
}
#endif
+28
View File
@@ -0,0 +1,28 @@
#ifndef __mx_jobs_h__
#define __mx_jobs_h__
#include "vars.h"
long jobs_calls(CVars in, CVars &out);
long WrenchCreateJobs( CVars in, CVars &out );
long WrenchDeleteJobs( CVars in, CVars &out );
long WrenchEditJobs( CVars in, CVars &out );
long WrenchAddJobsGroupMember( CVars in, CVars &out );
long WrenchCreateJobsGroup( CVars in, CVars &out );
long WrenchDeleteJobsGroup( CVars in, CVars &out );
long WrenchDeleteJobsGroupMember( CVars in, CVars &out );
long WrenchSendJobsOfferIndividual( CVars in, CVars &out );
long WrenchSendJobsOfferGroup( CVars in, CVars &out );
long WrenchSendJobsOfferPublic( CVars in, CVars &out );
long WrenchJobsOfferInterest( CVars in, CVars &out );
long WrenchJobsProcessInterest( CVars in, CVars &out );
long WrenchConcludeJobsOffer( CVars in, CVars &out );
#endif
+21
View File
@@ -0,0 +1,21 @@
#ifndef __storeface_list_h__
#define __storeface_list_h__
typedef struct _list
{
char * text;
struct _list * next;
} TList;
void DestroyList( TList * top );
TList * Add( TList * list, char * text, long size );
TList * AddF( TList * list, char * format, ... );
#endif
+12
View File
@@ -0,0 +1,12 @@
#ifndef __mx_login_h__
#define __mx_login_h__
#include "vars.h"
long LoginAdmin(CVars in, CVars &out);
long LoginShop(CVars in, CVars &out);
long LoginManager(CVars in, CVars &out);
long CommonSessionCheck(long managers_id,long shop,long acc, const char *sessionid, int create );
#endif
+15
View File
@@ -0,0 +1,15 @@
#ifndef __mx_mobile_h__
#define __mx_mobile_h__
#include "vars.h"
long mobile_calls(CVars in, CVars &out);
long WrenchReturnActiveJobsList(CVars in, CVars &out);
long WrenchReturnJobOffersList(CVars in, CVars &out);
long WrenchReturnUserProfile(CVars in, CVars &out);
long WrenchReturnUserAccount(CVars in, CVars &out);
#endif
+13
View File
@@ -0,0 +1,13 @@
#ifndef __mx_payments_h__
#define __mx_payments_h__
#include "vars.h"
long WrenchOfferPayment( CVars in, CVars &out );
long WrenchSendMoneyPayment( CVars in, CVars &out );
long WrenchRefundoffer( CVars in, CVars &out );
long WrenchContractPayment( CVars in, CVars &out );
long WrenchCanceContractPayment( CVars in, CVars &out );
#endif
+28
View File
@@ -0,0 +1,28 @@
#ifndef __PGSQL_H__
#define __PGSQL_H__
#include <libpq-fe.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string>
#include <map>
#include <vector>
using namespace std;
int pgsql_db_connect(const char*host,const char*name,const char*user,const char*pass,long port);
int pgsql_exec(const char * format, ... );
const PGresult* pgsql_query(const char * format, ... );
int pgsql_num_rows(const PGresult *res);
int pgsql_num_fields(const PGresult *res);
map<const char*,const char*> pgsql_fetch_assoc(const PGresult *res, int row);
vector<const char*> pgsql_fetch_row(const PGresult *res, int row);
void pgsql_close();
char* pgsql_uitoa(unsigned n, char *s, int radix);
#endif
/*
vi:ts=2
*/
+42
View File
@@ -0,0 +1,42 @@
#ifndef __PGSQL_WRAPPER_H__
#define __PGSQL_WRAPPER_H__
#include "exceptions.h"
enum { DBS_ALL=0, DBS_VALID=1, DBS_STREAM=2 };
class CEscape;
#define NEED_ESC CEscape __esc( cmd );
#define esc( param ) __esc.Escape( param )
#define ESCAPE_MAX_VARS 50
void map_to_cvars(map<const char *,const char *>f, CVars &rec);
void load_db_record( const char * table, CVars &rec, const char * where, ... );
long load_db_record( CVars &rec, const char * query, ... );
long insert_db_record( int mode, const char *table, const char *seq, CVars &rec );
void update_db_record( int mode, const char * table, CVars &rec, long id, const char * where=NULL, ... ) throw ( bad_parameter );
void v_update_db_record( int mode, const char * table, CVars &rec, const char *index, long id, const char * where=NULL, va_list ap=NULL ) throw ( bad_parameter );
void update_db_record( int mode, const char * table, CVars &rec, const char *index, long id, const char * where=NULL, ... ) throw ( bad_parameter );
long curr_val( const char *seq );
class CEscape
{
public:
char * New( int sz );
CEscape( char * st );
~CEscape();
char * Escape( const char * param );
private:
char * vars[ESCAPE_MAX_VARS];
int n;
char * st;
char esc[1000];
int EscapeLength( const char * par ); // Calculate the required buffer size for escaped par
char *EscapeReal( const char * cmd, char * _esc=NULL, int sz=0 ); // Escape a string for SQL server
};
#endif
@@ -0,0 +1 @@
#define FILELOG_MAX_LEVEL 9
@@ -0,0 +1 @@
#define TMPL_PREFIX "/home/oameye/wrenchboard/wrenchboard/email/"
@@ -0,0 +1,18 @@
#ifndef PHP_WRENCHBOARD_API_H
#define PHP_WRENCHBOARD_API_H
#define PHP_WRENCHBOARD_API_EXTNAME "wrenchboard_api"
#define PHP_WRENCHBOARD_API_EXTVER "0.1"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
extern "C" {
#include "php.h"
}
extern zend_module_entry wrenchboard_api_module_entry;
#define phpext_wrenchboard_api_ptr &wrenchboard_api_module_entry;
#endif /* PHP_WRENCHBOARD_API_H */
@@ -0,0 +1 @@
#define WRENCHBOARD_API_NS "wrenchboard_api_oameye"
@@ -0,0 +1 @@
#define WRENCHBOARD_CONFIG "/home/oameye/wrenchboard/wrenchboard/etc/"
@@ -0,0 +1 @@
#define WRENCHBOARD_LOG "/home/oameye/wrenchboard/wrenchboard/logs/wrenchboard_api.log"
+49
View File
@@ -0,0 +1,49 @@
#ifndef __safestr_lib
#define __safestr_lib
#include "config.h"
#define SAFESTRING_COMMON_BUFFER_SIZE 1024
#ifdef __cplusplus
extern "C"
{
#endif
char * strsafecpy( char * dest, const char * src, int size );
char * strnsafecpy( char * dest, const char * src, int n, int size );
char * strsafecat( char * dest, const char * src, int size );
char * strcatf( char * dest, int size, const char * fmt, ... );
char * strnsafecat( char * dest, const char * src, int n, int size );
// Append first n characters of src to dest
char * last_line( char * buf ); // find the last line and return the pointer to its beginning
char * safestrdup( const char *s );
char * strreverse( char *s );
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
char * toupper( char * s, char * dest=0, int sz=0 );
char * tolower( char * s, char * dest=0, int sz=0 );
char * toupper( const char * s, char * dest, int sz );
char * tolower( const char * s, char * dest, int sz );
#endif
//int GetParam(char * params, char _name[], char value[], int valuelen, char ** end = 0 );
#endif
+108
View File
@@ -0,0 +1,108 @@
/*
* FIPS 180-2 SHA-224/256/384/512 implementation
* Last update: 02/02/2007
* Issue date: 04/30/2005
*
* Copyright (C) 2005, 2007 Olivier Gay <olivier.gay@a3.epfl.ch>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#ifndef SHA2_H
#define SHA2_H
#define SHA224_DIGEST_SIZE ( 224 / 8)
#define SHA256_DIGEST_SIZE ( 256 / 8)
#define SHA384_DIGEST_SIZE ( 384 / 8)
#define SHA512_DIGEST_SIZE ( 512 / 8)
#define SHA256_BLOCK_SIZE ( 512 / 8)
#define SHA512_BLOCK_SIZE (1024 / 8)
#define SHA384_BLOCK_SIZE SHA512_BLOCK_SIZE
#define SHA224_BLOCK_SIZE SHA256_BLOCK_SIZE
#ifndef SHA2_TYPES
#define SHA2_TYPES
typedef unsigned char uint8;
typedef unsigned int uint32;
typedef unsigned long long uint64;
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
unsigned int tot_len;
unsigned int len;
unsigned char block[2 * SHA256_BLOCK_SIZE];
uint32 h[8];
} sha256_ctx;
typedef struct {
unsigned int tot_len;
unsigned int len;
unsigned char block[2 * SHA512_BLOCK_SIZE];
uint64 h[8];
} sha512_ctx;
typedef sha512_ctx sha384_ctx;
typedef sha256_ctx sha224_ctx;
void sha224_init(sha224_ctx *ctx);
void sha224_update(sha224_ctx *ctx, const unsigned char *message,
unsigned int len);
void sha224_final(sha224_ctx *ctx, unsigned char *digest);
void sha224(const unsigned char *message, unsigned int len,
unsigned char *digest);
void sha256_init(sha256_ctx * ctx);
void sha256_update(sha256_ctx *ctx, const unsigned char *message,
unsigned int len);
void sha256_final(sha256_ctx *ctx, unsigned char *digest);
void sha256(const unsigned char *message, unsigned int len,
unsigned char *digest);
void sha384_init(sha384_ctx *ctx);
void sha384_update(sha384_ctx *ctx, const unsigned char *message,
unsigned int len);
void sha384_final(sha384_ctx *ctx, unsigned char *digest);
void sha384(const unsigned char *message, unsigned int len,
unsigned char *digest);
void sha512_init(sha512_ctx *ctx);
void sha512_update(sha512_ctx *ctx, const unsigned char *message,
unsigned int len);
void sha512_final(sha512_ctx *ctx, unsigned char *digest);
void sha512(const unsigned char *message, unsigned int len,
unsigned char *digest);
#ifdef __cplusplus
}
#endif
#endif /* !SHA2_H */
+10
View File
@@ -0,0 +1,10 @@
#ifndef __SHA512_H__
#define __SHA512_H__
#include<string>
using namespace std;
string hash_sha512_cpp(string msg_arr);
#endif
+10
View File
@@ -0,0 +1,10 @@
#ifndef __mx_site_crons_h__
#define __mx_site_crons_h__
#include "vars.h"
long sitecrons_calls(CVars in, CVars &out);
#endif
+15
View File
@@ -0,0 +1,15 @@
#ifndef __mx_smoney_h__
#define __mx_smoney_h__
#include "vars.h"
long smoney_calls(CVars in, CVars &out);
long member_addrecipient(CVars in, CVars &out);
long member_sendmoney(CVars in, CVars &out);
long member_sendmoney_fee(CVars in, CVars &out);
long bko_process_sendmoney(CVars in, CVars &out);
#endif
+10
View File
@@ -0,0 +1,10 @@
#ifndef __smtp_lib
#define __smtp_lib
#include "php_tmpl_prefix.h"
#define EMAIL_PREFIX TMPL_PREFIX
int SMTP2( const char * _server, const char * _from, char * _to, char * _body, const char * _domain, const char * _user, const char * _pass, const char * _name);
#endif
+27
View File
@@ -0,0 +1,27 @@
#ifndef __STRIPE_H__
#define __STRIPE_H__
#include <vector>
#include <string>
using namespace std;
void remove_all_chars(char* str, char c);
long stripe_tokenize_card(const char *key, const char *ccnum, const char *ccexpm, const char *ccexpy, const char *cccvc, char *token, size_t token_size);
long stripe_get_all_cards(const char *key, char *customer, vector <string> *ccids, vector <string> *ccdigits, vector <string> *ccexpm, vector <string> *ccexpy);
long stripe_get_card(const char *key, char *customer, const char *ccdigits, const char *ccexpm, const char *ccexpy, char *card, size_t card_size);
long stripe_create_card(const char *key, char *customer, char *token, char *card, size_t card_size);
long stripe_charge_token(const char *key, char *token, int amount, const char *currency, const char *description, const char *metadata, char *id, size_t id_size);
long stripe_create_customer(const char *key, char *token, const char *email, const char *description, const char *metadata, char *id, size_t id_size);
long stripe_charge_customer(const char *key, char *customer, int amount, const char *currency, const char *description, const char *metadata, char *id, size_t id_size);
long stripe_update_customer(const char *key, char *customer, const char *entity, const char *entity_value, const char *result, char *data, size_t data_size);
long stripe_charge_real(const char *key, const char *entity_name, char *entity, int amount, const char *currency, const char *description, const char *metadata, char *id, size_t id_size);
string stripe_get_card_type(const char *card);
/*
* https://stripe.com/docs/api/curl#create_card
* https://stripe.com/docs/testing#cards
* https://dashboard.stripe.com
*/
#endif
+13
View File
@@ -0,0 +1,13 @@
#ifndef __stripe_charge_h__
#define __stripe_charge_h__
#include "vars.h"
long stripe_save_card(CVars in, CVars &out);
long stripe_one_time_charge(CVars in, CVars &out);
long stripe_new_customer_charge(CVars in, CVars &out);
long stripe_charge_member(CVars in, CVars &out);
long stripe_charge_member_paymentid(CVars in, CVars &out);
#endif
+20
View File
@@ -0,0 +1,20 @@
#ifndef __timer_h__
#define __timer_h__
class CTimer
{
public:
CTimer( );
void init();
bool timeout( unsigned long t );
void wake( unsigned long );
unsigned long elapsed( );
private:
unsigned long prev;
};
#endif
+15
View File
@@ -0,0 +1,15 @@
#ifndef __mx_topups_h__
#define __mx_topups_h__
#include "vars.h"
//long CreateWrenchBoardAccount(CVars in, CVars &out);
long CreateBulkTopupBatch(CVars in, CVars &out);
long AddBulkTopupBatchItem(CVars in, CVars &out);
long UpdateBulkTopupItem(CVars in, CVars &out);
long DeliverBulkTopupItem(CVars in, CVars &out);
long CreateTopupOrder(CVars in, CVars &out);
long DeliverTopOrderByBalance(CVars in, CVars &out);
#endif
+11
View File
@@ -0,0 +1,11 @@
#ifndef __mx_twilo_h__
#define __mx_twilo_h__
#include "vars.h"
long twilo_calls(CVars in, CVars &out);
long SendSMSMessage(CVars in, CVars &out);
#endif
+10
View File
@@ -0,0 +1,10 @@
#ifndef __UTIL_H__
#define __UTIL_H__
bool reg_match( const char * input, const char * regexp, char * ret=NULL, int sz=0, int * pos = NULL );
//char * urlencode(const char * buf); // Encode a string using URL-encoding
char * urlencode(const char * buf, char *, int ); // Encode a string using URL-encoding
//char * urldecode( char * buf); // Decode a string using URL-encoding
char * urldecode( char * buf, char *, int ); // Decode a string using URL-encoding
#endif
+125
View File
@@ -0,0 +1,125 @@
#ifndef __vars_h__
#define __vars_h__
#pragma interface
#include <map>
#include <string>
using std::string;
using std::map;
/*
struct hash_str
{
inline size_t string_hf(const string& str)
{ return hash(str.c_str()); }
};
struct MyHASHER : public hash<const char*>{
size_t operator(string a_string){
return (*this)( a_string.c_str() );
}
}
struct eqstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) == 0;
}
};
*/
class varstring : public string
{
public:
varstring();
varstring( const varstring &c );
varstring( const string &c );
varstring( const char* c, int len);
varstring( const char *c );
long Long() const;
double Double();
varstring& operator=( const char* c );
void operator=( long l );
void operator=( const string c );
varstring& operator=( const varstring &c );
operator long(); // type conversion
operator const char*(); // type conversion
bool valid() const;
void set_valid( bool validated = true );
bool db() const;
void set_db( bool validated = true );
bool binary() const;
void set_binary( bool binary = true );
friend class CVars;
private:
bool validated;
bool db_var; // is this variable to be used in DB updates
bool binary_var;
};
/*
class string_key : public string
{
public:
string_key& operator=( const char* c );
void operator=( long l );
void operator=( const string c );
string_key();
string_key( const char *c );
bool valid() const;
void set_valid( bool validated = true );
private:
bool validated;
};
*/
typedef
// hash_map<const char*, char*, hash<const char*>, eqstr>
// map< string_key, varstring >
map< const string, varstring >
CVars1;
class CVars : public CVars1
{
public:
CVars() : CVars1() {};
CVars& operator<<( char const *name ); // schedule for db processing
CVars& operator>>( char const *name ); // ignore db processing for this variable
void ClearDB();
long serialize( unsigned char *&buf ); // this will serialize the data into buf and return the resulting size
// it is the responsibility of the caller to free the buffer with free()
int deserialize( unsigned char *buf, long buf_sz ); // this will initialize the current instance by de-serializing the data from buf
// returns number of elements de-serialized
};
#endif
+20
View File
@@ -0,0 +1,20 @@
#ifndef WRENCHBOARD_API_WRENCHBOARD_H
#define WRENCHBOARD_API_WRENCHBOARD_H
#include "vars.h"
// A very simple wrenchboard class
class WrenchBoard {
public:
WrenchBoard();
~WrenchBoard();
long wrenchboard_api(CVars in, CVars &out);
const char* cfgReadChar(const char *parameter);
long cfgReadLong(const char *parameter);
void logMessage(const char *message);
private:
FILE* pFile;
int db;
};
#endif /* WRENCHBOARD_API_WRENCHBOARD_H */
+315
View File
@@ -0,0 +1,315 @@
#ifndef WRENCHBOARD_API_H
#define WRENCHBOARD_API_H
enum { DIR_TARGET, DIR_SOURCE };
enum { FLAG_INIT,FLAG_START,FLAG_CANCEL,FLAG_FAIL,FLAG_OK };
enum { WHAT_NEW_CARDADD, WHAT_PICKUP_INITIALPAYMENT };
enum { PARTNER_STRIPE };
#define PHP_API_OK 0
#define PHP_CREATED_OK 10
#define PHP_LOGIN_OK 100
#define PHP_API_BAD_PARAM -1
#define PAYMENT_MODE 100
#define REFUND_MODE 333
#define OFFER_ACCEPT 100
#define OFFER_REJECT 333
#define OFFER_CANCEL 222
#define OFFER_EXPIRE 444
#define OFFER_SENDTOME 777
#define CONTRACT_CANCEL_CONTRACT 7
#define CONTRACT_EXTEND_TIMELINE 9
#define CONTRACT_NOTIFY_COMPLETE 4
#define CONTRACT_REQUEST_CANCEL 3
#define CONTRACT_ACCEPT_COMPLETE 5
#define CONTRACT_REJECT_COMPLETE 1
#define SM_PENDING 1
#define SM_CANCEL 3
#define SM_FAILED 4
#define SM_COMPLETED 5
#define SMONEY_PROCC_MANUAL 100
#define SMONEY_PROCC_AUTO 200
#define SMONEY_PROCC_INTERSWITCH 300
// define email series here
#define ACCOUNT_CREATED_MAIL 100
#define ACCOUNT_CREATED_ALERT 101
#define ACCOUNT_CONTACT_MAIL 102
#define ACCOUNT_CONTACT_ALERT 103
#define ACCOUNT_PASSWORD_RESET 104
#define ACCOUNT_LOGIN_ALERT 105
#define ACCOUNT_RESEND_PENDING 106
#define ACCOUNT_SEND_REFEREMAIL 107
#define ACCOUNT_PASSWORD_COMPLT 108
#define ACCOUNT_SENDMONEY_ALERT 120
#define ACCOUNT_START_SENDMONEY 121
#define ACCOUNT_COMPLETE_SENDMONEY 122
#define JOBS_CREATED_MAIL 200
#define JOBS_INDIVIDUAL_OFFER_MAIL 201
#define JOBS_GROUP_OFFER_MAIL 202
#define JOBS_MESSAGE_ADDED 203
#define JOBS_GROUP_OFFER_PUBLIC 204
#define JOBS_OFFER_ACCEPT_MAIL 207
#define JOBS_OFFER_REJECT_MAIL 208
#define JOBS_OFFER_CANCEL_MAIL 209
#define JOBS_OFFER_INTEREST_MAIL 210
#define JOBS_OFFER_SENDTOME_MAIL 220
#define JOBS_DUE_APPROACH_MAIL 311
#define JOBS_PAYMENT_DUE_MAIL 312
#define JOB_INTEREST_ACCEPT 100
#define JOB_INTEREST_REJECT 200
#define JOB_INTEREST_CANCEL 300
//#define JOBS_CREATED_MAIL 202
//#define JOBS_CREATED_MAIL 203
#define PROJ_CREATED_MAIL 300
//#define PROJ_CREATED_MAIL 301
//#define PROJ_CREATED_MAIL 302
//#define PROJ_CREATED_MAIL 303
#define SMONEY_PROCC_MANUAL 100
#define SMONEY_PROCC_AUTO 200
#define ACCOUNT_AGREE_JOBS 100
#define ACCOUNT_AGREE_REFER 200
//========================
#define WRENCHBOARD_SESSION_CHECK 299
#define WRENCHBOARD_USER_LOGIN 300
#define WRENCHBOARD_USER_LOGOUT 301
#define WRENCHBOARD_CREATE_ACCOUNT 320
// -- CRON JOBS
#define WRB_JOB_CRONJOB 770
#define WRB_CRONJOB_JOBDUE_REMINDER 771
#define WRB_CRONJOB_JOBDUE_PAYMENTS 772
#define WRB_CRONJOB_SIGNUP_ALERT 773
#define WRB_CRONJOB_PASTDUE_ALERT 774
//**************************************************************
#define WRENCHBOARD_BKO_START 10000
#define WRENCHBOARD_BKO_LOGIN 10010
#define WRENCHBOARD_BKO_CREATEUSER 10015
#define WRENCHBOARD_BKO_UPDATEUSER 10020
#define WRENCHBOARD_BKO_END 10999
//**************************************************************
#define WRENCHBOARD_ACCOUNT_START 11000
#define WRENCHBOARD_ACCOUNT_TESTEMAIL 11001
#define WRENCHBOARD_ACCOUNT_PENDING 11010
#define WRENCHBOARD_CREATE_MOBILEUSER 11011
#define WRENCHBOARD_COMPLETE_MOBILEUSER 11012
#define WRENCHBOARD_RESET_PASSWORD 11013
#define WRENCHBOARD_ACCOUNT_JOBLIST 11014
#define WRENCHBOARD_VERIFY_PENDING_LINK 11015
#define WRENCHBOARD_ACCOUNT_RESETPASS 11016
#define WRENCHBOARD_ACCOUNT_SETPASSWD 11017
#define WRENCHBOARD_DELETE_PENDING_LINK 11018
#define WRENCHBOARD_RESEND_PENDING_LINK 11019
#define WRENCHBOARD_ACCOUNT_CREATEACC 11020
#define WRENCHBOARD_ACCOUNT_LOGIN 11025
#define WRENCHBOARD_FACEBOOK_LOGIN 11026
#define WRENCHBOARD_START_JOBLIST 11028
#define WRENCHBOARD_ACCOUNT_DASHDATA 11029
#define WRENCHBOARD_SEND_CONTACTUS 11030
#define WRENCHBOARD_ACCOUNT_SENDREFER 11032
#define WRENCHBOARD_ACCOUNT_REFERLINK 11033
#define WRENCHBOARD_SESSION_VERIFY 11034
#define WRENCHBOARD_UPDATE_PROFILE 11035
#define WRENCHBOARD_ACCOUNT_TERMS 11036
#define WRENCHBOARD_ACCOUNT_MDESCRIPTION 11037
#define WRENCHBOARD_ACCOUNT_SAVESKILL 11038
#define WRENCHBOARD_ACCOUNT_DELSKILL 11039
#define WRENCHBOARD_LOG_MEMBER 11040
#define WRENCHBOARD_DELETE_RECACC 11041
#define WRENCHBOARD_SAVE_GALLERY 11042
#define WRENCHBOARD_ACCOUNT_PENDJOB 11043
#define WRENCHBOARD_USER_GETBANKLIST 11050
#define WRENCHBOARD_USER_SENDMONEY 11051
#define WRENCHBOARD_USER_SENDJOBINT 11052
#define WRENCHBOARD_ACCOUNT_END 11999
//**************************************************************
#define WRENCHBOARD_GROUP_START 12000
#define WRENCHBOARD_GROUP_CREATEGROUP 12010
#define WRENCHBOARD_GROUP_INVITEGROUP 12015
#define WRENCHBOARD_GROUP_ACCEPTGROUP 12020
#define WRENCHBOARD_GROUP_END 12999
//**************************************************************
#define WRENCHBOARD_JOBS_START 13000
#define WRENCHBOARD_JOB_CREATEJOB 13010
#define WRENCHBOARD_JOB_DELETEJOB 13011
#define WRENCHBOARD_JOB_GROUP_MEMBER 13015
#define WRENCHBOARD_JOB_DELETE_GROUPMEMBER 13017
#define WRENCHBOARD_JOB_CREATE_GROUP 13020
#define WRENCHBOARD_JOB_DELETE_GROUP 13023
#define WRENCHBOARD_JOB_OFFER_INDVI 13030
#define WRENCHBOARD_JOB_OFFER_GROUP 13031
#define WRENCHBOARD_JOB_OFFER_PUBLIC 13032
#define WRENCHBOARD_JOB_SEND_INTEREST 13033
#define WRENCHBOARD_JOB_PROC_INTEREST 13034
#define WRENCHBOARD_JOB_OFFER_CONCLUDE 13035
#define WRENCHBOARD_JOB_SEND_QUESTION 13036
#define WRENCHBOARD_JOB_MRKTINT_QUEST 13037
#define WRENCHBOARD_JOB_REPLY_QUESTION 13038
#define WRENCHBOARD_JOBS_END 13999
//**************************************************************
#define WRENCHBOARD_CONTRACT_START 14000
#define WRENCHBOARD_CONTRACT_MESSAGE 14010
#define WRENCHBOARD_CONTRACT_STATUS 14015
#define WRENCHBOARD_CONTRACT_END 14999
//**************************************************************
#define WRENCHBOARD_MOBILE_START 15000
#define WRENCHBOARD_MOBILE_OFFERSLIST 15010
#define WRENCHBOARD_MOBILE_ACTIVEJOB 15020
#define WRENCHBOARD_MOBILE_LOADPROFILE 15030
#define WRENCHBOARD_MOBILE_ACCOUNT 15040
#define WRENCHBOARD_MOBILE_MESSAGE 15045
#define WRENCHBOARD_MOBILE_PAYMENTHX 15046
#define WRENCHBOARD_MOBILE_TASKMESSAGE 15047
#define WRENCHBOARD_MOBILE_SENDTASKMESSAGE 15048
#define WRENCHBOARD_MOBILE_END 15999
//**************************************************************
#define WRENCHBOARD_SMONEY_START 33000
#define WRENCHBOARD_SMONEY_ADDRECIPIENT 33010
#define WRENCHBOARD_SMONEY_MEMBER 33020
#define WRENCHBOARD_SMONEY_PROCFEE 33025
#define WRENCHBOARD_SMONEY_BKOPROC 33030
#define WRENCHBOARD_SMONEY_END 33999
//**************************************************************
#define WRENCHBOARD_LOGIN_SHOP 50501
#define WRENCHBOARD_LOGIN_ADMIN 50502
#define WRENCHBOARD_LOGIN_MANAGER 50503
#define WRENCHBOARD_SURVEY_DATA 55000
#define WRENCHBOARD_ADD_SURVEY 55050
#define WRENCHBOARD_LOAD_SURVEY 55055
#define WRENCHBOARD_STRIPE_CHARGE_ONE 90004
#define WRENCHBOARD_STRIPE_CHARGE_NEW 90005
#define WRENCHBOARD_COMPLETE_SENDMONEY_INTERSW 555
#define WRENCHBOARD_GETBILLER_INTERSW 556
#define WRENCHBOARD_BILL_PAYMENT_ADVICE_INTERSW 557
#define WRENCHBOARD_INTERSW_GETBILLER 556
#define WRENCHBOARD_INTERSW_BILL_PAYMENT_ADVICE 557
#define WRENCHBOARD_INTERSW_GETBILLERPAYMENTINTEMS 558
#define WRENCHBOARD_INTERSW_GETBILLERCATEGORIES 559
#define WRENCHBOARD_INTERSW_DO_TRANSFER 560
#define WRENCHBOARD_INTERSW_QUERY_TRANSACTION 561
#define WRENCHBOARD_ADD_MONEYRECIPIENT 600
#define WRENCHBOARD_CREATE_USER_ACCOUNT 700
#define WRENCHBOARD_USER_ACCOUNT_LOGIN 710
#define WRENCHBOARD_START_PASSWORDRESET 720
#define WRENCHBOARD_COMPLETE_PASSWORDRESET 730
#define WRENCHBOARD_START_ADDMONEY 770
#define WRENCHBOARD_COMPLETE_ADDMONEY 775
#define WRENCHBOARD_ADD_MOBILE_TOPUPNUM 900
#define WRENCHBOARD_PROMO_CALL 990
#define WRENCHBOARD_STOREFACE_GET_ACCOUNT_BALANCE 891
#define WRENCHBOARD_LOG_ENTRY 900000
#define WRENCHBOARD_CREDIT_TOPUP 900010
#define WRENCHBOARD_TOPUP_ORDER 900020
#define WRENCHBOARD_TOPUP_ORDER_PURCHASE 900030
#define WRENCHBOARD_PAYPAL_IPNMSG 900090
#define WRENCHBOARD_BULKTOPUP_ORDER 700010
#define WRENCHBOARD_BULKTOPUP_ITEM 700020
#define WRENCHBOARD_BULKTOPUP_ITEMUPDATE 700030
#define WRENCHBOARD_BULKTOPUP_DELIVER 700040
#define WRENCHBOARD_BALANCE_TOPUP_ORDER 800020
#define WRENCHBOARD_BALANCE_TOPUP_PURCHASE 800030
#define WRENCHBOARD_BALANCE_TOPUP_PAYMENT 800040
#define VIRTUAL_AIRTOPUP 70011
#define PAY_MODE_BALANCE 0
#define PAY_MODE_CCARD 1
#define PAY_MODE_BONUS 9
#define APPROVED_BALANCE 5
#define DISAPROVE_BALANCE 3
#define PENDING 0
#define CONFIRMED 2
#define CANCELLED 3
#define ASSIGNED 4
#define INPROGRESS 7 // 8,9
#define COMPLETED 5
#define SETTLED 9
#endif
@@ -0,0 +1,8 @@
#ifndef WRENCHBOARD_API_MAIN_H
#define WRENCHBOARD_API_MAIN_H
#include "vars.h"
long wrenchboard_api_main(CVars in, CVars &out);
#endif