You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

session.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. GPSBabel session (format session) management
  3. Copyright (C) 2008 Olaf Klein, o.b.klein@gpsbabel.org
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
  15. */
  16. #ifndef SESSION_H
  17. #define SESSION_H
  18. typedef struct {
  19. queue Q;
  20. int id;
  21. char* name;
  22. } category_t;
  23. typedef struct {
  24. queue Q;
  25. int nr;
  26. const char* name; /* in normal case the name of a format */
  27. char* filename; /* used file within format */
  28. int category_ct;
  29. int unknown_category_ct; /* added without id */
  30. queue category_list;
  31. } session_t;
  32. void session_init(void);
  33. void session_exit(void);
  34. void start_session(const char* name, const char* filename);
  35. session_t* curr_session(void);
  36. /* in work
  37. int session_add_category(const char *name, const int id);
  38. */
  39. #endif