#include <stdlib.h>
#include <CORBA-c.h>
#include "hello-c.h"

Hello server_Hello_CreateTrue(Hello _handle)
{
  printf ("New object created\n");
}

void server_Hello_hello(Hello _handle, const char *s, CORBA_Environment *ev)
{
  printf ("%s\n", s);
}

int
main (int argc, char *argv[])
{
    CORBA_Object hello_object;

    /*
     * MICO initialization
     */
    CORBA_ORB orb;
    CORBA_BOA boa;
    orb = CORBA_ORB_init(&argc, &argv, "mico-local-orb");
    boa = CORBA_BOA_init(orb, &argc, &argv, "mico-local-boa");

    hello_object = Hello_CreateTrue();
    printf ("%s\n", CORBA_ORB_object_to_string(orb, hello_object));

    CORBA_BOA_impl_is_ready(boa, hello_object);
    CORBA_ORB_run(orb);

    return 0;
}
