Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROOT-7541: Public header #includes private header #88

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions proof/proofx/inc/TXSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#ifndef ROOT_TSocket
#include "TSocket.h"
#endif
#ifndef ROOT_XrdProofConn
#include "XrdProofConn.h"
#ifndef __XPTYPES_H
#include "XProtocol/XPtypes.hh"
#endif
#ifndef XRC_UNSOLMSG_H
#include "XrdClient/XrdClientUnsolMsg.hh"
Expand All @@ -58,6 +58,7 @@ class TXSockPipe;
class TXHandler;
class TXSocketHandler;
class XrdClientMessage;
class XrdProofConn;

// To transmit info to Handlers
typedef struct {
Expand Down Expand Up @@ -140,7 +141,7 @@ friend class TXUnixSocket;
void PostMsg(Int_t type, const char *msg = 0);

// Auxilliary
Int_t GetLowSocket() const { return (fConn ? fConn->GetLowSocket() : -1); }
Int_t GetLowSocket() const;

static void SetLocation(const char *loc = ""); // Set location string

Expand Down Expand Up @@ -170,13 +171,13 @@ friend class TXUnixSocket;

virtual Int_t GetClientID() const { return -1; }
virtual Int_t GetClientIDSize() const { return 1; }
Int_t GetLogConnID() const { return (fConn ? fConn->GetLogConnID() : -1); }
Int_t GetOpenError() const { return (fConn ? fConn->GetOpenError() : -1); }
Int_t GetServType() const { return (fConn ? fConn->GetServType() : -1); }
Int_t GetSessionID() const { return (fConn ? fConn->GetSessionID() : -1); }
Int_t GetXrdProofdVersion() const { return fXrdProofdVersion; }
Int_t GetLogConnID() const;
Int_t GetOpenError() const;
Int_t GetServType() const;
Int_t GetSessionID() const;
Int_t GetXrdProofdVersion() const;

Bool_t IsValid() const { return (fConn ? (fConn->IsValid()) : kFALSE); }
Bool_t IsValid() const;
Bool_t IsServProofd();
virtual void RemoveClientID() { }
virtual void SetClientID(Int_t) { }
Expand Down Expand Up @@ -215,10 +216,7 @@ friend class TXUnixSocket;
void SendUrgent(Int_t type, Int_t int1, Int_t int2);

// Interrupt the low level socket
inline void SetInterrupt(Bool_t i = kTRUE) { R__LOCKGUARD(fAMtx);
fRDInterrupt = i;
if (i && fConn) fConn->SetInterrupt();
if (i && fAWait) fASem.Post(); }
void SetInterrupt(Bool_t i = kTRUE);
inline Bool_t IsInterrupt() { R__LOCKGUARD(fAMtx); return fRDInterrupt; }
// Set / Check async msg queue waiting status
inline void SetAWait(Bool_t w = kTRUE) { R__LOCKGUARD(fAMtx); fAWait = w; }
Expand Down
2 changes: 2 additions & 0 deletions proof/proofx/src/TXProofMgr.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include "TSysEvtHandler.h"
#include "XProofProtocol.h"

#include "XrdProofConn.h"

ClassImp(TXProofMgr)

//
Expand Down
58 changes: 58 additions & 0 deletions proof/proofx/src/TXSocket.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,48 @@ void TXSocket::PostMsg(Int_t type, const char *msg)
return;
}

////////////////////////////////////////////////////////////////////////////////

Int_t TXSocket::GetLogConnID() const
{
return (fConn ? fConn->GetLogConnID() : -1);
}

////////////////////////////////////////////////////////////////////////////////

Int_t TXSocket::GetOpenError() const
{
return (fConn ? fConn->GetOpenError() : -1);
}

////////////////////////////////////////////////////////////////////////////////

Int_t TXSocket::GetServType() const
{
return (fConn ? fConn->GetServType() : -1);
}

////////////////////////////////////////////////////////////////////////////////

Int_t TXSocket::GetSessionID() const
{
return (fConn ? fConn->GetSessionID() : -1);
}

////////////////////////////////////////////////////////////////////////////////

Int_t TXSocket::GetXrdProofdVersion() const
{
return fXrdProofdVersion;
}

////////////////////////////////////////////////////////////////////////////////

Bool_t TXSocket::IsValid() const
{
return (fConn ? (fConn->IsValid()) : kFALSE);
}

////////////////////////////////////////////////////////////////////////////////
/// Return kTRUE if the remote server is a 'proofd'

Expand Down Expand Up @@ -1649,6 +1691,16 @@ Int_t TXSocket::SendInterrupt(Int_t type)
return -1;
}

////////////////////////////////////////////////////////////////////////////////

void TXSocket::SetInterrupt(Bool_t i)
{
R__LOCKGUARD(fAMtx);
fRDInterrupt = i;
if (i && fConn) fConn->SetInterrupt();
if (i && fAWait) fASem.Post();
}

////////////////////////////////////////////////////////////////////////////////
/// Send a TMessage object. Returns the number of bytes in the TMessage
/// that were sent and -1 in case of error.
Expand Down Expand Up @@ -1939,6 +1991,12 @@ void TXSocket::SendUrgent(Int_t type, Int_t int1, Int_t int2)
return;
}

////////////////////////////////////////////////////////////////////////////////

Int_t TXSocket::GetLowSocket() const {
return (fConn ? fConn->GetLowSocket() : -1);
}

////////////////////////////////////////////////////////////////////////////////
/// Init environment variables for XrdClient

Expand Down