Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 3123d2a in mainline for uspace/srv/hid/remcons/user.h


Ignore:
Timestamp:
2012-06-01T19:26:32Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
520acaf, 85a4350, c573e0f, e1e4192
Parents:
2f90b46
Message:

trivial changes (error code reporting, messages)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/remcons/user.h

    r2f90b46 r3123d2a  
    7676} telnet_user_t;
    7777
    78 telnet_user_t *telnet_user_create(int socket);
    79 void telnet_user_destroy(telnet_user_t *user);
    80 telnet_user_t *telnet_user_get_for_client_connection(service_id_t id);
    81 bool telnet_user_is_zombie(telnet_user_t *user);
    82 void telnet_user_notify_client_disconnected(telnet_user_t *user);
    83 int telnet_user_get_next_keyboard_event(telnet_user_t *user, kbd_event_t *event);
    84 int telnet_user_send_data(telnet_user_t *user, uint8_t *data, size_t size);
    85 void telnet_user_update_cursor_x(telnet_user_t *user, int new_x);
     78extern telnet_user_t *telnet_user_create(int);
     79extern void telnet_user_destroy(telnet_user_t *);
     80extern telnet_user_t *telnet_user_get_for_client_connection(service_id_t);
     81extern bool telnet_user_is_zombie(telnet_user_t *);
     82extern void telnet_user_notify_client_disconnected(telnet_user_t *);
     83extern int telnet_user_get_next_keyboard_event(telnet_user_t *, kbd_event_t *);
     84extern int telnet_user_send_data(telnet_user_t *, uint8_t *, size_t);
     85extern void telnet_user_update_cursor_x(telnet_user_t *, int);
    8686
    8787/** Print informational message about connected user. */
    8888#ifdef CONFIG_DEBUG
    8989#define telnet_user_log(user, fmt, ...) \
    90         printf(NAME " [console %d (%d)]: " fmt "\n", user->id, (int) user->service_id, ##__VA_ARGS__)
     90        printf(NAME " [console %d (%d)]: " fmt "\n", \
     91            user->id, (int) user->service_id, ##__VA_ARGS__)
    9192#else
    92 #define telnet_user_log(user, fmt, ...) (void)0
     93#define telnet_user_log(user, fmt, ...) ((void) 0)
    9394#endif
    9495
    9596/** Print error message associated with connected user. */
    9697#define telnet_user_error(user, fmt, ...) \
    97         fprintf(stderr, NAME " [console %d (%d)]: ERROR: " fmt "\n", user->id, (int) user->service_id, ##__VA_ARGS__)
     98        fprintf(stderr, NAME " [console %d (%d)]: ERROR: " fmt "\n", \
     99            user->id, (int) user->service_id, ##__VA_ARGS__)
    98100
    99101#endif
Note: See TracChangeset for help on using the changeset viewer.