X-Git-Url: http://git.maemo.org/git/?p=mtetherd;a=blobdiff_plain;f=device.h;h=b21cd3e0cc7f0ad1b94392841405ebe565aa9b29;hp=66e0002d0bfa70d58d71c7977fa3290938fbe477;hb=HEAD;hpb=62befab10c1a61d24d2e511758472dc05e6c8525 diff --git a/device.h b/device.h index 66e0002..b21cd3e 100644 --- a/device.h +++ b/device.h @@ -1,33 +1,36 @@ /* -maemo-tethering -(c) 2010 Gregor Riepl - -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 . + mtetherd + (c) 2010 Gregor Riepl + + 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 . */ -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 +