Example #1
0
plVaultBlob QSDLEditor::saveBlob()
{
    if (fSDLVersion == -1)
        return plVaultBlob();

    if (fSDLList->currentItem() != NULL && fSDLList->currentItem()->type() == QSDLTreeItem::kSDLVarType)
        saveVarCustomEdit(fSDLList->currentItem(), fCurrentWhich);

    plVaultBlob blob;
    hsRAMStream S;
    S.setVer(PlasmaVer::pvPots);
    plStateDataRecord::WriteStreamHeader(&S, fSDLName, fSDLVersion, NULL);
    fRecord->write(&S, fResMgr);
    unsigned char* data = new unsigned char[S.size()];
    S.copyTo(data, S.size());
    blob.setData(S.size(), data);
    delete[] data;
    return blob;
}
Example #2
0
plVaultBlob pnVaultNode::getBlob(size_t which) const
{
    return (fFieldMask & (uint64_t)((1<<kBlob_1) << which)) != 0
           ? fBlob[which] : plVaultBlob();
}
Example #3
0
plVaultBlob plVaultNode::getBlob_1() const {
    return fFields[kFieldBlob_1] ? fBlob1 : plVaultBlob();
}
Example #4
0
plVaultBlob plVaultNode::getBlob_2() const {
    return fFields[kFieldBlob_2] ? fBlob2 : plVaultBlob();
}
Example #5
0
void plVaultNode::makeField(unsigned int field) {
    fFields[field] = true;
    switch (field) {
    case kFieldNodeID:
        fNodeID = 0;
        break;
    case kFieldNodeType:
        fNodeType = 0;
        break;
    case kFieldPermissions:
        fPermissions = 0;
        break;
    case kFieldOwner:
        fOwner = 0;
        break;
    case kFieldGroup:
        fGroup = 0;
        break;
    case kFieldAutoTime:
        fAutoTime = plUnifiedTime();
        break;
    case kFieldCreator:
        fCreator = 0;
        break;
    case kFieldModifyTime:
        fModifyTime = plUnifiedTime();
        break;
    case kFieldCreateAgeTime:
        fCreateAgeTime = plUnifiedTime();
        break;
    case kFieldCreateAgeName:
        fCreateAgeName = "";
        break;
    case kFieldCreateAgeGuid:
        fCreateAgeGuid = plServerGuid();
        break;
    case kFieldInt32_1:
        fInt32[0] = 0;
        break;
    case kFieldInt32_2:
        fInt32[1] = 0;
        break;
    case kFieldInt32_3:
        fInt32[2] = 0;
        break;
    case kFieldInt32_4:
        fInt32[3] = 0;
        break;
    case kFieldUInt32_1:
        fUInt32[0] = 0;
        break;
    case kFieldUInt32_2:
        fUInt32[1] = 0;
        break;
    case kFieldUInt32_3:
        fUInt32[2] = 0;
        break;
    case kFieldUInt32_4:
        fUInt32[3] = 0;
        break;
    case kFieldString64_1:
        fString64[0] = "";
        break;
    case kFieldString64_2:
        fString64[1] = "";
        break;
    case kFieldString64_3:
        fString64[2] = "";
        break;
    case kFieldString64_4:
        fString64[3] = "";
        break;
    case kFieldString64_5:
        fString64[4] = "";
        break;
    case kFieldString64_6:
        fString64[5] = "";
        break;
    case kFieldIString64_1:
        fIString64[0] = "";
        break;
    case kFieldIString64_2:
        fIString64[1] = "";
        break;
    case kFieldText_1:
        fText[0] = "";
        break;
    case kFieldText_2:
        fText[1] = "";
        break;
    case kFieldBlob_1:
        fBlob1 = plVaultBlob();
        break;
    case kFieldBlob_2:
        fBlob2 = plVaultBlob();
        break;
    case kFieldGuid_1:
        fGuid1 = plServerGuid();
        break;
    case kFieldGuid_2:
        fGuid2 = plServerGuid();
        break;
    default:
        break;
    }
}