本文整理汇总了C++中JString::DecodeBase64方法的典型用法代码示例。如果您正苦于以下问题:C++ JString::DecodeBase64方法的具体用法?C++ JString::DecodeBase64怎么用?C++ JString::DecodeBase64使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JString
的用法示例。
在下文中一共展示了JString::DecodeBase64方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
XDLink::ReceiveMessageFromDebugger()
{
itsLink->StopTimer();
JString data;
const JBoolean ok = itsLink->GetNextMessage(&data);
assert( ok );
if (data.IsEmpty() || data.GetFirstCharacter() != '<')
{
return;
}
Broadcast(DebugOutput(data, kOutputType));
if (itsInitFinishedFlag)
{
if (!itsProgramIsStoppedFlag)
{
itsProgramIsStoppedFlag = kJTrue;
Broadcast(ProgramStopped(CMLocation("", 1)));
}
itsDebuggerBusyFlag = kJFalse;
Broadcast(DebuggerReadyForInput());
}
xmlDoc* doc = xmlReadMemory(data.GetCString(), data.GetLength(),
NULL, NULL, XML_PARSE_NOCDATA);
if (doc != NULL)
{
xmlNode* root = xmlDocGetRootElement(doc);
if (root != NULL && strcmp((char*) root->name, "init") == 0)
{
itsIDEKey = JGetXMLNodeAttr(root, "idekey");
const JString uri = JGetXMLNodeAttr(root, "fileuri");
const JCharacter* map[] =
{
"idekey", itsIDEKey,
"uri", uri
};
JString msg = JGetString("ConnectionInfo::XDLink", map, sizeof(map));
Broadcast(UserOutput(msg, kJFalse));
Send("feature_set -n show_hidden -v 1");
Send("step_into");
JString programName;
GetProgram(&programName);
Broadcast(AttachedToProcess());
Broadcast(SymbolsLoaded(JI2B(uri == itsScriptURI), programName));
itsInitFinishedFlag = kJTrue;
itsScriptURI = uri;
}
else if (root != NULL && strcmp((char*) root->name, "response") == 0)
{
const JString status = JGetXMLNodeAttr(root, "status");
const JString reason = JGetXMLNodeAttr(root, "reason");
if (status == "break" && reason == "error" &&
root->children != NULL && root->children->children != NULL &&
strcmp((char*) root->children->name, "error") == 0 &&
root->children->children->type == XML_TEXT_NODE)
{
JString msg = (char*) root->children->children->content;
const JString encoding = JGetXMLNodeAttr(root->children, "encoding");
if (encoding == "base64")
{
msg.DecodeBase64(&msg);
}
msg += "\n";
Broadcast(UserOutput(msg, kJTrue));
}
const JString idStr = JGetXMLNodeAttr(root, "transaction_id");
JUInt id;
if (idStr.ConvertToUInt(&id))
{
HandleCommandRunning(id);
}
CMCommand* cmd;
if (GetRunningCommand(&cmd))
{
itsParsedDataRoot = root;
cmd->Finished(JI2B(
root->children == NULL || strcmp((char*) root->children->name, "error") != 0));
itsParsedDataRoot = NULL;
SetRunningCommand(NULL);
if (!HasForegroundCommands())
{
RunNextCommand();
}
//.........这里部分代码省略.........