diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2012-02-17 19:07:19 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2012-02-23 12:46:25 +0000 |
commit | d88193074f1f1d9f4d618932821dbab36a474182 (patch) | |
tree | c2e0c3d7005eb58afed74a807888d69eadcdb5fc /src | |
parent | ac9ee4a66f56f8c033f150eb5c8a4a9999e475e3 (diff) |
Move Jingle enums and typedefs to a new jingle-types.h
For some reason the enums lived in jingle-factory.h before.
We do need a separate header for the typedefs because some of the Jingle
headers are mutually dependent.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/call-stream.h | 3 | ||||
-rw-r--r-- | src/jingle-content.h | 3 | ||||
-rw-r--r-- | src/jingle-factory.h | 94 | ||||
-rw-r--r-- | src/jingle-media-rtp.h | 2 | ||||
-rw-r--r-- | src/jingle-mint.h | 2 | ||||
-rw-r--r-- | src/jingle-session.h | 2 | ||||
-rw-r--r-- | src/jingle-share.h | 2 | ||||
-rw-r--r-- | src/jingle-transport-google.h | 2 | ||||
-rw-r--r-- | src/jingle-transport-iceudp.h | 2 | ||||
-rw-r--r-- | src/jingle-transport-iface.h | 2 | ||||
-rw-r--r-- | src/jingle-transport-rawudp.h | 2 | ||||
-rw-r--r-- | src/jingle-types.h | 126 | ||||
-rw-r--r-- | src/media-stream.h | 2 | ||||
-rw-r--r-- | src/muc-factory.h | 1 | ||||
-rw-r--r-- | src/types.h | 11 |
16 files changed, 144 insertions, 115 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 8e64ec00a..9205def7f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -115,6 +115,7 @@ libgabble_convenience_la_SOURCES = \ jingle-transport-iceudp.c \ jingle-transport-iface.h \ jingle-transport-iface.c \ + jingle-types.h \ legacy-caps.h \ legacy-caps.c \ media-channel.h \ @@ -201,7 +202,7 @@ endif enumtype_sources = \ $(top_srcdir)/src/connection.h \ - $(top_srcdir)/src/jingle-factory.h \ + $(top_srcdir)/src/jingle-types.h \ $(top_srcdir)/src/room-config.h \ $(top_srcdir)/src/presence.h diff --git a/src/call-stream.h b/src/call-stream.h index 23b7fc8fa..ed8bb767f 100644 --- a/src/call-stream.h +++ b/src/call-stream.h @@ -24,7 +24,8 @@ #include <glib-object.h> #include <telepathy-glib/base-media-call-stream.h> -#include "types.h" + +#include "jingle-types.h" G_BEGIN_DECLS diff --git a/src/jingle-content.h b/src/jingle-content.h index d85eb7e67..1c337efb5 100644 --- a/src/jingle-content.h +++ b/src/jingle-content.h @@ -21,9 +21,10 @@ #define __JINGLE_CONTENT_H__ #include <glib-object.h> -#include "types.h" + #include "jingle-factory.h" #include "jingle-transport-iface.h" +#include "jingle-types.h" G_BEGIN_DECLS diff --git a/src/jingle-factory.h b/src/jingle-factory.h index b24ba3242..cb150c1b8 100644 --- a/src/jingle-factory.h +++ b/src/jingle-factory.h @@ -22,103 +22,11 @@ #include <glib-object.h> -#include "types.h" #include "jingle-info.h" +#include "jingle-types.h" G_BEGIN_DECLS -typedef enum { /*< skip >*/ - /* not a jingle message */ - JINGLE_DIALECT_ERROR, - /* old libjingle3 gtalk variant */ - JINGLE_DIALECT_GTALK3, - /* new gtalk variant */ - JINGLE_DIALECT_GTALK4, - /* jingle in the old 0.15 version days */ - JINGLE_DIALECT_V015, - /* current jingle standard */ - JINGLE_DIALECT_V032 -} JingleDialect; - -#define JINGLE_IS_GOOGLE_DIALECT(d)\ - ((d == JINGLE_DIALECT_GTALK3) || (d == JINGLE_DIALECT_GTALK4)) - -typedef enum { /*< skip >*/ - JINGLE_STATE_INVALID = -1, - JINGLE_STATE_PENDING_CREATED = 0, - JINGLE_STATE_PENDING_INITIATE_SENT, - JINGLE_STATE_PENDING_INITIATED, - JINGLE_STATE_PENDING_ACCEPT_SENT, - JINGLE_STATE_ACTIVE, - JINGLE_STATE_ENDED, - MAX_JINGLE_STATES -} JingleState; - -typedef enum { /*< skip >*/ - JINGLE_ACTION_UNKNOWN, - JINGLE_ACTION_CONTENT_ACCEPT, - JINGLE_ACTION_CONTENT_ADD, - JINGLE_ACTION_CONTENT_MODIFY, - JINGLE_ACTION_CONTENT_REMOVE, - JINGLE_ACTION_CONTENT_REPLACE, - JINGLE_ACTION_CONTENT_REJECT, - JINGLE_ACTION_SESSION_ACCEPT, - JINGLE_ACTION_SESSION_INFO, - JINGLE_ACTION_SESSION_INITIATE, - JINGLE_ACTION_SESSION_TERMINATE, - JINGLE_ACTION_TRANSPORT_INFO, - JINGLE_ACTION_TRANSPORT_ACCEPT, - JINGLE_ACTION_DESCRIPTION_INFO, - JINGLE_ACTION_INFO -} JingleAction; - -typedef enum { /*< skip >*/ - JINGLE_CONTENT_SENDERS_NONE, - JINGLE_CONTENT_SENDERS_INITIATOR, - JINGLE_CONTENT_SENDERS_RESPONDER, - JINGLE_CONTENT_SENDERS_BOTH -} JingleContentSenders; - -typedef enum { /*< skip >*/ - JINGLE_TRANSPORT_UNKNOWN, - JINGLE_TRANSPORT_GOOGLE_P2P, - JINGLE_TRANSPORT_RAW_UDP, - JINGLE_TRANSPORT_ICE_UDP, -} JingleTransportType; - -typedef enum { /*< skip >*/ - JINGLE_TRANSPORT_PROTOCOL_UDP, - JINGLE_TRANSPORT_PROTOCOL_TCP -} JingleTransportProtocol; - -typedef enum { /*< skip >*/ - JINGLE_CANDIDATE_TYPE_LOCAL, - JINGLE_CANDIDATE_TYPE_STUN, - JINGLE_CANDIDATE_TYPE_RELAY -} JingleCandidateType; - -typedef enum -{ - JINGLE_REASON_UNKNOWN, - JINGLE_REASON_ALTERNATIVE_SESSION, - JINGLE_REASON_BUSY, - JINGLE_REASON_CANCEL, - JINGLE_REASON_CONNECTIVITY_ERROR, - JINGLE_REASON_DECLINE, - JINGLE_REASON_EXPIRED, - JINGLE_REASON_FAILED_APPLICATION, - JINGLE_REASON_FAILED_TRANSPORT, - JINGLE_REASON_GENERAL_ERROR, - JINGLE_REASON_GONE, - JINGLE_REASON_INCOMPATIBLE_PARAMETERS, - JINGLE_REASON_MEDIA_ERROR, - JINGLE_REASON_SECURITY_ERROR, - JINGLE_REASON_SUCCESS, - JINGLE_REASON_TIMEOUT, - JINGLE_REASON_UNSUPPORTED_APPLICATIONS, - JINGLE_REASON_UNSUPPORTED_TRANSPORTS -} JingleReason; - typedef struct _GabbleJingleFactoryClass GabbleJingleFactoryClass; GType gabble_jingle_factory_get_type (void); diff --git a/src/jingle-media-rtp.h b/src/jingle-media-rtp.h index 9bcb8f4d4..d904c8c10 100644 --- a/src/jingle-media-rtp.h +++ b/src/jingle-media-rtp.h @@ -21,9 +21,9 @@ #define __JINGLE_MEDIA_RTP_H__ #include <glib-object.h> -#include "types.h" #include "jingle-content.h" +#include "jingle-types.h" G_BEGIN_DECLS diff --git a/src/jingle-mint.h b/src/jingle-mint.h index 2c8656233..90b52270a 100644 --- a/src/jingle-mint.h +++ b/src/jingle-mint.h @@ -22,7 +22,9 @@ #include <glib-object.h> #include "types.h" + #include "jingle-info.h" +#include "jingle-types.h" typedef struct _GabbleJingleMint GabbleJingleMint; typedef struct _GabbleJingleMintClass GabbleJingleMintClass; diff --git a/src/jingle-session.h b/src/jingle-session.h index 8b3f6ea0c..92a244d71 100644 --- a/src/jingle-session.h +++ b/src/jingle-session.h @@ -25,7 +25,7 @@ #include "jingle-content.h" #include "jingle-factory.h" -#include "types.h" +#include "jingle-types.h" G_BEGIN_DECLS diff --git a/src/jingle-share.h b/src/jingle-share.h index 1a4ac64d8..27d1ecce8 100644 --- a/src/jingle-share.h +++ b/src/jingle-share.h @@ -21,9 +21,9 @@ #define __JINGLE_SHARE_H__ #include <glib-object.h> -#include "types.h" #include "jingle-content.h" +#include "jingle-types.h" G_BEGIN_DECLS diff --git a/src/jingle-transport-google.h b/src/jingle-transport-google.h index 441509330..bfab8f0fb 100644 --- a/src/jingle-transport-google.h +++ b/src/jingle-transport-google.h @@ -22,7 +22,7 @@ #include <glib-object.h> -#include "types.h" +#include "jingle-types.h" G_BEGIN_DECLS diff --git a/src/jingle-transport-iceudp.h b/src/jingle-transport-iceudp.h index 7d9c77e66..8f7324371 100644 --- a/src/jingle-transport-iceudp.h +++ b/src/jingle-transport-iceudp.h @@ -22,7 +22,7 @@ #include <glib-object.h> -#include "types.h" +#include "jingle-types.h" G_BEGIN_DECLS diff --git a/src/jingle-transport-iface.h b/src/jingle-transport-iface.h index bc6253ad9..dc59d5394 100644 --- a/src/jingle-transport-iface.h +++ b/src/jingle-transport-iface.h @@ -24,7 +24,7 @@ #include <wocky/wocky.h> #include "jingle-factory.h" -#include "types.h" +#include "jingle-types.h" G_BEGIN_DECLS diff --git a/src/jingle-transport-rawudp.h b/src/jingle-transport-rawudp.h index e638e8380..060f854dc 100644 --- a/src/jingle-transport-rawudp.h +++ b/src/jingle-transport-rawudp.h @@ -22,7 +22,7 @@ #include <glib-object.h> -#include "types.h" +#include "jingle-types.h" G_BEGIN_DECLS diff --git a/src/jingle-types.h b/src/jingle-types.h new file mode 100644 index 000000000..14934aae6 --- /dev/null +++ b/src/jingle-types.h @@ -0,0 +1,126 @@ +/* + * jingle-types.h - Header for Jingle-related enums and typedefs + * Copyright © 2008–2012 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef GABBLE_JINGLE_ENUMS_H +#define GABBLE_JINGLE_ENUMS_H + +typedef struct _GabbleJingleFactory GabbleJingleFactory; +typedef struct _GabbleJingleSession GabbleJingleSession; +typedef struct _GabbleJingleContent GabbleJingleContent; +typedef struct _GabbleJingleTransportGoogle GabbleJingleTransportGoogle; +typedef struct _GabbleJingleTransportRawUdp GabbleJingleTransportRawUdp; +typedef struct _GabbleJingleTransportIceUdp GabbleJingleTransportIceUdp; +typedef struct _GabbleJingleMediaRtp GabbleJingleMediaRtp; +typedef struct _GabbleJingleShare GabbleJingleShare; +typedef struct _JingleCandidate JingleCandidate; + +typedef enum { /*< skip >*/ + /* not a jingle message */ + JINGLE_DIALECT_ERROR, + /* old libjingle3 gtalk variant */ + JINGLE_DIALECT_GTALK3, + /* new gtalk variant */ + JINGLE_DIALECT_GTALK4, + /* jingle in the old 0.15 version days */ + JINGLE_DIALECT_V015, + /* current jingle standard */ + JINGLE_DIALECT_V032 +} JingleDialect; + +#define JINGLE_IS_GOOGLE_DIALECT(d)\ + ((d == JINGLE_DIALECT_GTALK3) || (d == JINGLE_DIALECT_GTALK4)) + +typedef enum { /*< skip >*/ + JINGLE_STATE_INVALID = -1, + JINGLE_STATE_PENDING_CREATED = 0, + JINGLE_STATE_PENDING_INITIATE_SENT, + JINGLE_STATE_PENDING_INITIATED, + JINGLE_STATE_PENDING_ACCEPT_SENT, + JINGLE_STATE_ACTIVE, + JINGLE_STATE_ENDED, + MAX_JINGLE_STATES +} JingleState; + +typedef enum { /*< skip >*/ + JINGLE_ACTION_UNKNOWN, + JINGLE_ACTION_CONTENT_ACCEPT, + JINGLE_ACTION_CONTENT_ADD, + JINGLE_ACTION_CONTENT_MODIFY, + JINGLE_ACTION_CONTENT_REMOVE, + JINGLE_ACTION_CONTENT_REPLACE, + JINGLE_ACTION_CONTENT_REJECT, + JINGLE_ACTION_SESSION_ACCEPT, + JINGLE_ACTION_SESSION_INFO, + JINGLE_ACTION_SESSION_INITIATE, + JINGLE_ACTION_SESSION_TERMINATE, + JINGLE_ACTION_TRANSPORT_INFO, + JINGLE_ACTION_TRANSPORT_ACCEPT, + JINGLE_ACTION_DESCRIPTION_INFO, + JINGLE_ACTION_INFO +} JingleAction; + +typedef enum { /*< skip >*/ + JINGLE_CONTENT_SENDERS_NONE, + JINGLE_CONTENT_SENDERS_INITIATOR, + JINGLE_CONTENT_SENDERS_RESPONDER, + JINGLE_CONTENT_SENDERS_BOTH +} JingleContentSenders; + +typedef enum { /*< skip >*/ + JINGLE_TRANSPORT_UNKNOWN, + JINGLE_TRANSPORT_GOOGLE_P2P, + JINGLE_TRANSPORT_RAW_UDP, + JINGLE_TRANSPORT_ICE_UDP, +} JingleTransportType; + +typedef enum { /*< skip >*/ + JINGLE_TRANSPORT_PROTOCOL_UDP, + JINGLE_TRANSPORT_PROTOCOL_TCP +} JingleTransportProtocol; + +typedef enum { /*< skip >*/ + JINGLE_CANDIDATE_TYPE_LOCAL, + JINGLE_CANDIDATE_TYPE_STUN, + JINGLE_CANDIDATE_TYPE_RELAY +} JingleCandidateType; + +typedef enum +{ + JINGLE_REASON_UNKNOWN, + JINGLE_REASON_ALTERNATIVE_SESSION, + JINGLE_REASON_BUSY, + JINGLE_REASON_CANCEL, + JINGLE_REASON_CONNECTIVITY_ERROR, + JINGLE_REASON_DECLINE, + JINGLE_REASON_EXPIRED, + JINGLE_REASON_FAILED_APPLICATION, + JINGLE_REASON_FAILED_TRANSPORT, + JINGLE_REASON_GENERAL_ERROR, + JINGLE_REASON_GONE, + JINGLE_REASON_INCOMPATIBLE_PARAMETERS, + JINGLE_REASON_MEDIA_ERROR, + JINGLE_REASON_SECURITY_ERROR, + JINGLE_REASON_SUCCESS, + JINGLE_REASON_TIMEOUT, + JINGLE_REASON_UNSUPPORTED_APPLICATIONS, + JINGLE_REASON_UNSUPPORTED_TRANSPORTS +} JingleReason; + + +#endif /* GABBLE_JINGLE_ENUMS_H */ diff --git a/src/media-stream.h b/src/media-stream.h index 5d6edc220..c8c50929a 100644 --- a/src/media-stream.h +++ b/src/media-stream.h @@ -23,7 +23,7 @@ #include <glib-object.h> -#include "types.h" +#include "jingle-types.h" #include <telepathy-glib/dbus.h> #include <telepathy-glib/dtmf.h> #include <telepathy-glib/enums.h> diff --git a/src/muc-factory.h b/src/muc-factory.h index 3707043da..a6848af9a 100644 --- a/src/muc-factory.h +++ b/src/muc-factory.h @@ -24,6 +24,7 @@ #include <wocky/wocky.h> #include "bytestream-iface.h" +#include "jingle-types.h" #include "types.h" G_BEGIN_DECLS diff --git a/src/types.h b/src/types.h index 2a459d006..597f7d1f1 100644 --- a/src/types.h +++ b/src/types.h @@ -43,20 +43,9 @@ typedef struct _GabbleRequestPipeline GabbleRequestPipeline; typedef struct _GabbleTubesChannel GabbleTubesChannel; -typedef struct _GabbleJingleFactory GabbleJingleFactory; -typedef struct _GabbleJingleSession GabbleJingleSession; -typedef struct _GabbleJingleContent GabbleJingleContent; -typedef struct _GabbleJingleTransportGoogle GabbleJingleTransportGoogle; -typedef struct _GabbleJingleTransportRawUdp GabbleJingleTransportRawUdp; -typedef struct _GabbleJingleTransportIceUdp GabbleJingleTransportIceUdp; -typedef struct _GabbleJingleMediaRtp GabbleJingleMediaRtp; -typedef struct _GabbleJingleShare GabbleJingleShare; - typedef struct _GabbleCallMember GabbleCallMember; typedef struct _GabbleCallMemberContent GabbleCallMemberContent; -typedef struct _JingleCandidate JingleCandidate; - struct _GabbleDiscoIdentity { gchar *category; |