/* Icecast * * This program is distributed under the GNU General Public License, version 2. * A copy of this license is included with this source. * * Copyright 2018, Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org>, */#ifndef __REFOBJECT_H__#define __REFOBJECT_H__#include "common/thread/thread.h"#include "icecasttypes.h"#include "compat.h"typedefvoid(*refobject_free)(refobject_tself,void**userdata);structrefobject_base_tag{size_trefc;mutex_tlock;void*userdata;refobject_freefreecb;};refobject_trefobject_new(size_tlen,refobject_freefreecb,void*userdata);intrefobject_ref(refobject_tself);intrefobject_unref(refobject_tself);void*refobject_get_userdata(refobject_tself);intrefobject_set_userdata(refobject_tself,void*userdata);#endif