/**
 * @file service_vars.h
 *
 * @brief Service (variables).
 *
 * Copyright 2007-2008, Freie Universitaet Berlin. All rights reserved.
 * Please refer to the COPYING file for detailed licensing information.
 *
 * @author Georg Wittenburg
 *
 * $Id: service_vars.h 2685 2008-06-25 16:38:56Z wittenbu $
 */

#ifndef SERVICE_VARS_H
#define SERVICE_VARS_H

#include "../types.h"
#include "service_types.h"
#include "../vars.h"



// Client variables.

/**
 * @brief List of cached services for which a server is known.
 */
list_t* C_SERVICE_service_cache;

/**
 * @brief Statistics counter for total number of data requests.
 */
uint32_t C_SERVICE_total_data_requests;

/**
 * @brief Statistics counter for number of successful data requests.
 */
uint32_t C_SERVICE_successful_data_requests;

/**
 * @brief Statistics counter for number of failed data requests.
 */
uint32_t C_SERVICE_failed_data_requests;

/**
 * @brief Statistics counter for total delay of successful data requests.
 */
double C_SERVICE_total_successful_data_request_delay;

/**
 * @brief Statistics counter for total number of data updates.
 */
uint32_t C_SERVICE_total_data_updates;

/**
 * @brief Statistics counter for number of successful data updates.
 */
uint32_t C_SERVICE_successful_data_updates;

/**
 * @brief Statistics counter for number of failed data updates.
 */
uint32_t C_SERVICE_failed_data_updates;

/**
 * @brief Statistics counter for total number of stream requests.
 */
uint32_t C_SERVICE_total_stream_requests;

/**
 * @brief Statistics counter for number of successful stream requests.
 */
uint32_t C_SERVICE_successful_stream_requests;

/**
 * @brief Statistics counter for number of failed stream requests.
 */
uint32_t C_SERVICE_failed_stream_requests;

/**
 * @brief Statistics counter for number of expected stream packets.
 */
uint32_t C_SERVICE_expected_stream_packets;

/**
 * @brief Statistics counter for number of received stream packets.
 */
uint32_t C_SERVICE_received_stream_packets;



// Server variables.

/**
 * @brief List of currently hosted services.
 */
list_t* C_SERVICE_hosted_services;

/**
 * @brief List of currently served stream.
 */
list_t* C_SERVICE_served_streams;

/**
 * @brief List of incoming service replications.
 */
list_t* C_SERVICE_incoming_replications;

/**
 * @brief List of outgoing service replications.
 */
list_t* C_SERVICE_outgoing_replications;

/**
 * @brief Statistics counter for total number of replications.
 */
uint32_t C_SERVICE_total_replications;

/**
 * @brief Statistics counter for number of successful replications.
 */
uint32_t C_SERVICE_successful_replications;

/**
 * @brief Statistics counter for number of failed replications.
 */
uint32_t C_SERVICE_failed_replications;

/**
 * @brief Statistics counter for total number of migrations.
 */
uint32_t C_SERVICE_total_migrations;

/**
 * @brief Statistics counter for number of successful migrations.
 */
uint32_t C_SERVICE_successful_migrations;

/**
 * @brief Statistics counter for number of failed migrations.
 */
uint32_t C_SERVICE_failed_migrations;

#endif	// SERVICE_VARS_H
