Back to index

im-sdk  12.3.91
Typedefs | Functions | Variables
request-reply.c File Reference
#include <stdlib.h>
#include <iiimp-data.h>
#include <iiimp.h>
#include "request-reply.h"
#include "input-method.h"
#include "input-context.h"
#include "stream.h"
#include "opcode-reply.h"
#include "sequence.h"

Go to the source code of this file.

Typedefs

typedef uchar_t *(* IIIMP_message_reply_pack_func )(IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)

Functions

static uchar_t * message_reply_pack_nop (IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)
static uchar_t * message_simple_im_reply_pack (IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)
static uchar_t * message_simple_ic_reply_pack (IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)
static uchar_t * message_im_connect_reply_pack (IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)
static uchar_t * message_im_getimvalues_reply_pack (IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)
static uchar_t * message_im_forward_event_with_operations_reply_pack (IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)
static uchar_t * message_im_geticvalues_reply_pack (IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)
static uchar_t * message_preedit_start_reply_pack (IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)
static uchar_t * message_aux_simple_reply_pack (IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)
static uchar_t * message_aux_value_reply_pack (IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)
IIIMF_status iiimf_request_reply (IIIMF_im *im, IIIMF_ic *ic, IIIMP_message *message_original)

Variables

static
IIIMP_message_reply_pack_func 
message_reply_pack_func []

Typedef Documentation

typedef uchar_t*(* IIIMP_message_reply_pack_func)(IIIMF_im *im, IIIMF_ic *ic, int opcode, IIIMP_message *m, size_t *nbyte)

Definition at line 171 of file request-reply.c.


Function Documentation

IIIMF_status iiimf_request_reply ( IIIMF_im *  im,
IIIMF_ic *  ic,
IIIMP_message message_original 
)

Definition at line 329 of file request-reply.c.

