addCookie static method
Implementation
static addCookie(MobiData data, String? pid, int from, int to) {
if (from > to) {
throw MobiInvalidParameterException("from must be less than to");
}
data.drm ??= MobiDrm();
if (data.drm!.cookiesCount >= vouchersCountMax) {
throw MobiInvalidParameterException(
"cookiesCount must be less than vouchersCountMax");
}
var cookie = DrmCookie(pid, from, to);
data.drm!.cookies.add(cookie);
data.drm!.cookiesCount++;
}