[FEATURE] Implement kernel -> user connection
[platform/core/system/swap-manager.git] / daemon / ioctl_commands.h
1 /*
2  *  DA manager
3  *
4  * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:
7  *
8  * Cherepanov Vitaliy <v.cherepanov@samsung.com>
9  * Nikita Kalyazin    <n.kalyazin@samsung.com>
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  *
23  * Contributors:
24  * - Samsung RnD Institute Russia
25  *
26  */
27
28
29 /* SWAP Device ioctl commands */
30
31 #include "da_protocol.h"
32
33 #include <linux/ioctl.h>
34
35 #ifndef __SWAP_IOCTL_COMMANDS_H__
36 #define __SWAP_IOCTL_COMMANDS_H__
37
38 #define SWAP_DRIVER_IOC_MAGIC 0xAF
39
40 struct buffer_initialize {
41     size_t size;
42     unsigned int count;
43 };
44 #define SWAP_DRIVER_BUFFER_INITIALIZE           _IOW(SWAP_DRIVER_IOC_MAGIC, 1, \
45                                                                                      struct buffer_initialize *)
46 #define SWAP_DRIVER_BUFFER_UNINITIALIZE         _IO(SWAP_DRIVER_IOC_MAGIC, 2)
47 #define SWAP_DRIVER_NEXT_BUFFER_TO_READ         _IO(SWAP_DRIVER_IOC_MAGIC, 3)
48 #define SWAP_DRIVER_FLUSH_BUFFER                        _IO(SWAP_DRIVER_IOC_MAGIC, 4)
49 #define SWAP_DRIVER_MSG                                         _IOW(SWAP_DRIVER_IOC_MAGIC, 5, \
50                                                                                      void *)
51 #define SWAP_DRIVER_WAKE_UP                              _IO(SWAP_DRIVER_IOC_MAGIC, 6)
52
53
54 int ioctl_send_msg(struct msg_t *msg);
55
56
57 #endif /* __SWAP_IOCTL_H__ */