Ejemplo n.º 1
0
static char *avt_GetPositionInfo(AVTransport *avt)
{
	IXML_Document *in = NULL, *out = NULL;
	char *errorString = NULL, *value = NULL;
	
	GetPositionInfo(in, &out, &errorString);
	json_object *output = json_object_new_object();

	value = UpnpUtil_GetFirstDocumentItem(out, "AbsTime");
	json_object_object_add(output, "AbsTime", s_DmrYx_json_object_new_string(value)); 
	if(value)
		free(value);

	value = UpnpUtil_GetFirstDocumentItem(out, "AbsCount");
	json_object_object_add(output, "AbsCount", s_DmrYx_json_object_new_string(value));  
	if(value)
		free(value);

	char *result = (char *)json_object_to_json_string(output);//bug!!!!
	json_object_put(output);
	if(in)
		ixmlDocument_free(in);
	if(out)
		ixmlDocument_free(out);
	return result;
}
/** Get position info data from RProperty published from modules

@param aBlob pointer to a TPositionInfoBase object.
@param aBlobSize size of blob.
@param aTargetTime The target time for the position data.
@param aActualTime The actually time for the position data.

@see TPositionInfoBase

@return Symbian Location service Error code

@released
@internalComponent
*/
EXPORT_C TInt RLbsPositionUpdates::GetPositionInfo(TBool& aConflictControl, TAny* aBlob, 
												   TUint aBlobSize, TTime& aTargetTime, 
												   TTime& aActualTime) const
	{
	TUint attributes;
	TUint gpsMode;
	return GetPositionInfo(aConflictControl, aBlob, aBlobSize, aTargetTime, aActualTime, attributes, gpsMode);
	}