source: gsdl/trunk/runtime-src/src/oaiservr/resumptiontoken.h@ 18895

Last change on this file since 18895 was 11769, checked in by mdewsnip, 18 years ago

A couple of fixes for compiling on Windows.

  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
Line 
1#ifndef _RESUMPTIONTOKEN_H_
2#define _RESUMPTIONTOKEN_H_
3
4#include <vector>
5
6#include "text_t.h"
7
8// use the standard namespace
9#if !defined (GSDL_NAMESPACE_BROKEN)
10#if defined(GSDL_USE_OBJECTSPACE)
11using namespace ospace::std;
12#else
13using namespace std;
14#endif
15#endif
16
17class ResumptionToken
18{ private:
19 text_t collection;
20 text_t browseNode;
21 vector<int> browsePosition;
22 int startItem;
23 text_t buildDate;
24 // TODO: add a server name to the variables list; see getToken in resumptionToken.cpp
25
26 public:
27 ResumptionToken(const text_t &collection, const text_t &rootNode, const text_t &buildDate);
28 ResumptionToken(const text_t &URN);
29 text_t getToken();
30
31 void setPosition(const text_t &node, int startItem);
32
33 text_t getCollection() { return collection; }
34 text_t getNode() { return browseNode; }
35 int getPosition() { return startItem; }
36 int getOffsetDepth() { return this->browsePosition.size(); }
37 void setOffset(int depth, int position) { this->browsePosition[depth] = position; }
38 int getOffset(int offset) { return this->browsePosition[offset]; }
39 bool isValid();
40};
41
42#endif
Note: See TracBrowser for help on using the repository browser.