本文整理汇总了C++中PLT_ActionReference::SetArgumentValue方法的典型用法代码示例。如果您正苦于以下问题:C++ PLT_ActionReference::SetArgumentValue方法的具体用法?C++ PLT_ActionReference::SetArgumentValue怎么用?C++ PLT_ActionReference::SetArgumentValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PLT_ActionReference
的用法示例。
在下文中一共展示了PLT_ActionReference::SetArgumentValue方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InvokeActionWithInstance
/*----------------------------------------------------------------------
| PLT_MediaController::SetAVTransportURI
+---------------------------------------------------------------------*/
NPT_Result
PLT_MediaController::SetAVTransportURI(PLT_DeviceDataReference& device,
NPT_UInt32 instance_id,
const char* uri,
const char* metadata,
void* userdata)
{
PLT_ActionReference action;
NPT_CHECK_SEVERE(m_CtrlPoint->CreateAction(
device,
"urn:schemas-upnp-org:service:AVTransport:1",
"SetAVTransportURI",
action));
// set the uri
if (NPT_FAILED(action->SetArgumentValue("CurrentURI", uri))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
// set the uri metadata
if (NPT_FAILED(action->SetArgumentValue("CurrentURIMetaData", metadata))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
return InvokeActionWithInstance(action, instance_id, userdata);
}
示例2: SetVolume
/*----------------------------------------------------------------------
| PLT_MediaController::SetVolume
+---------------------------------------------------------------------*/
NPT_Result PLT_MediaController::SetVolume(PLT_DeviceDataReference& device,
NPT_UInt32 instance_id,
const char* channel,
int volume,
void* userdata)
{
PLT_ActionReference action;
NPT_CHECK_SEVERE(m_CtrlPoint->CreateAction(
device,
"urn:schemas-upnp-org:service:RenderingControl:1",
"SetVolume",
action));
// set the channel
if (NPT_FAILED(action->SetArgumentValue("Channel", channel))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
if (NPT_FAILED(action->SetArgumentValue("DesiredVolume",
NPT_String::FromInteger(volume)))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
return InvokeActionWithInstance(action, instance_id, userdata);
}
示例3: InvokeUpdateObject
bool InvokeUpdateObject(const char* id, const char* curr_value, const char* new_value)
{
CURL url(id);
PLT_DeviceDataReference device;
PLT_Service* cds;
PLT_ActionReference action;
CLog::Log(LOGDEBUG, "UPNP: attempting to invoke UpdateObject for %s", id);
// check this server supports UpdateObject action
NPT_CHECK_LABEL(FindServer(url.GetHostName().c_str(), device),failed);
NPT_CHECK_LABEL(device->FindServiceById("urn:upnp-org:serviceId:ContentDirectory", cds),failed);
NPT_CHECK_LABEL(m_CtrlPoint->CreateAction(
device,
"urn:schemas-upnp-org:service:ContentDirectory:1",
"UpdateObject",
action), failed);
NPT_CHECK_LABEL(action->SetArgumentValue("ObjectID", url.GetFileName().c_str()), failed);
NPT_CHECK_LABEL(action->SetArgumentValue("CurrentTagValue", curr_value), failed);
NPT_CHECK_LABEL(action->SetArgumentValue("NewTagValue", new_value), failed);
NPT_CHECK_LABEL(m_CtrlPoint->InvokeAction(action, NULL),failed);
CLog::Log(LOGDEBUG, "UPNP: invoked UpdateObject successfully");
return true;
failed:
CLog::Log(LOGINFO, "UPNP: invoking UpdateObject failed");
return false;
}
示例4:
/*----------------------------------------------------------------------
| PLT_MediaController::GetCurrentConnectionInfo
+---------------------------------------------------------------------*/
NPT_Result
PLT_MediaController::GetCurrentConnectionInfo(PLT_DeviceDataReference& device,
NPT_UInt32 connection_id,
void* userdata)
{
PLT_ActionReference action;
NPT_CHECK_SEVERE(m_CtrlPoint->CreateAction(
device,
"urn:schemas-upnp-org:service:ConnectionManager:1",
"GetCurrentConnectionInfo",
action));
// set the New PlayMode
if (NPT_FAILED(action->SetArgumentValue("ConnectionID",
NPT_String::FromInteger(connection_id)))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
// set the arguments on the action, this will check the argument values
if (NPT_FAILED(m_CtrlPoint->InvokeAction(action, userdata))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
return NPT_SUCCESS;
}
示例5: if
/*----------------------------------------------------------------------
| PLT_LightSampleDevice::OnAction
+---------------------------------------------------------------------*/
NPT_Result
PLT_LightSampleDevice::OnAction(PLT_ActionReference& action, NPT_SocketInfo* /* info */)
{
/* parse the action name */
NPT_String name = action->GetActionDesc()->GetName();
if (name.Compare("SetTarget") == 0) {
NPT_String value;
action->GetArgumentValue("newTargetValue", value);
PLT_StateVariable* variable = action->GetActionDesc()->GetService()->FindStateVariable("Status");
if (NPT_FAILED(variable->SetValue(value))) {
action->SetError(402, "Invalid Args");
return NPT_FAILURE;
}
return NPT_SUCCESS;
} else if (name.Compare("GetStatus") == 0) {
PLT_StateVariable* variable = action->GetActionDesc()->GetService()->FindStateVariable("Status");
if (variable) {
action->SetArgumentValue("ResultStatus", variable->GetValue());
return NPT_SUCCESS;
}
}
action->SetError(501, "Action Failed");
return NPT_FAILURE;
}
示例6:
/*----------------------------------------------------------------------
| PLT_MediaServer::OnGetCurrentConnectionInfo
+---------------------------------------------------------------------*/
NPT_Result
PLT_MediaServer::OnGetCurrentConnectionInfo(PLT_ActionReference& action,
const PLT_HttpRequestContext& context)
{
NPT_COMPILER_UNUSED(context);
if (NPT_FAILED(action->VerifyArgumentValue("ConnectionID", "0"))) {
action->SetError(706,"No Such Connection.");
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("RcsID", "-1"))){
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("AVTransportID", "-1"))) {
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("ProtocolInfo", "http-get:*:*:*"))) {
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("PeerConnectionManager", "/"))) {
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("PeerConnectionID", "-1"))) {
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("Direction", "Output"))) {
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("Status", "Unknown"))) {
return NPT_FAILURE;
}
return NPT_SUCCESS;
}
示例7:
/*----------------------------------------------------------------------
| PLT_MediaRenderer::OnGetCurrentConnectionInfo
+---------------------------------------------------------------------*/
NPT_Result
PLT_MediaRenderer::OnGetCurrentConnectionInfo(PLT_ActionReference& action)
{
if (NPT_FAILED(action->VerifyArgumentValue("ConnectionID", "0"))) {
action->SetError(706,"No Such Connection.");
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("RcsID", "0"))){
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("AVTransportID", "0"))) {
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("ProtocolInfo", "http-get:*:*:*"))) {
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("PeerConnectionManager", "/"))) {
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("PeerConnectionID", "-1"))) {
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("Direction", "Input"))) {
return NPT_FAILURE;
}
if (NPT_FAILED(action->SetArgumentValue("Status", "Unknown"))) {
return NPT_FAILURE;
}
return NPT_SUCCESS;
}
示例8:
/*----------------------------------------------------------------------
| PLT_MediaConnect::OnRegisterDevice
+---------------------------------------------------------------------*/
NPT_Result
PLT_MediaConnect::OnRegisterDevice(PLT_ActionReference& action)
{
NPT_String reqMsgBase64;
NPT_CHECK_WARNING(action->GetArgumentValue("RegistrationReqMsg", reqMsgBase64));
NPT_String respMsgBase64;
NPT_CHECK_WARNING(action->SetArgumentValue("RegistrationRespMsg", respMsgBase64));
return NPT_SUCCESS;
}
示例9:
/*----------------------------------------------------------------------
| PLT_MediaBrowser::Browse
+---------------------------------------------------------------------*/
NPT_Result
PLT_MediaBrowser::Browse(PLT_DeviceDataReference& device,
const char* obj_id,
NPT_UInt32 start_index,
NPT_UInt32 count,
bool browse_metadata,
const char* filter,
const char* sort_criteria,
void* userdata)
{
// verify device still in our list
PLT_DeviceDataReference device_data;
NPT_CHECK_WARNING(FindServer(device->GetUUID(), device_data));
// create action
PLT_ActionReference action;
NPT_CHECK_SEVERE(m_CtrlPoint->CreateAction(
device,
"urn:schemas-upnp-org:service:ContentDirectory:1",
"Browse",
action));
// Set the object id
PLT_Arguments args;
if (NPT_FAILED(action->SetArgumentValue("ObjectID", obj_id))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
// set the browse_flag
if (NPT_FAILED(action->SetArgumentValue("BrowseFlag", browse_metadata?"BrowseMetadata":"BrowseDirectChildren"))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
// set the Filter
if (NPT_FAILED(action->SetArgumentValue("Filter", filter))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
// set the Starting Index
if (NPT_FAILED(action->SetArgumentValue("StartingIndex", NPT_String::FromInteger(start_index)))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
// set the Requested Count
if (NPT_FAILED(action->SetArgumentValue("RequestedCount", NPT_String::FromInteger(count)))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
// set the Requested Count
if (NPT_FAILED(action->SetArgumentValue("SortCriteria", sort_criteria))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
// invoke the action
if (NPT_FAILED(m_CtrlPoint->InvokeAction(action, userdata))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
return NPT_SUCCESS;
}
示例10: CallAVTransportAction
/*----------------------------------------------------------------------
| PLT_MediaController::Mute
+---------------------------------------------------------------------*/
NPT_Result
PLT_MediaController::Mute(PLT_DeviceDataReference& device,
NPT_UInt32 instance_id,
void* userdata)
{
static int mute=0;
PLT_ActionReference action;
NPT_CHECK_SEVERE(CreateAction(device,
"urn:schemas-upnp-org:service:RenderingControl:1",
"SetMute",
action));
mute = 1-mute;
// Set the speed
if (NPT_FAILED(action->SetArgumentValue("DesiredMute", mute==1?"1":"0"))) {
return NPT_ERROR_INVALID_PARAMETERS;
}
return CallAVTransportAction(action, instance_id, userdata);
}
示例11: directory
/*----------------------------------------------------------------------
| PLT_FileMediaServer::OnBrowseDirectChildren
+---------------------------------------------------------------------*/
NPT_Result
PLT_FileMediaServer::OnBrowseDirectChildren(PLT_ActionReference& action,
const char* object_id,
NPT_SocketInfo* info /* = NULL */)
{
/* locate the file from the object ID */
NPT_String dir;
if (NPT_FAILED(GetFilePath(object_id, dir))) {
/* error */
NPT_LOG_WARNING("PLT_FileMediaServer::OnBrowse - ObjectID not found.");
action->SetError(701, "No Such Object.");
return NPT_FAILURE;
}
/* retrieve the item type */
NPT_DirectoryEntryInfo entry_info;
NPT_Result res = NPT_DirectoryEntry::GetInfo(dir, entry_info);
if (NPT_FAILED(res)) {
/* Object does not exist */
action->SetError(800, "Can't retrieve info " + dir);
return NPT_FAILURE;
}
if (entry_info.type != NPT_DIRECTORY_TYPE) {
/* error */
NPT_LOG_WARNING("PLT_FileMediaServer::OnBrowse - BROWSEDIRECTCHILDREN not allowed on an item.");
action->SetError(710, "item is not a container.");
return NPT_FAILURE;
}
NPT_String filter;
NPT_String startingInd;
NPT_String reqCount;
NPT_CHECK_SEVERE(action->GetArgumentValue("Filter", filter));
NPT_CHECK_SEVERE(action->GetArgumentValue("StartingIndex", startingInd));
NPT_CHECK_SEVERE(action->GetArgumentValue("RequestedCount", reqCount));
unsigned long start_index, req_count;
if (NPT_FAILED(startingInd.ToInteger(start_index)) ||
NPT_FAILED(reqCount.ToInteger(req_count))) {
return NPT_FAILURE;
}
NPT_String path = dir;
if (!path.EndsWith(m_DirDelimiter)) {
path += m_DirDelimiter;
}
/* start iterating through the directory */
NPT_Directory directory(path);
NPT_String entryName;
res = directory.GetNextEntry(entryName);
if (NPT_FAILED(res)) {
NPT_LOG_WARNING_1("PLT_FileMediaServer::OnBrowseDirectChildren - failed to open dir %s", (const char*) path);
return res;
}
unsigned long cur_index = 0;
unsigned long num_returned = 0;
unsigned long total_matches = 0;
//unsigned long update_id = 0;
NPT_String didl = didl_header;
PLT_MediaObjectReference item;
do {
item = BuildFromFilePath(path + entryName, true, info);
if (!item.IsNull()) {
if ((cur_index >= start_index) && ((num_returned < req_count) || (req_count == 0))) {
NPT_String tmp;
NPT_CHECK_SEVERE(PLT_Didl::ToDidl(*item.AsPointer(), filter, tmp));
didl += tmp;
num_returned++;
}
cur_index++;
total_matches++;
}
res = directory.GetNextEntry(entryName);
} while (NPT_SUCCEEDED(res));
didl += didl_footer;
NPT_CHECK_SEVERE(action->SetArgumentValue("Result", didl));
NPT_CHECK_SEVERE(action->SetArgumentValue("NumberReturned", NPT_String::FromInteger(num_returned)));
NPT_CHECK_SEVERE(action->SetArgumentValue("TotalMatches", NPT_String::FromInteger(total_matches)));
NPT_CHECK_SEVERE(action->SetArgumentValue("UpdateId", "1"));
return NPT_SUCCESS;
}
示例12: SMJS_FUNCTION
static JSBool SMJS_FUNCTION(upnp_service_call_action)
{
GPAC_ActionUDTA *act_udta = NULL;
char *action_name = NULL;
SMJS_OBJ
SMJS_ARGS
GPAC_ServiceItem *service = (GPAC_ServiceItem *)SMJS_GET_PRIVATE(c, obj);
if (!service || !argc || !JSVAL_IS_STRING(argv[0]) ) return JS_FALSE;
action_name = SMJS_CHARS(c, argv[0]);
PLT_ActionDesc* action_desc = service->m_service->FindActionDesc(action_name);
SMJS_FREE(c, action_name);
if (action_desc == NULL) return JS_FALSE;
PLT_ActionReference action;
NPT_CHECK_SEVERE(
service->m_device->m_pUPnP->m_pGenericController->m_CtrlPoint->CreateAction(
service->m_device->m_device,
service->m_service->GetServiceType(),
action_name,
action)
);
if ((argc>=2) && JSVAL_IS_OBJECT(argv[1])) {
JSObject *list = JSVAL_TO_OBJECT(argv[1]);
u32 i, count;
JS_GetArrayLength(c, list, (jsuint*) &count);
GF_LOG(GF_LOG_INFO, GF_LOG_NETWORK, ("[UPnP] Calling %s(", action_name));
i=0;
while (i+2<=count) {
NPT_Result res;
jsval an_arg;
char *param_val, *_param_val = NULL;
char szParamVal[1024];
JS_GetElement(c, list, (jsint) i, &an_arg);
char *param_name = SMJS_CHARS(c, an_arg);
JS_GetElement(c, list, (jsint) i+1, &an_arg);
param_val = (char*)"";
if (JSVAL_IS_STRING(an_arg)) {
param_val = _param_val = SMJS_CHARS(c, an_arg);
} else if (JSVAL_IS_BOOLEAN(an_arg)) {
param_val = (char *) ((JSVAL_TO_BOOLEAN(an_arg) == JS_TRUE) ? "true" : "false");
}
else if (JSVAL_IS_INT(argv[1])) {
sprintf(szParamVal, "%d", JSVAL_TO_INT(an_arg));
param_val = szParamVal;
}
else if (JSVAL_IS_NUMBER(an_arg)) {
jsdouble v;
JS_ValueToNumber(c, an_arg, &v);
sprintf(szParamVal, "%g", v);
param_val = szParamVal;
}
if (!param_name || !param_val) res = NPT_FAILURE;
else {
GF_LOG(GF_LOG_INFO, GF_LOG_NETWORK, (" %s(%s)", param_name, param_val));
res = action->SetArgumentValue(param_name, param_val);
}
SMJS_FREE(c, param_name);
SMJS_FREE(c, _param_val);
if (res != NPT_SUCCESS) return JS_FALSE;
i+=2;
}
GF_LOG(GF_LOG_INFO, GF_LOG_NETWORK, (" )\n"));
}
if ((argc==3) && JSVAL_IS_OBJECT(argv[2])) {
act_udta = new GPAC_ActionUDTA();
act_udta->udta = argv[2];
gf_js_add_root(c, &act_udta->udta, GF_JSGC_VAL);
}
service->m_device->m_pUPnP->m_pGenericController->m_CtrlPoint->InvokeAction(action, act_udta);
return JS_TRUE;
}
示例13: GetMediaServers
/*----------------------------------------------------------------------
| CMediaCrawler::OnBrowseRoot
+---------------------------------------------------------------------*/
NPT_Result
CMediaCrawler::OnBrowseRoot(PLT_ActionReference& action)
{
NPT_String browseFlagValue;
if (NPT_FAILED(action->GetArgumentValue("BrowseFlag", browseFlagValue))) {
NPT_LOG_WARNING("PLT_FileMediaServer::OnBrowse - invalid arguments.");
return NPT_FAILURE;
}
/* extract browseFlag */
BrowseFlags browseFlag;
if (NPT_FAILED(GetBrowseFlag(browseFlagValue, browseFlag))) {
/* error */
NPT_LOG_WARNING("PLT_FileMediaServer::OnBrowseRoot - BrowseFlag value not allowed.");
action->SetError(402,"Invalid BrowseFlag arg.");
return NPT_FAILURE;
}
if (browseFlag == BROWSEMETADATA) {
PLT_MediaContainer item;
item.m_Title = "Root";
item.m_ParentID = "-1";
item.m_ObjectID = "0";
item.m_ChildrenCount = GetMediaServers().GetItemCount();
item.m_ObjectClass.type = "object.container";
/* convert item to didl */
NPT_String filter;
action->GetArgumentValue("Filter", filter);
NPT_String tmp;
NPT_CHECK_SEVERE(PLT_Didl::ToDidl(item, filter, tmp));
/* add didl header and footer */
NPT_String didl = didl_header + tmp + didl_footer;
action->SetArgumentValue("Result", didl);
action->SetArgumentValue("NumberReturned", "1");
action->SetArgumentValue("TotalMatches", "1");
// update ID may be wrong here, it should be the one of the container?
action->SetArgumentValue("UpdateId", "1");
// TODO: We need to keep track of the overall updateID of the CDS
} else {
NPT_String startingInd;
NPT_String reqCount;
NPT_String filter;
NPT_CHECK_SEVERE(action->GetArgumentValue("StartingIndex", startingInd));
NPT_CHECK_SEVERE(action->GetArgumentValue("RequestedCount", reqCount));
NPT_CHECK_SEVERE(action->GetArgumentValue("Filter", filter));
unsigned long start_index, req_count;
if (NPT_FAILED(startingInd.ToInteger(start_index)) ||
NPT_FAILED(reqCount.ToInteger(req_count))) {
return NPT_FAILURE;
}
unsigned long cur_index = 0;
unsigned long num_returned = 0;
unsigned long total_matches = 0;
//unsigned long update_id = 0;
PLT_MediaContainer item;
NPT_String tmp;
NPT_String didl = didl_header;
// populate a list of containers (one container per known servers)
const NPT_Lock<PLT_DeviceDataReferenceList>& devices = GetMediaServers();
NPT_Lock<PLT_DeviceDataReferenceList>::Iterator entry = devices.GetFirstItem();
while (entry) {
PLT_DeviceDataReference device = (*entry);
item.m_Title = device->GetFriendlyName();
item.m_ObjectID = FormatObjectId(device->GetUUID(), "0");
item.m_ParentID = "0";
item.m_ObjectClass.type = "object.container";
if ((cur_index >= start_index) && ((num_returned < req_count) || (req_count == 0))) {
NPT_CHECK_SEVERE(PLT_Didl::ToDidl(item, filter, tmp));
didl += tmp;
num_returned++;
}
cur_index++;
total_matches++;
++entry;
}
didl += didl_footer;
action->SetArgumentValue("Result", didl);
action->SetArgumentValue("NumberReturned", NPT_String::FromInteger(num_returned));
action->SetArgumentValue("TotalMatches", NPT_String::FromInteger(total_matches));
action->SetArgumentValue("UpdateId", "1");
}
return NPT_SUCCESS;
}
示例14: CMediaCrawlerBrowseInfoReference
/*----------------------------------------------------------------------
| CMediaCrawler::OnBrowseDevice
+---------------------------------------------------------------------*/
NPT_Result
CMediaCrawler::OnBrowseDevice(PLT_ActionReference& action,
const char* server_uuid,
const char* server_object_id,
NPT_SocketInfo* info /* = NULL */)
{
NPT_Result res;
PLT_DeviceDataReference device;
{
// look for device first
const NPT_Lock<PLT_DeviceDataReferenceList>& devices = GetMediaServers();
//NPT_AutoLock lock(devices);
if (NPT_FAILED(NPT_ContainerFind(devices, PLT_DeviceDataFinder(server_uuid), device))) {
/* error */
NPT_LOG_WARNING("CMediaCrawler::OnBrowseDevice - device not found.");
action->SetError(701, "No Such Object.");
return NPT_FAILURE;
}
}
// look for args and convert them
NPT_String browseFlagValue;
NPT_String startingInd;
NPT_String reqCount;
NPT_String filter;
NPT_String sort;
NPT_CHECK_SEVERE(action->GetArgumentValue("BrowseFlag", browseFlagValue));
NPT_CHECK_SEVERE(action->GetArgumentValue("StartingIndex", startingInd));
NPT_CHECK_SEVERE(action->GetArgumentValue("RequestedCount", reqCount));
NPT_CHECK_SEVERE(action->GetArgumentValue("Filter", filter));
NPT_CHECK_SEVERE(action->GetArgumentValue("SortCriteria", sort));
unsigned long start_index, req_count;
if (NPT_FAILED(startingInd.ToInteger(start_index)) ||
NPT_FAILED(reqCount.ToInteger(req_count))) {
return NPT_FAILURE;
}
// create a container for our result
// this will be filled in by OnBrowseResponse
CMediaCrawlerBrowseInfoReference browse_info(new CMediaCrawlerBrowseInfo());
browse_info->shared_var.SetValue(0);
// send off the browse packet. Note that this will
// not block. The shared variable is used to block
// until the response has been received.
res = Browse(device,
server_object_id,
start_index,
req_count,
(browseFlagValue == "BrowseMetadata")?1:0,
filter,
sort,
new CMediaCrawlerBrowseInfoReference(browse_info));
NPT_CHECK_SEVERE(res);
// wait 30 secs for response
res = browse_info->shared_var.WaitUntilEquals(1, 30000);
NPT_CHECK_SEVERE(res);
// did the browse fail?
if (NPT_FAILED(browse_info->res)) {
action->SetError(browse_info->code, "");
return NPT_FAILURE;
}
action->SetArgumentValue("Result", UpdateDidl(server_uuid, browse_info->didl, info));
action->SetArgumentValue("NumberReturned", browse_info->nr);
action->SetArgumentValue("TotalMatches", browse_info->tm);
action->SetArgumentValue("UpdateId", browse_info->uid);
action->SetArgumentValue("ObjectID", FormatObjectId(server_uuid, browse_info->object_id));
return NPT_SUCCESS;
}