#ifndef CLIENT_GETTINGSTARTED_LESSON01
#define CLIENT_GETTINGSTARTED_LESSON01
#include <uaclient/uaclient.h>
enum sample_client_states {
SAMPLE_CLIENT_STATE_INITIAL,
SAMPLE_CLIENT_STATE_CONNECTING,
SAMPLE_CLIENT_STATE_CONNECTED,
SAMPLE_CLIENT_STATE_READING,
SAMPLE_CLIENT_STATE_READ_DONE,
SAMPLE_CLIENT_STATE_BROWSING,
SAMPLE_CLIENT_STATE_BROWSE_DONE,
SAMPLE_CLIENT_STATE_DISCONNECT,
SAMPLE_CLIENT_STATE_DISCONNECTING,
SAMPLE_CLIENT_STATE_FINISHED
};
struct sample_client {
enum sample_client_states cur_state;
const char *url;
int result;
};
int sample_client_init(struct sample_client *ctx, const char *url);
void sample_client_cleanup(struct sample_client *ctx);
bool sample_client_check_state(struct sample_client *ctx);
int sample_client_get_result(struct sample_client *ctx);
#endif