* Splitted the main documentation file in some smaller ones
authorSergio Villar Senin <svillar@igalia.com>
Tue, 26 Dec 2006 17:43:32 +0000 (17:43 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Tue, 26 Dec 2006 17:43:32 +0000 (17:43 +0000)
* Updated documentation
* Migrated the transfer_msgs function to the async version

pmo-trunk-r581

40 files changed:
docs/reference/Makefile.am
docs/reference/modest-architecture.sgml [new file with mode: 0644]
docs/reference/modest-coding-guidelines.sgml [new file with mode: 0644]
docs/reference/modest-design.sgml [new file with mode: 0644]
docs/reference/modest-docs.sgml
docs/reference/modest-preface.sgml [new file with mode: 0644]
docs/reference/modest-sections.txt
docs/reference/tmpl/modest-account-assistant.sgml
docs/reference/tmpl/modest-account-keys.sgml
docs/reference/tmpl/modest-account-mgr.sgml
docs/reference/tmpl/modest-account-view-window.sgml
docs/reference/tmpl/modest-account-view.sgml
docs/reference/tmpl/modest-combo-box.sgml
docs/reference/tmpl/modest-conf.sgml
docs/reference/tmpl/modest-edit-msg-window.sgml
docs/reference/tmpl/modest-error.sgml
docs/reference/tmpl/modest-folder-view.sgml
docs/reference/tmpl/modest-formatter.sgml
docs/reference/tmpl/modest-header-view.sgml
docs/reference/tmpl/modest-icon-factory.sgml
docs/reference/tmpl/modest-icon-names.sgml
docs/reference/tmpl/modest-mail-operation-queue.sgml
docs/reference/tmpl/modest-mail-operation.sgml
docs/reference/tmpl/modest-msg-view.sgml
docs/reference/tmpl/modest-pair.sgml
docs/reference/tmpl/modest-presets.sgml
docs/reference/tmpl/modest-protocol-mgr.sgml
docs/reference/tmpl/modest-store-widget.sgml
docs/reference/tmpl/modest-text-utils.sgml
docs/reference/tmpl/modest-tny-account-store.sgml
docs/reference/tmpl/modest-tny-platform-factory.sgml
docs/reference/tmpl/modest-tny-stream-gtkhtml.sgml
docs/reference/tmpl/modest-toolbar.sgml
docs/reference/tmpl/modest-transport-widget.sgml
docs/reference/tmpl/modest-widget-factory.sgml
docs/reference/tmpl/modest-widget-memory.sgml
src/modest-account-mgr.h
src/modest-formatter.h
src/modest-mail-operation.c
src/modest-mail-operation.h

index 14fbb5f..eee2972 100644 (file)
@@ -22,10 +22,10 @@ SCANGOBJ_OPTIONS=
 
 # Extra options to supply to gtkdoc-scan.
 # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" 
-SCAN_OPTIONS=\
-       --source-dir=$(top_srcdir)/src \
+SCAN_OPTIONS= \
+       --source-dir=$(top_srcdir)/src/widgets \
        --source-dir=$(top_srcdir)/src/gtk \
-       --source-dir=$(top_srcdir)/src/widgets
+       --source-dir=$(top_srcdir)/src
 
 # Extra options to supply to gtkdoc-mkdb.
 # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
@@ -42,8 +42,8 @@ FIXXREF_OPTIONS=
 # Used for dependencies. The docs will be rebuilt if any of these change.
 # e.g. HFILE_GLOB=$(top_srcdir)/*.h
 # e.g. CFILE_GLOB=$(top_srcdir)/*.c
-HFILE_GLOB=$(top_srcdir)/src/*.h 
-CFILE_GLOB=$(top_srcdir)/src/*.c 
+HFILE_GLOB=$(top_srcdir)/src/*.h $(top_srcdir)/src/widgets/*.h  $(top_srcdir)/src/gtk/*.h 
+CFILE_GLOB=$(top_srcdir)/src/*.c $(top_srcdir)/src/widgets/*.c  $(top_srcdir)/src/gtk/*.c 
 
 # Header files to ignore when scanning.
 # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
@@ -55,7 +55,12 @@ HTML_IMAGES=
 
 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
 # e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files=xml/tree_index.sgml
+content_files= \
+       xml/tree_index.sgml \
+       modest-preface.sgml \
+       modest-architecture.sgml \
+       modest-design.sgml \
+       modest-coding-guidelines.sgml
 
 # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
 # These files must be listed here *and* in content_files
@@ -74,30 +79,31 @@ INCLUDES=                                           \
        -I$(top_srcdir)/src/widgets
 
 
-GTKDOC_LIBS=\
+GTKDOC_LIBS= \
        $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS)        \
        $(MODEST_LIBTINYMAIL_MAEMO_LIBS)                \
        $(MODEST_GSTUFF_LIBS)                   \
        $(top_builddir)/src/gtk/libmodest-ui.la         \
        $(top_builddir)/src/widgets/libmodest-widgets.la\
-       ${top_builddir}/src/modest-conf.o \
        ${top_builddir}/src/modest-account-mgr.o \
-       ${top_builddir}/src/modest-tny-platform-factory.o \
+       ${top_builddir}/src/modest-conf.o \
+       ${top_builddir}/src/modest-formatter.o \
+       ${top_builddir}/src/modest-icon-factory.o \
+       ${top_builddir}/src/modest-mail-operation.o \
+       ${top_builddir}/src/modest-mail-operation-queue.o \
+       ${top_builddir}/src/modest-marshal.o \
+       ${top_builddir}/src/modest-pair.o \
+       ${top_builddir}/src/modest-presets.o \
        ${top_builddir}/src/modest-protocol-mgr.o \
        ${top_builddir}/src/modest-proto.o \
-       ${top_builddir}/src/modest-pair.o \
-       ${top_builddir}/src/modest-marshal.o \
+       ${top_builddir}/src/modest-text-utils.o \
        ${top_builddir}/src/modest-tny-account-store.o \
-       ${top_builddir}/src/modest-mail-operation.o \
-       ${top_builddir}/src/modest-mail-operation-queue.o \
-       ${top_builddir}/src/modest-tny-msg-actions.o \
        ${top_builddir}/src/modest-tny-attachment.o \
+       ${top_builddir}/src/modest-tny-msg-actions.o \
+       ${top_builddir}/src/modest-tny-platform-factory.o \
        ${top_builddir}/src/modest-tny-stream-gtkhtml.o \
        ${top_builddir}/src/modest-widget-factory.o \
-       ${top_builddir}/src/modest-widget-memory.o \
-       ${top_builddir}/src/modest-icon-factory.o \
-       ${top_builddir}/src/modest-formatter.o \
-       ${top_builddir}/src/modest-text-utils.o
+       ${top_builddir}/src/modest-widget-memory.o
 
 # This includes the standard gtk-doc make rules, copied by gtkdocize.
 include $(top_srcdir)/gtk-doc.make
diff --git a/docs/reference/modest-architecture.sgml b/docs/reference/modest-architecture.sgml
new file mode 100644 (file)
index 0000000..94927e7
--- /dev/null
@@ -0,0 +1,28 @@
+  <part>
+    <title>Architecture</title>
+    <partintro>
+      <para><application>modest</application> tries to be quite flexible in its
+       design. However, it's always important not to make things too
+       generic. Both for reasons of time limitations and keeping the software
+       understandable and 'modest', it's important to limit the scope.
+      </para>
+      
+      <para>
+       For <application>modest</application>, the following:
+       <itemizedlist>
+         <listitem><application>modest</application> is a e-mail program
+           using the <package>tinymail</package> and <package>camel</package>
+           libraries;</listitem>
+         <listitem><application>modest</application> targets gtk and
+           gconf-based user-interfaces, including the Hildon
+           environment;</listitem>
+         <listitem><application>modest</application> main use-case is in
+           small, mobile device such as the <productname>Nokia 770 Internet
+             Tablet</productname>;</listitem>
+         <listitem>However, effort is made also to
+           make <application>modest</application> usable as a general-purpose
+           e-mail client on normal desktop computer.</listitem>
+       </itemizedlist>
+      </para>
+    </partintro>
+  </part>
diff --git a/docs/reference/modest-coding-guidelines.sgml b/docs/reference/modest-coding-guidelines.sgml
new file mode 100644 (file)
index 0000000..f78d943
--- /dev/null
@@ -0,0 +1,76 @@
+  <part>
+    <title>Coding guidelines</title>
+    <partintro>
+      When hacking on modest, please honour these time-tested coding guidelines.
+      First, please follow the <emphasis>Linux CodingStyle guidelines</emphasis>
+      (<filename>/usr/src/linux/Documentation/CodingStyle</filename>).
+    </partintro>
+    
+    <para>
+      Here are only some additional notes.
+    </para>
+    
+    <para>
+      Your editor may help you with this, for example for <application>emacs</application>:
+      <programlisting>
+       (c-set-style "K&amp;R")
+       (setq tab-width 8)
+       (setq indent-tabs-mode t)
+       (setq c-basic-offset 8)
+      </programlisting>
+      
+      Or the equivalent in your favourite editor.
+    </para>
+    
+    <para>
+      Lines must not exceed 100 characters.
+    </para>
+    
+    <para>
+      Functions should do one thing, and do it well. In general, functions
+      should not be much longer than 20-30 lines (except for, say, handling
+      many different cases in a 'switch'-statement). Files should not get to
+      big either; if there are more than, say, 800 lines, it's a sign that
+      some refactoring should take place.
+    </para>
+    
+    <para>
+      Code should compile cleanly
+      with <command>gcc</command>'s <symbol>-Wall</symbol> compile option. Of
+      course this might not always be possible due to problems in dependent
+      libraries and/or compiler version. Therefore, do not
+      include <symbol>-Werror</symbol> in the standard compile options; but
+      do use it when building / testing things yourself.
+    </para>
+
+    <para>
+      Code should also run cleanly. GTK+/GLib warnings and errors must be
+      taken very seriously. If you run <application>modest</application> with
+      the <symbol>-d</symbol>-flag, it will <symbol>abort</symbol> whenever
+      there is such a warning. This can be useful when running inside the
+      debugger. 
+    </para>
+    
+    <para>Global functions (the ones in <filename>.h</filename>-files) must
+      be commented using <systemitem>gtk-doc</systemitem>. This way, we
+      generate nice documentation. After installing
+      (under <filename>/usr/local</filename>), we can browse the results
+      with <application>DevHelp</application>. Just
+      add <systemitem>/usr/local/share/gtk-doc/html</systemitem> to the
+      <systemitem>DEVHELP_SEARCH_PATH</systemitem>-environment variable.  
+    </para>
+    <para>
+      Furthermore, please follow 'conventional wisdom' for programming with 
+      GLib/GTK+/GObject. Some things to remember:
+      <itemizedlist>
+       <listitem> <function>g_new</function>, <function>g_malloc</function> and
+         friends <emphasis>never</emphasis> return <function>NULL</function>. They terminate
+         the application if it happens (normally).  No need to check
+         for <function>NULL</function> returns;</listitem>
+       <listitem> <function>g_return_if_fail</function> and friends may be
+         'turned off', ie. they are to be used for error checking,
+         but <emphasis>not</emphasis> for your programming logic
+       </listitem>
+      </itemizedlist>
+    </para>
+  </part>
\ No newline at end of file
diff --git a/docs/reference/modest-design.sgml b/docs/reference/modest-design.sgml
new file mode 100644 (file)
index 0000000..ac7dff5
--- /dev/null
@@ -0,0 +1,175 @@
+  <part>
+    <title>Design</title>
+    <partintro>
+      <para>In this part, we'll discuss the design of various parts of
+       <application>modest</application>. We'll not go into the details of
+       various APIs in this chapter.  Please consult the documentation generated
+       from the source code (<systemitem>gtk-doc</systemitem>) for that.
+      </para>
+    </partintro>
+    
+    <chapter>
+      <title>Configuration</title>
+      <para>Configuration is the part of <application>modest</application>
+       that deals with storing all settings. While the design allows for
+       alternative implementations, currently
+       only <systemitem>GConf</systemitem> is supported as a backend.
+      </para>
+      
+      <para>
+       All dealing with configuration is done with
+       the <classname>ModestConf</classname>-class. It is declared
+       in <filename> modest-conf.h</filename>, and
+       the <systemitem>GConf</systemitem>-based implementation in 
+       <filename>modest-conf.c</filename>. As said, there could be
+       different implementations --
+       nothing <systemitem>GConf</systemitem>-specific is visible in the
+       <classname>ModestConf</classname>-<abbrev>API</abbrev>.
+      </para>
+    </chapter>
+    
+    <chapter>
+      <title>Account Management</title>
+      <para>
+       Account Management is the part of <application>modest</application>
+       that deals with the setting related to sending and receiving of
+       e-mail. We will follow the libcamel-convention of using the
+       term <emphasis>store</emphasis> for an e-mail storage/retrieval
+       server, and a <emphasis>transport</emphasis> for a server that
+       transports mail to its destination.
+      </para>
+      
+      <para>
+       In practice, the following types are available:
+       <itemizedlist>
+         <listitem><emphasis>stores</emphasis>: <abbrev>POP</abbrev>
+           and <abbrev>IMAP</abbrev>; </listitem>
+         <listitem> <emphasis>transports</emphasis>: <systemitem>sendmail</systemitem>
+           and <abbrev>SMTP</abbrev>.</listitem>
+       </itemizedlist>
+      </para>
+      
+      <sect1>
+       <title>Definitions</title>
+       <itemizedlist>
+         <listitem>An <emphasis>account</emphasis> is a named entity
+           consisting of a <emphasis>store</emphasis> and
+           a <emphasis>transport</emphasis>. Note: For our mobile use-cases,
+           the <emphasis>transport</emphasis> cannot be a static entity, but
+           may depend on the network connection. That is however not part of
+           Account Management, so not discussed here</listitem>
+         <listitem>A <emphasis>server account</emphasis> is account
+           describing the connection with a specific server. Server accounts
+           come in two type:
+           <itemizedlist>
+             <listitem>A <emphasis>transport</emphasis> describes the connection information
+               (servername, username, password etc.) for a transport
+               server;</listitem>
+             <listitem>A <emphasis>store</emphasis> describes the connection information for
+               a store server;</listitem>
+           </itemizedlist>
+         </listitem>
+       </itemizedlist>
+      </sect1>
+      
+      <sect1>
+       <title>Code</title>
+       <para>The functions to deal with account and server accounts are
+         located in <classname>ModestAccountMgr</classname>, ie. in 
+         <filename>modest-account-mgr.[ch]</filename>. There function to add
+         specific values for both, to list the available ones, etc. Please
+         refer to the source code documentation for details.
+       </para>
+      </sect1>
+      
+      <sect1>
+       <title>Location in configuration database</title>
+       <para>
+         <emphasis>Accounts</emphasis> can be found
+         in <systemitem>/apps/modest/accounts</systemitem>,
+         while <emphasis>server accounts</emphasis> can be found
+         in <systemitem>/app/modest/server_accounts</systemitem>.
+       </para>
+       
+       <para>
+         The following image show an
+         account <systemitem>accountstest</systemitem> with server accounts
+         <systemitem>mystore</systemitem>
+         and <systemitem>mytransport</systemitem>.
+         <imagedata fileref="modest-account-mgr.png"/>
+       </para>
+
+       <para>
+         For each of the stores, there are number of parameters specified:
+         <itemizedlist>
+           <listitem><emphasis>hostname</emphasis> - the place where the server resides;</listitem>
+           <listitem><emphasis>username</emphasis> - the username;</listitem>
+           <listitem><emphasis>password</emphasis> - the password;</listitem>
+           <listitem><emphasis>proto</emphasis> - the protocal for communication with this server - for
+             now these are the following valid values (literal strings):
+             <itemizedlist>
+               <listitem><emphasis>sendmail</emphasis>;</listitem>
+               <listitem><emphasis>smtp</emphasis>;</listitem>
+               <listitem><emphasis>pop</emphasis></listitem>
+               <listitem><emphasis>imap</emphasis>.</listitem>
+             </itemizedlist>
+           </listitem>
+         </itemizedlist>
+       </para>
+       
+       <para>In <filename>modest-proto.[ch]</filename> there are various
+         functions to check whether something is a valid protocol, and
+         whether it is a transport of a store.
+       </para>
+       
+       <para>Note that server accounts and accounts are relatively independent. While
+         accounts refer to two server accounts, these server accounts can be
+         used by other accounts as well.
+       </para>
+       
+       <para>The reason two keep accounts and server accounts separately, is a bit of
+         flexibility. In mobile use-cases, quite often it's desirable to use a
+         network-specific smtp-server. The chosen structure makes it easy to iterate
+         over all smtp-servers and find the right one.
+       </para>
+      </sect1>
+      
+      <sect1>
+       <title>Account Management and Tinymail</title>
+       <para>
+         Tinymail needs the information about all configured accounts - and the
+         mechanism that it uses for that
+         is <interface>TnyAccountStoreIface</interface>. We don't want to use
+         the tinymail-provided <classname>TnyAccountStore</classname>, but
+         provide our own implementation
+         instead: <classname>ModestTnyAccountStore</classname>. This class
+         implements the <interface>TnyAccountStoreIface</interface>-interace in
+         terms of the aforementioned <classname>ModestAccountMgr</classname>.
+       </para>
+       
+       <para>
+         One unexpected function
+         that  <classname>ModestTnyAccountStore</classname> needs to implement
+         is <symbol>tny account_store get_session</symbol> (to get the
+         Camel-session). This function must be provided as a public function,
+         with that exact name.
+       </para>
+      </sect1>
+    </chapter>
+    
+    <chapter>
+      <title>Finding the right transport</title>
+      <para>
+       One of the interesting topics in designing a mobile e-mail client is
+       to deal with transports (in
+       particular, <acronym>SMTP</acronym>). The reason for that is that
+       the majority of <acronym>SMTP</acronym>-servers only allow e-mail
+       from the same network. That means that for example <systemitem>
+         smtp.some-isp.com</systemitem> will only accept mail from
+       (<command>MAIL FROM:</command>) <systemitem>
+         user@some-isp.com</systemitem>, and refuse mail
+       from <systemitem>user@some-other-isp.com</systemitem>, unless the
+       recipient (<command>RCPT TO:</command>) is on the same network.
+      </para>
+    </chapter>
+  </part>
\ No newline at end of file
index 2b1caac..6bfe3db 100644 (file)
 
 <!ENTITY index-Object-Tree SYSTEM "xml/tree_index.sgml">
 
+<!ENTITY preface SYSTEM "modest-preface.sgml">
+<!ENTITY architecture SYSTEM "modest-architecture.sgml">
+<!ENTITY design SYSTEM "modest-design.sgml">
+<!ENTITY coding-guidelines SYSTEM "modest-coding-guidelines.sgml">
+
 ]>
 
 <book id="index">
     </copyright>
   </bookinfo>
 
-  <preface>
-    <title>Introduction</title>
-    <para><application>modest</application> is a mail user agent
-      (<abbrev>MUA</abbrev>) targetting small devices, in particular Nokia's
-      <productname>Nokia 770 Internet Tablet</productname>. This document
-      describes the design and implementation of this software.
-    </para>
-    
-    <para><application>modest</application> lives at the top of a extensive
-      stack of software. It is built on top
-      of <application>tinymail</application>, and uses its libcamel
-      backend. It strives to the be a simple yet powerful program, geared
-      towards small devices, for example (but not limited
-      to) <productname>Nokia's 770 internet tablet</productname>. An important
-      goal is to minimize memory usage while still being able to handle
-      significant amounts of email quickly; much of that is achieved simply by
-      using <application>tinymail</application>, which uses a number of clever
-      tricks for that, such as the proxy design pattern for listing email
-      headers, and not needing memory for headers which are not currently
-      visible.
-    </para>
-    
-    <para>
-      <application>modest</application>, in turn, also tries to be efficient,
-      fast and scalable. That means that the <abbrev>MUA</abbrev> should
-      support multiple user-interfaces, perhaps making it even possible to
-      switch between them during runtime.
-    </para>
-    
-    <para>To summarize the goals for <application>modest</application>:
-      <itemizedlist>
-       <listitem>target devices with limited amounts of memory ('limited' in 2006
-         terms means less than 64Mb, and of which only part can be used for
-         e-mail);</listitem>
-       <listitem>target Linux/Unix-like environments with GLib/GTK+-based
-         support;</listitem>
-       <listitem>support multiple user-interface (UIs) with as much code
-         sharing as possible between the different UIs.</listitem>
-    </itemizedlist></para>
-    
-    <para>Like <application>tinymail</application>
-      and <application>libcamel</application>, <application>modest</application>
-      is programmed in C, using the <package>GObject</package>-system for
-      object-oriented (OO) features. For now, it specifically targets \gtk based
-      UIs (and derivatives like 'Hildon').</para>
-
-  </preface>
+  &preface;
 
-  <part>
-    <title>Architecture</title>
-    <partintro>
-      <para><application>modest</application> tries to be quite flexible in its
-       design. However, it's always important not to make things too
-       generic. Both for reasons of time limitations and keeping the software
-       understandable and 'modest', it's important to limit the scope.
-      </para>
-      
-      <para>
-       For <application>modest</application>, the following:
-       <itemizedlist>
-         <listitem><application>modest</application> is a e-mail program
-           using the <package>tinymail</package> and <package>camel</package>
-           libraries;</listitem>
-         <listitem><application>modest</application> targets gtk and
-           gconf-based user-interfaces, including the Hildon
-           environment;</listitem>
-         <listitem><application>modest</application> main use-case is in
-           small, mobile device such as the <productname>Nokia 770 Internet
-             Tablet</productname>;</listitem>
-         <listitem>However, effort is made also to
-           make <application>modest</application> usable as a general-purpose
-           e-mail client on normal desktop computer.</listitem>
-       </itemizedlist>
-      </para>
-    </partintro>
-  </part>
+  &architecture;
   
-  <part>
-    <title>Design</title>
-    <partintro>
-      <para>In this part, we'll discuss the design of various parts of
-       <application>modest</application>. We'll not go into the details of
-       various APIs in this chapter.  Please consult the documentation generated
-       from the source code (<systemitem>gtk-doc</systemitem>) for that.
-      </para>
-    </partintro>
-    
-    <chapter>
-      <title>Configuration</title>
-      <para>Configuration is the part of <application>modest</application>
-       that deals with storing all settings. While the design allows for
-       alternative implementations, currently
-       only <systemitem>GConf</systemitem> is supported as a backend.
-      </para>
-      
-      <para>
-       All dealing with configuration is done with
-       the <classname>ModestConf</classname>-class. It is declared
-       in <filename> modest-conf.h</filename>, and
-       the <systemitem>GConf</systemitem>-based implementation in 
-       <filename>modest-conf.c</filename>. As said, there could be
-       different implementations --
-       nothing <systemitem>GConf</systemitem>-specific is visible in the
-       <classname>ModestConf</classname>-<abbrev>API</abbrev>.
-      </para>
-    </chapter>
-    
-    <chapter>
-      <title>Account Management</title>
-      <para>
-       Account Management is the part of <application>modest</application>
-       that deals with the setting related to sending and receiving of
-       e-mail. We will follow the libcamel-convention of using the
-       term <emphasis>store</emphasis> for an e-mail storage/retrieval
-       server, and a <emphasis>transport</emphasis> for a server that
-       transports mail to its destination.
-      </para>
-      
-      <para>
-       In practice, the following types are available:
-       <itemizedlist>
-         <listitem><emphasis>stores</emphasis>: <abbrev>POP</abbrev>
-           and <abbrev>IMAP</abbrev>; </listitem>
-         <listitem> <emphasis>transports</emphasis>: <systemitem>sendmail</systemitem>
-           and <abbrev>SMTP</abbrev>.</listitem>
-       </itemizedlist>
-      </para>
-      
-      <sect1>
-       <title>Definitions</title>
-       <itemizedlist>
-         <listitem>An <emphasis>account</emphasis> is a named entity
-           consisting of a <emphasis>store</emphasis> and
-           a <emphasis>transport</emphasis>. Note: For our mobile use-cases,
-           the <emphasis>transport</emphasis> cannot be a static entity, but
-           may depend on the network connection. That is however not part of
-           Account Management, so not discussed here</listitem>
-         <listitem>A <emphasis>server account</emphasis> is account
-           describing the connection with a specific server. Server accounts
-           come in two type:
-           <itemizedlist>
-             <listitem>A <emphasis>transport</emphasis> describes the connection information
-               (servername, username, password etc.) for a transport
-               server;</listitem>
-             <listitem>A <emphasis>store</emphasis> describes the connection information for
-               a store server;</listitem>
-           </itemizedlist>
-         </listitem>
-       </itemizedlist>
-      </sect1>
-      
-      <sect1>
-       <title>Code</title>
-       <para>The functions to deal with account and server accounts are
-         located in <classname>ModestAccountMgr</classname>, ie. in 
-         <filename>modest-account-mgr.[ch]</filename>. There function to add
-         specific values for both, to list the available ones, etc. Please
-         refer to the source code documentation for details.
-       </para>
-      </sect1>
-      
-      <sect1>
-       <title>Location in configuration database</title>
-       <para>
-         <emphasis>Accounts</emphasis> can be found
-         in <systemitem>/apps/modest/accounts</systemitem>,
-         while <emphasis>server accounts</emphasis> can be found
-         in <systemitem>/app/modest/server_accounts</systemitem>.
-       </para>
-       
-       <para>
-         The following image show an
-         account <systemitem>accountstest</systemitem> with server accounts
-         <systemitem>mystore</systemitem>
-         and <systemitem>mytransport</systemitem>.
-         <imagedata fileref="modest-account-mgr.png"/>
-       </para>
-
-       <para>
-         For each of the stores, there are number of parameters specified:
-         <itemizedlist>
-           <listitem><emphasis>hostname</emphasis> - the place where the server resides;</listitem>
-           <listitem><emphasis>username</emphasis> - the username;</listitem>
-           <listitem><emphasis>password</emphasis> - the password;</listitem>
-           <listitem><emphasis>proto</emphasis> - the protocal for communication with this server - for
-             now these are the following valid values (literal strings):
-             <itemizedlist>
-               <listitem><emphasis>sendmail</emphasis>;</listitem>
-               <listitem><emphasis>smtp</emphasis>;</listitem>
-               <listitem><emphasis>pop</emphasis></listitem>
-               <listitem><emphasis>imap</emphasis>.</listitem>
-             </itemizedlist>
-           </listitem>
-         </itemizedlist>
-       </para>
-       
-       <para>In <filename>modest-proto.[ch]</filename> there are various
-         functions to check whether something is a valid protocol, and
-         whether it is a transport of a store.
-       </para>
-       
-       <para>Note that server accounts and accounts are relatively independent. While
-         accounts refer to two server accounts, these server accounts can be
-         used by other accounts as well.
-       </para>
-       
-       <para>The reason two keep accounts and server accounts separately, is a bit of
-         flexibility. In mobile use-cases, quite often it's desirable to use a
-         network-specific smtp-server. The chosen structure makes it easy to iterate
-         over all smtp-servers and find the right one.
-       </para>
-      </sect1>
-      
-      <sect1>
-       <title>Account Management and Tinymail</title>
-       <para>
-         Tinymail needs the information about all configured accounts - and the
-         mechanism that it uses for that
-         is <interface>TnyAccountStoreIface</interface>. We don't want to use
-         the tinymail-provided <classname>TnyAccountStore</classname>, but
-         provide our own implementation
-         instead: <classname>ModestTnyAccountStore</classname>. This class
-         implements the <interface>TnyAccountStoreIface</interface>-interace in
-         terms of the aforementioned <classname>ModestAccountMgr</classname>.
-       </para>
-       
-       <para>
-         One unexpected function
-         that  <classname>ModestTnyAccountStore</classname> needs to implement
-         is <symbol>tny account_store get_session</symbol> (to get the
-         Camel-session). This function must be provided as a public function,
-         with that exact name.
-       </para>
-      </sect1>
-    </chapter>
-    
-    <chapter>
-      <title>Finding the right transport</title>
-      <para>
-       One of the interesting topics in designing a mobile e-mail client is
-       to deal with transports (in
-       particular, <acronym>SMTP</acronym>). The reason for that is that
-       the majority of <acronym>SMTP</acronym>-servers only allow e-mail
-       from the same network. That means that for example <systemitem>
-         smtp.some-isp.com</systemitem> will only accept mail from
-       (<command>MAIL FROM:</command>) <systemitem>
-         user@some-isp.com</systemitem>, and refuse mail
-       from <systemitem>user@some-other-isp.com</systemitem>, unless the
-       recipient (<command>RCPT TO:</command>) is on the same network.
-      </para>
-    </chapter>
-  </part>
+  &design;
   
-  <chapter>
-    <title>Coding guidelines</title>
-    <para>
-      When hacking on modest, please honour these time-tested coding guidelines.
-      First, please follow the <emphasis>Linux CodingStyle guidelines</emphasis>
-      (<filename>/usr/src/linux/Documentation/CodingStyle</filename>).
-    </para>
-    
-    <para>
-      Here are only some additional notes.
-    </para>
-    
-    <para>
-      Your editor may help you with this, for example for <application>emacs</application>:
-      <programlisting>
-       (c-set-style "K&amp;R")
-       (setq tab-width 8)
-       (setq indent-tabs-mode t)
-       (setq c-basic-offset 8)
-      </programlisting>
-      
-      Or the equivalent in your favourite editor.
-    </para>
-    
-    <para>
-      Lines must not exceed 100 characters.
-    </para>
-    
-    <para>
-      Functions should do one thing, and do it well. In general, functions
-      should not be much longer than 20-30 lines (except for, say, handling
-      many different cases in a 'switch'-statement). Files should not get to
-      big either; if there are more than, say, 800 lines, it's a sign that
-      some refactoring should take place.
-    </para>
-    
-    <para>
-      Code should compile cleanly
-      with <command>gcc</command>'s <symbol>-Wall</symbol> compile option. Of
-      course this might not always be possible due to problems in dependent
-      libraries and/or compiler version. Therefore, do not
-      include <symbol>-Werror</symbol> in the standard compile options; but
-      do use it when building / testing things yourself.
-    </para>
-
-    <para>
-      Code should also run cleanly. GTK+/GLib warnings and errors must be
-      taken very seriously. If you run <application>modest</application> with
-      the <symbol>-d</symbol>-flag, it will <symbol>abort</symbol> whenever
-      there is such a warning. This can be useful when running inside the
-      debugger. 
-    </para>
-    
-    <para>Global functions (the ones in <filename>.h</filename>-files) must
-      be commented using <systemitem>gtk-doc</systemitem>. This way, we
-      generate nice documentation. After installing
-      (under <filename>/usr/local</filename>), we can browse the results
-      with <application>DevHelp</application>. Just
-      add <systemitem>/usr/local/share/gtk-doc/html</systemitem> to the
-      <systemitem>DEVHELP_SEARCH_PATH</systemitem>-environment variable.  
-    </para>
-    <para>
-      Furthermore, please follow 'conventional wisdom' for programming with 
-      GLib/GTK+/GObject. Some things to remember:
-      <itemizedlist>
-       <listitem> <function>g_new</function>, <function>g_malloc</function> and
-         friends <emphasis>never</emphasis> return <function>NULL</function>. They terminate
-         the application if it happens (normally).  No need to check
-         for <function>NULL</function> returns;</listitem>
-       <listitem> <function>g_return_if_fail</function> and friends may be
-         'turned off', ie. they are to be used for error checking,
-         but <emphasis>not</emphasis> for your programming logic
-       </listitem>
-      </itemizedlist>
-    </para>
-  </chapter>
+  &coding-guidelines;
   
   <reference>
     <title>Object Index</title>
diff --git a/docs/reference/modest-preface.sgml b/docs/reference/modest-preface.sgml
new file mode 100644 (file)
index 0000000..461d28d
--- /dev/null
@@ -0,0 +1,47 @@
+  <preface>
+    <title>Introduction</title>
+    <para><application>modest</application> is a mail user agent
+      (<abbrev>MUA</abbrev>) targetting small devices, in particular Nokia's
+      <productname>Nokia 770 Internet Tablet</productname>. This document
+      describes the design and implementation of this software.
+    </para>
+    
+    <para><application>modest</application> lives at the top of a extensive
+      stack of software. It is built on top
+      of <application>tinymail</application>, and uses its libcamel
+      backend. It strives to the be a simple yet powerful program, geared
+      towards small devices, for example (but not limited
+      to) <productname>Nokia's 770 internet tablet</productname>. An important
+      goal is to minimize memory usage while still being able to handle
+      significant amounts of email quickly; much of that is achieved simply by
+      using <application>tinymail</application>, which uses a number of clever
+      tricks for that, such as the proxy design pattern for listing email
+      headers, and not needing memory for headers which are not currently
+      visible.
+    </para>
+    
+    <para>
+      <application>modest</application>, in turn, also tries to be efficient,
+      fast and scalable. That means that the <abbrev>MUA</abbrev> should
+      support multiple user-interfaces, perhaps making it even possible to
+      switch between them during runtime.
+    </para>
+    
+    <para>To summarize the goals for <application>modest</application>:
+      <itemizedlist>
+       <listitem>target devices with limited amounts of memory ('limited' in 2006
+         terms means less than 64Mb, and of which only part can be used for
+         e-mail);</listitem>
+       <listitem>target Linux/Unix-like environments with GLib/GTK+-based
+         support;</listitem>
+       <listitem>support multiple user-interface (UIs) with as much code
+         sharing as possible between the different UIs.</listitem>
+    </itemizedlist></para>
+    
+    <para>Like <application>tinymail</application>
+      and <application>libcamel</application>, <application>modest</application>
+      is programmed in C, using the <package>GObject</package>-system for
+      object-oriented (OO) features. For now, it specifically targets \gtk based
+      UIs (and derivatives like 'Hildon').</para>
+
+  </preface>
\ No newline at end of file
index b645a97..be5f2d6 100644 (file)
@@ -327,6 +327,7 @@ MODEST_ACCOUNT_VIEW_WINDOW_GET_CLASS
 ModestTransportWidget
 modest_transport_widget_new
 modest_transport_widget_get_remember_password
+modest_transport_widget_get_requires_auth
 modest_transport_widget_get_username
 modest_transport_widget_get_servername
 modest_transport_widget_get_proto
@@ -601,6 +602,217 @@ MODEST_MSG_VIEW_GET_CLASS
 </SECTION>
 
 <SECTION>
+<FILE>modest-account-view</FILE>
+<TITLE>ModestAccountView</TITLE>
+ModestAccountView
+modest_account_view_new
+modest_account_view_get_selected_account
+<SUBSECTION Standard>
+MODEST_ACCOUNT_VIEW
+MODEST_IS_ACCOUNT_VIEW
+MODEST_TYPE_ACCOUNT_VIEW
+modest_account_view_get_type
+MODEST_ACCOUNT_VIEW_CLASS
+MODEST_IS_ACCOUNT_VIEW_CLASS
+MODEST_ACCOUNT_VIEW_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-header-view</FILE>
+MODEST_HEADER_VIEW_COLUMN
+ModestHeaderViewColumn
+ModestHeaderViewStyle
+ModestItemType
+<TITLE>ModestHeaderView</TITLE>
+ModestHeaderView
+modest_header_view_new
+modest_header_view_set_folder
+modest_header_view_get_folder
+modest_header_view_set_columns
+modest_header_view_get_columns
+modest_header_view_set_style
+modest_header_view_get_style
+modest_header_view_get_selected_headers
+<SUBSECTION Standard>
+MODEST_HEADER_VIEW
+MODEST_IS_HEADER_VIEW
+MODEST_TYPE_HEADER_VIEW
+modest_header_view_get_type
+MODEST_HEADER_VIEW_CLASS
+MODEST_IS_HEADER_VIEW_CLASS
+MODEST_HEADER_VIEW_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-toolbar</FILE>
+ModestToolbarButton
+<TITLE>ModestToolbar</TITLE>
+ModestToolbar
+modest_toolbar_new
+<SUBSECTION Standard>
+MODEST_TOOLBAR
+MODEST_IS_TOOLBAR
+MODEST_TYPE_TOOLBAR
+modest_toolbar_get_type
+MODEST_TOOLBAR_CLASS
+MODEST_IS_TOOLBAR_CLASS
+MODEST_TOOLBAR_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-folder-view</FILE>
+<TITLE>ModestFolderView</TITLE>
+ModestFolderView
+modest_folder_view_new
+modest_folder_view_set_title
+modest_folder_view_is_empty
+modest_folder_view_guess_folder_type
+modest_folder_view_get_selected_account
+<SUBSECTION Standard>
+MODEST_FOLDER_VIEW
+MODEST_IS_FOLDER_VIEW
+MODEST_TYPE_FOLDER_VIEW
+modest_folder_view_get_type
+MODEST_FOLDER_VIEW_CLASS
+MODEST_IS_FOLDER_VIEW_CLASS
+MODEST_FOLDER_VIEW_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-combo-box</FILE>
+<TITLE>ModestComboBox</TITLE>
+ModestComboBox
+modest_combo_box_new
+modest_combo_box_get_active_id
+modest_combo_box_get_active_display_name
+<SUBSECTION Standard>
+MODEST_COMBO_BOX
+MODEST_IS_COMBO_BOX
+MODEST_TYPE_COMBO_BOX
+modest_combo_box_get_type
+MODEST_COMBO_BOX_CLASS
+MODEST_IS_COMBO_BOX_CLASS
+MODEST_COMBO_BOX_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-msg-view</FILE>
+<TITLE>ModestMsgView</TITLE>
+ModestMsgView
+modest_msg_view_new
+modest_msg_view_set_message
+<SUBSECTION Standard>
+MODEST_MSG_VIEW
+MODEST_IS_MSG_VIEW
+MODEST_TYPE_MSG_VIEW
+modest_msg_view_get_type
+MODEST_MSG_VIEW_CLASS
+MODEST_IS_MSG_VIEW_CLASS
+MODEST_MSG_VIEW_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-account-assistant</FILE>
+<TITLE>ModestAccountAssistant</TITLE>
+ModestAccountAssistant
+modest_account_assistant_new
+<SUBSECTION Standard>
+MODEST_ACCOUNT_ASSISTANT
+MODEST_IS_ACCOUNT_ASSISTANT
+MODEST_TYPE_ACCOUNT_ASSISTANT
+modest_account_assistant_get_type
+MODEST_ACCOUNT_ASSISTANT_CLASS
+MODEST_IS_ACCOUNT_ASSISTANT_CLASS
+MODEST_ACCOUNT_ASSISTANT_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-account-view-window</FILE>
+<TITLE>ModestAccountViewWindow</TITLE>
+ModestAccountViewWindow
+modest_account_view_window_new
+<SUBSECTION Standard>
+MODEST_ACCOUNT_VIEW_WINDOW
+MODEST_IS_ACCOUNT_VIEW_WINDOW
+MODEST_TYPE_ACCOUNT_VIEW_WINDOW
+modest_account_view_window_get_type
+MODEST_ACCOUNT_VIEW_WINDOW_CLASS
+MODEST_IS_ACCOUNT_VIEW_WINDOW_CLASS
+MODEST_ACCOUNT_VIEW_WINDOW_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-transport-widget</FILE>
+<TITLE>ModestTransportWidget</TITLE>
+ModestTransportWidget
+modest_transport_widget_new
+modest_transport_widget_get_remember_password
+modest_transport_widget_get_requires_auth
+modest_transport_widget_get_username
+modest_transport_widget_get_servername
+modest_transport_widget_get_proto
+<SUBSECTION Standard>
+MODEST_TRANSPORT_WIDGET
+MODEST_IS_TRANSPORT_WIDGET
+MODEST_TYPE_TRANSPORT_WIDGET
+modest_transport_widget_get_type
+MODEST_TRANSPORT_WIDGET_CLASS
+MODEST_IS_TRANSPORT_WIDGET_CLASS
+MODEST_TRANSPORT_WIDGET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-store-widget</FILE>
+<TITLE>ModestStoreWidget</TITLE>
+ModestStoreWidget
+modest_store_widget_new
+modest_store_widget_get_remember_password
+modest_store_widget_get_username
+modest_store_widget_get_servername
+modest_store_widget_get_proto
+<SUBSECTION Standard>
+MODEST_STORE_WIDGET
+MODEST_IS_STORE_WIDGET
+MODEST_TYPE_STORE_WIDGET
+modest_store_widget_get_type
+MODEST_STORE_WIDGET_CLASS
+MODEST_IS_STORE_WIDGET_CLASS
+MODEST_STORE_WIDGET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-edit-msg-window</FILE>
+<TITLE>ModestEditMsgWindow</TITLE>
+ModestEditMsgWindow
+ModestEditType
+modest_edit_msg_window_new
+modest_edit_msg_window_set_msg
+<SUBSECTION Standard>
+MODEST_EDIT_MSG_WINDOW
+MODEST_IS_EDIT_MSG_WINDOW
+MODEST_TYPE_EDIT_MSG_WINDOW
+modest_edit_msg_window_get_type
+MODEST_EDIT_MSG_WINDOW_CLASS
+MODEST_IS_EDIT_MSG_WINDOW_CLASS
+MODEST_EDIT_MSG_WINDOW_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>modest-main-window</FILE>
+<TITLE>ModestMainWindow</TITLE>
+ModestMainWindow
+modest_main_window_new
+<SUBSECTION Standard>
+MODEST_MAIN_WINDOW
+MODEST_IS_MAIN_WINDOW
+MODEST_TYPE_MAIN_WINDOW
+modest_main_window_get_type
+MODEST_MAIN_WINDOW_CLASS
+MODEST_IS_MAIN_WINDOW_CLASS
+MODEST_MAIN_WINDOW_GET_CLASS
+</SECTION>
+
+<SECTION>
 <FILE>modest-tny-attachment</FILE>
 <TITLE>ModestTnyAttachment</TITLE>
 ModestTnyAttachment
@@ -879,118 +1091,18 @@ MODEST_WIDGET_FACTORY_GET_CLASS
 <SECTION>
 <FILE>modest-tny-account-store</FILE>
 ModestTnyGetPassFunc
-<TITLE>ModestTnyAccountStore</TITLE>
-ModestTnyAccountStore
-modest_tny_account_store_new
-tny_account_store_get_session
-<SUBSECTION Standard>
-MODEST_TNY_ACCOUNT_STORE
-MODEST_IS_TNY_ACCOUNT_STORE
-MODEST_TYPE_TNY_ACCOUNT_STORE
-modest_tny_account_store_get_type
-MODEST_TNY_ACCOUNT_STORE_CLASS
-MODEST_IS_TNY_ACCOUNT_STORE_CLASS
-MODEST_TNY_ACCOUNT_STORE_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-account-assistant</FILE>
-<TITLE>ModestAccountAssistant</TITLE>
-ModestAccountAssistant
-modest_account_assistant_new
-<SUBSECTION Standard>
-MODEST_ACCOUNT_ASSISTANT
-MODEST_IS_ACCOUNT_ASSISTANT
-MODEST_TYPE_ACCOUNT_ASSISTANT
-modest_account_assistant_get_type
-MODEST_ACCOUNT_ASSISTANT_CLASS
-MODEST_IS_ACCOUNT_ASSISTANT_CLASS
-MODEST_ACCOUNT_ASSISTANT_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-account-view-window</FILE>
-<TITLE>ModestAccountViewWindow</TITLE>
-ModestAccountViewWindow
-modest_account_view_window_new
-<SUBSECTION Standard>
-MODEST_ACCOUNT_VIEW_WINDOW
-MODEST_IS_ACCOUNT_VIEW_WINDOW
-MODEST_TYPE_ACCOUNT_VIEW_WINDOW
-modest_account_view_window_get_type
-MODEST_ACCOUNT_VIEW_WINDOW_CLASS
-MODEST_IS_ACCOUNT_VIEW_WINDOW_CLASS
-MODEST_ACCOUNT_VIEW_WINDOW_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-transport-widget</FILE>
-<TITLE>ModestTransportWidget</TITLE>
-ModestTransportWidget
-modest_transport_widget_new
-modest_transport_widget_get_remember_password
-modest_transport_widget_get_username
-modest_transport_widget_get_servername
-modest_transport_widget_get_proto
-<SUBSECTION Standard>
-MODEST_TRANSPORT_WIDGET
-MODEST_IS_TRANSPORT_WIDGET
-MODEST_TYPE_TRANSPORT_WIDGET
-modest_transport_widget_get_type
-MODEST_TRANSPORT_WIDGET_CLASS
-MODEST_IS_TRANSPORT_WIDGET_CLASS
-MODEST_TRANSPORT_WIDGET_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-store-widget</FILE>
-<TITLE>ModestStoreWidget</TITLE>
-ModestStoreWidget
-modest_store_widget_new
-modest_store_widget_get_remember_password
-modest_store_widget_get_username
-modest_store_widget_get_servername
-modest_store_widget_get_proto
-<SUBSECTION Standard>
-MODEST_STORE_WIDGET
-MODEST_IS_STORE_WIDGET
-MODEST_TYPE_STORE_WIDGET
-modest_store_widget_get_type
-MODEST_STORE_WIDGET_CLASS
-MODEST_IS_STORE_WIDGET_CLASS
-MODEST_STORE_WIDGET_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-edit-msg-window</FILE>
-<TITLE>ModestEditMsgWindow</TITLE>
-ModestEditMsgWindow
-ModestEditType
-modest_edit_msg_window_new
-modest_edit_msg_window_set_msg
-<SUBSECTION Standard>
-MODEST_EDIT_MSG_WINDOW
-MODEST_IS_EDIT_MSG_WINDOW
-MODEST_TYPE_EDIT_MSG_WINDOW
-modest_edit_msg_window_get_type
-MODEST_EDIT_MSG_WINDOW_CLASS
-MODEST_IS_EDIT_MSG_WINDOW_CLASS
-MODEST_EDIT_MSG_WINDOW_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-main-window</FILE>
-<TITLE>ModestMainWindow</TITLE>
-ModestMainWindow
-modest_main_window_new
+<TITLE>ModestTnyAccountStore</TITLE>
+ModestTnyAccountStore
+modest_tny_account_store_new
+tny_account_store_get_session
 <SUBSECTION Standard>
-MODEST_MAIN_WINDOW
-MODEST_IS_MAIN_WINDOW
-MODEST_TYPE_MAIN_WINDOW
-modest_main_window_get_type
-MODEST_MAIN_WINDOW_CLASS
-MODEST_IS_MAIN_WINDOW_CLASS
-MODEST_MAIN_WINDOW_GET_CLASS
+MODEST_TNY_ACCOUNT_STORE
+MODEST_IS_TNY_ACCOUNT_STORE
+MODEST_TYPE_TNY_ACCOUNT_STORE
+modest_tny_account_store_get_type
+MODEST_TNY_ACCOUNT_STORE_CLASS
+MODEST_IS_TNY_ACCOUNT_STORE_CLASS
+MODEST_TNY_ACCOUNT_STORE_GET_CLASS
 </SECTION>
 
 <SECTION>
@@ -1029,6 +1141,7 @@ MODEST_ACCOUNT_VIEW_WINDOW_GET_CLASS
 ModestTransportWidget
 modest_transport_widget_new
 modest_transport_widget_get_remember_password
+modest_transport_widget_get_requires_auth
 modest_transport_widget_get_username
 modest_transport_widget_get_servername
 modest_transport_widget_get_proto
@@ -1067,6 +1180,7 @@ MODEST_STORE_WIDGET_GET_CLASS
 ModestEditMsgWindow
 ModestEditType
 modest_edit_msg_window_new
+modest_edit_msg_window_set_msg
 <SUBSECTION Standard>
 MODEST_EDIT_MSG_WINDOW
 MODEST_IS_EDIT_MSG_WINDOW
@@ -1093,116 +1207,6 @@ MODEST_MAIN_WINDOW_GET_CLASS
 </SECTION>
 
 <SECTION>
-<FILE>modest-account-view</FILE>
-<TITLE>ModestAccountView</TITLE>
-ModestAccountView
-modest_account_view_new
-modest_account_view_get_selected_account
-<SUBSECTION Standard>
-MODEST_ACCOUNT_VIEW
-MODEST_IS_ACCOUNT_VIEW
-MODEST_TYPE_ACCOUNT_VIEW
-modest_account_view_get_type
-MODEST_ACCOUNT_VIEW_CLASS
-MODEST_IS_ACCOUNT_VIEW_CLASS
-MODEST_ACCOUNT_VIEW_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-header-view</FILE>
-MODEST_HEADER_VIEW_COLUMN
-ModestHeaderViewColumn
-ModestHeaderViewStyle
-ModestItemType
-<TITLE>ModestHeaderView</TITLE>
-ModestHeaderView
-modest_header_view_new
-modest_header_view_set_folder
-modest_header_view_get_folder
-modest_header_view_set_columns
-modest_header_view_get_columns
-modest_header_view_set_style
-modest_header_view_get_style
-modest_header_view_get_selected_headers
-<SUBSECTION Standard>
-MODEST_HEADER_VIEW
-MODEST_IS_HEADER_VIEW
-MODEST_TYPE_HEADER_VIEW
-modest_header_view_get_type
-MODEST_HEADER_VIEW_CLASS
-MODEST_IS_HEADER_VIEW_CLASS
-MODEST_HEADER_VIEW_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-toolbar</FILE>
-ModestToolbarButton
-<TITLE>ModestToolbar</TITLE>
-ModestToolbar
-modest_toolbar_new
-<SUBSECTION Standard>
-MODEST_TOOLBAR
-MODEST_IS_TOOLBAR
-MODEST_TYPE_TOOLBAR
-modest_toolbar_get_type
-MODEST_TOOLBAR_CLASS
-MODEST_IS_TOOLBAR_CLASS
-MODEST_TOOLBAR_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-folder-view</FILE>
-<TITLE>ModestFolderView</TITLE>
-ModestFolderView
-modest_folder_view_new
-modest_folder_view_set_title
-modest_folder_view_is_empty
-modest_folder_view_guess_folder_type
-modest_folder_view_get_selected_account
-<SUBSECTION Standard>
-MODEST_FOLDER_VIEW
-MODEST_IS_FOLDER_VIEW
-MODEST_TYPE_FOLDER_VIEW
-modest_folder_view_get_type
-MODEST_FOLDER_VIEW_CLASS
-MODEST_IS_FOLDER_VIEW_CLASS
-MODEST_FOLDER_VIEW_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-combo-box</FILE>
-<TITLE>ModestComboBox</TITLE>
-ModestComboBox
-modest_combo_box_new
-modest_combo_box_get_active_id
-modest_combo_box_get_active_display_name
-<SUBSECTION Standard>
-MODEST_COMBO_BOX
-MODEST_IS_COMBO_BOX
-MODEST_TYPE_COMBO_BOX
-modest_combo_box_get_type
-MODEST_COMBO_BOX_CLASS
-MODEST_IS_COMBO_BOX_CLASS
-MODEST_COMBO_BOX_GET_CLASS
-</SECTION>
-
-<SECTION>
-<FILE>modest-msg-view</FILE>
-<TITLE>ModestMsgView</TITLE>
-ModestMsgView
-modest_msg_view_new
-modest_msg_view_set_message
-<SUBSECTION Standard>
-MODEST_MSG_VIEW
-MODEST_IS_MSG_VIEW
-MODEST_TYPE_MSG_VIEW
-modest_msg_view_get_type
-MODEST_MSG_VIEW_CLASS
-MODEST_IS_MSG_VIEW_CLASS
-MODEST_MSG_VIEW_GET_CLASS
-</SECTION>
-
-<SECTION>
 <FILE>modest-account-assistant</FILE>
 <TITLE>ModestAccountAssistant</TITLE>
 ModestAccountAssistant
@@ -1276,7 +1280,6 @@ MODEST_STORE_WIDGET_GET_CLASS
 ModestEditMsgWindow
 ModestEditType
 modest_edit_msg_window_new
-modest_edit_msg_window_set_msg
 <SUBSECTION Standard>
 MODEST_EDIT_MSG_WINDOW
 MODEST_IS_EDIT_MSG_WINDOW
@@ -1438,6 +1441,7 @@ MODEST_ACCOUNT_HOSTNAME
 MODEST_ACCOUNT_USERNAME
 MODEST_ACCOUNT_PROTO
 MODEST_ACCOUNT_ENABLED
+MODEST_ACCOUNT_TYPE
 MODEST_ACCOUNT_LEAVE_ON_SERVER
 MODEST_ACCOUNT_PREFERRED_CNX
 MODEST_ACCOUNT_OPTIONS
@@ -1535,6 +1539,19 @@ modest_proto_auth_protos
 </SECTION>
 
 <SECTION>
+<FILE>modest-widget-memory</FILE>
+modest_widget_memory_save
+modest_widget_memory_restore
+</SECTION>
+
+<SECTION>
+<FILE>modest-tny-msg-actions</FILE>
+modest_tny_msg_actions_find_body_part
+modest_tny_msg_actions_find_nth_part
+modest_tny_msg_actions_find_body
+</SECTION>
+
+<SECTION>
 <FILE>modest-marshal</FILE>
 modest_marshal_VOID__POINTER_POINTER
 modest_marshal_VOID__POINTER_POINTER_POINTER
@@ -1550,19 +1567,6 @@ modest_marshal_VOID__STRING_POINTER_POINTER_POINTER
 </SECTION>
 
 <SECTION>
-<FILE>modest-widget-memory</FILE>
-modest_widget_memory_save
-modest_widget_memory_restore
-</SECTION>
-
-<SECTION>
-<FILE>modest-tny-msg-actions</FILE>
-modest_tny_msg_actions_find_body_part
-modest_tny_msg_actions_find_nth_part
-modest_tny_msg_actions_find_body
-</SECTION>
-
-<SECTION>
 <FILE>modest-error</FILE>
 ModestErrorDomain
 ModestErrorCode
@@ -1639,6 +1643,43 @@ MODEST_TOOLBAR_ICON_STOP
 </SECTION>
 
 <SECTION>
+<FILE>modest-header-view-priv</FILE>
+</SECTION>
+
+<SECTION>
+<FILE>modest-icon-names</FILE>
+PIXMAP_PREFIX
+MODEST_APP_ICON
+MODEST_HEADER_ICON_READ
+MODEST_HEADER_ICON_UNREAD
+MODEST_HEADER_ICON_DELETED
+MODEST_HEADER_ICON_ATTACH
+MODEST_FOLDER_ICON_OPEN
+MODEST_FOLDER_ICON_CLOSED
+MODEST_FOLDER_ICON_ACCOUNT
+MODEST_FOLDER_ICON_INBOX
+MODEST_FOLDER_ICON_OUTBOX
+MODEST_FOLDER_ICON_SENT
+MODEST_FOLDER_ICON_TRASH
+MODEST_FOLDER_ICON_JUNK
+MODEST_FOLDER_ICON_DRAFTS
+MODEST_FOLDER_ICON_NORMAL
+MODEST_FOLDER_ICON_CONTACTS
+MODEST_FOLDER_ICON_NOTES
+MODEST_FOLDER_ICON_CALENDAR
+MODEST_TOOLBAR_ICON_MAIL_SEND
+MODEST_TOOLBAR_ICON_NEW_MAIL
+MODEST_TOOLBAR_ICON_SEND_RECEIVE
+MODEST_TOOLBAR_ICON_REPLY
+MODEST_TOOLBAR_ICON_REPLY_ALL
+MODEST_TOOLBAR_ICON_FORWARD
+MODEST_TOOLBAR_ICON_DELETE
+MODEST_TOOLBAR_ICON_NEXT
+MODEST_TOOLBAR_ICON_PREV
+MODEST_TOOLBAR_ICON_STOP
+</SECTION>
+
+<SECTION>
 <FILE>modest-tny-store-actions</FILE>
 modest_tny_store_actions_create_folder
 modest_tny_store_actions_remove_folder
@@ -1664,6 +1705,7 @@ MODEST_ACCOUNT_HOSTNAME
 MODEST_ACCOUNT_USERNAME
 MODEST_ACCOUNT_PROTO
 MODEST_ACCOUNT_ENABLED
+MODEST_ACCOUNT_TYPE
 MODEST_ACCOUNT_LEAVE_ON_SERVER
 MODEST_ACCOUNT_PREFERRED_CNX
 MODEST_ACCOUNT_OPTIONS
@@ -1761,6 +1803,19 @@ modest_proto_auth_protos
 </SECTION>
 
 <SECTION>
+<FILE>modest-widget-memory</FILE>
+modest_widget_memory_save
+modest_widget_memory_restore
+</SECTION>
+
+<SECTION>
+<FILE>modest-tny-msg-actions</FILE>
+modest_tny_msg_actions_find_body_part
+modest_tny_msg_actions_find_nth_part
+modest_tny_msg_actions_find_body
+</SECTION>
+
+<SECTION>
 <FILE>modest-marshal</FILE>
 modest_marshal_VOID__POINTER_POINTER
 modest_marshal_VOID__POINTER_POINTER_POINTER
@@ -1776,19 +1831,6 @@ modest_marshal_VOID__STRING_POINTER_POINTER_POINTER
 </SECTION>
 
 <SECTION>
-<FILE>modest-widget-memory</FILE>
-modest_widget_memory_save
-modest_widget_memory_restore
-</SECTION>
-
-<SECTION>
-<FILE>modest-tny-msg-actions</FILE>
-modest_tny_msg_actions_find_body_part
-modest_tny_msg_actions_find_nth_part
-modest_tny_msg_actions_find_body
-</SECTION>
-
-<SECTION>
 <FILE>modest-error</FILE>
 ModestErrorDomain
 ModestErrorCode
@@ -1864,40 +1906,3 @@ MODEST_TOOLBAR_ICON_STOP
 <FILE>modest-header-view-priv</FILE>
 </SECTION>
 
-<SECTION>
-<FILE>modest-icon-names</FILE>
-PIXMAP_PREFIX
-MODEST_APP_ICON
-MODEST_HEADER_ICON_READ
-MODEST_HEADER_ICON_UNREAD
-MODEST_HEADER_ICON_DELETED
-MODEST_HEADER_ICON_ATTACH
-MODEST_FOLDER_ICON_OPEN
-MODEST_FOLDER_ICON_CLOSED
-MODEST_FOLDER_ICON_ACCOUNT
-MODEST_FOLDER_ICON_INBOX
-MODEST_FOLDER_ICON_OUTBOX
-MODEST_FOLDER_ICON_SENT
-MODEST_FOLDER_ICON_TRASH
-MODEST_FOLDER_ICON_JUNK
-MODEST_FOLDER_ICON_DRAFTS
-MODEST_FOLDER_ICON_NORMAL
-MODEST_FOLDER_ICON_CONTACTS
-MODEST_FOLDER_ICON_NOTES
-MODEST_FOLDER_ICON_CALENDAR
-MODEST_TOOLBAR_ICON_MAIL_SEND
-MODEST_TOOLBAR_ICON_NEW_MAIL
-MODEST_TOOLBAR_ICON_SEND_RECEIVE
-MODEST_TOOLBAR_ICON_REPLY
-MODEST_TOOLBAR_ICON_REPLY_ALL
-MODEST_TOOLBAR_ICON_FORWARD
-MODEST_TOOLBAR_ICON_DELETE
-MODEST_TOOLBAR_ICON_NEXT
-MODEST_TOOLBAR_ICON_PREV
-MODEST_TOOLBAR_ICON_STOP
-</SECTION>
-
-<SECTION>
-<FILE>modest-header-view-priv</FILE>
-</SECTION>
-
index eb816cb..d142920 100644 (file)
@@ -2,7 +2,7 @@
 ModestAccountAssistant
 
 <!-- ##### SECTION Short_Description ##### -->
-A widget that displays a wizard to create new accounts
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 1e4a518..ef904c0 100644 (file)
@@ -131,6 +131,13 @@ modest-account-keys
 
 
 
+<!-- ##### MACRO MODEST_ACCOUNT_TYPE ##### -->
+<para>
+
+</para>
+
+
+
 <!-- ##### MACRO MODEST_ACCOUNT_LEAVE_ON_SERVER ##### -->
 <para>
 
index 0c8a6a2..f4d862c 100644 (file)
@@ -30,38 +30,19 @@ ModestAccountMgr
 
 </para>
 
-@: 
-@: 
-@: 
-@: 
+@modestaccountmgr: the object which received the signal.
+@arg1: 
+@arg2: 
+@arg3: 
 
 <!-- ##### SIGNAL ModestAccountMgr::account-removed ##### -->
 <para>
 
 </para>
 
-@: 
-@: 
-@: 
-
-<!-- ##### SIGNAL ModestAccountMgr::account-changed ##### -->
-<para>
-
-</para>
-
-@: 
-@: 
-@: 
-@: 
-
-<!-- ##### SIGNAL ModestAccountMgr::account-removed ##### -->
-<para>
-
-</para>
-
-@: 
-@: 
-@: 
+@modestaccountmgr: the object which received the signal.
+@arg1: 
+@arg2: 
 
 <!-- ##### STRUCT ModestServerAccountData ##### -->
 <para>
index 0f09541..21e58a3 100644 (file)
@@ -2,7 +2,7 @@
 ModestAccountViewWindow
 
 <!-- ##### SECTION Short_Description ##### -->
-A window that shows the list of available accounts
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index a842b6b..61fcfb1 100644 (file)
@@ -2,7 +2,7 @@
 ModestAccountView
 
 <!-- ##### SECTION Short_Description ##### -->
-A widget that shows a list with the available accounts
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 1157267..16c4866 100644 (file)
@@ -2,7 +2,7 @@
 ModestComboBox
 
 <!-- ##### SECTION Short_Description ##### -->
-A wrapper for a #GtkComboBox that shows lists of #ModestPair objects
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index c4a1dc7..1381572 100644 (file)
@@ -48,18 +48,9 @@ ModestConf
 
 </para>
 
-@: 
-@: 
-@: 
-
-<!-- ##### SIGNAL ModestConf::key-changed ##### -->
-<para>
-
-</para>
-
-@: 
-@: 
-@: 
+@modestconf: the object which received the signal.
+@arg1: 
+@arg2: 
 
 <!-- ##### FUNCTION modest_conf_new ##### -->
 <para>
index 91a8bf8..ecc2065 100644 (file)
@@ -2,7 +2,7 @@
 ModestEditMsgWindow
 
 <!-- ##### SECTION Short_Description ##### -->
-A window used for composing messages
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
@@ -46,12 +46,3 @@ A window used for composing messages
 @Returns: 
 
 
-<!-- ##### FUNCTION modest_edit_msg_window_set_msg ##### -->
-<para>
-
-</para>
-
-@self: 
-@msg: 
-
-
index e450e4b..19e571a 100644 (file)
@@ -2,7 +2,7 @@
 modest-error
 
 <!-- ##### SECTION Short_Description ##### -->
-Modest error stuff
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 0d0bf02..a28a5a2 100644 (file)
@@ -2,7 +2,7 @@
 ModestFolderView
 
 <!-- ##### SECTION Short_Description ##### -->
-A widget that shows the list of folders of email accounts
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 7d1dd40..9779f1e 100644 (file)
@@ -2,7 +2,7 @@
 ModestFormatter
 
 <!-- ##### SECTION Short_Description ##### -->
-An object that creates new emails from others
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 4035eaf..bd0c464 100644 (file)
@@ -2,7 +2,7 @@
 ModestHeaderView
 
 <!-- ##### SECTION Short_Description ##### -->
-A widget that shows a list of email headers
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 770f928..f15a940 100644 (file)
@@ -2,7 +2,7 @@
 modest-icon-factory
 
 <!-- ##### SECTION Short_Description ##### -->
-A factory that creates the icons for Modest
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 477cc0a..9e44b91 100644 (file)
@@ -2,7 +2,7 @@
 modest-icon-names
 
 <!-- ##### SECTION Short_Description ##### -->
-Definitions for the Modest icons
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index f2309e0..15e970e 100644 (file)
@@ -2,7 +2,7 @@
 ModestMailOperationQueue
 
 <!-- ##### SECTION Short_Description ##### -->
-An object that stores a queue of #ModestMailOperation
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 13490da..9668d88 100644 (file)
@@ -2,7 +2,7 @@
 ModestMailOperation
 
 <!-- ##### SECTION Short_Description ##### -->
-An object that performs mail operations
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
@@ -195,6 +195,7 @@ An object that performs mail operations
 @self: 
 @header: 
 @folder: 
+@Returns: 
 
 
 <!-- ##### FUNCTION modest_mail_operation_move_msg ##### -->
@@ -205,6 +206,7 @@ An object that performs mail operations
 @self: 
 @header: 
 @folder: 
+@Returns: 
 
 
 <!-- ##### FUNCTION modest_mail_operation_remove_msg ##### -->
index fde7239..291af8f 100644 (file)
@@ -2,7 +2,7 @@
 ModestMsgView
 
 <!-- ##### SECTION Short_Description ##### -->
-A widget that shows the body of a message
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
@@ -30,24 +30,24 @@ A widget that shows the body of a message
 
 </para>
 
-@modestmsgview: the object which received the signal.
-@arg1: 
+@: 
+@: 
 
 <!-- ##### SIGNAL ModestMsgView::link-clicked ##### -->
 <para>
 
 </para>
 
-@modestmsgview: the object which received the signal.
-@arg1: 
+@: 
+@: 
 
 <!-- ##### SIGNAL ModestMsgView::link-hover ##### -->
 <para>
 
 </para>
 
-@modestmsgview: the object which received the signal.
-@arg1: 
+@: 
+@: 
 
 <!-- ##### FUNCTION modest_msg_view_new ##### -->
 <para>
index 17156a6..66b40e6 100644 (file)
@@ -2,7 +2,7 @@
 modest-pair
 
 <!-- ##### SECTION Short_Description ##### -->
-An object that stores pairs of related objects
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index f531829..42352e7 100644 (file)
@@ -2,7 +2,7 @@
 modest-presets
 
 <!-- ##### SECTION Short_Description ##### -->
-An object that manages Modest presest
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 0e0fdf9..d8aea74 100644 (file)
@@ -2,7 +2,7 @@
 ModestProtocolMgr
 
 <!-- ##### SECTION Short_Description ##### -->
-An object that manages the email protocols
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index bdd6f69..1b41490 100644 (file)
@@ -2,7 +2,7 @@
 ModestStoreWidget
 
 <!-- ##### SECTION Short_Description ##### -->
-A widget that shows the server information for a store account
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
@@ -25,6 +25,20 @@ A widget that shows the server information for a store account
 </para>
 
 
+<!-- ##### SIGNAL ModestStoreWidget::data-changed ##### -->
+<para>
+
+</para>
+
+@modeststorewidget: the object which received the signal.
+
+<!-- ##### SIGNAL ModestStoreWidget::data-changed ##### -->
+<para>
+
+</para>
+
+@modeststorewidget: the object which received the signal.
+
 <!-- ##### FUNCTION modest_store_widget_new ##### -->
 <para>
 
index cb283a4..bab1d21 100644 (file)
@@ -2,7 +2,7 @@
 modest-text-utils
 
 <!-- ##### SECTION Short_Description ##### -->
-A library with text utility functions
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 7472858..3673db2 100644 (file)
@@ -36,27 +36,8 @@ ModestTnyAccountStore
 
 </para>
 
-@: 
-@: 
-
-<!-- ##### SIGNAL ModestTnyAccountStore::password-requested ##### -->
-<para>
-
-</para>
-
-@: 
-@: 
-@: 
-@: 
-@Param5: 
-
-<!-- ##### SIGNAL ModestTnyAccountStore::account-update ##### -->
-<para>
-
-</para>
-
-@: 
-@: 
+@modesttnyaccountstore: the object which received the signal.
+@arg1: 
 
 <!-- ##### SIGNAL ModestTnyAccountStore::password-requested ##### -->
 <para>
@@ -64,9 +45,9 @@ ModestTnyAccountStore
 </para>
 
 @: 
-@: 
-@: 
-@: 
+@Param2: 
+@Param3: 
+@Param4: 
 @Param5: 
 
 <!-- ##### FUNCTION modest_tny_account_store_new ##### -->
index 3a23c59..b95a37d 100644 (file)
@@ -2,7 +2,7 @@
 ModestTnyPlatformFactory
 
 <!-- ##### SECTION Short_Description ##### -->
-An implementation of a #TnyPlatformFactory
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index fdb3a4d..d073ba4 100644 (file)
@@ -2,7 +2,7 @@
 ModestTnyStreamGtkhtml
 
 <!-- ##### SECTION Short_Description ##### -->
-An implementation of a #TnyStream that uses a #GtkHTMLStream
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 7df6bc3..9699dce 100644 (file)
@@ -2,7 +2,7 @@
 ModestToolbar
 
 <!-- ##### SECTION Short_Description ##### -->
-A widgets that shows a toolbar in the Modest main window
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 2bdb33e..eef2c1a 100644 (file)
@@ -2,7 +2,7 @@
 ModestTransportWidget
 
 <!-- ##### SECTION Short_Description ##### -->
-A widget that shows the server information for a transport account
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 007a13e..a6520df 100644 (file)
@@ -2,7 +2,7 @@
 ModestWidgetFactory
 
 <!-- ##### SECTION Short_Description ##### -->
-A factory that creates the widgets of the UI
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index e6f341c..74f7955 100644 (file)
@@ -2,7 +2,7 @@
 modest-widget-memory
 
 <!-- ##### SECTION Short_Description ##### -->
-An object that stores preferences of the widgets
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
index 2ae7a21..303a90c 100644 (file)
@@ -154,7 +154,8 @@ gboolean modest_account_mgr_add_server_account    (ModestAccountMgr *self,
  * modest_account_mgr_remove_account:
  * @self: a ModestAccountMgr instance
  * @name: the name of the account to remove
- * @err: a GError ptr, or NULL to ignore.
+ * @server_account: TRUE if the account to remove is a server account
+ * @err: a #GError ptr, or NULL to ignore.
  * 
  * remove an existing account. the account with @name should already exist
  *
index a74b54b..cf5c040 100644 (file)
@@ -74,13 +74,13 @@ ModestFormatter* modest_formatter_new (const gchar *content_type);
  * Original message
  * ----------------
  * Date: 1970/01/01
- * From: somemail@modest.org
+ * From: somemailATmodest.org
  * Body: "This is the body of the text"
  * </para><para>
  * Cited message
  * -------------
  * Body:
- * On 1970/01/01 somemail@modest.org wrote:
+ * On 1970/01/01 somemailATmodest.org wrote:
  * This is the body of the text
  * </para></programlisting>
  *
@@ -103,13 +103,13 @@ TnyMsg * modest_formatter_cite   (ModestFormatter *self, TnyMimePart *part, TnyH
  * Original message
  * ----------------
  * Date: 1970/01/01
- * From: somemail@modest.org
+ * From: somemailATmodest.org
  * Body: "This is the body of the text"
  * </para><para>
  * Quoted message
  * -------------
  * Body:
- * On 1970/01/01 somemail@modest.org wrote:
+ * On 1970/01/01 somemailATmodest.org wrote:
  * > This is the body of the text
  * </para></programlisting>
  *
@@ -133,8 +133,8 @@ TnyMsg * modest_formatter_quote  (ModestFormatter *self, TnyMimePart *part, TnyH
  * Original message
  * ----------------
  * Date: 1970/01/01
- * From: somemail@modest.org
- * To: mymail@modest.org
+ * From: somemailATmodest.org
+ * To: mymailATmodest.org
  * Subject: Mail subject
  * Body: "This is the body of the text"
  * </para><para>
@@ -142,11 +142,11 @@ TnyMsg * modest_formatter_quote  (ModestFormatter *self, TnyMimePart *part, TnyH
  * -------------
  * Body:
  * -----Forwarded Message-----
- * From: somemail@modest.org
+ * From: somemailATmodest.org
  * Sent: 1970/01/01
- * To: mymail@modest.org
+ * To: mymailATmodest.org
  * Subject: Fw: Mail subject
- * On 1970/01/01 somemail@modest.org wrote:
+ * On 1970/01/01 somemailATmodest.org wrote:
  * This is the body of the text
  * </para></programlisting>
  *
index e0068b3..9a99a59 100644 (file)
@@ -80,10 +80,10 @@ static void modest_mail_operation_xfer_folder (ModestMailOperation *self,
                                               TnyFolderStore *parent,
                                               gboolean delete_original);
 
-static void modest_mail_operation_xfer_msg    (ModestMailOperation *self,
-                                              TnyHeader *header, 
-                                              TnyFolder *folder, 
-                                              gboolean delete_original);
+static gboolean    modest_mail_operation_xfer_msg          (ModestMailOperation *self,
+                                                           TnyHeader *header, 
+                                                           TnyFolder *folder, 
+                                                           gboolean delete_original);
 
 static TnyFolder * modest_mail_operation_find_trash_folder (ModestMailOperation *self,
                                                            TnyStoreAccount *store_account);
@@ -839,26 +839,26 @@ modest_mail_operation_find_trash_folder (ModestMailOperation *self,
 /* **************************  MSG  ACTIONS  ************************* */
 /* ******************************************************************* */
 
-void 
+gboolean 
 modest_mail_operation_copy_msg (ModestMailOperation *self,
                                TnyHeader *header, 
                                TnyFolder *folder)
 {
-       g_return_if_fail (TNY_IS_HEADER (header));
-       g_return_if_fail (TNY_IS_FOLDER (folder));
+       g_return_val_if_fail (TNY_IS_HEADER (header), FALSE);
+       g_return_val_if_fail (TNY_IS_FOLDER (folder), FALSE);
 
-       modest_mail_operation_xfer_msg (self, header, folder, FALSE);
+       return modest_mail_operation_xfer_msg (self, header, folder, FALSE);
 }
 
-void 
+gboolean 
 modest_mail_operation_move_msg (ModestMailOperation *self,
                                TnyHeader *header, 
                                TnyFolder *folder)
 {
-       g_return_if_fail (TNY_IS_HEADER (header));
-       g_return_if_fail (TNY_IS_FOLDER (folder));
+       g_return_val_if_fail (TNY_IS_HEADER (header), FALSE);
+       g_return_val_if_fail (TNY_IS_FOLDER (folder), FALSE);
 
-       modest_mail_operation_xfer_msg (self, header, folder, TRUE);
+       return modest_mail_operation_xfer_msg (self, header, folder, TRUE);
 }
 
 void 
@@ -893,24 +893,44 @@ modest_mail_operation_remove_msg (ModestMailOperation *self,
 }
 
 static void
+transfer_msgs_cb (TnyFolder *folder, GError **err, gpointer user_data)
+{
+       ModestMailOperationPrivate *priv;
+
+       priv = MODEST_MAIL_OPERATION_GET_PRIVATE(user_data);
+       priv->done = 1;
+       priv->status = MODEST_MAIL_OPERATION_STATUS_SUCCESS;
+
+       g_signal_emit (G_OBJECT (user_data), signals[PROGRESS_CHANGED_SIGNAL], 0, NULL);
+}
+
+static gboolean
 modest_mail_operation_xfer_msg (ModestMailOperation *self,
                                TnyHeader *header, 
                                TnyFolder *folder, 
                                gboolean delete_original)
 {
+       ModestMailOperationPrivate *priv;
        TnyFolder *src_folder;
        TnyList *headers;
 
        src_folder = tny_header_get_folder (header);
        headers = tny_simple_list_new ();
 
-       /* Move */
+       priv = MODEST_MAIL_OPERATION_GET_PRIVATE(self);
+       priv->total = 1;
+       priv->done = 0;
+       priv->status = MODEST_MAIL_OPERATION_STATUS_IN_PROGRESS;
+
        tny_list_prepend (headers, G_OBJECT (header));
-       tny_folder_transfer_msgs (src_folder, headers, folder, delete_original, NULL); /* FIXME */
+       tny_folder_transfer_msgs_async (src_folder, headers, folder, 
+                                       delete_original, transfer_msgs_cb, self);
 
        /* Free */
        g_object_unref (headers);
        g_object_unref (folder);
+
+       return TRUE;
 }
 
 
index cf2169c..47820f7 100644 (file)
@@ -47,27 +47,42 @@ G_BEGIN_DECLS
 typedef struct _ModestMailOperation      ModestMailOperation;
 typedef struct _ModestMailOperationClass ModestMailOperationClass;
 
-/* typedef enum _ModestMailOperationForwardType ModestMailOperationForwardType; */
-/* typedef enum _ModestMailOperationReplyType   ModestMailOperationReplyType; */
-/* typedef enum _ModestMailOperationReplyMode   ModestMailOperationReplyMode; */
-/* typedef enum _ModestMailOperationStatus      ModestMailOperationStatus; */
-
+/**
+ * ModestMailOperationForwardType:
+ *
+ * How the original message will be forwarded to the recipient
+ */
 typedef enum _ModestMailOperationForwardType {
        MODEST_MAIL_OPERATION_FORWARD_TYPE_INLINE = 1,
        MODEST_MAIL_OPERATION_FORWARD_TYPE_ATTACHMENT
 } ModestMailOperationForwardType;
 
+/**
+ * ModestMailOperationReplyType:
+ *
+ * How the original message will be forwarded to the recipient
+ */
 typedef enum _ModestMailOperationReplyType {
        MODEST_MAIL_OPERATION_REPLY_TYPE_CITE = 1,
        MODEST_MAIL_OPERATION_REPLY_TYPE_QUOTE
 } ModestMailOperationReplyType;
 
+/**
+ * ModestMailOperationReplyMode:
+ *
+ * Who will be the recipients of the replied message
+ */
 typedef enum _ModestMailOperationReplyMode {
        MODEST_MAIL_OPERATION_REPLY_MODE_SENDER,
        MODEST_MAIL_OPERATION_REPLY_MODE_LIST,
        MODEST_MAIL_OPERATION_REPLY_MODE_ALL
 } ModestMailOperationReplyMode;
 
+/**
+ * ModestMailOperationStatus:
+ *
+ * The state of a mail operation
+ */
 typedef enum _ModestMailOperationStatus {
        MODEST_MAIL_OPERATION_STATUS_INVALID,
        MODEST_MAIL_OPERATION_STATUS_SUCCESS,
@@ -181,7 +196,7 @@ TnyMsg* modest_mail_operation_create_reply_mail    (TnyMsg *msg,
  * <informalexample><programlisting>
  * queue = modest_tny_platform_factory_get_modest_mail_operation_queue_instance (fact)
  * mail_op = modest_mail_operation_new ();
- * g_signal_connect (G_OBJECT (mail_op), "progress_changed", G_CALLBACK (on_progress_changed), queue);
+ * g_signal_connect (G_OBJECT (mail_op), "progress_changed", G_CALLBACK(on_progress_changed), queue);
  * if (modest_mail_operation_update_account (mail_op, account))
  * {
  *     modest_mail_operation_queue_add (queue, mail_op);
@@ -284,11 +299,26 @@ void          modest_mail_operation_copy_folder    (ModestMailOperation *self,
  * @header: the #TnyHeader of the message to copy
  * @folder: the #TnyFolder where the message will be copied
  * 
- * Copies a message from its current folder to another one. This
- * operation is synchronous, so the #ModestMailOperation should not be
- * added to any #ModestMailOperationQueue
+ * Asynchronously copies a message from its current folder to another
+ * one. The caller should add the #ModestMailOperation to a
+ * #ModestMailOperationQueue and then free it. The caller will be
+ * notified by the "progress_changed" when the operation is completed.
+ * 
+ * Example
+ * <informalexample><programlisting>
+ * queue = modest_tny_platform_factory_get_modest_mail_operation_queue_instance (fact);
+ * mail_op = modest_mail_operation_new ();
+ * if (modest_mail_operation_copy_msg (mail_op, account))
+ * {
+ *     g_signal_connect (G_OBJECT (mail_op), "progress_changed", G_CALLBACK(on_progress_changed), queue);
+ *     modest_mail_operation_queue_add (queue, mail_op);
+ * }
+ * g_object_unref (G_OBJECT (mail_op));
+ * </programlisting></informalexample>
+ *
+ * Returns: TRUE if the mail operation could be started, or FALSE otherwise
  **/
-void          modest_mail_operation_copy_msg       (ModestMailOperation *self,
+gboolean      modest_mail_operation_copy_msg       (ModestMailOperation *self,
                                                    TnyHeader *header, 
                                                    TnyFolder *folder);
 
@@ -298,11 +328,26 @@ void          modest_mail_operation_copy_msg       (ModestMailOperation *self,
  * @header: the #TnyHeader of the message to move
  * @folder: the #TnyFolder where the message will be moved
  * 
- * Moves a message from its current folder to another one. This
- * operation is synchronous, so the #ModestMailOperation should not be
- * added to any #ModestMailOperationQueue
+ * Asynchronously moves a message from its current folder to another
+ * one. The caller should add the #ModestMailOperation to a
+ * #ModestMailOperationQueue and then free it. The caller will be
+ * notified by the "progress_changed" when the operation is completed.
+ * 
+ * Example
+ * <informalexample><programlisting>
+ * queue = modest_tny_platform_factory_get_modest_mail_operation_queue_instance (fact);
+ * mail_op = modest_mail_operation_new ();
+ * if (modest_mail_operation_move_msg (mail_op, account))
+ * {
+ *     g_signal_connect (G_OBJECT (mail_op), "progress_changed", G_CALLBACK(on_progress_changed), queue);
+ *     modest_mail_operation_queue_add (queue, mail_op);
+ * }
+ * g_object_unref (G_OBJECT (mail_op));
+ * </programlisting></informalexample>
+ *
+ * Returns: TRUE if the mail operation could be started, or FALSE otherwise
  **/
-void          modest_mail_operation_move_msg       (ModestMailOperation *self,
+gboolean      modest_mail_operation_move_msg       (ModestMailOperation *self,
                                                    TnyHeader *header, 
                                                    TnyFolder *folder);