Initialize the gmime for upstream
[platform/upstream/gmime.git] / docs / reference / question_index.sgml
1 <refentry id="gmime-question-index" revision="1 Feb 2003">
2   <refmeta>
3     <refentrytitle>Frequently Asked Questions</refentrytitle>
4     <manvolnum>3</manvolnum>
5     <refmiscinfo>Frequently Asked Questions</refmiscinfo>
6   </refmeta>
7   <refnamediv>
8     <refname>Frequently Asked Questions</refname>
9     <refpurpose>
10 Find answers to common questions in the GMime manual
11 </refpurpose>
12   </refnamediv>
13   <refsect1>
14     <title>Questions and Answers</title>
15     <para>This is an "index" of the reference manual
16     organized by common "How do I..." questions. If you
17     aren't sure which documentation to read for the question you have,
18     this list is a good place to start.
19     </para>
20     <qandaset>
21       <qandadiv>
22         <title>General</title>
23         <qandaentry>
24           <question><para>Where can I get help with GMime, submit a bug report, or make a feature request?</para></question>
25           <answer>
26             <para>See the <link
27             linkend="gmime-resources">documentation on this
28             topic</link>.</para>
29           </answer>
30         </qandaentry>
31         <qandaentry>
32           <question><para>How do I port from one GMime version to another?</para></question>
33           <answer>
34             <para>See the <link linkend="gmime-changes-2-4">list of
35             incompatible changes from 2.2 to 2.4</link>.</para>
36           </answer>
37         </qandaentry>
38         <qandaentry>
39           <question><para>How does memory management work in GMime? Should I free data returned from functions?</para></question>
40           <answer>
41             <para>Most accessor functions return a pointer to internal
42             members. When these internal members are objects
43             themselves (e.g. subclasses
44             of <ulink url="http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html">GObject</ulink>),
45             there is no need to unref them unless otherwise stated in
46             the documentation for that particular function.</para>
47             <para>For accessor functions that return strings, they will be
48             declared "const" if they should not be freed. Non-const
49             strings should be freed with <ulink
50             url="http://developer.gnome.org/doc/API/2.0/glib/glib-Memory-Allocation.html#g-free">g_free()</ulink>.</para>
51           </answer>
52         </qandaentry>
53         <qandaentry>
54           <question><para>How do I use GMime with threads?</para></question>
55           <answer>
56             <para>First, read the <ulink
57             url="http://developer.gnome.org/doc/API/2.0/glib/glib-Threads.html">GThread</ulink> documentation for
58             portable threading primitives.</para>
59             <para>Secondly, all functions
60             in <link linkend="gmime-charset">gmime-charset</link>, <link linkend="gmime-iconv">gmime-iconv</link>
61             and <link linkend="gmime-utils">gmime-utils</link> should
62             be thread-safe. Objects subclassing 
63             <ulink url="http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html">GObject</ulink>
64             are not. This means that you'll have to do your own mutex
65             locking if you want to access the same GObjects from
66             multiple threads.
67             </para>
68           </answer>
69         </qandaentry>
70         <qandaentry>
71           <question><para>How do I use GMime with C++?</para></question>
72           <answer>
73             <para>The GMime header files use the subset of C that's
74             also valid C++, so you can simply use the normal GMime API
75             in a C++ program.</para>
76           </answer>
77         </qandaentry>
78       </qandadiv>
79     </qandaset>
80   </refsect1>
81 </refentry>