purple.h

Go to the documentation of this file.
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 <libpurple/status.h>
00024 
00025 enum purple_cmd_type {
00026    PURPLE_MESSAGE_CMD      = 1,
00027    PURPLE_PUBLISH_CMD      = 2,
00028    PURPLE_SUBSCRIBE_CMD    = 3
00029 };
00030 
00031 enum purple_publish_basic {
00032    PURPLE_BASIC_OPEN       = 1,
00033    PURPLE_BASIC_CLOSED     = 2
00034 };
00035 
00036 enum purple_publish_activity {
00037    PURPLE_ACTIVITY_AVAILABLE = 1,
00038    PURPLE_ACTIVITY_BUSY = 2,
00039    PURPLE_ACTIVITY_AWAY = 3,
00040 };
00041 
00042 struct purple_message {
00043    char *from, *to, *body, *id;
00044 };
00045 
00046 struct purple_publish {
00047    char *from, *id;
00048    enum purple_publish_basic basic;
00049    PurpleStatusPrimitive primitive;
00050    char *note;
00051 };
00052 
00053 struct purple_subscribe {
00054    char *from, *to;
00055    int expires;
00056    
00057 };
00058 
00059 struct purple_cmd {
00060    enum purple_cmd_type type;
00061    union {
00062       struct purple_message message;
00063       struct purple_publish publish;
00064       struct purple_subscribe subscribe;
00065    };
00066 };
00067 
00068 #endif /*PURPLE_H_*/

Generated on Thu May 24 08:00:53 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6