Updated documentation for 0.2 release
[mtetherd] / device.h
index 66e0002..b21cd3e 100644 (file)
--- a/device.h
+++ b/device.h
@@ -1,33 +1,36 @@
 /*
-maemo-tethering
-(c) 2010 Gregor Riepl <onitake@gmail.com>
-
-Tethering utility for Maemo
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  mtetherd
+  (c) 2010 Gregor Riepl <onitake@gmail.com>
+  
+  Tethering utility for Maemo
+  
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+  
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+  
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-struct Device;
+#ifndef _MTETHERD_DEVICE_H
+#define _MTETHERD_DEVICE_H
 
-typedef struct Device {
+typedef struct _Device Device;
+
+struct _Device {
        char *name;
        char *address;
        char *startaddress;
        char *endaddress;
-       struct Device *previous;
-       struct Device *next;
-} Device;
+       Device *previous;
+       Device *next;
+};
 
 // Allocates memory for a device structure and copies the name
 Device *device_new(const char *name);
@@ -60,3 +63,6 @@ int device_validate(Device *device);
 // Searches for a device name, starting from start and returns a pointer
 // to the matching node, or NULL if no name matches
 Device *device_search(Device *start, const char *name);
+
+#endif //_MTETHERD_DEVICE_H
+