Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

application.h

Go to the documentation of this file.
00001 /***
00002  * This file is part of OpenHome, an open source home automation system.
00003  * Copyright (C) 2003 Jan Klötzke
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 
00026 #ifndef __APPLICATION_H
00027 #define __APPLICATION_H
00028 
00029 #include <avr/pgmspace.h>
00030 #include <inttypes.h>
00031 #include "net/buffers.h"
00032 #include "net/network.h"
00033 #include "net/transport.h"
00034 #include "net.h"
00035 
00039 typedef struct {
00040                 uint8_t in;     
00041                 uint8_t out;    
00042         } param_desc_t PROGMEM;
00043 
00044 typedef void appObjCallback_t(void *self, uint8_t method, uint8_t *buf, uint8_t *result, uint8_t repeated);
00045 
00053 struct AppObject {
00054         const param_desc_t *method_sizes;       
00055         const param_desc_t *event_sizes;        
00056         appObjCallback_t *Callback;             
00057 };
00058 
00059 #ifdef __cplusplus
00060 extern "C" {
00061 #endif
00062 
00063 void app_init(void);
00064 void app_process(void);
00065 void app_trigger_event(uint8_t obj, uint8_t event);
00066 #ifndef APP_STATIC
00067 uint8_t app_register_obj(struct AppObject *obj, uint8_t events);
00068 #endif
00069 
00070 #ifdef __cplusplus
00071 }
00072 #endif
00073 
00074 #endif

Generated on Fri Oct 17 16:45:53 2003 for OpenHome by doxygen 1.3.3