summaryrefslogtreecommitdiff
path: root/alarm-app/inc
diff options
context:
space:
mode:
authorEugene Kurzberg <i.kurtsberg@samsung.com>2017-02-21 00:43:25 -0800
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2017-02-21 00:43:25 -0800
commite693b1ca5851040b14fbcb41520175fba4fa453c (patch)
treef76f249413806301645eee6275686c4a30fadf8e /alarm-app/inc
parenta2a6cdb2a9081a5335234d0ff4aaefe58f7ee162 (diff)
parent7eb0784601556f73dd6fc7d83e567eeebe1700dc (diff)
downloadalarm-e693b1ca5851040b14fbcb41520175fba4fa453c.tar.gz
alarm-e693b1ca5851040b14fbcb41520175fba4fa453c.tar.bz2
alarm-e693b1ca5851040b14fbcb41520175fba4fa453c.zip
Merge "TizenRefApp-8012 Implement automatic launch of alarm's create when there are no alarms for pick operation" into tizen_dev
Diffstat (limited to 'alarm-app/inc')
-rw-r--r--alarm-app/inc/Input/InputView.h15
-rw-r--r--alarm-app/inc/OperationAddController.h29
2 files changed, 44 insertions, 0 deletions
diff --git a/alarm-app/inc/Input/InputView.h b/alarm-app/inc/Input/InputView.h
index 19b4139..ed95cc3 100644
--- a/alarm-app/inc/Input/InputView.h
+++ b/alarm-app/inc/Input/InputView.h
@@ -31,12 +31,25 @@ namespace Input
class InputView : public Ui::ScrollNavigator
{
public:
+
+ /**
+ * @brief Called when alarm is created.
+ * @param id Created Alarm ID
+ */
+ typedef std::function<void(int id)> CreateCallback;
+
/**
* @brief Create view.
* @param[in] alarm Alarm to edit
*/
explicit InputView(Common::Model::Alarm alarm);
+ /**
+ * @brief Set alarm create callback.
+ * @param[in] callback Alarm create callback.
+ */
+ void setCreateCallback(CreateCallback callback);
+
private:
virtual Evas_Object *onCreate(Evas_Object *parent) override;
virtual void onCreated() override;
@@ -60,6 +73,8 @@ namespace Input
Evas_Object *m_Button;
bool m_HasDeleteButton;
+ CreateCallback m_OnCreated;
+
SetTimeView *m_TimeView;
SetRepeatView *m_RepeatView;
Common::Model::Alarm m_Alarm;
diff --git a/alarm-app/inc/OperationAddController.h b/alarm-app/inc/OperationAddController.h
new file mode 100644
index 0000000..5e2246a
--- /dev/null
+++ b/alarm-app/inc/OperationAddController.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef OPERATION_ADD_CONTROLLER_H
+#define OPERATION_ADD_CONTROLLER_H
+
+#include "App/OperationController.h"
+
+class OperationAddController : public App::OperationController
+{
+private:
+ virtual void onRequest(const char *operation, app_control_h request) override;
+ void onCreated(int alarmId);
+};
+
+#endif /* OPERATION_ADD_CONTROLLER_H */