1#!/usr/bin/env python
2#############################################################################
3# Copyright (c) 2015-2018 Balabit
4#
5# This program is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 as published
7# by the Free Software Foundation, or (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17#
18# As an additional exemption you are allowed to compile & link against the
19# OpenSSL libraries as published by the OpenSSL project. See the file
20# COPYING for details.
21#
22#############################################################################
23from src.syslog_ng_ctl.driver_stats_handler import DriverStatsHandler
24
25
26class DestinationDriver(object):
27    group_type = "destination"
28
29    def __init__(self, positional_parameters=None, options=None):
30        if positional_parameters is None:
31            positional_parameters = []
32        self.positional_parameters = positional_parameters
33        if options is None:
34            options = {}
35        self.options = options
36        self.stats_handler = DriverStatsHandler(group_type=self.group_type, driver_name=self.driver_name)
37
38    def get_stats(self):
39        return self.stats_handler.get_stats()
40
41    def get_query(self):
42        return self.stats_handler.get_query()
43