nx_server_plugin_sdk 1.0 Server Plugin SDK

test_file_info_iterator.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
5 #include <string>
6
7 #include <common.h>
8
9 #include <detail/fs_stub.h>
10 #include <storage/third_party_storage.h>
11
12 class TestFileInfoIterator :
13 public nx_spl::FileInfoIterator,
14 public PluginRefCounter<TestFileInfoIterator>
15 {
16 public:
17 TestFileInfoIterator(FsStubNode* node, const std::string& prefix);
18 public:
19 virtual nx_spl::FileInfo* STORAGE_METHOD_CALL next(int* ecode) const override;
20
21 public: // plugin interface implementation
22 virtual void* queryInterface(const nxpl::NX_GUID& interfaceID) override;
23
24 virtual int addRef() const override;
25 virtual int releaseRef() const override;
26
27 private:
28 mutable nx_spl::FileInfo m_fInfo;
29 mutable FsStubNode* m_cur;
30 std::string m_prefix;
31 mutable char m_urlBuf[4096];
32 };
PluginRefCounter
Definition: common.h:14
TestFileInfoIterator::queryInterface
virtual void * queryInterface(const nxpl::NX_GUID &interfaceID) override
Cast to type, specified by interfaceID.
Definition: test_file_info_iterator.cpp:40
TestFileInfoIterator
Definition: test_file_info_iterator.h:12
nx_spl::FileInfoIterator
File information iterator abstraction.
Definition: third_party_storage.h:138
FsStubNode
Definition: fs_stub.h:15
TestFileInfoIterator::releaseRef
virtual int releaseRef() const override
Decrement reference counter.
Definition: test_file_info_iterator.cpp:65
nx_spl::FileInfo
Common file information.
Definition: third_party_storage.h:126
TestFileInfoIterator::addRef
virtual int addRef() const override
Increment reference counter.
Definition: test_file_info_iterator.cpp:60
nxpl::NX_GUID
GUID of plugin interface.
Definition: plugin_api.h:26
TestFileInfoIterator::next
virtual nx_spl::FileInfo *STORAGE_METHOD_CALL next(int *ecode) const override
Definition: test_file_info_iterator.cpp:15