当前位置: 首页>>代码示例>>C++>>正文


C++ plString::wstr方法代码示例

本文整理汇总了C++中plString::wstr方法的典型用法代码示例。如果您正苦于以下问题:C++ plString::wstr方法的具体用法?C++ plString::wstr怎么用?C++ plString::wstr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在plString的用法示例。


在下文中一共展示了plString::wstr方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sendAcctLoginRequest

uint32_t pnAuthClient::sendAcctLoginRequest(uint32_t serverChallenge,
                uint32_t clientChallenge, const plString& acctName,
                const plString& password, const plString& authToken,
                const plString& os)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_AcctLoginRequest);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    msg[1].fUint = clientChallenge;
    msg[2].fString = plwcsdup(acctName.wstr());
    pnSha1Hash hash;
    if (acctName.find('@') != -1 && acctName.find("@gametap") == -1
        && acctName.find("@magiquest") == -1) {
        hash = NCHashLoginInfo(acctName, password, serverChallenge, clientChallenge);
    } else {
        hash = pnSha1Hash::Sha1(password.cstr(), password.len());
        hash.swapBytes();   // Cyan uses a different byte order for this case
    }
    memcpy(msg[3].fData, &hash, sizeof(hash));
    msg[4].fString = plwcsdup(authToken.wstr());
    msg[5].fString = plwcsdup(os.wstr());
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:26,代码来源:pnAuthClient.cpp

示例2: sendFileListRequest

uint32_t pnAuthClient::sendFileListRequest(const plString& directory, const plString& ext)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_FileListRequest);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    msg[1].fString = plwcsdup(directory.wstr());
    msg[2].fString = plwcsdup(ext.wstr());
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:12,代码来源:pnAuthClient.cpp

示例3: sendFriendInviteRequest

uint32_t pnAuthClient::sendFriendInviteRequest(const plUuid& invite, const plString& email,
                const plString& sendTo)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_SendFriendInviteRequest);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    invite.write(msg[1].fData);
    msg[2].fString = plwcsdup(email.wstr());
    msg[3].fString = plwcsdup(sendTo.wstr());
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:14,代码来源:pnAuthClient.cpp

示例4: sendPlayerCreateRequest

uint32_t pnAuthClient::sendPlayerCreateRequest(const plString& playerName,
                const plString& playerShape, const plString& friendInvite)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_PlayerCreateRequest);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    msg[1].fString = plwcsdup(playerName.wstr());
    msg[2].fString = plwcsdup(playerShape.wstr());
    msg[3].fString = plwcsdup(friendInvite.wstr());
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:14,代码来源:pnAuthClient.cpp

示例5: sendLogStackDump

void pnAuthClient::sendLogStackDump(const plString& stackdump)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_LogStackDump);
    msgparm_t* msg = NCAllocMessage(desc);
    msg[0].fString = plwcsdup(stackdump.wstr());
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:8,代码来源:pnAuthClient.cpp

示例6: sendLogPythonTraceback

void pnAuthClient::sendLogPythonTraceback(const plString& traceback)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_LogPythonTraceback);
    msgparm_t* msg = NCAllocMessage(desc);
    msg[0].fString = plwcsdup(traceback.wstr());
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:8,代码来源:pnAuthClient.cpp

示例7: writeString

static void writeString(const plString& v, unsigned char*& buffer, size_t& size) {
    plString::Wide ws = v.wstr();
    size_t len = (ws.len() + 1) * sizeof(pl_wchar_t);
    writeU32(len, buffer, size);
    memcpy(buffer, ws.data(), len);  // Includes the '\0'
    buffer += len;
    size -= len;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:8,代码来源:pnVaultNode.cpp

示例8: sendGetPublicAgeList

uint32_t pnAuthClient::sendGetPublicAgeList(const plString& filename)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_GetPublicAgeList);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    msg[1].fString = plwcsdup(filename.wstr());
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:11,代码来源:pnAuthClient.cpp

示例9: sendAcctExistsRequest

uint32_t pnAuthClient::sendAcctExistsRequest(const plString& acctName)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_AcctExistsRequest);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    msg[1].fString = plwcsdup(acctName.wstr());
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:11,代码来源:pnAuthClient.cpp

示例10: sendScoreGetScores

uint32_t pnAuthClient::sendScoreGetScores(uint32_t owner, const plString& gameName)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_ScoreGetScores);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    msg[1].fUint = owner;
    msg[2].fString = plwcsdup(gameName.wstr());
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:12,代码来源:pnAuthClient.cpp

示例11: sendAgeRequestEx

uint32_t pnAuthClient::sendAgeRequestEx(const plString& ageName, const plUuid& ageUuid)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_AgeRequestEx);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    msg[1].fString = plwcsdup(ageName.wstr());
    ageUuid.write(msg[2].fData);
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:12,代码来源:pnAuthClient.cpp

示例12: sendChangePlayerNameRequest

uint32_t pnAuthClient::sendChangePlayerNameRequest(uint32_t playerId, const plString& name)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_ChangePlayerNameRequest);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    msg[1].fUint = playerId;
    msg[2].fString = plwcsdup(name.wstr());
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:12,代码来源:pnAuthClient.cpp

示例13: sendVaultInitAgeRequest

uint32_t pnAuthClient::sendVaultInitAgeRequest(const plUuid& ageUuid, const plString& filename,
                const plString& instanceName, const plString& userDefinedName,
                const plString& description, uint32_t sequence, uint32_t language,
                const plUuid& parentUuid)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_VaultInitAgeRequest);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    ageUuid.write(msg[1].fData);
    parentUuid.write(msg[2].fData);
    msg[3].fString = plwcsdup(filename.wstr());
    msg[4].fString = plwcsdup(instanceName.wstr());
    msg[5].fString = plwcsdup(userDefinedName.wstr());
    msg[6].fString = plwcsdup(description.wstr());
    msg[7].fUint = sequence;
    msg[8].fUint = language;
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:21,代码来源:pnAuthClient.cpp

示例14: sendAcctChangePasswordRequest

uint32_t pnAuthClient::sendAcctChangePasswordRequest(const plString& acctName,
                const plString& password)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_AcctChangePasswordRequest);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    msg[1].fString = plwcsdup(acctName.wstr());
    pnSha1Hash hash = NCHashPassword(acctName, password);
    memcpy(msg[2].fData, &hash, sizeof(hash));
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:14,代码来源:pnAuthClient.cpp

示例15: sendAcctCreateFromKeyRequest

uint32_t pnAuthClient::sendAcctCreateFromKeyRequest(const plString& acctName,
                const plString& password, const plUuid& key, uint32_t billingType)
{
    const pnNetMsg* desc = GET_Cli2Auth(kCli2Auth_AcctCreateFromKeyRequest);
    msgparm_t* msg = NCAllocMessage(desc);
    uint32_t transId = nextTransId();
    msg[0].fUint = transId;
    msg[1].fString = plwcsdup(acctName.wstr());
    pnSha1Hash hash = NCHashPassword(acctName, password);
    memcpy(msg[2].fData, &hash, sizeof(hash));
    key.write(msg[3].fData);
    msg[4].fUint = billingType;
    fSock->sendMsg(msg, desc);
    NCFreeMessage(msg, desc);
    return transId;
}
开发者ID:GPNMilano,项目名称:libhsplasma,代码行数:16,代码来源:pnAuthClient.cpp


注:本文中的plString::wstr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。