pidgin/pidgin

Add 'symbol_name:' to doc comments in libpurple/media/*.h
soc.2013.gobjectification.plugins
2014-01-29, Ankit Vani
9b6661893d92
Parents 8e2b68c79fa1
Children da82f59c6787
Add 'symbol_name:' to doc comments in libpurple/media/*.h
--- a/libpurple/media/backend-fs2.h Wed Jan 29 05:28:33 2014 +0530
+++ b/libpurple/media/backend-fs2.h Wed Jan 29 05:29:11 2014 +0530
@@ -43,10 +43,16 @@
#define PURPLE_MEDIA_BACKEND_FS2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_BACKEND_FS2, PurpleMediaBackendFs2))
#define PURPLE_MEDIA_BACKEND_FS2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_BACKEND_FS2, PurpleMediaBackendFs2))
-/** An opaque structure representing the Farsight 2 media backend. */
+/**
+ * PurpleMediaBackendFs2:
+ *
+ * An opaque structure representing the Farsight 2 media backend.
+ */
typedef struct _PurpleMediaBackendFs2 PurpleMediaBackendFs2;
/**
+ * purple_media_backend_fs2_get_type:
+ *
* Gets the type of the Farsight 2 media backend object.
*
* Returns: The Farsight 2 media backend's GType
--- a/libpurple/media/backend-iface.h Wed Jan 29 05:28:33 2014 +0530
+++ b/libpurple/media/backend-iface.h Wed Jan 29 05:29:11 2014 +0530
@@ -39,9 +39,18 @@
#define PURPLE_MEDIA_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_MEDIA_BACKEND, PurpleMediaBackend))
#define PURPLE_MEDIA_BACKEND_GET_INTERFACE(inst)(G_TYPE_INSTANCE_GET_INTERFACE((inst), PURPLE_TYPE_MEDIA_BACKEND, PurpleMediaBackendIface))
-/** A placeholder to represent any media backend */
+/**
+ * PurpleMediaBackend:
+ *
+ * A placeholder to represent any media backend
+ */
typedef struct _PurpleMediaBackend PurpleMediaBackend;
-/** A structure to derive media backends from. */
+
+/**
+ * PurpleMediaBackendIface:
+ *
+ * A structure to derive media backends from.
+ */
typedef struct _PurpleMediaBackendIface PurpleMediaBackendIface;
struct _PurpleMediaBackendIface
@@ -74,6 +83,8 @@
};
/**
+ * purple_media_backend_get_type:
+ *
* Gets the media backend's GType.
*
* Returns: The media backend's GType.
@@ -81,8 +92,7 @@
GType purple_media_backend_get_type(void);
/**
- * Creates and adds a stream to the media backend.
- *
+ * purple_media_backend_add_stream:
* @self: The backend to add the stream to.
* @sess_id: The session id of the stream to add.
* @who: The remote participant of the stream to add.
@@ -92,6 +102,8 @@
* @num_params: The number of parameters in the param parameter.
* @params: The additional parameters to pass when creating the stream.
*
+ * Creates and adds a stream to the media backend.
+ *
* Returns: True if the stream was successfully created, othewise False.
*/
gboolean purple_media_backend_add_stream(PurpleMediaBackend *self,
@@ -101,65 +113,70 @@
guint num_params, GParameter *params);
/**
- * Add remote candidates to a stream.
- *
+ * purple_media_backend_add_remote_candidates:
* @self: The backend the stream is in.
* @sess_id: The session id associated with the stream.
* @participant: The participant associated with the stream.
* @remote_candidates: The list of remote candidates to add.
+ *
+ * Add remote candidates to a stream.
*/
void purple_media_backend_add_remote_candidates(PurpleMediaBackend *self,
const gchar *sess_id, const gchar *participant,
GList *remote_candidates);
/**
+ * purple_media_backend_codecs_ready:
+ * @self: The media backend the session is in.
+ * @sess_id: The session id of the session to check.
+ *
* Get whether or not a session's codecs are ready.
*
* A codec is ready if all of the attributes and additional
* parameters have been collected.
*
- * @self: The media backend the session is in.
- * @sess_id: The session id of the session to check.
- *
* Returns: True if the codecs are ready, otherwise False.
*/
gboolean purple_media_backend_codecs_ready(PurpleMediaBackend *self,
const gchar *sess_id);
/**
+ * purple_media_backend_get_codecs:
+ * @self: The media backend the session is in.
+ * @sess_id: The session id of the session to use.
+ *
* Gets the codec intersection list for a session.
*
* The intersection list consists of all codecs that are compatible
* between the local and remote software.
*
- * @self: The media backend the session is in.
- * @sess_id: The session id of the session to use.
- *
* Returns: The codec intersection list.
*/
GList *purple_media_backend_get_codecs(PurpleMediaBackend *self,
const gchar *sess_id);
/**
- * Gets the list of local candidates for a stream.
- *
+ * purple_media_backend_get_local_candidates:
* @self: The media backend the stream is in.
* @sess_id: The session id associated with the stream.
* @particilant: The participant associated with the stream.
*
+ * Gets the list of local candidates for a stream.
+ *
* Returns: The list of local candidates.
*/
GList *purple_media_backend_get_local_candidates(PurpleMediaBackend *self,
const gchar *sess_id, const gchar *participant);
/**
- * Sets the remote codecs on a stream.
- *
+ * purple_media_backend_set_remote_codecs:
* @self: The media backend the stream is in.
* @sess_id: The session id the stream is associated with.
* @participant: The participant the stream is associated with.
* @codecs: The list of remote codecs to set.
*
+ * Sets the remote codecs on a stream.
+ *
* Returns: True if the remote codecs were set successfully, otherwise False.
*/
gboolean purple_media_backend_set_remote_codecs(PurpleMediaBackend *self,
@@ -167,34 +184,36 @@
GList *codecs);
/**
- * Sets which codec format to send media content in for a session.
- *
+ * purple_media_backend_set_send_codec:
* @self: The media backend the session is in.
* @sess_id: The session id of the session to set the codec for.
* @codec: The codec to set.
*
+ * Sets which codec format to send media content in for a session.
+ *
* Returns: True if set successfully, otherwise False.
*/
gboolean purple_media_backend_set_send_codec(PurpleMediaBackend *self,
const gchar *sess_id, PurpleMediaCodec *codec);
/**
- * Sets various optional parameters of the media backend.
- *
+ * purple_media_backend_set_params:
* @self: The media backend to set the parameters on.
* @num_params: The number of parameters to pass to backend
* @params: Array of @c GParameter to pass to backend
+ *
+ * Sets various optional parameters of the media backend.
*/
void purple_media_backend_set_params(PurpleMediaBackend *self,
guint num_params, GParameter *params);
/**
+ * purple_media_backend_get_available_params:
+ * @self: The media backend
+ *
* Gets the list of optional parameters supported by the media backend.
- *
* The list should NOT be freed.
*
- * @self: The media backend
- *
* Returns: NULL-terminated array of names of supported parameters.
*/
const gchar **purple_media_backend_get_available_params(PurpleMediaBackend *self);
--- a/libpurple/media/candidate.h Wed Jan 29 05:28:33 2014 +0530
+++ b/libpurple/media/candidate.h Wed Jan 29 05:29:11 2014 +0530
@@ -40,10 +40,17 @@
#define PURPLE_MEDIA_CANDIDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate))
#define PURPLE_MEDIA_CANDIDATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_CANDIDATE, PurpleMediaCandidate))
-/** An opaque structure representing a network candidate (IP Address and port pair). */
+/**
+ * PurpleMediaCandidate:
+ *
+ * An opaque structure representing a network candidate (IP Address and port
+ * pair).
+ */
typedef struct _PurpleMediaCandidate PurpleMediaCandidate;
/**
+ * purple_media_candidate_get_type:
+ *
* Gets the type of the media candidate structure.
*
* Returns: The media canditate's GType
@@ -51,8 +58,7 @@
GType purple_media_candidate_get_type(void);
/**
- * Creates a PurpleMediaCandidate instance.
- *
+ * purple_media_candidate_new:
* @foundation: The foundation of the candidate.
* @component_id: The component this candidate is for.
* @type: The type of candidate.
@@ -60,6 +66,8 @@
* @ip: The IP address of this component.
* @port: The network port.
*
+ * Creates a PurpleMediaCandidate instance.
+ *
* Returns: The newly created PurpleMediaCandidate instance.
*/
PurpleMediaCandidate *purple_media_candidate_new(
@@ -69,9 +77,10 @@
const gchar *ip, guint port);
/**
- * Copies a PurpleMediaCandidate.
+ * purple_media_candidate_copy:
+ * @candidate: The candidate to copy.
*
- * @candidate: The candidate to copy.
+ * Copies a PurpleMediaCandidate.
*
* Returns: The copy of the PurpleMediaCandidate.
*/
@@ -79,83 +88,90 @@
PurpleMediaCandidate *candidate);
/**
- * Copies a GList of PurpleMediaCandidate and its contents.
+ * purple_media_candidate_list_copy:
+ * @candidates: The list of candidates to be copied.
*
- * @candidates: The list of candidates to be copied.
+ * Copies a GList of PurpleMediaCandidate and its contents.
*
* Returns: The copy of the GList.
*/
GList *purple_media_candidate_list_copy(GList *candidates);
/**
- * Frees a GList of PurpleMediaCandidate and its contents.
+ * purple_media_candidate_list_free:
+ * @candidates: The list of candidates to be freed.
*
- * @candidates: The list of candidates to be freed.
+ * Frees a GList of PurpleMediaCandidate and its contents.
*/
void purple_media_candidate_list_free(GList *candidates);
/**
- * Gets the foundation (identifier) from the candidate.
+ * purple_media_candidate_get_foundation:
+ * @candidate: The candidate to get the foundation from.
*
- * @candidate: The candidate to get the foundation from.
+ * Gets the foundation (identifier) from the candidate.
*
* Returns: The foundation.
*/
gchar *purple_media_candidate_get_foundation(PurpleMediaCandidate *candidate);
/**
- * Gets the component id (rtp or rtcp)
+ * purple_media_candidate_get_component_id:
+ * @candidate: The candidate to get the compnent id from.
*
- * @candidate: The candidate to get the compnent id from.
+ * Gets the component id (rtp or rtcp)
*
* Returns: The component id.
*/
guint purple_media_candidate_get_component_id(PurpleMediaCandidate *candidate);
/**
- * Gets the IP address.
+ * purple_media_candidate_get_ip:
+ * @candidate: The candidate to get the IP address from.
*
- * @candidate: The candidate to get the IP address from.
+ * Gets the IP address.
*
* Returns: The IP address.
*/
gchar *purple_media_candidate_get_ip(PurpleMediaCandidate *candidate);
/**
- * Gets the port.
+ * purple_media_candidate_get_port:
+ * @candidate: The candidate to get the port from.
*
- * @candidate: The candidate to get the port from.
+ * Gets the port.
*
* Returns: The port.
*/
guint16 purple_media_candidate_get_port(PurpleMediaCandidate *candidate);
/**
+ * purple_media_candidate_get_base_ip:
+ * @candidate: The candidate to get the base IP address from.
+ *
* Gets the base (internal) IP address.
- *
* This can be NULL.
*
- * @candidate: The candidate to get the base IP address from.
- *
* Returns: The base IP address.
*/
gchar *purple_media_candidate_get_base_ip(PurpleMediaCandidate *candidate);
/**
+ * purple_media_candidate_get_base_port:
+ * @candidate: The candidate to get the base port.
+ *
* Gets the base (internal) port.
- *
* Invalid if the base IP is NULL.
*
- * @candidate: The candidate to get the base port.
- *
* Returns: The base port.
*/
guint16 purple_media_candidate_get_base_port(PurpleMediaCandidate *candidate);
/**
- * Gets the protocol (TCP or UDP).
+ * purple_media_candidate_get_protocol:
+ * @candidate: The candidate to get the protocol from.
*
- * @candidate: The candidate to get the protocol from.
+ * Gets the protocol (TCP or UDP).
*
* Returns: The protocol.
*/
@@ -163,18 +179,20 @@
PurpleMediaCandidate *candidate);
/**
- * Gets the priority.
+ * purple_media_candidate_get_priority:
+ * @candidate: The candidate to get the priority from.
*
- * @candidate: The candidate to get the priority from.
+ * Gets the priority.
*
* Returns: The priority.
*/
guint32 purple_media_candidate_get_priority(PurpleMediaCandidate *candidate);
/**
- * Gets the candidate type.
+ * purple_media_candidate_get_candidate_type:
+ * @candidate: The candidate to get the candidate type from.
*
- * @candidate: The candidate to get the candidate type from.
+ * Gets the candidate type.
*
* Returns: The candidate type.
*/
@@ -182,31 +200,33 @@
PurpleMediaCandidate *candidate);
/**
+ * purple_media_candidate_get_username:
+ * @candidate: The candidate to get the username from.
+ *
* Gets the username.
- *
* This can be NULL. It depends on the transmission type.
*
- * @The: candidate to get the username from.
- *
* Returns: The username.
*/
gchar *purple_media_candidate_get_username(PurpleMediaCandidate *candidate);
/**
+ * purple_media_candidate_get_password:
+ * @candidate: The candidate to get the password from.
+ *
* Gets the password.
*
* This can be NULL. It depends on the transmission type.
*
- * @The: candidate to get the password from.
- *
* Returns: The password.
*/
gchar *purple_media_candidate_get_password(PurpleMediaCandidate *candidate);
/**
- * Gets the TTL.
+ * purple_media_candidate_get_ttl:
+ * @candidate: The candidate to get the TTL from.
*
- * @The: candidate to get the TTL from.
+ * Gets the TTL.
*
* Returns: The TTL.
*/
--- a/libpurple/media/codec.h Wed Jan 29 05:28:33 2014 +0530
+++ b/libpurple/media/codec.h Wed Jan 29 05:29:11 2014 +0530
@@ -29,7 +29,11 @@
#include "enum-types.h"
-/** An opaque structure representing an audio or video codec. */
+/**
+ * PurpleMediaCodec:
+ *
+ * An opaque structure representing an audio or video codec.
+ */
typedef struct _PurpleMediaCodec PurpleMediaCodec;
#include "../util.h"
@@ -47,6 +51,8 @@
/**
+ * purple_media_codec_get_type:
+ *
* Gets the type of the media codec structure.
*
* Returns: The media codec's GType
@@ -54,92 +60,101 @@
GType purple_media_codec_get_type(void);
/**
- * Creates a new PurpleMediaCodec instance.
- *
+ * purple_media_codec_new:
* @id: Codec identifier.
* @encoding_name: Name of the media type this encodes.
* @media_type: PurpleMediaSessionType of this codec.
* @clock_rate: The clock rate this codec encodes at, if applicable.
*
+ * Creates a new PurpleMediaCodec instance.
+ *
* Returns: The newly created PurpleMediaCodec.
*/
PurpleMediaCodec *purple_media_codec_new(int id, const char *encoding_name,
PurpleMediaSessionType media_type, guint clock_rate);
/**
- * Gets the codec id.
+ * purple_media_codec_get_id:
+ * @codec: The codec to get the id from.
*
- * @The: codec to get the id from.
+ * Gets the codec id.
*
* Returns: The codec id.
*/
guint purple_media_codec_get_id(PurpleMediaCodec *codec);
/**
- * Gets the encoding name.
+ * purple_media_codec_get_encoding_name:
+ * @codec: The codec to get the encoding name from.
*
- * @The: codec to get the encoding name from.
+ * Gets the encoding name.
*
* Returns: The encoding name.
*/
gchar *purple_media_codec_get_encoding_name(PurpleMediaCodec *codec);
/**
- * Gets the clock rate.
+ * purple_media_codec_get_clock_rate:
+ * @codec: The codec to get the clock rate from.
*
- * @The: codec to get the clock rate from.
+ * Gets the clock rate.
*
* Returns: The clock rate.
*/
guint purple_media_codec_get_clock_rate(PurpleMediaCodec *codec);
/**
- * Gets the number of channels.
+ * purple_media_codec_get_channels:
+ * @codec: The codec to get the number of channels from.
*
- * @The: codec to get the number of channels from.
+ * Gets the number of channels.
*
* Returns: The number of channels.
*/
guint purple_media_codec_get_channels(PurpleMediaCodec *codec);
/**
+ * purple_media_codec_get_optional_parameters:
+ * @codec: The codec to get the optional parameters from.
+ *
* Gets a list of the optional parameters.
*
* The list consists of PurpleKeyValuePair's.
*
- * @The: codec to get the optional parameters from.
- *
* Returns: The list of optional parameters. The list is owned by the codec and
* should not be freed.
*/
GList *purple_media_codec_get_optional_parameters(PurpleMediaCodec *codec);
/**
- * Adds an optional parameter to the codec.
- *
+ * purple_media_codec_add_optional_parameter:
* @codec: The codec to add the parameter to.
* @name: The name of the parameter to add.
* @value: The value of the parameter to add.
+ *
+ * Adds an optional parameter to the codec.
*/
void purple_media_codec_add_optional_parameter(PurpleMediaCodec *codec,
const gchar *name, const gchar *value);
/**
- * Removes an optional parameter from the codec.
- *
+ * purple_media_codec_remove_optional_parameter:
* @codec: The codec to remove the parameter from.
* @param: A pointer to the parameter to remove.
+ *
+ * Removes an optional parameter from the codec.
*/
void purple_media_codec_remove_optional_parameter(PurpleMediaCodec *codec,
PurpleKeyValuePair *param);
/**
- * Gets an optional parameter based on the values given.
- *
+ * purple_media_codec_get_optional_parameter:
* @codec: The codec to find the parameter in.
* @name: The name of the parameter to search for.
* @value: The value to search for or NULL.
*
+ * Gets an optional parameter based on the values given.
+ *
* Returns: The value found or NULL.
*/
PurpleKeyValuePair *purple_media_codec_get_optional_parameter(
@@ -147,34 +162,38 @@
const gchar *value);
/**
- * Copies a PurpleMediaCodec object.
+ * purple_media_codec_copy:
+ * @codec: The codec to copy.
*
- * @codec: The codec to copy.
+ * Copies a PurpleMediaCodec object.
*
* Returns: The copy of the codec.
*/
PurpleMediaCodec *purple_media_codec_copy(PurpleMediaCodec *codec);
/**
- * Copies a GList of PurpleMediaCodec and its contents.
+ * purple_media_codec_list_copy:
+ * @codecs: The list of codecs to be copied.
*
- * @codecs: The list of codecs to be copied.
+ * Copies a GList of PurpleMediaCodec and its contents.
*
* Returns: The copy of the GList.
*/
GList *purple_media_codec_list_copy(GList *codecs);
/**
- * Frees a GList of PurpleMediaCodec and its contents.
+ * purple_media_codec_list_free:
+ * @codecs: The list of codecs to be freed.
*
- * @codecs: The list of codecs to be freed.
+ * Frees a GList of PurpleMediaCodec and its contents.
*/
void purple_media_codec_list_free(GList *codecs);
/**
- * Creates a string representation of the codec.
+ * purple_media_codec_to_string:
+ * @codec: The codec to create the string of.
*
- * @codec: The codec to create the string of.
+ * Creates a string representation of the codec.
*
* Returns: The new string representation.
*/
--- a/libpurple/media/enum-types.h Wed Jan 29 05:28:33 2014 +0530
+++ b/libpurple/media/enum-types.h Wed Jan 29 05:29:11 2014 +0530
@@ -38,7 +38,11 @@
#define PURPLE_TYPE_MEDIA_SESSION_TYPE (purple_media_session_type_get_type())
#define PURPLE_MEDIA_TYPE_STATE (purple_media_state_changed_get_type())
-/** Media candidate types */
+/**
+ * PurpleMediaCandidateType:
+ *
+ * Media candidate types
+ */
typedef enum {
PURPLE_MEDIA_CANDIDATE_TYPE_HOST,
PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX,
@@ -47,7 +51,11 @@
PURPLE_MEDIA_CANDIDATE_TYPE_MULTICAST
} PurpleMediaCandidateType;
-/** Media caps */
+/**
+ * PurpleMediaCaps:
+ *
+ * Media caps
+ */
typedef enum {
PURPLE_MEDIA_CAPS_NONE = 0,
PURPLE_MEDIA_CAPS_AUDIO = 1,
@@ -59,14 +67,22 @@
PURPLE_MEDIA_CAPS_CHANGE_DIRECTION = 1 << 6
} PurpleMediaCaps;
-/** Media component types */
+/**
+ * PurpleMediaComponentType:
+ *
+ * Media component types
+ */
typedef enum {
PURPLE_MEDIA_COMPONENT_NONE = 0,
PURPLE_MEDIA_COMPONENT_RTP = 1,
PURPLE_MEDIA_COMPONENT_RTCP = 2
} PurpleMediaComponentType;
-/** Media info types */
+/**
+ * PurpleMediaInfoType:
+ *
+ * Media info types
+ */
typedef enum {
PURPLE_MEDIA_INFO_HANGUP = 0,
PURPLE_MEDIA_INFO_ACCEPT,
@@ -79,13 +95,21 @@
PURPLE_MEDIA_INFO_UNHOLD
} PurpleMediaInfoType;
-/** Media network protocols */
+/**
+ * PurpleMediaNetworkProtocol:
+ *
+ * Media network protocols
+ */
typedef enum {
PURPLE_MEDIA_NETWORK_PROTOCOL_UDP,
PURPLE_MEDIA_NETWORK_PROTOCOL_TCP
} PurpleMediaNetworkProtocol;
-/** Media session types */
+/**
+ * PurpleMediaSessionType:
+ *
+ * Media session types
+ */
typedef enum {
PURPLE_MEDIA_NONE = 0,
PURPLE_MEDIA_RECV_AUDIO = 1 << 0,
@@ -96,7 +120,11 @@
PURPLE_MEDIA_VIDEO = PURPLE_MEDIA_RECV_VIDEO | PURPLE_MEDIA_SEND_VIDEO
} PurpleMediaSessionType;
-/** Media state-changed types */
+/**
+ * PurpleMediaState:
+ *
+ * Media state-changed types
+ */
typedef enum {
PURPLE_MEDIA_STATE_NEW = 0,
PURPLE_MEDIA_STATE_CONNECTED,
@@ -104,6 +132,8 @@
} PurpleMediaState;
/**
+ * purple_media_candidate_type_get_type:
+ *
* Gets the media candidate type's GType
*
* Returns: The media candidate type's GType.
@@ -111,6 +141,8 @@
GType purple_media_candidate_type_get_type(void);
/**
+ * purple_media_caps_get_type:
+ *
* Gets the type of the media caps flags
*
* Returns: The media caps flags' GType
@@ -118,6 +150,8 @@
GType purple_media_caps_get_type(void);
/**
+ * purple_media_info_type_get_type:
+ *
* Gets the type of the info type enum
*
* Returns: The info type enum's GType
@@ -125,6 +159,8 @@
GType purple_media_info_type_get_type(void);
/**
+ * purple_media_network_protocol_get_type:
+ *
* Gets the media network protocol's GType
*
* Returns: The media network protocol's GType.
@@ -132,6 +168,8 @@
GType purple_media_network_protocol_get_type(void);
/**
+ * purple_media_session_type_get_type:
+ *
* Gets the media session type's GType
*
* Returns: The media session type's GType.
@@ -139,6 +177,8 @@
GType purple_media_session_type_get_type(void);
/**
+ * purple_media_state_changed_get_type:
+ *
* Gets the type of the state-changed enum
*
* Returns: The state-changed enum's GType