Back to index

im-sdk  12.3.91
Defines | Functions | Variables
le_object.c File Reference
#include <stdio.h>
#include "le_object.h"

Go to the source code of this file.

Defines

#define LE_VERSION   "2.0"

Functions

LeObjectRecle_object_new ()
void le_object_destroy (LeObjectRec *le_object)

Variables

char lename_string []
UTFCHAR lename_utf_string []
IMLocale locales []
static IMLEName lename = { lename_string, lename_utf_string }

Define Documentation

#define LE_VERSION   "2.0"

Definition at line 15 of file le_object.c.


Function Documentation

void le_object_destroy ( LeObjectRec le_object)

Definition at line 62 of file le_object.c.

{
    IMObjectDescriptorStruct *im_objects;

    if (le_object == NULL)
       return;

    im_objects = le_object->objects;
    if (im_objects == NULL)
       return;

    if (im_objects->path)
       free((char *) im_objects->path);

    free((char *) im_objects);
    free((char *) le_object);

    return;
}

Definition at line 17 of file le_object.c.

{
    LeObjectRec *le_object = NULL;
    IMObjectDescriptorStruct *im_objects, *l;
    char auxiliary_object_path[256];

    le_object = (LeObjectRec *) calloc(1, sizeof(LeObjectRec));
    if (le_object == NULL)
        return (NULL);

    /* initilize the IMObjectDescriptorStruct */
    im_objects = (IMObjectDescriptorStruct *) calloc(2, sizeof(IMObjectDescriptorStruct));
    if (im_objects == NULL) {
       free ((char *)le_object);
       return (NULL);
    }

    snprintf(auxiliary_object_path, 256,
           "./%s/auxiliary_windows/auxiliary_object.so", LE_NAME);
    l = im_objects;
    l->leid = lename_string;       /* engine id */
    l->type = IM_DOWNLOADINGOBJECT_BINGUI_TYPE;  /* object type */
    l->name = lename_utf_string;
    l->name_length = UTFCHARLen(lename_utf_string);
    l->domain = "com.sun";
    l->scope = lename_string;

    /* path for .so from /usr/lib/iiim/ */
    l->path = (char *) strdup(auxiliary_object_path);

    l->signature = "";
    l->basepath = NULL;            /* only for CCDEF */
    l->encoding = NULL;            /* only for CCDEF */

    /* initilize the le_object info */
    le_object->version = LE_VERSION;

    le_object->lename = (IMLEName *) &lename;
    le_object->locales = (IMLocale **) &locales;

    le_object->objects = im_objects;

    return (le_object);
}

Here is the call graph for this function:


Variable Documentation

Definition at line 13 of file le_object.c.

char lename_string[]

Definition at line 165 of file CannaLE.c.

Definition at line 4 of file le_define.c.

Definition at line 16 of file le_object.c.