/*
********************************************************
Copyright 2000 MBARI.
MBARI Proprietary Information. All rights reserved.
NOTE: This file is automatically generated.
DO NOT MODIFY.
********************************************************
*/

#ifndef __DropWeightIF_SK_H
#define __DropWeightIF_SK_H

#include "TaskServer.h"
#include "DropWeightIF.h"

class DropWeightIF_SK : public TaskServer {

  public:

  // Constructor for server with default name
  DropWeightIF_SK();

  // Constructor for server with specific name
  DropWeightIF_SK(const char *serverName);

  virtual ~DropWeightIF_SK();
  
  protected:

  // These methods must be defined in subclass
  virtual long release(DropWeightIF::Weight weight) = 0;
  virtual Boolean released(DropWeightIF::Weight weight) = 0;
  virtual long setWatchdogTimeout(long timeout, DropWeightIF::Weight weight) = 0;
  virtual long watchdogTimeout(DropWeightIF::Weight weight) = 0;
  virtual long resetWatchdog(DropWeightIF::Weight weight) = 0;
  
  // Declare callbacks corresponding to each method
  Boolean releaseCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean releasedCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean setWatchdogTimeoutCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean watchdogTimeoutCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean resetWatchdogCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  
  // Message structure pointer for each method
  DropWeightIF::ReleaseMsg *_releaseMsg;
  DropWeightIF::ReleasedMsg *_releasedMsg;
  DropWeightIF::SetWatchdogTimeoutMsg *_setWatchdogTimeoutMsg;
  DropWeightIF::WatchdogTimeoutMsg *_watchdogTimeoutMsg;
  DropWeightIF::ResetWatchdogMsg *_resetWatchdogMsg;
  
  // Determine max bytes required for message buffer
  virtual size_t maxRequestBytes();

  // Allocate buffer for messages, set pointers, etc
  virtual void allocateBuffers();

  private:

  // Initializer method called by constructors
  int init();

};

#endif

