// limitations under the License.
//
-
-#include <dpl/log/log.h>
#include <CommonsJavaScript/PrivateObject.h>
#include <CommonsJavaScript/Converter.h>
#include <CommonsJavaScript/JSUtils.h>
#include "ContentConverter.h"
#include "AudioLyricsUtil.h"
#include "ContentUtility.h"
-
+#include <Logger.h>
#define TIZEN_CONTENT_AUDIO_ATTRIBUTENAME "AudioContent"
#define TIZEN_CONTENT_AUDIO_ALBUM "album"
void JSAudio::initialize(JSContextRef context, JSObjectRef object)
{
- LogDebug( "entered" );
+ LoggerD( "entered" );
AudioPrivObject *priv = static_cast<AudioPrivObject*>( JSObjectGetPrivate( object ) );
if (!priv)
{
MediacontentAudioPtr privateData(new MediacontentAudio());
priv = new AudioPrivObject(context, privateData);
JSObjectSetPrivate(object, static_cast<void*>(priv));
- LogDebug("new Private Object is created" );
+ LoggerD("new Private Object is created" );
}
else {
- LogDebug("private object already exists");
+ LoggerD("private object already exists");
}
}
void JSAudio::finalize(JSObjectRef object)
{
- LogDebug( "entered" );
+ LoggerD( "entered" );
AudioPrivObject *priv = static_cast<AudioPrivObject*>( JSObjectGetPrivate( object ) ) ;
if (priv != NULL)
{
const JSClassRef JSAudio::getClassRef()
{
- LogDebug("JSAudio::getClassRef()");
+ LoggerD("JSAudio::getClassRef()");
if (!m_jsClassRef)
{
MediacontentAudioPtr JSAudio::getAudioObject(JSObjectRef object)
{
- LogDebug("entered");
+ LoggerD("entered");
AudioPrivObject *priv = static_cast<AudioPrivObject*>(JSObjectGetPrivate(object));
if(!priv)
{
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeNull(context);
}
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("getPropertyArtist::entered");
+ LoggerD("getPropertyArtist::entered");
Try
{
Converter converter(context);
}
for( unsigned int i=0; i < audio->getAudioArtist().size(); i++){
string artist = audio->getAudioArtist().at(i);
- LogDebug("artist : " << artist);
+ LoggerD("artist : " << artist);
JSValueRef val = converter.toJSValueRef(artist);
if(!JSSetArrayElement(context, jsResult, i, val)){
ThrowMsg(UnknownException, "Could not insert value into js array");
}
Catch(Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeNull(context);
}
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("getPropertyGenre::entered");
+ LoggerD("getPropertyGenre::entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeNull(context);
}
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("getPropertyComposer::entered");
+ LoggerD("getPropertyComposer::entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeNull(context);
}
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeNull(context);
}
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context);
JSContextRef globalContext = priv->getContext();
//check lyrics state
- LogDebug("lyrics state : " << audio->getLyricsState());
+ LoggerD("lyrics state : " << audio->getLyricsState());
if ( CONTENT_LYRIC_UNKNOWN == audio->getLyricsState() ||
CONTENT_LYRIC_EXISTENT == audio->getLyricsState() )
if (mediaContent && (audio->getLyricsState() != CONTENT_LYRIC_NON_EXISTENT))
{
- LogDebug(" lyrics success ");
+ LoggerD(" lyrics success ");
JSObjectRef jsobject;
jsobject = JSMediaLyrics::createJSObject(globalContext, mediaContent);
return jsobject;
}
else
{
- LogDebug(" lyrics success ");
+ LoggerD(" lyrics success ");
audio->setAudioLyricNonExistent();
}
}
}
Catch(Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeNull(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeNull(context);
}
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeNull(context);
}
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeNull(context);
}
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to get incorrect value");
+ LoggerW("trying to get incorrect value");
}
return JSValueMakeUndefined(context);
}
JSValueRef value,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to set incorrect value");
+ LoggerW("trying to set incorrect value");
DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR);
}
JSValueRef value,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to set incorrect value");
+ LoggerW("trying to set incorrect value");
return DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR);
}
JSValueRef value,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to set incorrect value");
+ LoggerW("trying to set incorrect value");
return DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR);
}
JSValueRef value,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to set incorrect value");
+ LoggerW("trying to set incorrect value");
return DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR);
}
JSValueRef value,
JSValueRef* exception)
{
- LogDebug("entered");
+ LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LogWarning("trying to set incorrect value");
+ LoggerW("trying to set incorrect value");
DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR);
}