Rename Client struct to ClientImp for C++
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// Public stuff
|
||||
struct Client;
|
||||
typedef struct Client* Client;
|
||||
struct ClientImp;
|
||||
typedef struct ClientImp* Client;
|
||||
|
||||
#include "message.h"
|
||||
#include "chassis.h"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct Client {
|
||||
struct ClientImp {
|
||||
|
||||
uint16_t seq;
|
||||
|
||||
|
||||
+1
-1
@@ -124,7 +124,7 @@ connection_new(unsigned int source_port, const char* source_ip, unsigned int des
|
||||
}
|
||||
|
||||
struct Connection*
|
||||
connection_poll_ready(struct Client* client) {
|
||||
connection_poll_ready(struct ClientImp* client) {
|
||||
|
||||
// Return a null connection if no sockets have been opened
|
||||
if(max_fd < 0)
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ struct Connection*
|
||||
connection_new(unsigned int source_port, const char* source_ip, unsigned int dest_port, const char* dest_ip);
|
||||
|
||||
struct Connection*
|
||||
connection_poll_ready(struct Client* client);
|
||||
connection_poll_ready(struct ClientImp* client);
|
||||
|
||||
void
|
||||
connection_read(struct Connection* connection, union Message* resp);
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ struct RobotImp {
|
||||
struct FragmentLink *free;
|
||||
} frag_queue;
|
||||
|
||||
struct Client* client;
|
||||
struct ClientImp* client;
|
||||
uint16_t seq;
|
||||
|
||||
int16_t wheels[4];
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@
|
||||
#include <string.h>
|
||||
|
||||
Client client_new() {
|
||||
struct Client* client = malloc(sizeof(struct Client));
|
||||
memset(client, 0, sizeof(struct Client));
|
||||
struct ClientImp* client = malloc(sizeof(struct ClientImp));
|
||||
memset(client, 0, sizeof(struct ClientImp));
|
||||
// TODO: Make this configurable
|
||||
return client;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user