unsigned long count = validator.toULong(2);
unsigned long offset = validator.toULong(3);
+ LoggerD("browse container " << containerId << " sort: " << sortMode
+ << " count:" << count << " offset:" << offset);
+
BrowseFindCB *cbP = new BrowseFindCB();
cbP->context = context;
cbP->object = object;
cbP->thisObject = thisObject;
cbP->successCB = validator.toFunction(4, true);
- if (argumentCount > 5)
+ JSValueProtect(cbP->context, cbP->successCB);
+ if (argumentCount > 5) {
cbP->errorCB = validator.toFunction(5, true);
+ JSValueProtect(cbP->context, cbP->errorCB);
+ }
MediaServerPtr server(privateObject->getObject());
server->browse(containerId, sortMode, count, offset, cbP);
unsigned long count = validator.toULong(3);
unsigned long offset = validator.toULong(4);
+ LoggerD("find: " << searchFilter << " in container " << containerId << " sort: " << sortMode
+ << " count:" << count << " offset:" << offset);
+
BrowseFindCB *cbP = new BrowseFindCB();
cbP->context = context;
cbP->object = object;
cbP->thisObject = thisObject;
cbP->successCB = validator.toFunction(5, true);
- if (argumentCount > 6)
+ JSValueProtect(cbP->context, cbP->successCB);
+ if (argumentCount > 6) {
cbP->errorCB = validator.toFunction(6, true);
+ JSValueProtect(cbP->context, cbP->errorCB);
+ }
MediaServerPtr server(privateObject->getObject());
server->find(containerId, searchFilter, sortMode, count, offset, cbP);