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

presentation.h

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 
00020 #ifndef __PARSER_H
00021 #define __PARSER_H
00022 
00023 #include <inttypes.h>
00024 
00025 #define P_TYPE_MASK             0x07
00026 #define P_TYPE_COMPOUND_OPEN    0x00
00027 #define P_TYPE_COMPOUND_CLOSE   0x01
00028 #define P_TYPE_CHAR             0x02
00029 #define P_TYPE_INT              0x03
00030 #define P_TYPE_LONG             0x04
00031 #define P_TYPE_LONGLONG         0x05
00032 #define P_TYPE_FLOAT            0x06
00033 #define P_TYPE_STRING           0x07
00034 
00035 #define P_TAG_MASK      0xf8
00036 #define P_TAG_APP_IMAGE 0x00
00037 #define P_TAG_LABEL     0x08
00038 #define P_TAG_ICON      0x10
00039 #define P_TAG_SWITCH    0x18
00040 #define P_TAG_DIMMER    0x20
00041 
00042 #define P_TAG_X         0xf8
00043 #define P_TAG_Y         0xf0
00044 #define P_TAG_DEFAULT   0xe8
00045 #define P_TAG_IMAGE     0xe0
00046 #define P_TAG_BEHAV     0xd8
00047 
00048 #define P_SERVICE_DISCOVERY             0
00049 #define P_SERVICE_DISCOVERY_REPLY       1
00050 #define P_GET_PROPERTIES                2
00051 #define P_SET_PROPERTIES                3
00052 #define P_UPDATE                        4
00053 
00054 #define PT_SWITCH                       0
00055 #define PT_PERCENT                      1
00056 
00057 #define IT_PLUG                         0
00058 #define IT_LAMP                         1
00059 
00060 #ifdef __cplusplus
00061 extern "C" {
00062 #endif
00063 
00064 void prs_init(uint8_t* buf, uint8_t len);
00065 uint8_t prs_get_tag(void);
00066 void prs_skip(uint8_t tag);
00067 uint8_t prs_get_char(void);
00068 uint16_t prs_get_int(void);
00069 char* prs_get_str(void);
00070 
00071 #ifdef __cplusplus
00072 }
00073 #endif
00074 
00075 #endif

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