project_name=webapi-plugins
-libdir=__LIB_DIR__
-includedir=__INCLUDE_DIR__
+libdir=/usr/lib/tizen-extensions-crosswalk
+includedir=/usr/include/webapi-plugins/src
Name: ${project_name}
Description: ${project_name}
AttributeMatchFlag flag) {
ScopeLogger();
+ if (match_value.empty() && value.empty()) {
+ return true;
+ }
+
switch (flag) {
case AttributeMatchFlag::kEndsWith: {
if (match_value.empty()) {
bool FilterUtils::isTimeStampInRange(const time_t& time_stamp, tizen::AnyPtr& initial_value,
tizen::AnyPtr& end_value) {
ScopeLogger();
- time_t from_time = 0;
- if (initial_value && !initial_value->isNullOrUndefined()) {
- struct tm ftime = *initial_value->toDateTm();
- from_time = mktime(&ftime);
- } else {
- LoggerE("initialValue is not Time!");
+ if (!initial_value || !end_value) {
+ LoggerD("initial_value is %snull. end_value is %snull",
+ initial_value ? "NOT " : "", end_value ? "NOT " : "");
return false;
}
- time_t to_time = 0;
- if (end_value && !end_value->isNullOrUndefined()) {
- struct tm ttime = *end_value->toDateTm();
- to_time = mktime(&ttime);
- } else {
- LoggerE("endValue is not Time!");
- return false;
- }
+ time_t from_time = initial_value->isNullOrUndefined() ?
+ std::numeric_limits<time_t>::min() : initial_value->toTimeT();
+
+ time_t to_time = end_value->isNullOrUndefined() ?
+ std::numeric_limits<time_t>::max() : end_value->toTimeT();
bool is_in_range = FilterUtils::isBetweenTimeRange(time_stamp, from_time, to_time);
#include <memory>
#include <sstream>
#include <vector>
+#include <time.h>
//#include <JSArray.h>
#include "Any.h"
tizen::AnyPtr& end_value);
bool isInRange(const unsigned long messageCount, const unsigned long initial_value,
const unsigned long end_value);
-inline bool isBetweenTimeRange(const time_t current, const time_t from, const time_t to) {
- return ((current - from) >= 0) && ((to - current) >= 0);
+inline bool isBetweenTimeRange(const time_t timestamp, const time_t from, const time_t to) {
+ return (difftime(timestamp, from) >= 0.0) && (difftime(to, timestamp) >= 0.0);
}
/*