Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-13 08:35:41

0001 /* ATK -  Accessibility Toolkit
0002  * Copyright 2001 Sun Microsystems Inc.
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Library General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  * Library General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Library General Public
0015  * License along with this library; if not, write to the
0016  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0017  * Boston, MA 02111-1307, USA.
0018  */
0019 
0020 #ifndef __ATK_STREAMABLE_CONTENT_H__
0021 #define __ATK_STREAMABLE_CONTENT_H__
0022 
0023 #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined(__ATK_H_INSIDE__) && !defined(ATK_COMPILATION)
0024 #error "Only <atk/atk.h> can be included directly."
0025 #endif
0026 
0027 #include <atk/atkobject.h>
0028 
0029 G_BEGIN_DECLS
0030 
0031 #define ATK_TYPE_STREAMABLE_CONTENT (atk_streamable_content_get_type ())
0032 #define ATK_IS_STREAMABLE_CONTENT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_STREAMABLE_CONTENT)
0033 #define ATK_STREAMABLE_CONTENT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_STREAMABLE_CONTENT, AtkStreamableContent)
0034 #define ATK_STREAMABLE_CONTENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_STREAMABLE_CONTENT, AtkStreamableContentIface))
0035 
0036 #ifndef _TYPEDEF_ATK_STREAMABLE_CONTENT
0037 #define _TYPEDEF_ATK_STREAMABLE_CONTENT
0038 typedef struct _AtkStreamableContent AtkStreamableContent;
0039 #endif
0040 typedef struct _AtkStreamableContentIface AtkStreamableContentIface;
0041 
0042 struct _AtkStreamableContentIface
0043 {
0044   GTypeInterface parent;
0045 
0046   /*
0047    * Get the number of mime types supported by this object
0048    */
0049   gint (*get_n_mime_types) (AtkStreamableContent *streamable);
0050   /*
0051    * Gets the specified mime type supported by this object.
0052    * The mime types are 0-based so the first mime type is
0053    * at index 0, the second at index 1 and so on.  The mime-type
0054    * at index 0 should be considered the "default" data type for the stream.
0055    *
0056    * This assumes that the strings for the mime types are stored in the
0057    * AtkStreamableContent. Alternatively the const could be removed
0058    * and the caller would be responsible for calling g_free() on the
0059    * returned value.
0060    */
0061   const gchar *(*get_mime_type) (AtkStreamableContent *streamable,
0062                                  gint i);
0063   /*
0064    * One possible implementation for this method is that it constructs the
0065    * content appropriate for the mime type and then creates a temporary
0066    * file containing the content, opens the file and then calls
0067    * g_io_channel_unix_new_fd().
0068    */
0069   GIOChannel *(*get_stream) (AtkStreamableContent *streamable,
0070                              const gchar *mime_type);
0071 
0072   /*
0073    * Returns a string representing a URI in IETF standard format
0074    * (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content
0075    * may be streamed in the specified mime-type.
0076    * If mime_type is NULL, the URI for the default (and possibly only) mime-type is
0077    * returned.
0078    *
0079    * returns NULL if the mime-type is not supported, or if no URI can be
0080    * constructed.  Note that it is possible for get_uri to return NULL but for
0081    * get_stream to work nonetheless, since not all GIOChannels connect to URIs.
0082    */
0083   const gchar *(*get_uri) (AtkStreamableContent *streamable,
0084                            const gchar *mime_type);
0085 
0086   AtkFunction pad1;
0087   AtkFunction pad2;
0088   AtkFunction pad3;
0089 };
0090 ATK_AVAILABLE_IN_ALL
0091 GType atk_streamable_content_get_type (void);
0092 
0093 ATK_AVAILABLE_IN_ALL
0094 gint atk_streamable_content_get_n_mime_types (AtkStreamableContent *streamable);
0095 
0096 ATK_AVAILABLE_IN_ALL
0097 const gchar *atk_streamable_content_get_mime_type (AtkStreamableContent *streamable,
0098                                                    gint i);
0099 ATK_AVAILABLE_IN_ALL
0100 GIOChannel *atk_streamable_content_get_stream (AtkStreamableContent *streamable,
0101                                                const gchar *mime_type);
0102 
0103 ATK_AVAILABLE_IN_ALL
0104 const gchar *atk_streamable_content_get_uri (AtkStreamableContent *streamable,
0105                                              const gchar *mime_type);
0106 
0107 G_END_DECLS
0108 
0109 #endif /* __ATK_STREAMABLE_CONTENT_H__ */