Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
d316fe10
Commit
d316fe10
authored
7 years ago
by
Michael Davis
Browse files
Options
Downloads
Patches
Plain Diff
[ssi_af_ls] Creates class ArchiveFileLsStream
parent
0dba1ea0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
xroot_plugins/CMakeLists.txt
+1
-1
1 addition, 1 deletion
xroot_plugins/CMakeLists.txt
xroot_plugins/XrdCtaArchiveFileLs.hpp
+48
-10
48 additions, 10 deletions
xroot_plugins/XrdCtaArchiveFileLs.hpp
with
49 additions
and
11 deletions
xroot_plugins/CMakeLists.txt
+
1
−
1
View file @
d316fe10
...
...
@@ -49,7 +49,7 @@ if (OCCI_SUPPORT)
set_property
(
TARGET XrdSsiCta APPEND PROPERTY INSTALL_RPATH
${
ORACLE-INSTANTCLIENT_RPATH
}
)
endif
(
OCCI_SUPPORT
)
# Get some extra debug messages on stdout
#
target_compile_definitions(XrdSsiCta PRIVATE XRDSSI_DEBUG)
target_compile_definitions
(
XrdSsiCta PRIVATE XRDSSI_DEBUG
)
install
(
TARGETS XrdCtaOfs DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
install
(
TARGETS XrdSsiCta DESTINATION usr/
${
CMAKE_INSTALL_LIBDIR
}
)
...
...
This diff is collapsed.
Click to expand it.
xroot_plugins/XrdCtaArchiveFileLs.hpp
+
48
−
10
View file @
d316fe10
...
...
@@ -20,26 +20,64 @@
#include
<XrdSsi/XrdSsiStream.hh>
/*!
* The Buffer object is returned by active streams as they supply the buffer holding the requested
* data. Once the buffer is no longer needed it must be recycled by calling Recycle().
*/
class
ArchiveFileBuffer
:
public
XrdSsiStream
::
Buffer
{
public:
ArchiveFileBuffer
(
char
*
dp
=
nullptr
)
:
Buffer
(
dp
)
{}
virtual
void
Recycle
()
{}
};
#if 0
virtual void Recycle() = 0; //!> Call to recycle the buffer when finished
char *data; //!> -> Buffer containing the data
Buffer *next; //!> For chaining by buffer receiver
Buffer(char *dp=0) : data(dp), next(0) {}
virtual ~Buffer() {}
#endif
class
ArchiveFileLsStream
:
public
XrdSsiStream
{
public:
ArchiveFileLsStream
()
:
XrdSsiStream
(
XrdSsiStream
::
isActive
),
m_archiveFileLsBuffer
(
test_buf
)
{}
virtual
~
ArchiveFileLsStream
()
{}
ArchiveFileLsStream
()
:
XrdSsiStream
(
XrdSsiStream
::
isActive
),
m_archiveFileLsBuffer
(
test_buf
)
{}
Buffer
*
GetBuff
(
XrdSsiErrInfo
&
eInfo
,
int
&
dlen
,
bool
&
last
)
{
virtual
~
ArchiveFileLsStream
(
)
{
}
dlen
=
strlen
(
test_buff
);
/*!
* Synchronously obtain data from an active stream (server-side only).
*
* @param[out] eRef The object to receive any error description.
* @param[in,out] dlen input: the optimal amount of data wanted (this is a hint)
* output: the actual amount of data returned in the buffer.
* @param[in,out] last input: should be set to false.
* output: if true it indicates that no more data remains to be returned
* either for this call or on the next call.
*
* @return Pointer to the Buffer object that contains a pointer to the the data (see below). The
* buffer must be returned to the stream using Buffer::Recycle(). The next member is usable.
* @retval 0 No more data remains or an error occurred:
* last = true: No more data remains.
* last = false: A fatal error occurred, eRef has the reason.
*/
virtual
Buffer
*
GetBuff
(
XrdSsiErrInfo
&
eInfo
,
int
&
dlen
,
bool
&
last
)
{
dlen
=
strlen
(
m_archiveFileLsBuffer
.
data
);
last
=
false
;
return
m_archiveFileLsBuffer
;
return
&
m_archiveFileLsBuffer
;
}
private
:
c
onst
char
*
const
test_buf
=
"Hello, world!
\n
"
;
c
har
*
test_buf
=
const_cast
<
char
*>
(
"Hello, world!
\n
"
)
;
Buffer
m_archiveFileLsBuffer
;
ArchiveFile
Buffer
m_archiveFileLsBuffer
;
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment