Rename Client struct to ClientImp for C++

opencv
PgSocks 1 year ago
parent f7bda10f7d
commit c4e3a9ceea

@ -1,8 +1,8 @@
#pragma once #pragma once
// Public stuff // Public stuff
struct Client; struct ClientImp;
typedef struct Client* Client; typedef struct ClientImp* Client;
#include "message.h" #include "message.h"
#include "chassis.h" #include "chassis.h"

@ -2,7 +2,7 @@
#include <stdint.h> #include <stdint.h>
struct Client { struct ClientImp {
uint16_t seq; uint16_t seq;

@ -124,7 +124,7 @@ connection_new(unsigned int source_port, const char* source_ip, unsigned int des
} }
struct Connection* struct Connection*
connection_poll_ready(struct Client* client) { connection_poll_ready(struct ClientImp* client) {
// Return a null connection if no sockets have been opened // Return a null connection if no sockets have been opened
if(max_fd < 0) if(max_fd < 0)

@ -16,7 +16,7 @@ struct Connection*
connection_new(unsigned int source_port, const char* source_ip, unsigned int dest_port, const char* dest_ip); connection_new(unsigned int source_port, const char* source_ip, unsigned int dest_port, const char* dest_ip);
struct Connection* struct Connection*
connection_poll_ready(struct Client* client); connection_poll_ready(struct ClientImp* client);
void void
connection_read(struct Connection* connection, union Message* resp); connection_read(struct Connection* connection, union Message* resp);

@ -19,7 +19,7 @@ struct RobotImp {
struct FragmentLink *free; struct FragmentLink *free;
} frag_queue; } frag_queue;
struct Client* client; struct ClientImp* client;
uint16_t seq; uint16_t seq;
int16_t wheels[4]; int16_t wheels[4];

@ -8,8 +8,8 @@
#include <string.h> #include <string.h>
Client client_new() { Client client_new() {
struct Client* client = malloc(sizeof(struct Client)); struct ClientImp* client = malloc(sizeof(struct ClientImp));
memset(client, 0, sizeof(struct Client)); memset(client, 0, sizeof(struct ClientImp));
// TODO: Make this configurable // TODO: Make this configurable
return client; return client;
} }

Loading…
Cancel
Save