Skip to content

Commit

Permalink
Prefix io stuff with 'pecan'.
Browse files Browse the repository at this point in the history
  • Loading branch information
felipec committed Jan 27, 2008
1 parent 9fd00e0 commit 70986c2
Show file tree
Hide file tree
Showing 22 changed files with 381 additions and 381 deletions.
6 changes: 3 additions & 3 deletions Makefile
Expand Up @@ -31,9 +31,9 @@ objects = \
ab/group.o \
ab/user.o \
ab/userlist.o \
io/conn.o \
io/cmd_conn.o \
io/http_conn.o \
io/pecan_node.o \
io/pecan_cmd_server.o \
io/pecan_http_server.o \
cvr/slp.o \
cvr/slpcall.o \
cvr/slplink.o \
Expand Down
6 changes: 3 additions & 3 deletions cmd/cmdproc.c
Expand Up @@ -25,7 +25,7 @@
#include "table_private.h"
#include "command_private.h"

#include "io/conn.h"
#include "io/pecan_node.h"

#include "msn_log.h"

Expand Down Expand Up @@ -141,7 +141,7 @@ msn_cmdproc_send_trans(MsnCmdProc *cmdproc, MsnTransaction *trans)
len += trans->payload_len;
}

conn_object_write (cmdproc->conn, data, len, NULL, NULL);
pecan_node_write (cmdproc->conn, data, len, NULL, NULL);

