Changeset be15256 in mainline for uspace/srv/hid/display/main.c


Ignore:
Timestamp:
2019-11-05T08:00:18Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b2d1df3
Parents:
b3c185b6
git-author:
Jiri Svoboda <jiri@…> (2019-10-04 19:00:15)
git-committer:
Jiri Svoboda <jiri@…> (2019-11-05 08:00:18)
Message:

ds_client should not have reverse dependency on libdisplay's display_srv

Breaks layering and hampers testability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/main.c

    rb3c185b6 rbe15256  
    5252
    5353static void display_client_conn(ipc_call_t *, void *);
     54static void display_client_ev_pending(void *);
     55
     56static ds_client_cb_t display_client_cb = {
     57        .ev_pending = display_client_ev_pending
     58};
    5459
    5560static void display_kbd_event(void *arg, kbd_event_t *event)
     
    5964        printf("display_kbd_event\n");
    6065        ds_display_post_kbd_event(disp, event);
     66}
     67
     68static void display_client_ev_pending(void *arg)
     69{
     70        display_srv_t *srv = (display_srv_t *) arg;
     71        printf("display_client_ev_pending\n");
     72        display_srv_ev_pending(srv);
    6173}
    6274
     
    137149        if (svc_id != 0) {
    138150                /* Create client object */
    139                 rc = ds_client_create(disp, &srv, &client);
     151                rc = ds_client_create(disp, &display_client_cb, &srv, &client);
    140152                if (rc != EOK) {
    141153                        async_answer_0(icall, ENOMEM);
Note: See TracChangeset for help on using the changeset viewer.