Frameworks/libpurple.framework/Versions/2.10.12r8d2874a79747/Headers/media/enum-types.h
branchadium-1.5.11
changeset 6014 fcb71cb71a3d
parent 5941 307f53385811
parent 6013 f8d0dc659e3f
child 6016 325e2ab3406f
equal deleted inserted replaced
5941:307f53385811 6014:fcb71cb71a3d
     1 /**
       
     2  * @file enum-types.h Enum types for Media API
       
     3  * @ingroup core
       
     4  */
       
     5 
       
     6 /* purple
       
     7  *
       
     8  * Purple is the legal property of its developers, whose names are too numerous
       
     9  * to list here.  Please refer to the COPYRIGHT file distributed with this
       
    10  * source distribution.
       
    11  *
       
    12  * This program is free software; you can redistribute it and/or modify
       
    13  * it under the terms of the GNU General Public License as published by
       
    14  * the Free Software Foundation; either version 2 of the License, or
       
    15  * (at your option) any later version.
       
    16  *
       
    17  * This program is distributed in the hope that it will be useful,
       
    18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    20  * GNU General Public License for more details.
       
    21  *
       
    22  * You should have received a copy of the GNU General Public License
       
    23  * along with this program; if not, write to the Free Software
       
    24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
       
    25  */
       
    26 
       
    27 #ifndef _PURPLE_MEDIA_ENUM_TYPES_H_
       
    28 #define _PURPLE_MEDIA_ENUM_TYPES_H_
       
    29 
       
    30 #include <glib-object.h>
       
    31 
       
    32 G_BEGIN_DECLS
       
    33 
       
    34 #define PURPLE_TYPE_MEDIA_CANDIDATE_TYPE   (purple_media_candidate_type_get_type())
       
    35 #define PURPLE_MEDIA_TYPE_CAPS	           (purple_media_caps_get_type())
       
    36 #define PURPLE_MEDIA_TYPE_INFO_TYPE	   (purple_media_info_type_get_type())
       
    37 #define PURPLE_TYPE_MEDIA_NETWORK_PROTOCOL (purple_media_network_protocol_get_type())
       
    38 #define PURPLE_TYPE_MEDIA_SESSION_TYPE     (purple_media_session_type_get_type())
       
    39 #define PURPLE_MEDIA_TYPE_STATE            (purple_media_state_changed_get_type())
       
    40 
       
    41 /** Media candidate types */
       
    42 typedef enum {
       
    43 	PURPLE_MEDIA_CANDIDATE_TYPE_HOST,
       
    44 	PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX,
       
    45 	PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX,
       
    46 	PURPLE_MEDIA_CANDIDATE_TYPE_RELAY,
       
    47 	PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST
       
    48 } PurpleMediaCandidateType;
       
    49 
       
    50 /** Media caps */
       
    51 typedef enum {
       
    52 	PURPLE_MEDIA_CAPS_NONE = 0,
       
    53 	PURPLE_MEDIA_CAPS_AUDIO = 1,
       
    54 	PURPLE_MEDIA_CAPS_AUDIO_SINGLE_DIRECTION = 1 << 1,
       
    55 	PURPLE_MEDIA_CAPS_VIDEO = 1 << 2,
       
    56 	PURPLE_MEDIA_CAPS_VIDEO_SINGLE_DIRECTION = 1 << 3,
       
    57 	PURPLE_MEDIA_CAPS_AUDIO_VIDEO = 1 << 4,
       
    58 	PURPLE_MEDIA_CAPS_MODIFY_SESSION = 1 << 5,
       
    59 	PURPLE_MEDIA_CAPS_CHANGE_DIRECTION = 1 << 6
       
    60 } PurpleMediaCaps;
       
    61 
       
    62 /** Media component types */
       
    63 typedef enum {
       
    64 	PURPLE_MEDIA_COMPONENT_NONE = 0,
       
    65 	PURPLE_MEDIA_COMPONENT_RTP = 1,
       
    66 	PURPLE_MEDIA_COMPONENT_RTCP = 2
       
    67 } PurpleMediaComponentType;
       
    68 
       
    69 /** Media info types */
       
    70 typedef enum {
       
    71 	PURPLE_MEDIA_INFO_HANGUP = 0,
       
    72 	PURPLE_MEDIA_INFO_ACCEPT,
       
    73 	PURPLE_MEDIA_INFO_REJECT,
       
    74 	PURPLE_MEDIA_INFO_MUTE,
       
    75 	PURPLE_MEDIA_INFO_UNMUTE,
       
    76 	PURPLE_MEDIA_INFO_PAUSE,
       
    77 	PURPLE_MEDIA_INFO_UNPAUSE,
       
    78 	PURPLE_MEDIA_INFO_HOLD,
       
    79 	PURPLE_MEDIA_INFO_UNHOLD
       
    80 } PurpleMediaInfoType;
       
    81 
       
    82 /** Media network protocols */
       
    83 typedef enum {
       
    84 	PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
       
    85 	PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE,
       
    86 	PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_ACTIVE,
       
    87 	PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_SO,
       
    88 } PurpleMediaNetworkProtocol;
       
    89 
       
    90 /** Media session types */
       
    91 typedef enum {
       
    92 	PURPLE_MEDIA_NONE	= 0,
       
    93 	PURPLE_MEDIA_RECV_AUDIO = 1 << 0,
       
    94 	PURPLE_MEDIA_SEND_AUDIO = 1 << 1,
       
    95 	PURPLE_MEDIA_RECV_VIDEO = 1 << 2,
       
    96 	PURPLE_MEDIA_SEND_VIDEO = 1 << 3,
       
    97 	PURPLE_MEDIA_RECV_APPLICATION = 1 << 4,
       
    98 	PURPLE_MEDIA_SEND_APPLICATION = 1 << 5,
       
    99 	PURPLE_MEDIA_AUDIO = PURPLE_MEDIA_RECV_AUDIO | PURPLE_MEDIA_SEND_AUDIO,
       
   100 	PURPLE_MEDIA_VIDEO = PURPLE_MEDIA_RECV_VIDEO | PURPLE_MEDIA_SEND_VIDEO,
       
   101 	PURPLE_MEDIA_APPLICATION = PURPLE_MEDIA_RECV_APPLICATION |
       
   102                                    PURPLE_MEDIA_SEND_APPLICATION
       
   103 } PurpleMediaSessionType;
       
   104 
       
   105 /** Media state-changed types */
       
   106 typedef enum {
       
   107 	PURPLE_MEDIA_STATE_NEW = 0,
       
   108 	PURPLE_MEDIA_STATE_CONNECTED,
       
   109 	PURPLE_MEDIA_STATE_END
       
   110 } PurpleMediaState;
       
   111 
       
   112 /**
       
   113  * Gets the media candidate type's GType
       
   114  *
       
   115  * @return The media candidate type's GType.
       
   116  *
       
   117  * @since 2.6.0
       
   118  */
       
   119 GType purple_media_candidate_type_get_type(void);
       
   120 
       
   121 /**
       
   122  * Gets the type of the media caps flags
       
   123  *
       
   124  * @return The media caps flags' GType
       
   125  *
       
   126  * @since 2.7.0
       
   127  */
       
   128 GType purple_media_caps_get_type(void);
       
   129 
       
   130 /**
       
   131  * Gets the type of the info type enum
       
   132  *
       
   133  * @return The info type enum's GType
       
   134  *
       
   135  * @since 2.6.0
       
   136  */
       
   137 GType purple_media_info_type_get_type(void);
       
   138 
       
   139 /**
       
   140  * Gets the media network protocol's GType
       
   141  *
       
   142  * @return The media network protocol's GType.
       
   143  *
       
   144  * @since 2.6.0
       
   145  */
       
   146 GType purple_media_network_protocol_get_type(void);
       
   147 
       
   148 /**
       
   149  * Gets the media session type's GType
       
   150  *
       
   151  * @return The media session type's GType.
       
   152  *
       
   153  * @since 2.6.0
       
   154  */
       
   155 GType purple_media_session_type_get_type(void);
       
   156 
       
   157 /**
       
   158  * Gets the type of the state-changed enum
       
   159  *
       
   160  * @return The state-changed enum's GType
       
   161  *
       
   162  * @since 2.6.0
       
   163  */
       
   164 GType purple_media_state_changed_get_type(void);
       
   165 
       
   166 G_END_DECLS
       
   167 
       
   168 #endif  /* _PURPLE_MEDIA_ENUM_TYPES_ */