/*
 * (c) 2005 Research Group Dr. Fuhrmann, University of Karlsruhe, Germany
 * All rights reserved.
 *
 * Author:
 *         Roman Krenicky
 *
 * $Id: receiver.h,v 1.9 2005/11/21 09:39:01 kutzner Exp $
 *
 */

/*
  receiver.h
  created: 1.12.2004
  last change: 15.5.2005
*/
/*! @file
    callback-interface for IGOR receiving
*/

#ifndef _RECEIVER_H
#define _RECEIVER_H

#include "globalheader.h"

#include <libigor.h>
#include "epgtypes.h"
extern "C"
{
  #include <time.h>
}


/*! interface, declaring a callback method
*/
class receiver
{
  public:
   virtual void receive_data (const epgchannel &channel, time_t timeblock,
                              bool update, const epgdata &data, bool final)
         = 0;
   virtual void receive_req (const epgchannel &channel, time_t timeblock,
                             bool update, const sa_igor &requestor, bool final)
         = 0;
}; // receiver




/*! @fn void receiver::receive_data (const epgchannel &channel, time_t timeblock, bool update, const epgdata &data, bool final)
    @brief callback method for receiving EPG data from "outside"
    @param channel  the epg data's channel
    @param timeblock  starttime of the data, rounded off to next block bound
    @param update  @c true iff the message is the response to an update request
                   (i.e. has a "mode: update" entry)
    @param data  the EPG data received, should be exactly one time block
    @param final  @c true iff this data is destinated to us
*/


/*! @fn void receiver::receive_req (const epgchannel &channel, time_t timeblock, bool update, const sa_igor &requestor, bool final)
    @brief callback method for receiving a request for EPG data from "outside"
    @param channel  the requested epg data's channel
    @param timeblock  starttime of the requested EPG data block, rounded off
           to next block bound
    @param update  @c true iff the message is an update request
                   (i.e. has a "mode: update" entry)
    @param requestor  id of the requestor as to use when sending a response
           via @c epgigor_interface::send_resp() or when sending on via
           @c epgigor_interface::send_on_req()
    @param final  @c true iff this request is destinated to us
*/


#endif // _RECEIVER_H
