if (0 < bufferSize) {
data = new char[bufferSize];
reply.read(data, bufferSize);
+ drmConstraints->put(&key, data);
+ delete[] data;
}
- drmConstraints->put(&key, data);
}
}
return drmConstraints;
if (0 < bufferSize) {
data = new char[bufferSize];
reply.read(data, bufferSize);
+ drmMetadata->put(&key, data);
+ delete[] data;
}
- drmMetadata->put(&key, data);
}
}
return drmMetadata;
int bufferSize = 0;
if (NULL != value) {
bufferSize = strlen(value);
+ reply->writeInt32(bufferSize + 1);
+ reply->write(value, bufferSize + 1);
+ } else {
+ reply->writeInt32(0);
}
- reply->writeInt32(bufferSize + 1);
- reply->write(value, bufferSize + 1);
}
}
delete drmConstraints; drmConstraints = NULL;
char* charValue = NULL;
charValue = new char[value.length() + 1];
strncpy(charValue, value.string(), value.length());
+ charValue[value.length()] = '\0';
//Just add dummy available time for verification
drmConstraints->put(&(DrmConstraints::LICENSE_AVAILABLE_TIME), charValue);
-
+ delete[] charValue;
return drmConstraints;
}