Back to index

im-sdk  12.3.91
Defines | Functions
role-data-server.c File Reference
#include <stdlib.h>
#include <string.h>
#include <iiimp.h>
#include "input-method.h"
#include "role-data-server.h"

Go to the source code of this file.

Defines

#define SERVICE_DEFAULT   "9010"

Functions

IIIMF_status iiimf_role_data_server_new (const char *service, IIIMF_role_data_server **server_ret)
void iiimf_role_data_server_delete (IIIMF_role_data_server *server)
const char * iiimf_role_data_server_service (IIIMF_im *im)

Define Documentation

#define SERVICE_DEFAULT   "9010"

Definition at line 13 of file role-data-server.c.


Function Documentation

Definition at line 40 of file role-data-server.c.

{
    free(server->service);
    free(server);
}

Here is the caller graph for this function:

IIIMF_status iiimf_role_data_server_new ( const char *  service,
IIIMF_role_data_server **  server_ret 
)

Definition at line 17 of file role-data-server.c.

{
    IIIMF_role_data_server *       server;

    server = (IIIMF_role_data_server *)malloc(sizeof (IIIMF_role_data_server));
    if (NULL == server) return IIIMF_STATUS_MALLOC;

    server->service = ((NULL == service) ?
                     strdup(SERVICE_DEFAULT) : strdup(service));
    if (NULL == server->service) {
       free(server);
       return IIIMF_STATUS_MALLOC;
    }

    *server_ret = server;

    return IIIMF_STATUS_SUCCESS;
}

Here is the caller graph for this function:

const char* iiimf_role_data_server_service ( IIIMF_im *  im)

Definition at line 48 of file role-data-server.c.

{
    return im->role_data.server->service;
}