libfreerdp-core: rename 'network' module to 'transport'

This commit is contained in:
Vic Lee 2011-07-03 10:59:07 +08:00
parent 3bd924aa56
commit c65ac150ce
3 changed files with 28 additions and 28 deletions

View File

@ -30,12 +30,12 @@ set(LIBFREERDP_CORE_SRCS
# credssp.h
# ntlmssp.c
# ntlmssp.h
network.c
network.h
tpdu.c
tpdu.h
tpkt.c
tpkt.h
transport.c
transport.h
)
add_library(freerdp-core SHARED ${LIBFREERDP_CORE_SRCS})

View File

@ -23,51 +23,51 @@
#include <freerdp/utils/stream.h>
#include <freerdp/utils/memory.h>
#include "network.h"
#include "transport.h"
rdpNetwork *
network_new(void)
rdpTransport *
transport_new(void)
{
rdpNetwork * network;
rdpTransport * transport;
network = (rdpNetwork *) xmalloc(sizeof(rdpNetwork));
memset(network, 0, sizeof(rdpNetwork));
transport = (rdpTransport *) xmalloc(sizeof(rdpTransport));
memset(transport, 0, sizeof(rdpTransport));
return network;
return transport;
}
void
network_free(rdpNetwork * network)
transport_free(rdpTransport * transport)
{
xfree(network);
xfree(transport);
}
int
network_connect(rdpNetwork * network, const char * server, int port)
transport_connect(rdpTransport * transport, const char * server, int port)
{
return 0;
}
int
network_disconnect(rdpNetwork * network)
transport_disconnect(rdpTransport * transport)
{
return 0;
}
int
network_start_tls(rdpNetwork * network)
transport_start_tls(rdpTransport * transport)
{
return 0;
}
int
network_send(rdpNetwork * network, STREAM * stream)
transport_send(rdpTransport * transport, STREAM * stream)
{
return 0;
}
int
network_check_fds(rdpNetwork * network)
transport_check_fds(rdpTransport * transport)
{
return 0;
}

View File

@ -17,34 +17,34 @@
* limitations under the License.
*/
#ifndef __NETWORK_H
#define __NETWORK_H
#ifndef __TRANSPORT_H
#define __TRANSPORT_H
#include <freerdp/utils/stream.h>
typedef int (* PacketReceivedCallback) (STREAM * stream);
struct rdp_network
struct rdp_transport
{
int sockfd;
struct crypto_tls * tls;
PacketReceivedCallback * recv_callback;
};
typedef struct rdp_network rdpNetwork;
typedef struct rdp_transport rdpTransport;
rdpNetwork *
network_new(void);
rdpTransport *
transport_new(void);
void
network_free(rdpNetwork * network);
transport_free(rdpTransport * transport);
int
network_connect(rdpNetwork * network, const char * server, int port);
transport_connect(rdpTransport * transport, const char * server, int port);
int
network_disconnect(rdpNetwork * network);
transport_disconnect(rdpTransport * transport);
int
network_start_tls(rdpNetwork * network);
transport_start_tls(rdpTransport * transport);
int
network_send(rdpNetwork * network, STREAM * stream);
transport_send(rdpTransport * transport, STREAM * stream);
int
network_check_fds(rdpNetwork * network);
transport_check_fds(rdpTransport * transport);
#endif