00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 static const char *rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/advertservice_adaptor/advertservice_adaptor.c,v 1.6 2004/04/26 12:30:24 hartmutkaiser Exp $";
00018
00019
00020 #include <stdio.h>
00021 #include <stdlib.h>
00022 #include <string.h>
00023
00024
00025 #include <GATCPI.h>
00026
00027 #include "advertservice.h"
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 GATResult
00053 advertservice_adaptor_register(GATContext error_context, GATRegistry registry,
00054 GATTable_const system_config, GATTable_const instance_config, void *token)
00055 {
00056 GAT_USES_STATUS(error_context, "advertservice_adaptor_register_ex");
00057
00058 int load_request_cpi = 0;
00059
00060 if (!GATVERSION_ISCOMPATIBLE())
00061 {
00062 GAT_CREATE_STATUS(GAT_UNKNOWN_VERSION);
00063 }
00064 else
00065 {
00066
00067 GATResult retval = GATTable_Get_int(instance_config, "AdvertService",
00068 &load_request_cpi);
00069 if (GAT_SUCCESS != retval)
00070 {
00071 load_request_cpi = 1;
00072 }
00073
00074
00075 if (load_request_cpi)
00076 {
00077 GAT_CREATE_STATUS(advertservice_adaptor_Register_GATAdvertServiceCPI(
00078 error_context, registry, system_config, instance_config, token));
00079 }
00080 }
00081 return GAT_RETURN_STATUS();
00082 }
00083
00084
00085