--- /dev/null
+{
+ 'includes':[
+ '../common/common.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'tizen_exif',
+ 'type': 'loadable_module',
+ 'includes': [
+ '../common/pkg-config.gypi',
+ ],
+ 'sources': [
+ 'exif_api.js',
+ 'exif_extension.cc',
+ 'exif_extension.h',
+ 'exif_instance.cc',
+ 'exif_instance.h',
+ ],
+ 'conditions': [
+ [ 'tizen == 1', {
+ 'variables': { },
+ }],
+ ],
+ },
+ ],
+}
--- /dev/null
+// Copyright 2014 Samsung Electronics Co, Ltd. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function _sendSyncMessage(cmd) {
+ var msg = {
+ 'cmd': cmd
+ };
+ return JSON.parse(extension.internal.sendSyncMessage(JSON.stringify(msg)));
+}
+
+function ExifManager() {
+}
+
+ExifManager.prototype.getExifInfo = function(uri, successCallback, errorCallback) {
+ throw 'Not implemented';
+};
+
+ExifManager.prototype.saveExifInfo = function(exifInfo, successCallback, errorCallback) {
+ throw 'Not implemented';
+};
+
+ExifManager.prototype.getThumbnail = function(uri, successCallback, errorCallback) {
+ throw 'Not implemented';
+};
+
+tizen.ExifInformation = function(ExifInitDict) {
+ var uri_;
+ var width_;
+ var height_;
+ var deviceMaker_;
+ var deviceModel_;
+ var originalTime_;
+ var orientation_; //ImageContentOrientation
+ var fNumber_;
+ var isoSpeedRatings_;
+ var exposureTime_;
+ var exposureProgram_; //ExposureProgram
+ var flash_;
+ var focalLength_;
+ var whiteBalance_; //WhiteBalanceMode
+ var gpsLocation_; //SimpleCoordinates
+ var gpsAltitude_;
+ var gpsProcessingMethod_;
+ var gpsTime_; //TZDate
+ var userComment_;
+
+ throw 'Not implemented';
+};
+
+exports = new ExifManager();
--- /dev/null
+// Copyright (c) 2014 Samsung Electronics Co., Ltd. All Rights Reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "exif/exif_extension.h"
+#include "exif/exif_instance.h"
+
+namespace {
+const char kExtensionName[] = "tizen.exif";
+const char kExifInformationEntryPoint[] = "tizen.ExifInformation";
+}
+
+common::Extension* CreateExtension() {
+ return new ExifExtension;
+}
+
+// This will be generated from exif_api.js.
+extern const char kSource_exif_api[];
+
+ExifExtension::ExifExtension() {
+ SetExtensionName(kExtensionName);
+ SetJavaScriptAPI(kSource_exif_api);
+
+ const char* entry_points[] = {
+ kExifInformationEntryPoint,
+ NULL
+ };
+ SetExtraJSEntryPoints(entry_points);
+}
+
+ExifExtension::~ExifExtension() {}
+
+common::Instance* ExifExtension::CreateInstance() {
+ return new extension::exif::ExifInstance;
+}
--- /dev/null
+// Copyright (c) 2014 Samsung Electronics Co., Ltd. All Rights Reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXIF_EXIF_EXTENSION_H_
+#define EXIF_EXIF_EXTENSION_H_
+
+#include "common/extension.h"
+
+class ExifExtension : public common::Extension {
+ public:
+ ExifExtension();
+ virtual ~ExifExtension();
+
+ private:
+ // common::Extension implementation.
+ virtual common::Instance* CreateInstance();
+};
+
+#endif // EXIF_EXIF_EXTENSION_H_
--- /dev/null
+// Copyright (c) 2014 Samsung Electronics Co., Ltd. All Rights Reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "exif/exif_instance.h"
+
+#include <string>
+
+#include "common/logger.h"
+
+namespace extension {
+namespace exif {
+
+namespace {
+const char kGetExifInfoCmd[] = "Exif_getExifInfo";
+const char kSaveExifInfoCmd[] = "Exif_saveExifInfo";
+const char kGetThumbnailCmd[] = "Exif_getThumbnail";
+}
+
+ExifInstance::ExifInstance() {
+ using namespace std::placeholders;
+ #define REGISTER_SYNC(c,x) \
+ RegisterSyncHandler(c, std::bind(&ExifInstance::x, this, _1, _2));
+ REGISTER_SYNC(kGetExifInfoCmd, getExifInfo);
+ REGISTER_SYNC(kSaveExifInfoCmd, saveExifInfo);
+ REGISTER_SYNC(kGetThumbnailCmd, getThumbnail);
+ #undef REGISTER_SYNC
+}
+
+ExifInstance::~ExifInstance() {}
+
+void ExifInstance::getExifInfo(const picojson::value& args, picojson::object& out) {
+ LoggerE("getExifInfo is not implemented");
+}
+
+void ExifInstance::saveExifInfo(const picojson::value& args, picojson::object& out) {
+ LoggerE("saveExifInfo is not implemented");
+}
+
+void ExifInstance::getThumbnail(const picojson::value& args, picojson::object& out) {
+ LoggerE("getThumbnail is not implemented");
+}
+} // namespace exif
+} // namespace extension
--- /dev/null
+// Copyright (c) 2014 Samsung Electronics Co., Ltd. All Rights Reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXIF_EXIF_INSTANCE_H_
+#define EXIF_EXIF_INSTANCE_H_
+
+#include "common/extension.h"
+#include "common/picojson.h"
+
+namespace extension {
+namespace exif {
+class ExifInstance : public common::ParsedInstance {
+ public:
+ ExifInstance();
+ virtual ~ExifInstance();
+
+ private:
+ void getExifInfo(const picojson::value& args, picojson::object& out);
+ void saveExifInfo(const picojson::value& args, picojson::object& out);
+ void getThumbnail(const picojson::value& args, picojson::object& out);
+};
+} // namespace exif
+} // namespace extension
+
+#endif // EXIF_EXIF_INSTANCE_H_
'power/power.gyp:*',
'messageport/messageport.gyp:*',
'bookmark/bookmark.gyp:*',
- 'archive/archive.gyp:*'
+ 'archive/archive.gyp:*',
+ 'exif/exif.gyp:*',
],
'conditions': [
[ 'extension_host_os == "mobile"', {