Add Internal Password popup to ode-app for temporary
[platform/core/security/ode.git] / tools / apps / ode / include / ode-password.h
1 /*
2  *
3  * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 #ifndef __ODE_PASSWORD_H__
19 #define __ODE_PASSWORD_H__
20
21 #include <stdlib.h>
22 #include <string.h>
23 #include <limits.h>
24 #include <app.h>
25 #include <app_common.h>
26 #include <Elementary.h>
27 #include <dlog.h>
28
29 #include "ode-app.h"
30 #include "ode-app-widget.h"
31
32 enum {
33         CREATE_PASSWORD = 0,
34         CHANGE_PASSWORD,
35         DELETE_PASSWORD,
36         INSERT_SD_CARD,
37         INTERNAL_ENCRYPT_PASSWORD,
38         INTERNAL_DECRYPT_PASSWORD,
39 };
40
41 typedef struct {
42         Evas_Object *parent;
43         Evas_Object *popup;
44         int mode;
45         void (*callback)(void *user_data);
46         void *callback_data;
47         char entry_data_old[PATH_MAX];
48         char entry_data[PATH_MAX];
49 } popup_data_s;
50
51 void create_password_message_popup(popup_data_s *data);
52 void create_enter_password_popup(popup_data_s *data);
53 void create_confirm_password_popup(popup_data_s *data);
54 void create_delete_password_popup(popup_data_s *data);
55 void create_insert_sdcard_popup(popup_data_s *data);
56 void create_reset_sdcard_popup(popup_data_s *data);
57
58 void on_create_password_popup(Evas_Object *parent);
59 void on_delete_password_popup(Evas_Object *parent);
60 void on_change_password_popup(Evas_Object *parent);
61 void on_insert_sdcard_popup(Evas_Object *parent);
62
63 void password_popup_set_result_callback(void (*callback)(void *), void *user_data);
64 void password_result_callback(popup_data_s *data, const char *result);
65
66 #endif /* __ODE_PASSWORD_H__ */