{
    IIIMF_status     status;
    uchar_t *        message;
    size_t           nbyte;
    int                     opcode;
    IIIMP_message    message_dummy;

    opcode = iiimf_opcode_reply_internal(message_original->opcode);
    if (IM_NOP == opcode) return IIIMF_STATUS_SUCCESS;

    message_dummy.opcode = opcode;
    message_dummy.length = 8;
    message_dummy.im_id = message_original->im_id;
    message_dummy.ic_id = message_original->ic_id;
    status = iiimf_message_sequence(im, ic, &message_dummy,
                                IIIMF_MESSAGE_ATTR_SEND);
    if (IIIMF_STATUS_SUCCESS != status) {
       if (IIIMF_STATUS_SEQUENCE_REQUEST == status) {
           return IIIMF_STATUS_SUCCESS;
       } else {
           return status;
       }
    }

    message = message_reply_pack_func[opcode](im, ic, opcode, message_original,
                                         &nbyte);
    if (NULL == message) return IIIMF_STATUS_FAIL;

    status = im->stream->proc_write(im->stream->private_data, message, nbyte);

    free(message);

    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static uchar_t* message_aux_simple_reply_pack ( IIIMF_im *  im,
IIIMF_ic *  ic,
int  opcode,
IIIMP_message m,
size_t *  nbyte 
) [static]

Definition at line 143 of file request-reply.c.

{
    return iiimp_aux_simple_pack(im->data_s, opcode, im->im_id, ic->ic_id,
                             m->v.aux_simple.class_index,
                             m->v.aux_simple.input_method_name, nbyte);
}

Here is the call graph for this function:

static uchar_t* message_aux_value_reply_pack ( IIIMF_im *  im,
IIIMF_ic *  ic,
int  opcode,
IIIMP_message m,
size_t *  nbyte 
) [static]

Definition at line 156 of file request-reply.c.

{
    return iiimp_aux_value_pack(im->data_s, opcode, im->im_id, ic->ic_id,
                            m->v.aux_value.class_index,
                            m->v.aux_value.input_method_name,
                            m->v.aux_value.integer_value,
                            m->v.aux_value.string_value,
                            nbyte);
}

Here is the call graph for this function:

static uchar_t* message_im_connect_reply_pack ( IIIMF_im *  im,
IIIMF_ic *  ic,
int  opcode,
IIIMP_message m,
size_t *  nbyte 
) [static]

Definition at line 63 of file request-reply.c.

{
#if defined(lint) && defined(HAVE_NOTE_H)
    NOTE(ARGUNUSED(ic, opcode, m))
#endif /* lint && HAVE_NOTE_H */
    return iiimp_connect_reply_pack(im->data_s, im->im_id, im->language_list,
                                nbyte);
}

Here is the call graph for this function:

static uchar_t* message_im_forward_event_with_operations_reply_pack ( IIIMF_im *  im,
IIIMF_ic *  ic,
int  opcode,
IIIMP_message m,
size_t *  nbyte 
) [static]

Definition at line 94 of file request-reply.c.

{
#if defined(lint) && defined(HAVE_NOTE_H)
    NOTE(ARGUNUSED(opcode, m))
#endif /* lint && HAVE_NOTE_H */
    return iiimp_forward_event_with_operations_reply_pack(im->data_s, im->im_id,
                                                   ic->ic_id, NULL,
                                                   nbyte);
}

Here is the call graph for this function:

static uchar_t* message_im_geticvalues_reply_pack ( IIIMF_im *  im,
IIIMF_ic *  ic,
int  opcode,
IIIMP_message m,
size_t *  nbyte 
) [static]

Definition at line 111 of file request-reply.c.

{
#if defined(lint) && defined(HAVE_NOTE_H)
    NOTE(ARGUNUSED(opcode, m))
#endif /* lint && HAVE_NOTE_H */
    return iiimp_geticvalues_reply_pack(im->data_s, im->im_id, ic->ic_id, NULL,
                                   nbyte);
}

Here is the call graph for this function:

static uchar_t* message_im_getimvalues_reply_pack ( IIIMF_im *  im,
IIIMF_ic *  ic,
int  opcode,
IIIMP_message m,
size_t *  nbyte 
) [static]

Definition at line 79 of file request-reply.c.

{
#if defined(lint) && defined(HAVE_NOTE_H)
    NOTE(ARGUNUSED(ic, opcode, m))
#endif /* lint && HAVE_NOTE_H */
    return iiimp_getimvalues_reply_pack(im->data_s, im->im_id, NULL, nbyte);
}

Here is the call graph for this function:

static uchar_t* message_preedit_start_reply_pack ( IIIMF_im *  im,
IIIMF_ic *  ic,
int  opcode,
IIIMP_message m,
size_t *  nbyte 
) [static]

Definition at line 127 of file request-reply.c.

{
#if defined(lint) && defined(HAVE_NOTE_H)
    NOTE(ARGUNUSED(opcode, m))
#endif /* lint && HAVE_NOTE_H */
    return iiimp_preedit_start_reply_pack(im->data_s, im->im_id, ic->ic_id,
                                     ic->preedit_maximum_length, nbyte);
}

Here is the call graph for this function:

static uchar_t* message_reply_pack_nop ( IIIMF_im *  im,
IIIMF_ic *  ic,
int  opcode,
IIIMP_message m,
size_t *  nbyte 
) [static]

Definition at line 18 of file request-reply.c.

{
#if defined(lint) && defined(HAVE_NOTE_H)
    NOTE(ARGUNUSED(im, ic, opcode, m, nbyte))
#endif /* lint && HAVE_NOTE_H */
    return NULL;
}
static uchar_t* message_simple_ic_reply_pack ( IIIMF_im *  im,
IIIMF_ic *  ic,
int  opcode,
IIIMP_message m,
size_t *  nbyte 
) [static]

Definition at line 48 of file request-reply.c.

{
#if defined(lint) && defined(HAVE_NOTE_H)
    NOTE(ARGUNUSED(m))
#endif /* lint && HAVE_NOTE_H */
    return iiimp_simple_pack(im->data_s, opcode, im->im_id, ic->ic_id, nbyte);
}

Here is the call graph for this function:

static uchar_t* message_simple_im_reply_pack ( IIIMF_im *  im,
IIIMF_ic *  ic,
int  opcode,
IIIMP_message m,
size_t *  nbyte 
) [static]

Definition at line 33 of file request-reply.c.

{
#if defined(lint) && defined(HAVE_NOTE_H)
    NOTE(ARGUNUSED(ic, m))
#endif /* lint && HAVE_NOTE_H */
    return iiimp_simple_pack(im->data_s, opcode, im->im_id, 0, nbyte);
}

Here is the call graph for this function:


Variable Documentation

Definition at line 179 of file request-reply.c.