ultimatepp/bazaar/IPNServer/IPNServer.h
cxl 20424b0de8 bazaar: Fixing...
git-svn-id: svn://ultimatepp.org/upp/trunk@9135 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2015-11-02 08:25:00 +00:00

42 lines
898 B
C++

#ifndef _IPNServer_IPNServer_h_
#define _IPNServer_IPNServer_h_
#include <Web/SSL/SSL.h>
NAMESPACE_UPP
class IPNServer : public ScgiServer
{
private:
void OnAccepted();
void OnRequest();
void OnClosed();
String payServer;
int payPort;
public:
Callback WhenVerified;
Callback WhenInvalid;
// constructor - defaults to port 8787
IPNServer(int port = 8787);
// setup server and port for back confirmation message
IPNServer &SetPayServer(String const &s) { payServer = s; return *this; }
IPNServer &SetPayPort(int p) { payPort = p; return *this; }
// setting of handler
IPNServer &SetVerifiedHandler(Callback handler) { WhenVerified = handler; return *this; }
IPNServer &SetInvalidHandler(Callback handler) { WhenInvalid = handler; return *this; }
// runs the server
void Run(void);
VectorMap<String, String> GetVerified() const;
};
END_UPP_NAMESPACE
#endif