Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://projects.maemo.org/svn/dsm/mce/trunk@19331 db81c003-b5ea-0310-aa99-ed7f6e1db739
- Loading branch information
David Weinehall
committed
Dec 16, 2010
0 parents
commit 4c5de70
Showing
108 changed files
with
37,350 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
# Makefile for MCE | ||
# Copyright © 2004-2010 Nokia Corporation. | ||
# Written by David Weinehall | ||
# Modified by Tuomo Tanskanen | ||
|
||
VERSION := 1.10.88 | ||
|
||
INSTALL := install -o root -g root --mode=755 | ||
INSTALL_DIR := install -d | ||
INSTALL_DATA := install -o root -g root --mode=644 | ||
|
||
DOXYGEN := doxygen | ||
|
||
VARDIR := $(DESTDIR)/var/lib/mce | ||
RUNDIR := $(DESTDIR)/var/run/mce | ||
CONFDIR := /etc/mce | ||
CONFINSTDIR := $(DESTDIR)$(CONFDIR) | ||
SBINDIR := $(DESTDIR)/sbin | ||
MODULEDIR := $(DESTDIR)/usr/lib/mce/modules | ||
DBUSDIR := $(DESTDIR)/etc/dbus-1/system.d | ||
LOCALEDIR := $(DESTDIR)/usr/share/locale | ||
GCONFSCHEMADIR := $(DESTDIR)/etc/gconf/schemas | ||
BACKUPCONFDIR := $(DESTDIR)/usr/share/backup-framework/applications | ||
BACKUPSCRIPTDIR := $(DESTDIR)/usr/share/mce | ||
|
||
TOPDIR := . | ||
DOCDIR := $(TOPDIR)/doc | ||
TOOLDIR := $(TOPDIR)/tools | ||
TESTSDIR := $(TOPDIR)/tests | ||
MODULE_DIR := $(TOPDIR)/modules | ||
|
||
TOOLS := \ | ||
$(TOOLDIR)/mcetool | ||
TESTS := \ | ||
$(TESTSDIR)/mcetorture | ||
TARGETS := \ | ||
mce | ||
MODULES := \ | ||
$(MODULE_DIR)/libradiostates.so \ | ||
$(MODULE_DIR)/libfilter-brightness-als.so \ | ||
$(MODULE_DIR)/libfilter-brightness-simple.so \ | ||
$(MODULE_DIR)/libproximity.so \ | ||
$(MODULE_DIR)/libkeypad.so \ | ||
$(MODULE_DIR)/libinactivity.so \ | ||
$(MODULE_DIR)/libcamera.so \ | ||
$(MODULE_DIR)/libalarm.so \ | ||
$(MODULE_DIR)/libbattery.so \ | ||
$(MODULE_DIR)/libdisplay.so \ | ||
$(MODULE_DIR)/libled.so \ | ||
$(MODULE_DIR)/libcallstate.so \ | ||
$(MODULE_DIR)/libaudiorouting.so \ | ||
$(MODULE_DIR)/libpowersavemode.so | ||
ONLINERADIOSTATESFILE := radio_states.online | ||
OFFLINERADIOSTATESFILE := radio_states.offline | ||
CONFFILE := mce.ini | ||
DBUSCONF := mce.conf mcetool.conf | ||
GCONFSCHEMAS := display.schemas energymanagement.schemas | ||
BACKUPCONF := mcebackup.conf | ||
BACKUPSCRIPTS := mce-backup mce-restore | ||
|
||
WARNINGS := -Wextra -Wall -Wpointer-arith -Wundef -Wcast-align -Wshadow | ||
WARNINGS += -Wbad-function-cast -Wwrite-strings -Wsign-compare | ||
WARNINGS += -Waggregate-return -Wmissing-noreturn -Wnested-externs | ||
WARNINGS += -Wchar-subscripts -Wmissing-prototypes -Wformat-security | ||
WARNINGS += -Wformat=2 -Wformat-nonliteral -Winit-self | ||
WARNINGS += -Wswitch-default -Wstrict-prototypes | ||
WARNINGS += -Wdeclaration-after-statement | ||
WARNINGS += -Wold-style-definition -Wmissing-declarations | ||
WARNINGS += -Wmissing-include-dirs -Wstrict-aliasing=2 | ||
WARNINGS += -Wunsafe-loop-optimizations -Winvalid-pch | ||
WARNINGS += -Waddress -Wvolatile-register-var | ||
WARNINGS += -Wmissing-format-attribute | ||
#WARNINGS += -Wswitch-enum -Wunreachable-code | ||
WARNINGS += -Wstack-protector | ||
WARNINGS += -Werror # -std=c99 | ||
WARNINGS += -Wno-declaration-after-statement | ||
|
||
COMMON_CFLAGS := -D_GNU_SOURCE | ||
COMMON_CFLAGS += -I. $(WARNINGS) | ||
COMMON_CFLAGS += -DG_DISABLE_DEPRECATED | ||
COMMON_CFLAGS += -DOSSOLOG_COMPILE | ||
COMMON_CFLAGS += -DMCE_VAR_DIR=$(VARDIR) -DMCE_RUN_DIR=$(RUNDIR) | ||
COMMON_CFLAGS += -DPRG_VERSION=$(VERSION) | ||
#COMMON_CFLAGS += -funit-at-a-time -fwhole-program -combine | ||
#COMMON_CFLAGS += -fstack-protector | ||
|
||
MCE_CFLAGS := $(COMMON_CFLAGS) | ||
MCE_CFLAGS += -DMCE_CONF_FILE=$(CONFDIR)/$(CONFFILE) | ||
MCE_CFLAGS += $$(pkg-config gobject-2.0 glib-2.0 gio-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 conic sysinfo --cflags) | ||
MCE_LDFLAGS := $$(pkg-config gobject-2.0 glib-2.0 gio-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 conic dsme sysinfo --libs) | ||
LIBS := tklock.c modetransition.c powerkey.c connectivity.c mce-dbus.c mce-dsme.c mce-gconf.c event-input.c event-switches.c mce-hal.c mce-log.c mce-conf.c datapipe.c mce-modules.c mce-io.c mce-lib.c | ||
HEADERS := tklock.h modetransition.h powerkey.h connectivity.h mce.h mce-dbus.h mce-dsme.h mce-gconf.h event-input.h event-switches.h mce-hal.h mce-log.h mce-conf.h datapipe.h mce-modules.h mce-io.h mce-lib.h | ||
|
||
MODULE_CFLAGS := $(COMMON_CFLAGS) | ||
MODULE_CFLAGS += -fPIC -shared | ||
MODULE_CFLAGS += -I. | ||
MODULE_CFLAGS += $$(pkg-config gobject-2.0 glib-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 --cflags) | ||
MODULE_LDFLAGS := $$(pkg-config gobject-2.0 glib-2.0 gmodule-2.0 dbus-1 dbus-glib-1 gconf-2.0 libcal --libs) | ||
MODULE_LIBS := datapipe.c mce-hal.c mce-log.c mce-dbus.c mce-conf.c mce-gconf.c median_filter.c mce-lib.c | ||
MODULE_HEADERS := datapipe.h mce-hal.h mce-log.h mce-dbus.h mce-conf.h mce-gconf.h mce.h median_filter.h mce-lib.h | ||
|
||
TOOLS_CFLAGS := $(COMMON_CFLAGS) | ||
TOOLS_CFLAGS += -I. | ||
TOOLS_CFLAGS += $$(pkg-config gobject-2.0 glib-2.0 dbus-1 gconf-2.0 --cflags) | ||
TOOLS_LDFLAGS := $$(pkg-config gobject-2.0 glib-2.0 dbus-1 gconf-2.0 --libs) | ||
TOOLS_HEADERS := tklock.h mce-dsme.h tools/mcetool.h | ||
|
||
.PHONY: all | ||
all: $(TARGETS) $(MODULES) $(TOOLS) | ||
|
||
$(TARGETS): %: %.c $(HEADERS) $(LIBS) | ||
@$(CC) $(CFLAGS) $(MCE_CFLAGS) -o $@ $< $(LIBS) $(LDFLAGS) $(MCE_LDFLAGS) | ||
|
||
$(MODULES): $(MODULE_DIR)/lib%.so: $(MODULE_DIR)/%.c $(MODULE_HEADERS) $(MODULE_LIBS) | ||
@$(CC) $(CFLAGS) $(MODULE_CFLAGS) -o $@ $< $(MODULE_LIBS) $(LDFLAGS) $(MODULE_LDFLAGS) | ||
|
||
$(TOOLS): %: %.c $(TOOLS_HEADERS) | ||
@$(CC) $(CFLAGS) $(TOOLS_CFLAGS) -o $@ $< $(LDFLAGS) mce-log.c $(TOOLS_LDFLAGS) | ||
|
||
.PHONY: tags | ||
tags: | ||
@find . $(MODULE_DIR) -maxdepth 1 -type f -name '*.[ch]' | xargs ctags -a --extra=+f | ||
|
||
.PHONY: doc | ||
doc: | ||
@$(DOXYGEN) 2> $(DOCDIR)/warnings > /dev/null | ||
|
||
.PHONY: install | ||
install: all | ||
$(INSTALL_DIR) $(SBINDIR) $(DBUSDIR) $(VARDIR) $(MODULEDIR) &&\ | ||
$(INSTALL_DIR) $(RUNDIR) $(CONFINSTDIR) $(GCONFSCHEMADIR) &&\ | ||
$(INSTALL_DIR) $(BACKUPCONFDIR) $(BACKUPSCRIPTDIR) &&\ | ||
$(INSTALL) $(TARGETS) $(SBINDIR) &&\ | ||
$(INSTALL) $(TOOLS) $(TESTS) $(SBINDIR) &&\ | ||
$(INSTALL) $(MODULES) $(MODULEDIR) &&\ | ||
$(INSTALL) $(BACKUPSCRIPTS) $(BACKUPSCRIPTDIR) &&\ | ||
$(INSTALL_DATA) $(ONLINERADIOSTATESFILE) $(VARDIR) &&\ | ||
$(INSTALL_DATA) $(OFFLINERADIOSTATESFILE) $(VARDIR) &&\ | ||
$(INSTALL_DATA) $(CONFFILE) $(CONFINSTDIR) &&\ | ||
$(INSTALL_DATA) $(GCONFSCHEMAS) $(GCONFSCHEMADIR) &&\ | ||
$(INSTALL_DATA) $(DBUSCONF) $(DBUSDIR) &&\ | ||
$(INSTALL_DATA) $(BACKUPCONF) $(BACKUPCONFDIR) | ||
|
||
.PHONY: fixme | ||
fixme: | ||
@find . -type f -name "*.[ch]" | xargs grep -E "FIXME|XXX|TODO" | ||
|
||
.PHONY: clean | ||
clean: | ||
@rm -f $(TARGETS) $(TOOLS) $(MODULES) | ||
@if [ x"$(DOCDIR)" != x"" ] && [ -d "$(DOCDIR)" ]; then \ | ||
rm -rf $(DOCDIR)/*; \ | ||
fi | ||
|
||
.PHONY: distclean | ||
distclean: clean | ||
@rm -f tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
GENERIC: | ||
- stay-on doesn't seem to work?! | ||
|
||
- Handle display type = 0 properly! | ||
|
||
- Make ALS setup a 0-timeout read instead of using | ||
als_read_value_filtered() | ||
|
||
- Replace use of *_submode_int32() with datapipe if feasible | ||
|
||
- Merge ALS and proximity sensor into modules/sensors.c | ||
|
||
- Fix event-input.c to use | ||
/dev/input/{ts,keypad,jack,gpio-keys,pwr_button,mice} | ||
where possible | ||
|
||
- Use g_try_malloc() instead of g_malloc() | ||
|
||
- Add support for new functionality to mcetorture | ||
| power save mode | ||
|
||
- Add function to mce-hal to enumerate features for different | ||
products (flicker key, home key, keyboard, etc.) | ||
|
||
- Add code to datapipe.c to ensure that datapipes never end up | ||
called recursively | ||
|
||
- Audit the code to ensure that no datapipe triggers or filters | ||
execute datapipes directly; if this cannot be avoided, it needs | ||
to be verified to be safe | ||
|
||
- Use string pointer comparisons instead of strcmp() wherever | ||
possible; be sure to internalise strings to enable this | ||
|
||
- Add option for proximity sensor policy both for incoming calls | ||
and calls in progress | ||
|
||
- Add option to not use systemui tklock if kp + ts irqs are | ||
disabled and immediate blanking is enabled | ||
|
||
- Before ALS is fully tuned or if brightness setting isn't | ||
available, use 40% | ||
|
||
- Turn powerkey.c, tklock.c into proper modules | ||
|
||
- Unify lens cover and camera popout code | ||
| Move camera popout detection to event-switches, | ||
| and overload the lens cover pipe for this, thereby | ||
| ensuring consistent behaviour across hardware. | ||
| Also rename the configuration option CameraPopoutUnlock | ||
| in mce.ini to something more sensible, and enable it | ||
| by default | ||
| keep the camera active code in the camera module | ||
|
||
- Update mce manual for GConf keys | ||
|
||
- Fix maximum_display_brightness in the filters | ||
| Make it possible to use range 1-<max brightness> | ||
| if the ALS has been disabled | ||
|| Get brightness range from GConf, convert to percentage, | ||
|| use in filter_brightness_simple | ||
|| Non-linearity can then be achieved simply by using a 1-100% | ||
|| range and only providing discrete steps in the app | ||
|
||
- Make minimum brightness for RX34 2% of maximum? | ||
|
||
- Add option to allow the keyboard/keypad backlight stay on as | ||
long as the keyboard is open and the display is on | ||
|
||
- Find some way to make sure audio etc. is disabled | ||
| maybe save old profile and request silent profile, | ||
| then restore? | ||
|
||
|
||
FIXME: | ||
- mce-modules needs to make use of the module_info | ||
|
||
|
||
ACTIVITY: | ||
- Make activity sources configurable with path + values | ||
instead of hardcoding them | ||
|
||
|
||
HACKS: | ||
- "Silent" tklock; no tklock UI, only disable touchscreen | ||
and keypad (to allow mediaplayer to continue playing) | ||
|
||
|
||
CONFIGURABILITY: | ||
- Check ranges for return values | ||
|
||
|
||
RELIABILITY: | ||
- Check for superfluous D-Bus arguments | ||
- Return proper D-Bus errors | ||
|
||
|
||
DOCUMENTATION: | ||
- Manual page for mce.ini | ||
|
||
|
||
CLEANUP: | ||
|
||
OPEN ISSUES: | ||
- Should we unref dbus-messages or not after an OOM? | ||
|
||
- Failure cases for D-Bus, GConf, etc.? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* @file bme-dbus-names.h | ||
*/ | ||
|
||
#ifndef _BME_DBUS_NAMES_H_ | ||
#define _BME_DBUS_NAMES_H_ | ||
|
||
#define DBUS_BROADCAST "org.freedesktop.DBus.Broadcast" | ||
|
||
#define BME_SERVICE "com.nokia.bme" | ||
|
||
#define BME_REQUEST_IF "com.nokia.bme.request" | ||
#define BME_REQUEST_PATH "/com/nokia/bme/request" | ||
|
||
#define BME_SIGNAL_IF "com.nokia.bme.signal" | ||
#define BME_SIGNAL_PATH "/com/nokia/bme/signal" | ||
|
||
#define BME_ERROR_FATAL "com.nokia.bme.error.fatal" | ||
#define BME_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs" | ||
|
||
#define BME_BATTERY_STATE_UPDATE "battery_state_changed" | ||
#define BME_BATTERY_FULL "battery_full" | ||
#define BME_BATTERY_OK "battery_ok" | ||
#define BME_BATTERY_LOW "battery_low" | ||
#define BME_BATTERY_EMPTY "battery_empty" | ||
#define BME_BATTERY_TIMELEFT "battery_timeleft" | ||
|
||
#define BME_CHARGER_CONNECTED "charger_connected" | ||
#define BME_CHARGER_DISCONNECTED "charger_disconnected" | ||
#define BME_CHARGER_CHARGING_ON "charger_charging_on" | ||
#define BME_CHARGER_CHARGING_OFF "charger_charging_off" | ||
#define BME_CHARGER_CHARGING_FAILED "charger_charging_failed" | ||
|
||
#define BME_STATUS_INFO_REQ "status_info_req" | ||
#define BME_TIMELEFT_INFO_REQ "timeleft_info_req" | ||
|
||
#endif /*__BME_DBUS_NAMES_H_ */ |
Oops, something went wrong.