g_free(data);
}
Expand Down Expand Up @@ -176,7 +176,7 @@ msn_cmdproc_send_quick(MsnCmdProc *cmdproc, const char *command,

show_debug_cmd(cmdproc, FALSE, data);

conn_object_write (cmdproc->conn, data, len, NULL, NULL);
pecan_node_write (cmdproc->conn, data, len, NULL, NULL);

g_free(data);
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/cmdproc_private.h
Expand Up @@ -29,7 +29,7 @@

struct MsnSession;
struct MsnHistory;
struct ConnObject;
struct PecanNode;

struct MsnCmdProc
{
Expand All @@ -46,7 +46,7 @@ struct MsnCmdProc
guint cmd_count;

struct MsnHistory *history;
struct ConnObject *conn;
struct PecanNode *conn;
};

#endif /* MSN_CMDPROC_PRIVATE_H */
10 changes: 5 additions & 5 deletions directconn.c
Expand Up @@ -28,7 +28,7 @@
#include "cvr/slp.h"
#include "cvr/slpmsg.h"

#include "io/conn.h"
#include "io/pecan_node.h"

#include <netdb.h>

Expand Down Expand Up @@ -188,12 +188,12 @@ msn_directconn_write(MsnDirectConn *directconn,
body_len = GUINT32_TO_LE(len);

/* Let's write the length of the data. */
status = conn_object_write (directconn->conn, (gchar *) &body_len, sizeof(body_len), &tmp, NULL);
status = pecan_node_write (directconn->conn, (gchar *) &body_len, sizeof(body_len), &tmp, NULL);

if (status == G_IO_STATUS_NORMAL)
{
/* Let's write the data. */
status = conn_object_write (directconn->conn, data, len, &tmp, NULL);
status = pecan_node_write (directconn->conn, data, len, &tmp, NULL);
}

if (status == G_IO_STATUS_NORMAL)
Expand Down Expand Up @@ -365,7 +365,7 @@ connect_cb(gpointer data, gint source, const gchar *error_message)
{
GIOChannel *channel = g_io_channel_unix_new (fd);

/* directconn->conn = conn_object_new (channel); */
/* directconn->conn = pecan_node_new (channel); */
directconn->connected = TRUE;

msn_info ("connected: %p", channel);
Expand Down Expand Up @@ -477,7 +477,7 @@ msn_directconn_destroy(MsnDirectConn *directconn)
directconn->read_watch = 0;
}

conn_object_free (directconn->conn);
pecan_node_free (directconn->conn);

if (directconn->nonce != NULL)
g_free(directconn->nonce);
Expand Down
4 changes: 2 additions & 2 deletions directconn.h
Expand Up @@ -30,7 +30,7 @@ typedef struct MsnDirectConn MsnDirectConn;

#include "cmd/msg.h"

struct ConnObject;
struct PecanNode;
struct _PurpleProxyConnectData;

struct MsnDirectConn
Expand All @@ -50,7 +50,7 @@ struct MsnDirectConn

int c;
struct _PurpleProxyConnectData *connect_data;
struct ConnObject *conn;
struct PecanNode *conn;
};

MsnDirectConn *msn_directconn_new(MsnSlpLink *slplink);
Expand Down
62 changes: 0 additions & 62 deletions io/conn.h

This file was deleted.

38 changes: 0 additions & 38 deletions io/http_conn.h

This file was deleted.

48 changes: 24 additions & 24 deletions io/cmd_conn.c → io/pecan_cmd_server.c
Expand Up @@ -16,28 +16,28 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#include "cmd_conn_private.h"
#include "pecan_cmd_server_priv.h"
#include "cmd/cmdproc_private.h"
#include "cmd/command_private.h"

#include "msn_log.h"

#include <string.h>

static ConnObjectClass *parent_class = NULL;
static PecanNodeClass *parent_class = NULL;

CmdConnObject *
cmd_conn_object_new (gchar *name,
ConnObjectType type)
PecanCmdServer *
pecan_cmd_server_new (gchar *name,
PecanNodeType type)
{
CmdConnObject *conn;
PecanCmdServer *conn;

msn_log ("begin");

conn = CMD_CONN_OBJECT (g_type_create_instance (CMD_CONN_OBJECT_TYPE));
conn = CMD_PECAN_NODE (g_type_create_instance (CMD_PECAN_NODE_TYPE));

{
ConnObject *tmp = CONN_OBJECT (conn);
PecanNode *tmp = PECAN_NODE (conn);
tmp->name = g_strdup (name);
tmp->type = type;
}
Expand All @@ -48,15 +48,15 @@ cmd_conn_object_new (gchar *name,
}

void
cmd_conn_object_free (CmdConnObject *conn)
pecan_cmd_server_free (PecanCmdServer *conn)
{
msn_log ("begin");
g_object_unref (G_OBJECT (conn));
msn_log ("end");
}

void
cmd_conn_object_send (CmdConnObject *conn,
pecan_cmd_server_send (PecanCmdServer *conn,
const char *command,
const char *format,
...)
Expand All @@ -76,15 +76,15 @@ cmd_conn_object_send (CmdConnObject *conn,
}

static void
parse_impl (ConnObject *base_conn,
parse_impl (PecanNode *base_conn,
gchar *buf,
gsize bytes_read)
{
CmdConnObject *cmd_conn;
PecanCmdServer *cmd_conn;
gchar *cur, *end, *old_rx_buf;
gint cur_len;

cmd_conn = CMD_CONN_OBJECT (base_conn);
cmd_conn = CMD_PECAN_NODE (base_conn);

buf[bytes_read] = '\0';

Expand Down Expand Up @@ -147,7 +147,7 @@ parse_impl (ConnObject *base_conn,

#if 0
static void
read_impl (ConnObject *conn)
read_impl (PecanNode *conn)
{
MsnBuffer *read_buffer;
int r;
Expand All @@ -172,14 +172,14 @@ read_impl (ConnObject *conn)
if (r == 0)
{
/* connection closed */
conn_object_close (conn);
pecan_node_close (conn);
return;
}

if (r < 0)
{
/* connection error */
conn_object_close (conn);
pecan_node_close (conn);
return;
}

Expand Down Expand Up @@ -214,7 +214,7 @@ read_impl (ConnObject *conn)
}
else
{
/* CONN_OBJECT_GET_CLASS (conn)->parse (conn); */
/* PECAN_NODE_GET_CLASS (conn)->parse (conn); */
}

/** @todo only if parsed? yes indeed! */
Expand All @@ -239,7 +239,7 @@ read_impl (ConnObject *conn)
static void
dispose (GObject *obj)
{
CmdConnObject *conn = CMD_CONN_OBJECT (obj);
PecanCmdServer *conn = CMD_PECAN_NODE (obj);

if (!conn->dispose_has_run)
{
Expand All @@ -259,7 +259,7 @@ static void
class_init (gpointer g_class,
gpointer class_data)
{
ConnObjectClass *conn_class = CONN_OBJECT_CLASS (g_class);
PecanNodeClass *conn_class = PECAN_NODE_CLASS (g_class);
GObjectClass *gobject_class = G_OBJECT_CLASS (g_class);

conn_class->parse = &parse_impl;
Expand All @@ -274,32 +274,32 @@ static void
instance_init (GTypeInstance *instance,
gpointer g_class)
{
CmdConnObject *conn = CMD_CONN_OBJECT (instance);
PecanCmdServer *conn = CMD_PECAN_NODE (instance);

conn->dispose_has_run = FALSE;
}

GType
cmd_conn_object_get_type (void)
pecan_cmd_server_get_type (void)
{
static GType type = 0;

if (type == 0)
{
static const GTypeInfo type_info =
{
sizeof (CmdConnObjectClass),
sizeof (PecanCmdServerClass),
NULL, /* base_init */
NULL, /* base_finalize */
class_init, /* class_init */
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (CmdConnObject),
sizeof (PecanCmdServer),
0, /* n_preallocs */
instance_init /* instance_init */
};

type = g_type_register_static (CONN_OBJECT_TYPE, "CmdConnObjectType", &type_info, 0);
type = g_type_register_static (PECAN_NODE_TYPE, "PecanCmdServerType", &type_info, 0);
}

return type;
Expand Down

0 comments on commit 70986c2

Please sign in to comment.