Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal hw keyboard availability and slide-in keypad position over D-Bus #230

Merged
merged 6 commits into from Jan 12, 2015
Merged

Signal hw keyboard availability and slide-in keypad position over D-Bus #230

merged 6 commits into from Jan 12, 2015

Conversation

spiiroin
Copy link
Contributor

No description provided.

Using abstract gpointer instead of pointer to io monitor structure
makes following logic from callbacks up to io monitor functionality
harder than it needs to be.

Use typed pointer instead of abstact gpointer for io monitor functions.

Use uniform naming for io monitor functions.

Remove unused io monitor error callback function type.

No functional changes.

[mce] Refactor mce io monitor interface
Rename functions, data types and variables to reflect logical grouping
and move items in each logical group close to each other.

Switch indentation to use 4 spaces instead of 1 tabulator.

Remove unused legacy ini-file config items.

No significant functional changes.
When slide in keypad is opened/closed, a keypad_slide_state_ind signal
is broadcast over D-Bus System Bus.

<node name="/com/nokia/mce/signal">
  <interface name="com.nokia.mce.signal">
    <signal name="keypad_slide_state_ind">
      <arg name="keypad_state" type="s"/>
    </signal>
  </interface>
</node>

Current state can be queried from mce with keypad_slide_state_req D-Bus
method call.

<node name="/com/nokia/mce/request">
  <interface name="com.nokia.mce.request">
    <method name="keypad_slide_state_req">
      <arg direction="out" name="keypad_state" type="s"/>
    </method>
  </interface>
</node>

[mce] Signal slide in keypad state over D-Bus System Bus
After io monitor is created, used data can be attached to it via
mce_io_mon_set_user_data().

The existing notification interface is not changed, i.e. the user
data is not automatically passed to notification callbacks and
must be queried via mce_io_mon_get_user_data() function when needed.

If free callback is provided, the user data is released when the
io monitor itself gets deleted.

[mce] Allow attaching of context specific user data to mce io monitors
Classify evdev nodes that send KEY_Q and KEY_P events as keyboards
or slide-in keypads depending on whether they also emit SW_KEYPAD_SLIDE
switch state events.

Maintain a hw-keyboard-is-available state - which is true as long as
there exists at least one keyboard device or slide-in keypad in open
position.

When availability state changes, a keypad_available_state_ind signal
is broadcast over D-Bus System Bus.

<node name="/com/nokia/mce/signal">
  <interface name="com.nokia.mce.signal">
    <signal name="keypad_available_state_ind">
      <arg name="keypad_state" type="s"/>
    </signal>
  </interface>
</node>

Current state can be queried from mce with keypad_available_state_req
D-Bus method call.

<node name="/com/nokia/mce/request">
  <interface name="com.nokia.mce.request">
    <method name="keypad_available_state_req">
      <arg direction="out" name="keypad_state" type="s"/>
    </method>
  </interface>
</node>

[mce] Signal hw keyboard availability state over D-Bus System Bus. Fixes JB#25232
Using signals/state data names with "keypad" causes confusion.

When dealing with input devices that are expected to be qwerty
keyboards, use names that have "keyboard" instead of "keypad".
spiiroin added a commit that referenced this pull request Jan 12, 2015
Signal hw keyboard availability and slide-in keypad position over D-Bus
@spiiroin spiiroin merged commit 1f7e319 into nemomobile:master Jan 12, 2015
@spiiroin spiiroin deleted the jb25232_keyboard_availability branch January 12, 2015 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant