Beispiel #1
0
int main(int argc, char** argv)
{
	std::map<std::string, std::string> args = ProcessArgs(argc, argv);

	if (args.size() != 5 || !ValidateArgs(args))
	{
		ShowHelp();
		return -5;
	}

	DesuraId id(args["-i"].c_str(), args["-t"].c_str());

	if (!Login(args["-u"], args["-p"]))
		return -1;

	if (!CreateMcf(id, args["-f"]))
		return -2;

	if (!StartUpload(id))
		return -3;

	if (!UploadMcf())
		return -4;

	return 0;
}
Beispiel #2
0
	virtual int performAction(std::vector<std::string> &args)
	{
		DesuraId id(args[3].c_str(), args[4].c_str());

		if (!Login(args[0], args[1]))
			return -1;

		if (!CreateMcf(id, args[2]))
			return -2;

		if (!StartUpload(id))
			return -3;

		if (!UploadMcf())
			return -4;

		return 0;
	}