Make patty/client.h types opaque

This commit is contained in:
XANTRONIX Development 2020-10-14 23:41:53 -04:00 committed by XANTRONIX Industrial
parent 4f2f01ec0a
commit 6a18811b04
2 changed files with 12 additions and 9 deletions

View file

@ -16,15 +16,8 @@ enum patty_client_call {
PATTY_CLIENT_CALL_COUNT PATTY_CLIENT_CALL_COUNT
}; };
typedef struct _patty_client_sock { typedef struct _patty_client_sock patty_client_sock;
int fd; typedef struct _patty_client patty_client;
char path[PATTY_AX25_SOCK_PATH_SIZE];
} patty_client_sock;
typedef struct _patty_client {
int fd;
patty_dict *socks;
} patty_client;
patty_client *patty_client_new(const char *path); patty_client *patty_client_new(const char *path);

View file

@ -9,6 +9,16 @@
#include <patty/ax25.h> #include <patty/ax25.h>
struct _patty_client_sock {
int fd;
char path[PATTY_AX25_SOCK_PATH_SIZE];
};
struct _patty_client {
int fd;
patty_dict *socks;
};
patty_client *patty_client_new(const char *path) { patty_client *patty_client_new(const char *path) {
patty_client *client; patty_client *client;
struct sockaddr_un addr; struct sockaddr_un addr;