purple.h

00001 /* OpenSER PURPLE MODULE
00002  * 
00003  * Copyright (C) 2008 Atos Worldline
00004  * Contact: Eric PTAK <eric.ptak@atosorigin.com>
00005  *
00006  * This program is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018  *
00019  */
00020 #ifndef _PURPLE_H
00021 #define _PURPLE_H
00022 
00023 #include <glib.h>
00024 #include <libpurple/status.h>
00025 
00026 enum purple_cmd_type {
00027         PURPLE_MESSAGE_CMD              = 1,
00028         PURPLE_PUBLISH_CMD              = 2,
00029         PURPLE_SUBSCRIBE_CMD            = 3
00030 };
00031 
00032 enum purple_publish_basic {
00033         PURPLE_BASIC_OPEN                       = 1,
00034         PURPLE_BASIC_CLOSED             = 2
00035 };
00036 
00037 enum purple_publish_activity {
00038         PURPLE_ACTIVITY_AVAILABLE = 1,
00039         PURPLE_ACTIVITY_BUSY = 2,
00040         PURPLE_ACTIVITY_AWAY = 3,
00041 };
00042 
00043 struct purple_message {
00044         char *from, *to, *body, *id;
00045 };
00046 
00047 struct purple_publish {
00048         char *from, *id;
00049         enum purple_publish_basic basic;
00050         PurpleStatusPrimitive primitive;
00051         char *note;
00052 };
00053 
00054 struct purple_subscribe {
00055         char *from, *to;
00056         int expires;
00057         
00058 };
00059 
00060 struct purple_cmd {
00061         enum purple_cmd_type type;
00062         union {
00063                 struct purple_message message;
00064                 struct purple_publish publish;
00065                 struct purple_subscribe subscribe;
00066         };
00067 };
00068 
00069 #endif /*PURPLE_H_*/