Branch data Line data Source code
1 : : /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- 2 : : * 3 : : * Copyright © 2018 Endless Mobile, Inc. 4 : : * 5 : : * This library is free software; you can redistribute it and/or 6 : : * modify it under the terms of the GNU Lesser General Public 7 : : * License as published by the Free Software Foundation; either 8 : : * version 2.1 of the License, or (at your option) any later version. 9 : : * 10 : : * This library 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 GNU 13 : : * Lesser General Public License for more details. 14 : : * 15 : : * You should have received a copy of the GNU Lesser General Public 16 : : * License along with this library; if not, write to the Free Software 17 : : * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 : : * 19 : : * Authors: 20 : : * - Philip Withnall <withnall@endlessm.com> 21 : : */ 22 : : 23 : : #pragma once 24 : : 25 : : #include <glib.h> 26 : : #include <glib-object.h> 27 : : #include <libmogwai-tariff/period.h> 28 : : #include <libmogwai-tariff/tariff.h> 29 : : 30 : : G_BEGIN_DECLS 31 : : 32 : : #define MWT_TYPE_TARIFF_BUILDER mwt_tariff_builder_get_type () 33 [ + + + - : 84 : G_DECLARE_FINAL_TYPE (MwtTariffBuilder, mwt_tariff_builder, MWT, TARIFF_BUILDER, GObject) + - ] 34 : : 35 : : MwtTariffBuilder *mwt_tariff_builder_new (void); 36 : : 37 : : void mwt_tariff_builder_reset (MwtTariffBuilder *self); 38 : : 39 : : void mwt_tariff_builder_set_name (MwtTariffBuilder *self, 40 : : const gchar *name); 41 : : void mwt_tariff_builder_add_period (MwtTariffBuilder *self, 42 : : MwtPeriod *period); 43 : : 44 : : MwtTariff *mwt_tariff_builder_get_tariff (MwtTariffBuilder *self); 45 : : GVariant *mwt_tariff_builder_get_tariff_as_variant (MwtTariffBuilder *self); 46 : : GBytes *mwt_tariff_builder_get_tariff_as_bytes (MwtTariffBuilder *self); 47 : : 48 : : G_END_DECLS