/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : MyInterface_SK.cc                                             */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*
NOTE: This file is automatically generated.
DO NOT MODIFY.
*/

#include <stdlib.h>
#include "MyInterface_SK.h"

MyInterface_SK::MyInterface_SK()
  :  TaskServer(MyInterfaceServerName)
{
  init();
}


MyInterface_SK::MyInterface_SK(const char *serverName)
  : TaskServer(serverName)
{
  init();
}


MyInterface_SK::~MyInterface_SK()
{
}

Boolean MyInterface_SK::fooCallback(Request *request, int nReqBytes,
                          Reply **reply, int *nReplyBytes)
{
  // Invoke method implementation
  _fooMsg->returnVal = 
     foo(_fooMsg->x, &_fooMsg->y);

  *reply = _fooMsg;
  *nReplyBytes = sizeof(MyInterface::FooMsg);
  return True;
}


int MyInterface_SK::init()
{
  // Add callbacks for each method
  addCallback(MyInterface::FooMsgCode,
             (CallbackPtr )MyInterface_SK::fooCallback);

return 0;
}


size_t MyInterface_SK::maxRequestBytes()
{
  size_t nBytes = 0;
  nBytes = max(nBytes, sizeof(MyInterface::FooMsg));
  return nBytes;
}


void MyInterface_SK::allocateBuffers()
{
  TaskServer::allocateBuffers();

  _fooMsg = (MyInterface::FooMsg *)_requestPtr;
}


