procobjecttree.h revision 927c7927eee73e195afc5b76ffb91bd72e3cb03d
1/* procobjecttree.h
2 *
3 * Copyright � 2010 - 2013 UNISYS CORPORATION
4 * All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14 * NON INFRINGEMENT.  See the GNU General Public License for more
15 * details.
16 */
17
18/** @file *********************************************************************
19 *
20 *  This describes the interfaces necessary for creating a tree of types,
21 *  objects, and properties in /proc.
22 *
23 ******************************************************************************
24 */
25
26#ifndef __PROCOBJECTTREE_H__
27#define __PROCOBJECTTREE_H__
28
29#include "uniklog.h"
30#include "timskmod.h"
31
32/* These are opaque structures to users.
33 * Fields are declared only in the implementation .c files.
34 */
35typedef struct MYPROCOBJECT_Tag MYPROCOBJECT;
36typedef struct MYPROCTYPE_Tag   MYPROCTYPE;
37
38MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type, const char *name,
39				      void *context);
40void          visor_proc_DestroyObject(MYPROCOBJECT *obj);
41MYPROCTYPE   *visor_proc_CreateType(struct proc_dir_entry *procRootDir,
42				    const char **name,
43				    const char **propertyNames,
44				    void (*show_property)(struct seq_file *,
45							  void *, int));
46void          visor_proc_DestroyType(MYPROCTYPE *type);
47
48#endif
49