* @exception E_SYSTEM A system error has occurred. @n
* Either the file operation or the DB operation has failed.
* @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks For the delivered launch arguments, see App::GetAppArgumentListN().
*/
static Tizen::Base::Collection::IList* FindAppControlsN(const Tizen::Base::String* pOperationId, const Tizen::Base::String* pCategory, const Tizen::Base::String* pDataType, const Tizen::Base::String* pUriPattern);
* @since 2.0
* @privlevel public
* @privilege %http://tizen.org/privilege/application.launch
+ * @feature %http://tizen.org/feature/network.nfc for L¡±NFC=¡¯command¡¯¡± or %http://tzen.org/feature/usb.accessory for L¡±Serial=¡¯command¡¯¡± in the value of @c condition
*
* @return An error code
* @param[in] condition The launch condition for the application @n
* @exception E_MAX_EXCEEDED The size of @c pArguments has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. For more information, see <a href=¡±../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm¡±>Application Filtering</a>. @b Since: @b 2.1
*
* @remarks When the registered application is about to be launched, the registered launch condition and arguments are given as parameters to IAppLaunchConditionEventListener::OnAppLaunchConditionMetN().
* @remarks The newly introduced launch condition does not work on the previous SDK version and the E_INVALID_CONDITION exception is returned.
* @remarks The launch period requires more consideration because an inappropriate short period value may lead
* to an adverse effect on the device battery.
* @remarks For the NFC launch condition, the detected NDEF message can be acquired using the @c pExtraData parameter of the %IAppLaunchConditionEventListener::OnAppLaunchConditionMetN() method.
+ * @remarks Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
* @see UnregisterAppLaunch()
* @see IsAppLaunchRegistered()
- * @see LaunchApplication()
+ * @see LaunchApplication(const AppId&, LaunchOption);
* @see Tizen::Base::DateTime::ToString()
* @see Tizen::Io::SerialPort
*
* @since 2.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/appmanager.launch
+ * @feature %http://tizen.org/feature/network.nfc for L¡±NFC=¡¯command¡¯¡± or %http://tzen.org/feature/usb.accessory for L¡±Serial=¡¯command¡¯¡± in the value of @c condition
*
* @return An error code
* @param[in] appId The ID of the application registered for launch
* @exception E_MAX_EXCEEDED The size of @c pArguments has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. For more information, see <a href=¡±../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm¡±>Application Filtering</a>. @b Since: @b 2.1
*
* @remarks When the registered application is about to be launched, the registered launch condition and arguments are given as parameters to IAppLaunchConditionEventListener::OnAppLaunchConditionMetN().
* @remarks The newly introduced launch condition does not work on the previous SDK version and the @c E_INVALID_CONDITION exception is returned.
* @remarks The launch period requires more consideration because an inappropriate short period value may lead
* to an adverse effect on the device battery.
* @remarks For the NFC launch condition, the detected NDEF message can be acquired using the @c pExtraData parameter of the %IAppLaunchConditionEventListener::OnAppLaunchConditionMetN() method.
+ * @remarks Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
* @see UnregisterAppLaunch()
* @see IsAppLaunchRegistered()
- * @see LaunchApplication()
+ * @see LaunchApplication(const AppId&, LaunchOption);
* @see IAppLaunchConditionEventListener::OnAppLaunchConditionMetN()
* @see Tizen::Base::DateTime::ToString()
* @see Tizen::Io::SerialPort
*
* @since 2.0
*
- * @privlevel partner
+ * @privlevel platform
* @privilege %http://tizen.org/privilege/appsetting
*
* @return A pointer to the %AppResource instance, @n
*
* @since 2.0
*
- * @privlevel partner
+ * @privlevel platform
* @privilege %http://tizen.org/privilege/appsetting
*
* @return An error code
*
* @since 2.0
*
- * @privlevel partner
+ * @privlevel platform
* @privilege %http://tizen.org/privilege/appsetting
*
* @return A pointer to the %AppSetting instance, @n
*
* @since 2.0
*
- * @privlevel partner
+ * @privlevel platform
* @privilege %http://tizen.org/privilege/appsetting
*
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_NUM_FORMAT The specified string does not contain a number that can be parsed.
* @remarks This method guarantees that the original value of out-parameter is not changed when the method returns error.
+ * @remarks The behavior of this method is dependent on the system default locale setting.
*/
static result Parse(const String& s, double& ret);
* @remarks If the value of the current instance is Not-a-Number (NaN), the result is the string "NaN". Furthermore, infinity
* produces the result "Infinity". @n
* 6 digits are given for the precision of this method. Use String::Format() to set the specific precision.
+ * @remarks The behavior of this method is dependent on the system default locale setting.
*/
virtual String ToString(void) const;
* @remarks If the input value is Not-a-Number (NaN), the result is the string "NaN". Furthermore, infinity
* produces the result "Infinity". @n
* 6 digits are given for the precision of this method. Use String::Format() to set the specific precision.
+ * @remarks The behavior of this method is dependent on the system default locale setting.
*/
static String ToString(double value);
* @exception E_SUCCESS The method is successful.
* @exception E_NUM_FORMAT The specified string does not contain a number that can be parsed.
* @remarks This method guarantees that the original value of out-parameter is not changed when the method returns error.
+ * @remarks The behavior of this method is dependent on the system default locale setting.
* @see Tizen::Base::Double::Parse()
*/
static result Parse(const String& s, float& ret);
* @remarks If the value is Not-a-Number (NaN), the result is the string "NaN". Furthermore, infinity
* produces the result "Infinity". @n
* 6 digits are given for the precision of this method. Use String::Format() to set the specific precision.
+ * @remarks The behavior of this method is dependent on the system default locale setting.
*/
virtual String ToString(void) const;
* @remarks If the value is Not-a-Number (NaN), the result is the string "NaN". Furthermore, infinity
* produces the result "Infinity". @n
* 6 digits are given for the precision of this method. Use String::Format() to set the specific precision.
+ * @remarks The behavior of this method is dependent on the system default locale setting.
*/
static String ToString(float value);
_AppControlImpl* pImpl = _AppControlImpl::GetInstance(*pAc);
pImpl->SetProperty(_APPCONTROL_PROPERTY_ALIAS);
- _AppControlAliasEntry* pEntry = new (std::nothrow) _AppControlAliasEntry(aId, oId, *pAppId, *pOperation);
- if (pEntry)
+ const _AppControlAliasEntry* pLookupEntry = GetReverseRuntimeAliasEntry(*pAppId, *pOperation);
+ if (pLookupEntry == null)
{
- // may fail
- __runtimeAlias.Add(pEntry);
- SysLog(NID_APP, "Setting alias appId (%ls -> %ls).", aId.GetPointer(), pAppId->GetPointer());
+ // no entry found : add new one
+ _AppControlAliasEntry* pEntry = new (std::nothrow) _AppControlAliasEntry(aId, oId, *pAppId, *pOperation);
+ if (pEntry)
+ {
+ // may fail
+ __runtimeAlias.Add(pEntry);
+ SysLog(NID_APP, "Setting alias appId (%ls -> %ls).", aId.GetPointer(), pAppId->GetPointer());
+ }
}
}
else
#include "FAppPkg_PackageInfoImpl.h"
#include "FApp_AppControlManager.h"
#include "FApp_Aul.h"
+#include "FSys_SystemInfoImpl.h"
using namespace Tizen::App::Package;
using namespace Tizen::Base;
_ConditionManagerProxy* pProxy = GetConditionManagerProxy();
SysTryReturnResult(NID_APP, null != pProxy, E_INVALID_STATE, "ConditionManager instance must not be null.");
+ Tizen::Base::Utility::StringTokenizer strTok(condition, L"=");
+ SysTryReturnResult(NID_APP, strTok.GetTokenCount() > 0, E_INVALID_ARG, "Condition string is invalid.(%ls)", condition.GetPointer());
+
+ String key;
+ result r = strTok.GetNextToken(key);
+ SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_ARG, "Condition string is invalid.(%ls)", condition.GetPointer());
+
+ bool ret = true;
+ if (key == L"Serial")
+ {
+ r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/usb.accessory", ret);
+ }
+ else if (key == L"NFC")
+ {
+ r = Tizen::System::_SystemInfoImpl::GetSysInfo(L"http://tizen.org/feature/network.nfc", ret);
+ }
+ SysTryReturnResult(NID_APP, ret != false, E_UNSUPPORTED_OPERATION, "Condition(%ls)", condition.GetPointer());
+
return pProxy->RegisterAppLaunch(appId, condition, pArguments, option);
}
if( (platformDebug == false) && (appDebug == 0) )
{
snprintf(logBody, LOG_LEN_MAX, "%s(%d) > App assertion passed due to debug mode off!", pFunction, lineNumber);
- ALOG(LOG_ERROR, logTag, logBody);
+ ALOG(LOG_ERROR, logTag, "%s", logBody);
return;
}
snprintf(logBody, LOG_LEN_MAX, "%s(%d) > AppAssert!", pFunction, lineNumber);
- ALOG(LOG_ERROR, logTag, logBody);
+ ALOG(LOG_ERROR, logTag, "%s", logBody);
assert(false);
}
snprintf(logBody, LOG_LEN_MAX, "%s(%d) > SysAssert!", pFunction, lineNumber);
- ALOG(LOG_ERROR, LOG_TAG_ASSERT, logBody);
+ ALOG(LOG_ERROR, LOG_TAG_ASSERT, "%s", logBody);
assert(false);
}
char logTag[LOG_MODULE_NAME_LEN_MAX];
snprintf(logTag, LOG_MODULE_NAME_LEN_MAX, "%s", __GetModuleName(static_cast<LogID>(nid)));
- ALOG(LOG_ERROR, logTag, logBody);
+ ALOG(LOG_ERROR, logTag, "%s", logBody);
}
void
g_io_channel_set_encoding(__pEventFdIo, null, &pGError);
g_io_channel_set_flags(__pEventFdIo, G_IO_FLAG_NONBLOCK, &pGError);
+ g_io_channel_set_close_on_unref(__pEventFdIo, TRUE);
+ eventFd = -1;
+
__pEventFdSource = g_io_create_watch(__pEventFdIo, G_IO_IN);
SysTryCatch(NID_BASE_RT, __pEventFdSource != null, r = E_SYSTEM, E_SYSTEM,
"[E_SYSTEM] Failed to create a gsource for a channel.");
if (__pEventFdSource)
{
+ g_source_destroy(__pEventFdSource);
g_source_unref(__pEventFdSource);
__pEventFdSource = null;
}
__pEventFdIo = null;
}
+ if (eventFd != -1)
+ {
+ close(eventFd);
+ }
+
return r;
}
if (__pSource)
{
+ g_source_destroy(__pSource);
g_source_unref(__pSource);
__pSource = null;
}
g_io_channel_set_encoding(__pChannel, null, &pGError);
g_io_channel_set_flags(__pChannel, G_IO_FLAG_NONBLOCK, &pGError);
+ g_io_channel_set_close_on_unref(__pChannel, TRUE);
+ eventFd = -1;
+
__pSource = g_io_create_watch(__pChannel, G_IO_IN);
SysTryCatch(NID_BASE_RT, __pSource != null, r = E_SYSTEM, E_SYSTEM,
"[E_SYSTEM] Failed to create a gsource for a channel.");
if (__pSource)
{
+ g_source_destroy(__pSource);
g_source_unref(__pSource);
__pSource = null;
}
__pChannel = null;
}
+ if (eventFd != -1)
+ {
+ close(eventFd);
+ }
return r;
}
ConnectivityNfcServiceMsgStart,
ConnectivityTelephonyServiceMsgStart,
UiManagerServiceStart,
- TrustZoneServiceStart
+ TrustZoneServiceStart,
+ LockManagerServiceStart
//LastIPCMsgStart // Must come last.
};
Calendar::GetActualMaxTimeField(TimeField field) const
{
SysAssertf(_pCalendarImpl != null, "Not yet constructed! Construct() should be called before use.");
- return _pCalendarImpl->GetActualMaxTimeField(field);
+ return _pCalendarImpl->GetActualMaxTimeFieldImpl(field);
}
int
Calendar::GetActualMinTimeField(TimeField field) const
{
SysAssertf(_pCalendarImpl != null, "Not yet constructed! Construct() should be called before use.");
- return _pCalendarImpl->GetActualMinTimeField(field);
+ return _pCalendarImpl->GetActualMinTimeFieldImpl(field);
}
int
Calendar::Roll(TimeField field, int amount)
{
SysAssertf(_pCalendarImpl != null, "Not yet constructed! Construct() should be called before use.");
- return _pCalendarImpl->Roll(field, amount);
+ return _pCalendarImpl->RollImpl(field, amount);
}
result
}
result
-_CalendarImpl::Roll(TimeField field, int amount)
+_CalendarImpl::RollImpl(TimeField field, int amount)
{
SysAssertf(__pCalendar != null, "Not yet constructed! Construct() should be called before use.");
-
result r = E_INVALID_ARG;
if (Tizen::App::_AppInfo::GetApiVersion() == _API_VERSION_2_0 && Tizen::App::_AppInfo::IsOspCompat())
{
}
int
-_CalendarImpl::GetActualMinTimeField(TimeField field) const
+_CalendarImpl::GetActualMinTimeFieldImpl(TimeField field) const
{
SysAssertf(__pCalendar != null, "Not yet constructed! Construct() should be called before use.");
SysTryReturn(NID_LCL, ValidateTimeField(field), -1, E_INVALID_ARG,
}
int
-_CalendarImpl::GetActualMaxTimeField(TimeField field) const
+_CalendarImpl::GetActualMaxTimeFieldImpl(TimeField field) const
{
SysAssertf(__pCalendar != null, "Not yet constructed! Construct() should be called before use.");
SysTryReturn(NID_LCL, ValidateTimeField(field), -1, E_INVALID_ARG,
result ClearImpl(TimeField field);
result AddTimeField(TimeField field, int amount);
- result Roll(TimeField field, int amount);
+ result RollImpl(TimeField field, int amount);
// Methods to compare Calendars
result After(const _CalendarImpl& otherInstance, bool& after);
Tizen::Base::DateTime GetTimeImpl(void) const;
int GetMinTimeField(TimeField field) const;
- int GetActualMinTimeField(TimeField field) const;
+ int GetActualMinTimeFieldImpl(TimeField field) const;
int GetGreatestMinTimeField(TimeField field) const;
int GetLeastMaxTimeField(TimeField field) const;
- int GetActualMaxTimeField(TimeField field) const;
+ int GetActualMaxTimeFieldImpl(TimeField field) const;
int GetMaxTimeField(TimeField field) const;
int GetFirstDayOfWeekImpl(void) const;
{ Tizen::Base::_API_VISIBILITY_PARTNER }, // application.kill
{ Tizen::Base::_API_VISIBILITY_PUBLIC }, // application.launch
{ Tizen::Base::_API_VISIBILITY_PARTNER }, // appmanager.launch
- { Tizen::Base::_API_VISIBILITY_PARTNER }, // appsetting
+ { Tizen::Base::_API_VISIBILITY_PLATFORM }, // appsetting
{ Tizen::Base::_API_VISIBILITY_PARTNER }, // appusage
{ Tizen::Base::_API_VISIBILITY_PARTNER }, // audiomanager.route
{ Tizen::Base::_API_VISIBILITY_PARTNER }, // audiomanager.session