mce-sensorfw.h 1.57 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/**
 * @file mce-sensorfw.h
 * Mode Control Entity - Interprocess communication with sensord
 * <p>
 * Copyright (C) 2013-2019 Jolla Ltd.
 * <p>
 * @author Simo Piiroinen <simo.piiroinen@jollamobile.com>
 *
 * mce is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License
 * version 2.1 as published by the Free Software Foundation.
 *
 * mce is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with mce.  If not, see <http://www.gnu.org/licenses/>.
 */

22 23 24 25 26 27 28 29 30 31 32 33 34 35
#ifndef MCE_SENSORFW_H_
# define MCE_SENSORFW_H_

# include <stdbool.h>

# ifdef __cplusplus
extern "C" {
# elif 0
} /* fool JED indentation ... */
# endif

bool mce_sensorfw_init(void);
void mce_sensorfw_quit(void);

36 37 38
void mce_sensorfw_suspend(void);
void mce_sensorfw_resume(void);

39
void mce_sensorfw_als_attach(int fd);
40
void mce_sensorfw_als_set_notify(void (*cb)(int lux));
41 42 43
void mce_sensorfw_als_enable(void);
void mce_sensorfw_als_disable(void);

44
void mce_sensorfw_ps_attach(int fd);
45 46 47 48
void mce_sensorfw_ps_set_notify(void (*cb)(bool covered));
void mce_sensorfw_ps_enable(void);
void mce_sensorfw_ps_disable(void);

49 50 51 52
void mce_sensorfw_orient_set_notify(void (*cb)(int state));
void mce_sensorfw_orient_enable(void);
void mce_sensorfw_orient_disable(void);

53 54
# ifdef __cplusplus
};
55
# endif
56 57

#endif /* MCE_SENSORFW_H_ */