~ubuntu-branches/ubuntu/quantal/config-manager/quantal

« back to all changes in this revision

Viewing changes to src/ConfigCVSSource.h

  • Committer: Bazaar Package Importer
  • Author(s): Anand Kumria
  • Date: 2004-07-19 22:27:50 UTC
  • mto: (3.1.1 dapper)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040719222750-sztqdj1aoj2r6frr
Tags: upstream-0.1p83
ImportĀ upstreamĀ versionĀ 0.1p83

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2003  Robert Collins  <robertc@squid-cache.org>
 
3
 * 
 
4
 * 
 
5
 * This program is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by
 
7
 * the Free Software Foundation; either version 2 of the License, or
 
8
 * (at your option) any later version.
 
9
 * 
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 * 
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program; if not, write to the Free Software
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 * 
 
19
 * DO NOT ALTER THE NEXT LINE
 
20
 * arch-tag: 36338b91-3298-40cf-ad88-dca8c7215280
 
21
 * 
 
22
 */
 
23
 
 
24
#ifndef   _CM_CONFIGCVSSOURCE_H_
 
25
#define   _CM_CONFIGCVSSOURCE_H_
 
26
 
 
27
#include <stdexcept>
 
28
#include <getopt++/StringOption.h>
 
29
#include "ConfigSource.h"
 
30
 
 
31
class ConfigCVSSource : public ConfigSource
 
32
{
 
33
 
 
34
public:
 
35
  static ConfigCVSSource* Create(Path const &location,ConfigSource const *mayBeParent) throw (std::exception *);
 
36
  ConfigCVSSource();
 
37
  ConfigCVSSource(std::string const &url);
 
38
  virtual std::string url(bool const &) const;
 
39
 
 
40
  virtual void get (std::string const &) const throw (std::exception *);
 
41
  virtual void update (std::string const &) const throw(std::exception *);
 
42
  virtual int changes (std::string const &) const throw(std::exception *);
 
43
  virtual int missing (std::string const &) const throw(std::exception *);
 
44
  virtual void ignore (ConfigSource const *, std::string const &) const throw (std::exception *);
 
45
 
 
46
  virtual std::string treeVersion(std::string const &where) const;
 
47
 
 
48
private:
 
49
    static std::string schemeFromRepository(std::string &result);
 
50
    void processRepository();
 
51
    std::string getOneLineFile(std::string const &where) const;
 
52
    std::string getRoot(std::string const &where) const;
 
53
    std::string getRepository(std::string const &where) const;
 
54
    static std::string urlScheme(std::string const &);
 
55
 
 
56
    std::string theUrl;
 
57
 
 
58
    std::string scheme;
 
59
 
 
60
    std::string repository;
 
61
 
 
62
    std::string module;
 
63
 
 
64
  std::string tag;
 
65
 
 
66
  std::string urlPart;
 
67
};
 
68
 
 
69
 
 
70
#endif /* _CM_CONFIGCVSSOURCE_H_ */