ultimatepp/bazaar/ProtectServerDemo/main.cpp
micio 408d643f4c Bazaar/Protect : Client/Server working now
git-svn-id: svn://ultimatepp.org/upp/trunk@2786 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2010-10-13 23:34:40 +00:00

35 lines
808 B
C++

#include <Protect/ProtectServer.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
ProtectServer server;
// setup database
server
.SetAppKey(ScanHexString("AABBCCDDEEFF00112233445566778899"))
.GetDB()
.SetHost("localhost")
.SetDBName("protect_demo")
.SetUserName("protect_user")
.SetPassword("protect")
;
server
.GetSmtp()
.Host("localhost")
.Port(25)
;
server
.SetWelcome("<HTML><BODY>License activation succeeded<BR><BR>Welcome to TIMBERSTRUCT, %USER%<BR></BODY></HTML>")
.SetActivationFailed("<HTML><BODY>We're sorry but product activation failed, %USER%<BR><BR>Please contact us to solve the problem<BR></BODY></HTML>")
;
// setup key
server.SetKey(ScanHexString("aabbccddeeff00112233445566778899"));
// setup cypher
server.SetCypher(new Snow2);
server.Run();
}