/* $Id: maxrw_cps.h,v 1.1 2000/04/23 07:55:57 fubob Exp $ */

/*
 *
 * Copyright (C) 2000 Kevin Fu (fubob@mit.edu)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 *
 */

#include "arpc.h"
#include "crypt.h"
#include "sfsmisc.h"


class srvcon {
  ptr<rabin_priv> kc;

  sfs_connectres conres;
  sfs_fsinfo fsires;

  ptr<axprt_crypt> s;
  ptr<aclnt> sfsc;
  ptr<aclnt> sfsrwc;

  ex_lookup3res lres;
  ex_readlink3res rres;

  void fail (int err);
  void init ();
  void connect ();
  void getsockres (int fd);
  void sfsconres (clnt_stat);
  void cryptres (const sfs_hash *sessid);
  void getfsinfores (clnt_stat);
  void getrootfh (int fd);
  void getrootfhres (clnt_stat err);
  void lookupres (clnt_stat err);
  void readlinkres (clnt_stat err);

public:
  srvcon ()
  {  init (); }
};


