Revision 139ffdc6 include/ALTOclient.h

View differences:

include/ALTOclient.h
38 38
*/
39 39
#define MIN_BOUN	4
40 40

  
41
/** Current state of asynchronous ALTO server query */
42
#define ALTO_QUERY_READY		0
43
#define ALTO_QUERY_INPROGRESS	1
44

  
41 45
/**
42
 * @brief A single element for the internal interface.
43
 *
44 46
 * This is the struct of one element for the internal interface. Make lists out of it to interact with the client.
45 47
 */
46 48
typedef struct alto_guidance_t{
47
	/**
48
	 * @brief The address of the host.
49
	 */
50 49
	struct in_addr alto_host;
51
	/**
52
	 * @brief The prefix associated to the host.
53
	 */
54 50
	int prefix;
55

  
56
/**
57
 * @brief The rating associated to the host.
58
 */
59 51
	int rating;
60 52
}ALTO_GUIDANCE_T;
61 53

  
......
63 55
// external API functions
64 56

  
65 57
/**
66
 * @brief Start the ALTO client.
67
 *
68 58
 * 	It starts the ALTO client, initialize the internal DB and provide the API
69 59
 * 	for upcoming requests.
70 60
 */
......
72 62

  
73 63

  
74 64
/**
75
 * @brief Stop the ALTO client.
76
 *
77
 * 	It stops the ALTO client and clean-up the internal DB.
65
 * 	It stops the ALTO server and clean-up the internal DB.
78 66
 */
79 67
void stop_ALTO_client();
80 68

  
81 69
/**
82
 * @brief Update the internal state.
83
 *
84 70
 * 	This function starts the synchronization of the internal peer list
85 71
 *  with the ALTO server.
86 72
 *  This function can be called after every dedicated request to the
......
97 83
void do_ALTO_update(struct in_addr rc_host, int pri_rat, int sec_rat);
98 84

  
99 85
/**
100
 * 	@brief Set the URI for the ALTO server.
101
 *
86
 * 	Set the URI for teh ALTO server
102 87
 * 	After calling the function, all upcoming requests are sent to the given
103 88
 * 	URI from this call.
104 89
 * 	Be careful, it is not tested if the ALTO server can be really reached
......
110 95

  
111 96

  
112 97
/**
113
 * 	@brief Get the actual URI of the ALTO server.
114
 *
98
 * 	Geck the actual URI of the ALTO server
115 99
 * 	To assure that the settings for the upcoming ALTOrequests are right, use
116 100
 * 	this function to assure the the actual given ALTO server is the right one.
117 101
 * 	@return	Pointer to a string where the URI of the ALTO server is stored.
......
119 103
char *get_ALTO_server(void);
120 104

  
121 105
/**
122
 *	@brief Rate a list of hosts given in a text file.
123
 *	@brief
124 106
 *	With this function a given list of hosts in a txt file will be ALTOrated
125 107
 *	This function will read from a text file all given hosts, transform them into
126 108
 *	the internal ALTO structure and get the alto rating for them. Afterwards it
127 109
 *	will write teh ALTO results in a new text file which will be the same name,
128 110
 *	but with the ending .out.
129 111
 *
130
 *	This function is used for functionality tests, it is not recommended
112
 *	ATTENTION: This function is used for functionality tests, it is not recommended
131 113
 *	to use it in a real ALTOclient implementation.
132 114
 *
133 115
 * 	@param	rc_host		The host IP from the client to which the Server
......
141 123
int get_ALTO_guidance_for_txt(char * txt, struct in_addr rc_host, int pri_rat, int sec_rat);
142 124

  
143 125
/**
144
 *	@brief Rate a list of hosts.
145
 *	@brief
146 126
 *	With this function a given list of hosts in the ALTOstruct (alto_guidance_t) gets
147 127
 *	ALTO rated.
148 128
 *	This function will use the given struct, transform it into the internal ALTO structure
......
161 141
 */
162 142
int get_ALTO_guidance_for_list(ALTO_GUIDANCE_T * list, int num, struct in_addr rc_host, int pri_rat, int sec_rat);
163 143

  
144
/**
145
 *	Asynchronous/threaded ALTO query.
146
 *	@see get_ALTO_guidance_for_list
147
 */
148
int ALTO_query_exec(ALTO_GUIDANCE_T * list, int num, struct in_addr rc_host, int pri_rat, int sec_rat);
164 149

  
150
/**
151
 *	Returns current state of query (asynchronous processing).
152
 *	@return				ALTO_QUERY_READY / ALTO_QUERY_INPROGRESS
153
 */
154
int ALTO_query_state();
165 155

  
166 156
#endif /* ALTOCLIENT_H */

Also available in: Unified diff