Commit b633d5aa authored by Eric Cano's avatar Eric Cano
Browse files

Removed unsed header files.

Fixed namespace not matching other files in tests.
parent 601be495
......@@ -23,7 +23,7 @@
#include <gtest/gtest.h>
#include "castor/server/Threading.hpp"
#include "castor/server/AtomicCounter.hpp"
namespace unitTest {
namespace unitTests {
struct ThreadPlus : public castor::server::Thread{
ThreadPlus( castor::server::AtomicCounter<int>& c):count(c){}
protected:
......@@ -42,7 +42,7 @@ namespace unitTest {
--count;
}
};
TEST(castor_tape_threading, AtomicCOunterTest) {
TEST(castor_tape_threading, AtomicCounterTest) {
castor::server::AtomicCounter<int> c(42);
ThreadPlus t(c);
......
......@@ -67,7 +67,7 @@
using namespace castor::tape::tapeserver;
using namespace castor::tape::tapeserver::daemon;
namespace unitTest {
namespace unitTests {
class castor_tape_tapeserver_daemon_DataTransferSessionTest: public
::testing::Test {
......
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* 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
* of the License, 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.
*
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
EXTERN_C int Cdomainname (char*, int);
#pragma once
#include <Csec_common.h>
#define CSEC_DEFAULT_MECHS "KRB5"
int Csec_client_lookup_protocols(Csec_protocol **protocols, int *nbprotocols);
int Csec_server_lookup_protocols(long client_address,
Csec_protocol **protocols,
int *nbprotocols);
int Csec_server_set_protocols(Csec_context_t *ctx,
int socket);
int Csec_initialize_protocols_from_list(Csec_context_t *ctx,
Csec_protocol *protocol);
/*
* Csecloader.h,v 1.00 2007/12/01
*/
#pragma once
#include <dlfcn.h>
#include <Csec_api.h>
int loader ();
int getServer_initContext (Csec_context_t *, int, Csec_protocol *);
int getClient_initContext (Csec_context_t *, int,Csec_protocol *);
int getClient_establishContext (Csec_context_t *,int);
int getServer_establishContext (Csec_context_t *,int);
int getClientId (Csec_context_t *, char **, char **);
int getMapUser (const char *, const char *, char *, size_t, uid_t *, gid_t *);
int getClearContext (Csec_context_t *);
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* 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
* of the License, 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.
*
*
* function declarations for checkkey
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
int connecttpread(char * host, u_short aport);
int checkkey(int sock, u_short key);
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* 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
* of the License, 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.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
int usf_open(int *unit, char *file, int *append, int *trunc);
int udf_open(int *unit, char *file, int *lrecl , int *trunc);
int usf_write(int *unit, char *buf, int *nwrit);
int udf_write(int *unit, char *buf, int *nrec, int *nwrit);
int usf_read(int *unit, char *buf, int *nwant);
int udf_read(int *unit, char *buf, int *nrec, int *nwant);
int uf_close(int *unit);
void uf_cread(int *unit, char *buf, int *nrec, int *nwant, int *ngot, int *irc);
/*
** $Id: mtio_add.h,v 1.1 2009/08/06 15:28:04 wiebalck Exp $
*/
/*
** This file defines the MTWEOFI ioctl to be able to write buffered tape marks.
** This definition is not in the official kernel yet, but will hopefully
** make it there at some point. For the time being, this header needs to be included
** instead. Something along the lines of
**
** #include <linux/mtio.h>
** #ifndef MTWEOFI
** #include "mtio_add.h"
** #endif
**
** should make sure that the code is forward compatible.
**
** In order to successfully use this ioctls, loading the appropriate st driver is required.
*/
#pragma once
/* in case MTWEOFI is not defined in linux/mtio.h */
#ifndef MTWEOFI
#define MTWEOFI 35
#endif
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* 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
* of the License, 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.
*
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
/* rbtsubr return codes */
#define RBT_OK 0 /* Ok or error should be ignored */
#define RBT_NORETRY 1 /* Unrecoverable error (just log it) */
#define RBT_SLOW_RETRY 2 /* Should release drive & retry in 600 seconds */
#define RBT_FAST_RETRY 3 /* Should retry in 60 seconds */
#define RBT_DMNT_FORCE 4 /* Should do first a demount force */
#define RBT_CONF_DRV_DN 5 /* Should configure the drive down */
#define RBT_OMSG_NORTRY 6 /* Should send a msg to operator and exit */
#define RBT_OMSG_SLOW_R 7 /* Ops msg (nowait) + release drive + slow retry */
#define RBT_OMSGR 8 /* Should send a msg to operator and wait */
#define RBT_UNLD_DMNT 9 /* Should unload the tape and retry demount */
/* RFIO O_DIRECT memory aligned buffer support */
/* 2006/02/15 KELEMEN Peter <Peter.Kelemen@cern.ch> CERN IT/FIO/LA */
#pragma once
/* NOTE(fuji): In order to be able to use O_DIRECT, we have to allocate
* page-aligned memory buffers. The technique we use for that is allocating
* more and then find a page boundary and use that as the buffer entry. We keep
* unaligned/aligned pointer pairs in a single linked list. There's no locking,
* i.e. we assume the list won't be manipulated from different thread contexts.
*/
void *malloc_page_aligned(size_t size);
void free_page_aligned(void *buf);
/* eof */
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* 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
* of the License, 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.
*
*
* functions definitions for the callhandler interface of rfio
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
int rfio_handle_open(const char *lfn,
int flags,
int mode,
uid_t uid,
gid_t gid,
char **pfn,
void **ctx,
int *need_user_check);
int rfio_handle_firstwrite(void *ctx);
int rfio_handle_close(void *ctx,
struct stat *filestat,
int close_status);
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* 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
* of the License, 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.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
int srerrmsg(
int s
);
int srstatfs(int s);
int srfread(
int s,
FILE *fp);
int srfwrite(
int s,
FILE *fp);
/*
* $Id: rfio_rdirfdt.h,v 1.2 2000/11/20 14:58:03 jdurand Exp $
*/
#pragma once
EXTERN_C int rfio_rdirfdt_allocentry (int);
#define FINDRDIR_WITH_SCAN 1
#define FINDRDIR_WITHOUT_SCAN 0
EXTERN_C int rfio_rdirfdt_findentry (int, int);
EXTERN_C int rfio_rdirfdt_findptr (RDIR *, int);
EXTERN_C int rfio_rdirfdt_freeentry (int);
/*
* $Id: rfio_rfilefdt.h,v 1.2 2000/11/20 14:58:03 jdurand Exp $
*/
#pragma once
EXTERN_C int rfio_rfilefdt_allocentry (int);
#define FINDRFILE_WITH_SCAN 1
#define FINDRFILE_WITHOUT_SCAN 0
EXTERN_C int rfio_rfilefdt_findentry (int, int);
EXTERN_C int rfio_rfilefdt_findptr (RFILE *, int);
EXTERN_C int rfio_rfilefdt_freeentry (int);
/* RFIO XFS preallocation support */
/* 2006/02/15 KELEMEN Peter <Peter.Kelemen@cern.ch> CERN IT/FIO/LA */
#pragma once
#include <sys/types.h>
#include <sys/stat.h>
/* NOTE(fuji): Since the filesize is not part of the protocol, we cannot
* now apriori how much the client is going to write, so we reserve the
* amount requested, and try to unreserve the remaining space later.
* If the file grows above this, XFS will take care of allocating the rest
* and we have nothing to do. */
/* ex:
* RFIOD XFSPREALLOC 1024
* ...would make RFIO preallocate 1 GiB for each file. */
void rfio_xfs_resvsp64(int fd, unsigned long mbytes);
void rfio_xfs_unresvsp64(int fd, unsigned long mbytes, off64_t written);
/* eof */
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* 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
* of the License, 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.
*
*
* header file for rfio_xy functions
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
int rfio_xysock(int lun);
int rfio_xyopen(char* name, char* node, int lun,
int lrecl, char* chopt, int* irc);
/* close a remote fortran logical unit */
int rfio_xyclose(int lun, char* chopt, int *irc);
int rfio_xyread(int lun, char* buf, int nrec, int nwant,
int* ngot, char* chopt, int* irc);
int rfio_xywrite(int lun, char* buf, int nrec, int nwrit,
char* chopt, int *irc);
/*
* $Id: rmc_api.h,v 1.2 2003/10/29 12:37:27 baud Exp $
*/
/*
* Copyright (C) 2002-2003 by CERN/IT/DS/HSM
* All rights reserved
*/
/*
*/
#pragma once
#include "osdep.h"
#include "smc_struct.h"
/* function prototypes */
EXTERN_C int rmc_dismount(const char *const server, const char *const vid, const int drvord, const int force);
EXTERN_C int rmc_errmsg(const char *const func, const char *const msg, ...);
EXTERN_C int rmc_export(const char *const server, const char *const vid);
EXTERN_C int rmc_find_cartridge(const char *const server, const char *const pattern, const int type, const int startaddr, const int nbelem, struct smc_element_info *const element_info);
EXTERN_C int rmc_get_geometry(const char *const server, struct robot_info *const robot_info);
EXTERN_C int rmc_import(const char *const server, const char *const vid);
EXTERN_C int rmc_mount(const char *const server, const char *const vid, const int side, const int drvord);
EXTERN_C int rmc_read_elem_status(const char *const server, const int type, const int startaddr, const int nbelem, struct smc_element_info *const element_info);
EXTERN_C void rmc_seterrbuf(const char *const buffer, const int buflen);
EXTERN_C int send2rmc(const char *const host, const char *const reqp, const int reql, char *const user_repbuf, const int user_repbuf_len);
/*
* Copyright (C) 2001 by CERN/IT/PDP/DM
* All rights reserved
*/
#pragma once
#include "osdep.h"
EXTERN_C int rmc_logit(const char *const func, const char *const msg, ...);
/*
* Copyright (C) 2001 by CERN/IT/PDP/DM
* All rights reserved
*/
#pragma once
#include "osdep.h"
EXTERN_C void rmc_logreq(const char *const func, char *const logbuf);
/*
* Copyright (C) 2001 by CERN/IT/PDP/DM
* All rights reserved
*/
#pragma once
#include "osdep.h"
#include "smc_struct.h"
EXTERN_C int rmc_marshall_element (char **const sbpp, const struct smc_element_info *const element_info);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment