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

Hello hello_client;

int
main (int argc, char *argv[])
{
    /*
     * MICO initialization
     */
    CORBA_ORB orb = CORBA_ORB_init(&argc, &argv, "mico-local-orb");
    CORBA_BOA boa = CORBA_BOA_init(orb, &argc, &argv, "mico-local-boa");

    if(argc < 2)
      {
	printf("Need a binding ID thing as argv[1]\n");
	return 1;
      }

    /*
     * MICO stuff
     */
    hello_client = CORBA_ORB_bind(orb, "IDL:Hello:1.0", argv[1]);
    if (!hello_client) {
	printf("Cannot bind to %s\n", argv[1]);
	return 1;
    }
    Hello_hello (hello_client, "hello world", NULL);

    return 0;
}


