Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 1 | /* gprs_ms_storage.h |
| 2 | * |
| 3 | * Copyright (C) 2015 by Sysmocom s.f.m.c. GmbH |
| 4 | * Author: Jacob Erlbeck <jerlbeck@sysmocom.de> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version 2 |
| 9 | * of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 19 | */ |
| 20 | |
| 21 | #pragma once |
| 22 | |
| 23 | #include "gprs_ms.h" |
| 24 | #include "cxx_linuxlist.h" |
Jacob Erlbeck | 0e50ce6 | 2015-05-21 16:58:22 +0200 | [diff] [blame] | 25 | #include "tbf.h" |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 26 | #include <stdint.h> |
| 27 | #include <stddef.h> |
| 28 | |
Jacob Erlbeck | 17214bb | 2015-06-02 14:06:12 +0200 | [diff] [blame] | 29 | struct BTS; |
| 30 | |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 31 | class GprsMsStorage : public GprsMs::Callback { |
| 32 | public: |
Jacob Erlbeck | 17214bb | 2015-06-02 14:06:12 +0200 | [diff] [blame] | 33 | GprsMsStorage(BTS *bts); |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 34 | ~GprsMsStorage(); |
| 35 | |
Jacob Erlbeck | c362df2 | 2016-01-20 22:02:19 +0100 | [diff] [blame] | 36 | void cleanup(); |
| 37 | |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 38 | virtual void ms_idle(class GprsMs *); |
| 39 | virtual void ms_active(class GprsMs *); |
| 40 | |
| 41 | GprsMs *get_ms(uint32_t tlli, uint32_t old_tlli = 0, const char *imsi = 0) const; |
Jacob Erlbeck | 0e50ce6 | 2015-05-21 16:58:22 +0200 | [diff] [blame] | 42 | GprsMs *create_ms(uint32_t tlli, enum gprs_rlcmac_tbf_direction dir); |
Jacob Erlbeck | cb1b494 | 2015-06-19 10:59:58 +0200 | [diff] [blame] | 43 | GprsMs *create_ms(); |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 44 | |
Jacob Erlbeck | f47f68a | 2015-06-04 10:23:24 +0200 | [diff] [blame] | 45 | const LListHead<GprsMs>& ms_list() const {return m_list;} |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 46 | private: |
Jacob Erlbeck | 17214bb | 2015-06-02 14:06:12 +0200 | [diff] [blame] | 47 | BTS *m_bts; |
Jacob Erlbeck | 5367086 | 2015-05-12 17:54:33 +0200 | [diff] [blame] | 48 | LListHead<GprsMs> m_list; |
| 49 | }; |