b10-parkinglot.h 1.36 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
// Copyright (C) 2009  Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.

// $Id$

#ifndef __PARKINGLOT_H
#define __PARKINGLOT_H 1

#include "zoneset.h"
21
#include <cc/data.h>
22
#include "data_source_plot.h"
23 24

class ParkingLot {
JINMEI Tatuya's avatar
JINMEI Tatuya committed
25 26
public:
    explicit ParkingLot(int port);
JINMEI Tatuya's avatar
JINMEI Tatuya committed
27 28
    virtual ~ParkingLot() {}
    int getSocket() { return (sock); }
JINMEI Tatuya's avatar
JINMEI Tatuya committed
29
    void processMessage();
Jelte Jansen's avatar
Jelte Jansen committed
30
    void command(std::pair<std::string,isc::data::ElementPtr>);
31
    void serve(std::string zone_name);
32

33
    isc::data::ElementPtr updateConfig(isc::data::ElementPtr config);
JINMEI Tatuya's avatar
JINMEI Tatuya committed
34
private:
35

36
    isc::dns::DataSourceParkingLot data_source;
JINMEI Tatuya's avatar
JINMEI Tatuya committed
37
    int sock;
38 39 40 41 42 43 44
};

#endif // __PARKINGLOT_H

// Local Variables:
// mode: c++
// End: