Statistics
| Branch: | Revision:

napa-baselibs / ALTOclient / main.c @ eca395a2

History | View | Annotate | Download (984 Bytes)

1
/*
2
 * main.c
3
 *
4
 *  Created on: Jan 28, 2010
5
 *      Author: ewald
6
 */
7
#include "ALTOclient.h"
8

    
9

    
10
// This is the address of the resource consumer
11
struct in_addr rc_addr;
12

    
13
/*
14
 *         This is a dummy/test programm which should show you
15
 *         the functionaliyt of the ALTO client
16
 */
17
int main(){
18

    
19
        // For testing, set the local RC manually
20
        //rc_addr.s_addr = inet_addr("95.37.70.39");
21
        //rc_addr.s_addr = inet_addr("195.37.70.39");
22
        rc_addr.s_addr = inet_addr("195.116.53.31");        // Warszawa
23
//        rc_addr.s_addr = inet_addr("10.1.6.41");
24

    
25
        // start ALTO client
26
        start_ALTO_client();
27

    
28
        // Configure set the ALTO server URL
29
        //set_ALTO_server("http://10.10.251.107/cgi-bin/alto-server.cgi");
30
        set_ALTO_server("http://10.10.251.125/cgi-bin/alto-server.cgi");
31
//        set_ALTO_server("http://www.napa-wine-alto.eu/cgi-bin/alto-server.cgi");
32

    
33
        // And now get the result for this list
34
        get_ALTO_guidance_for_txt("ip.list", rc_addr, REL_PREF, 7);
35

    
36
        // and stop the client
37
        stop_ALTO_client();
38

    
39
        return (1);
40
}