~ubuntu-branches/ubuntu/saucy/resiprocate/saucy-proposed

« back to all changes in this revision

Viewing changes to p2p/DataSpecifier.hxx

  • Committer: Package Import Robot
  • Author(s): Daniel Pocock
  • Date: 2012-05-17 19:29:59 UTC
  • Revision ID: package-import@ubuntu.com-20120517192959-vv00m77isztdy64q
Tags: upstream-1.8.2
ImportĀ upstreamĀ versionĀ 1.8.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef P2P_DataSpecifier_hxx
 
2
#define P2P_DataSpecifier_hxx
 
3
 
 
4
#include <list>
 
5
#include <vector>
 
6
 
 
7
namespace p2p 
 
8
{
 
9
 
 
10
class DataSpecifier
 
11
{
 
12
   public: 
 
13
      KindId kind;
 
14
      Generation generation;
 
15
      //encoding?
 
16
};
 
17
 
 
18
class SpecifySingle :public DataSpecifier
 
19
{
 
20
  public:
 
21
};
 
22
 
 
23
//default to entire array
 
24
class SpecifyArray :public DataSpecifier
 
25
{
 
26
   public:
 
27
      const static UInt32 Last = INT_MAX;
 
28
      
 
29
      class Range
 
30
      {
 
31
         public:
 
32
            UInt32 first;
 
33
            UInt32 last;
 
34
      };
 
35
      
 
36
      std::vector<Range>& ranges();
 
37
      const std::vector<Range>& ranges() const;
 
38
 
 
39
   private:
 
40
      std::vector<Range>& mRange;
 
41
};
 
42
 
 
43
//empty is entire dictionary, th default
 
44
class SpecifyDictionary
 
45
{
 
46
   public:
 
47
      std::vector<resip::Data>& keys();
 
48
};
 
49
   
 
50
// class DeleteReq
 
51
// {
 
52
//    public:
 
53
//       typedef std::list<DataSpecifier> Specifiers;
 
54
// };
 
55
 
 
56
} // p2p
 
57
 
 
58
#endif P2P_DataSpecifier_hxx