r3114 - in trunk/src/target/OM-2007.2/libraries/libmokojournal2: . doc/reference mokojournal

thomas at sita.openmoko.org thomas at sita.openmoko.org
Mon Oct 8 13:33:05 CEST 2007


Author: thomas
Date: 2007-10-08 13:33:03 +0200 (Mon, 08 Oct 2007)
New Revision: 3114

Added:
   trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal-sections.txt
   trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal.types
Modified:
   trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog
   trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/Makefile.am
   trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal-docs.sgml
   trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.c
   trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.h
Log:
Patch by: Emmanuele Bassi <ebassi at o-hand.com>

* doc/reference/Makefile.am:
* doc/reference/libmokojournal-docs.sgml:
* doc/reference/libmokojournal.types
* doc/reference/libmokojournal-sections.txt
* mokojournal/moko-journal.c:
* mokojournal/moko-journal.h:

Generate a correct sections.txt file.

Fixed a couple of inconsistencies in the API.


Modified: trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog	2007-10-08 11:28:08 UTC (rev 3113)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/ChangeLog	2007-10-08 11:33:03 UTC (rev 3114)
@@ -1,3 +1,18 @@
+2007-10-08  Thomas Wood  <thomas at openedhand.com>
+
+	Patch by: Emmanuele Bassi <ebassi at o-hand.com>
+
+	* doc/reference/Makefile.am:
+	* doc/reference/libmokojournal-docs.sgml:
+	* doc/reference/libmokojournal.types
+	* doc/reference/libmokojournal-sections.txt
+	* mokojournal/moko-journal.c:
+	* mokojournal/moko-journal.h:
+
+	Generate a correct sections.txt file.
+
+	Fixed a couple of inconsistencies in the API.
+
 2007-10-04  Thomas Wood  <thomas at openedhand.com>
 
 	* mokojournal/moko-journal.c:

Modified: trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/Makefile.am
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/Makefile.am	2007-10-08 11:28:08 UTC (rev 3113)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/Makefile.am	2007-10-08 11:33:03 UTC (rev 3114)
@@ -47,7 +47,7 @@
 
 # Header files to ignore when scanning.
 # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
-IGNORE_HFILES=
+IGNORE_HFILES=moko-time-priv.h
 
 # Images to copy into HTML directory.
 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
@@ -75,7 +75,7 @@
 
 # Other files to distribute
 # e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST = version.xml.in
+EXTRA_DIST += version.xml.in
 
 # Files not to distribute
 # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types

Modified: trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal-docs.sgml
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal-docs.sgml	2007-10-08 11:28:08 UTC (rev 3113)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal-docs.sgml	2007-10-08 11:33:03 UTC (rev 3114)
@@ -16,7 +16,6 @@
   <chapter>
     <title>libmokojournal2</title>
     <xi:include href="xml/moko-journal.xml"/>
-    <xi:include href="xml/moko-time-priv.xml"/>
     <xi:include href="xml/moko-time.xml"/>
   </chapter>
 </book>

Added: trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal-sections.txt
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal-sections.txt	2007-10-08 11:28:08 UTC (rev 3113)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal-sections.txt	2007-10-08 11:33:03 UTC (rev 3114)
@@ -0,0 +1,103 @@
+<SECTION>
+<FILE>moko-journal</FILE>
+<TITLE>MokoJournal</TITLE>
+MokoJournal
+MokoJournalClass
+moko_journal_open_default
+moko_journal_close
+moko_journal_add_entry
+moko_journal_get_nb_entries
+moko_journal_get_entry_at
+moko_journal_remove_entry_at
+moko_journal_remove_entry_by_uid
+moko_journal_write_to_storage
+moko_journal_load_from_storage
+
+<SUBSECTION>
+MokoJournalEntryType
+MokoJournalEntry
+moko_journal_entry_new
+moko_journal_entry_ref
+moko_journal_entry_unref
+moko_journal_entry_get_entry_type
+moko_journal_entry_set_entry_type
+
+<SUBSECTION>
+moko_journal_entry_get_uid
+moko_journal_entry_get_contact_uid
+moko_journal_entry_set_contact_uid
+moko_journal_entry_get_summary
+moko_journal_entry_set_summary
+moko_journal_entry_get_start_location
+moko_journal_entry_set_start_location
+MessageDirection
+moko_journal_entry_get_direction
+moko_journal_entry_set_direction
+moko_journal_entry_get_dtstart
+moko_journal_entry_set_dtstart
+moko_journal_entry_get_source
+moko_journal_entry_set_source
+moko_journal_entry_set_gsm_location
+moko_journal_entry_get_gsm_location
+moko_journal_entry_set_wifi_ap_mac_address
+moko_journal_entry_get_wifi_ap_mac_address
+moko_journal_entry_has_voice_info
+
+<SUBSECTION>
+moko_journal_voice_info_set_distant_number
+moko_journal_voice_info_get_distant_number
+moko_journal_voice_info_set_local_number
+moko_journal_voice_info_get_local_number
+moko_journal_voice_info_set_was_missed
+moko_journal_voice_info_get_was_missed
+
+<SUBSECTION>
+moko_journal_entry_has_fax_info
+moko_journal_entry_has_data_info
+moko_journal_entry_has_sms_info
+moko_journal_entry_has_email_info
+
+<SUBSECTION>
+MokoLocation
+moko_location_copy
+moko_location_free
+
+<SUBSECTION>
+MokoGSMLocation
+moko_gsm_location_copy
+moko_gsm_location_free
+
+<SUBSECTION Standard>
+MOKO_JOURNAL
+MOKO_IS_JOURNAL
+MOKO_JOURNAL_CLASS
+MOKO_IS_JOURNAL_CLASS
+MOKO_JOURNAL_GET_CLASS
+
+<SUBSECTION Private>
+MOKO_TYPE_JOURNAL
+MOKO_TYPE_LOCATION
+MOKO_TYPE_GSM_LOCATION
+MOKO_TYPE_JOURNAL_ENTRY
+moko_journal_get_type
+moko_location_get_type
+moko_gsm_location_get_type
+moko_journal_entry_get_type
+</SECTION>
+
+<SECTION>
+<FILE>moko-time</FILE>
+MokoTime
+moko_time_new_today
+moko_time_from_timet
+moko_time_from_string
+moko_time_copy
+moko_time_free
+moko_time_as_timet
+moko_time_as_ical_string
+
+<SUBSECTION Private>
+MOKO_TYPE_TIME
+moko_time_get_type
+</SECTION>
+

Added: trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal.types
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal.types	2007-10-08 11:28:08 UTC (rev 3113)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/doc/reference/libmokojournal.types	2007-10-08 11:33:03 UTC (rev 3114)
@@ -0,0 +1 @@
+moko_journal_get_type

Modified: trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.c
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.c	2007-10-08 11:28:08 UTC (rev 3113)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.c	2007-10-08 11:33:03 UTC (rev 3114)
@@ -1624,15 +1624,15 @@
 
 
 /**
- * moko_journal_entry_set_type:
+ * moko_journal_entry_set_entry_type:
  * @entry: the current instance of journal entry
  * @type: the new type
  *
  * Set the type of the journal entry
  */
 void
-moko_journal_entry_set_type (MokoJournalEntry *a_entry,
-                             MokoJournalEntryType a_type)
+moko_journal_entry_set_entry_type (MokoJournalEntry *a_entry,
+                                   MokoJournalEntryType a_type)
 {
   g_return_if_fail (a_entry) ;
   g_return_if_fail (a_type != UNDEF_ENTRY) ;

Modified: trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.h
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.h	2007-10-08 11:28:08 UTC (rev 3113)
+++ trunk/src/target/OM-2007.2/libraries/libmokojournal2/mokojournal/moko-journal.h	2007-10-08 11:33:03 UTC (rev 3114)
@@ -47,172 +47,169 @@
  * emails issued or received.
  ***********************************************************/
 
-typedef struct _MokoJournal MokoJournal ;
-typedef struct _MokoJournalClass MokoJournalClass ;
-typedef struct _MokoJournalEntry MokoJournalEntry ;
+typedef struct _MokoJournal             MokoJournal;
+typedef struct _MokoJournalClass        MokoJournalClass;
 
+typedef struct _MokoJournalEntry        MokoJournalEntry;
+
+typedef struct _MokoLocation            MokoLocation;
+typedef struct _MokoGSMLocation         MokoGSMLocation;
+
 struct _MokoJournal
 {
   GObject parent;
-} ;
+};
 
 struct _MokoJournalClass
 {
   GObjectClass parent_class;
 
-  void (*entry_added)   (MokoJournal *journal, const MokoJournalEntry *entry) ;
-  void (*entry_removed) (MokoJournal *journal, const MokoJournalEntry *entry) ;
+  void (*entry_added)   (MokoJournal            *journal,
+                         const MokoJournalEntry *entry);
+  void (*entry_removed) (MokoJournal            *journal,
+                         const MokoJournalEntry *entry);
 } ;
 
 /**
  * MokoJournalEntryType:
+ * @UNDEF_ENTRY: used internally
+ * @EMAIL_JOURNAL_ENTRY: E-mail
+ * @SMS_JOURNAL_ENTRY: SMS calls
+ * @VOICE_JOURNAL_ENTRY: voice calls
+ * @FAX_JOURNAL_ENTRY: fax calls
+ * @DATA_JOURNAL_ENTRY: data calls (like modules)
+ * @NB_OF_ENTRY_TYPES: terminator of entry types
  *
- * this represents the primary type of a journal entry.
+ * Reresents the primary type of a journal entry.
  */
 typedef enum {
-  UNDEF_ENTRY=0,
+  UNDEF_ENTRY,
   EMAIL_JOURNAL_ENTRY,
-  /*sms calls*/
   SMS_JOURNAL_ENTRY,
-  /*voice calls*/
   VOICE_JOURNAL_ENTRY,
-  /*fax call*/
   FAX_JOURNAL_ENTRY,
-  /*data calls (like modems)*/
   DATA_JOURNAL_ENTRY,
-  NB_OF_ENTRY_TYPES /*must always be the last*/
-} MokoJournalEntryType ;
 
+  NB_OF_ENTRY_TYPES
+} MokoJournalEntryType;
+
 typedef enum {
-  DIRECTION_IN=0,
+  DIRECTION_IN,
   DIRECTION_OUT
-} MessageDirection ;
+} MessageDirection;
 
-typedef struct
+/**
+ * MokoLocation:
+ * @longitude: longitude of a journal entry
+ * @latitude: latitude of a journal entry
+ *
+ * Geographical location of a journal entry
+ */
+struct _MokoLocation
 {
-  gfloat longitude ;
-  gfloat latitude ;
-} MokoLocation ;
+  gfloat longitude;
+  gfloat latitude;
+};
 
-typedef struct
+/**
+ * MokoGSMLocation:
+ * @lac: local area code
+ * @id: cell id
+ *
+ * GSM location of a journal entry
+ */
+struct _MokoGSMLocation
 {
-  /*local area code*/
-  gushort lac ;
-  /*cell id*/
-  gushort cid ;
-} MokoGSMLocation ;
+  gushort lac;
+  gushort cid;
+};
 
-/* The 'entry added' callback function */
+MokoJournal *moko_journal_open_default        (void);
+void         moko_journal_close               (MokoJournal       *journal);
+gboolean     moko_journal_add_entry           (MokoJournal       *journal,
+                                               MokoJournalEntry  *entry);
+gint         moko_journal_get_nb_entries      (MokoJournal       *journal) ;
+gboolean     moko_journal_get_entry_at        (MokoJournal       *journal,
+                                               guint              index_,
+                                               MokoJournalEntry **entry) ;
+gboolean     moko_journal_remove_entry_at     (MokoJournal       *journal,
+                                               guint              index_);
+gboolean     moko_journal_remove_entry_by_uid (MokoJournal       *journal,
+                                               const gchar       *uid);
+gboolean     moko_journal_write_to_storage    (MokoJournal       *journal);
+gboolean     moko_journal_load_from_storage   (MokoJournal       *journal);
 
+/* journal entries management */
+MokoJournalEntry *    moko_journal_entry_new                     (MokoJournalEntryType  type);
+MokoJournalEntryType  moko_journal_entry_get_entry_type          (MokoJournalEntry     *entry);
+void                  moko_journal_entry_set_entry_type          (MokoJournalEntry     *entry,
+                                                                  MokoJournalEntryType  type);
+G_CONST_RETURN gchar *moko_journal_entry_get_uid                 (MokoJournalEntry     *entry);
+G_CONST_RETURN gchar *moko_journal_entry_get_contact_uid         (MokoJournalEntry     *entry);
+void                  moko_journal_entry_set_contact_uid         (MokoJournalEntry     *entry,
+                                                                  const gchar          *uid);
+G_CONST_RETURN gchar *moko_journal_entry_get_summary             (MokoJournalEntry     *entry);
+void                  moko_journal_entry_set_summary             (MokoJournalEntry     *entry,
+                                                                  const gchar          *summary);
+gboolean              moko_journal_entry_get_start_location      (MokoJournalEntry     *entry,
+                                                                  MokoLocation         *location);
+gboolean              moko_journal_entry_set_start_location      (MokoJournalEntry     *entry,
+                                                                  MokoLocation         *location);
+gboolean              moko_journal_entry_get_direction           (MokoJournalEntry     *entry,
+                                                                  MessageDirection     *direction);
+void                  moko_journal_entry_set_direction           (MokoJournalEntry     *entry,
+                                                                  MessageDirection      direction);
+const MokoTime *      moko_journal_entry_get_dtstart             (MokoJournalEntry     *entry);
+void                  moko_journal_entry_set_dtstart             (MokoJournalEntry     *entry,
+                                                                  MokoTime             *dtstart);
+G_CONST_RETURN gchar *moko_journal_entry_get_source              (MokoJournalEntry     *entry);
+void                  moko_journal_entry_set_source              (MokoJournalEntry     *entry,
+                                                                  const gchar          *source);
+gboolean              moko_journal_entry_set_gsm_location        (MokoJournalEntry     *entry,
+                                                                  MokoGSMLocation      *location);
+gboolean              moko_journal_entry_get_gsm_location        (MokoJournalEntry     *entry,
+                                                                  MokoGSMLocation      *location);
+gboolean              moko_journal_entry_set_wifi_ap_mac_address (MokoJournalEntry     *entry,
+                                                                  const guchar         *address);
+const guchar *        moko_journal_entry_get_wifi_ap_mac_address (MokoJournalEntry     *entry);
 
-/*<journal management>*/
-MokoJournal* moko_journal_open_default () ;
-void moko_journal_close (MokoJournal *journal) ;
-gboolean moko_journal_add_entry (MokoJournal *journal, MokoJournalEntry *entry) ;
-int moko_journal_get_nb_entries (MokoJournal *journal) ;
-gboolean moko_journal_get_entry_at (MokoJournal *journal,
-                                    guint index,
-                                    MokoJournalEntry **entry) ;
-gboolean moko_journal_remove_entry_at (MokoJournal *journal,
-                                       guint index) ;
-gboolean moko_journal_remove_entry_by_uid (MokoJournal *journal,
-                                           const gchar* uid) ;
-gboolean moko_journal_write_to_storage (MokoJournal *journal) ;
-gboolean moko_journal_load_from_storage (MokoJournal *journal) ;
+/* voice call info */
+gboolean              moko_journal_entry_has_voice_info          (MokoJournalEntry *entry);
+void                  moko_journal_voice_info_set_distant_number (MokoJournalEntry *info,
+                                                                  const gchar      *number);
+G_CONST_RETURN gchar *moko_journal_voice_info_get_distant_number (MokoJournalEntry *info);
+void                  moko_journal_voice_info_set_local_number   (MokoJournalEntry *info,
+                                                                  const gchar      *number);
+G_CONST_RETURN gchar *moko_journal_voice_info_get_local_number   (MokoJournalEntry *info);
+void                  moko_journal_voice_info_set_was_missed     (MokoJournalEntry *info,
+                                                                  gboolean          missing);
+gboolean              moko_journal_voice_info_get_was_missed     (MokoJournalEntry *info);
 
-/*<journal entries querying>*/
-/*</journal entries querying>*/
+/* fax call info */
+gboolean moko_journal_entry_has_fax_info  (MokoJournalEntry *entry);
+gboolean moko_journal_entry_has_data_info (MokoJournalEntry *entry);
 
-/*</journal management>*/
+/* sms info */
+gboolean moko_journal_entry_has_sms_info (MokoJournalEntry *entry);
 
+/* email info */
+gboolean moko_journal_entry_has_email_info (MokoJournalEntry *entry);
 
-/*<journal entries management>*/
-MokoJournalEntry* moko_journal_entry_new (MokoJournalEntryType type) ;
-MokoJournalEntryType moko_journal_entry_get_entry_type (MokoJournalEntry *entry);
-void moko_journal_entry_set_type (MokoJournalEntry *entry,
-                                  MokoJournalEntryType type) ;
-const gchar* moko_journal_entry_get_uid (MokoJournalEntry *entry) ;
-const gchar* moko_journal_entry_get_contact_uid (MokoJournalEntry *entry) ;
-void  moko_journal_entry_set_contact_uid (MokoJournalEntry *entry,
-                                          const gchar *uid) ;
-const gchar* moko_journal_entry_get_summary (MokoJournalEntry *entry) ;
-void moko_journal_entry_set_summary (MokoJournalEntry *entry,
-                                     const gchar* summary) ;
-gboolean moko_journal_entry_get_start_location (MokoJournalEntry *entry,
-                                                MokoLocation *location) ;
-gboolean moko_journal_entry_set_start_location (MokoJournalEntry *entry,
-                                                MokoLocation *location) ;
-gboolean moko_journal_entry_get_direction (MokoJournalEntry *entry,
-                                           MessageDirection *direction) ;
-void moko_journal_entry_set_direction (MokoJournalEntry *entry,
-                                       MessageDirection direction) ;
-const MokoTime* moko_journal_entry_get_dtstart (MokoJournalEntry *entry) ;
-void moko_journal_entry_set_dtstart (MokoJournalEntry *entry, MokoTime* dtstart);
-const gchar* moko_journal_entry_get_source (MokoJournalEntry *entry) ;
-void moko_journal_entry_set_source (MokoJournalEntry *entry,
-                                    const gchar *source) ;
-gboolean moko_journal_entry_info_set_gsm_location (MokoJournalEntry *entry,
-                                                   MokoGSMLocation *location) ;
-gboolean moko_journal_entry_get_gsm_location (MokoJournalEntry *entry,
-                                              MokoGSMLocation *location);
-gboolean moko_journal_entry_set_wifi_ap_mac_address (MokoJournalEntry *entry,
-                                                     const guchar *address) ;
-const guchar *moko_journal_entry_get_wifi_ap_mac_address
-                                                  (MokoJournalEntry *entry) ;
-/*<voice call info>*/
+/* helpers for bindings */
+GType moko_journal_get_type (void) G_GNUC_CONST;
+GType moko_location_get_type (void) G_GNUC_CONST;
+GType moko_gsm_location_get_type (void) G_GNUC_CONST;
+GType moko_journal_entry_get_type (void) G_GNUC_CONST;
 
-gboolean moko_journal_entry_has_voice_info (MokoJournalEntry *entry);
-void moko_journal_voice_info_set_distant_number (MokoJournalEntry *info,
-                                                const gchar *number) ;
-const gchar* moko_journal_voice_info_get_distant_number
-                                                (MokoJournalEntry *info) ;
-void moko_journal_voice_info_set_local_number (MokoJournalEntry *info,
-                                                const gchar *number) ;
-const gchar* moko_journal_voice_info_get_local_number
-                                                (MokoJournalEntry *info) ;
-void moko_journal_voice_info_set_was_missed (MokoJournalEntry *info,
-                                             gboolean a_flag) ;
-gboolean moko_journal_voice_info_get_was_missed (MokoJournalEntry *info) ;
+MokoLocation* moko_location_copy (const MokoLocation *location);
+void          moko_location_free (MokoLocation       *location);
 
-/*</voice call info>*/
+MokoGSMLocation* moko_gsm_location_copy (const MokoGSMLocation *location);
+void             moko_gsm_location_free (MokoGSMLocation       *location);
 
-/*<fax call info>*/
+MokoJournalEntry* moko_journal_entry_ref   (MokoJournalEntry *entry);
+void              moko_journal_entry_unref (MokoJournalEntry *entry);
 
-gboolean moko_journal_entry_has_fax_info (MokoJournalEntry *entry) ;
-
-gboolean moko_journal_entry_has_data_info (MokoJournalEntry *entry) ;
-/*</fax call info>*/
-
-/*<sms info>*/
-gboolean moko_journal_entry_has_sms_info (MokoJournalEntry *entry) ;
-/*</sms info>*/
-
-/*<email info>*/
-
-gboolean moko_journal_entry_has_email_info (MokoJournalEntry *entry) ;
-
-/*</email info>*/
-
-
-/*</journal entries management>*/
-
-/*<helpers for bindings>*/
-GType moko_journal_get_type (void) ;
-GType moko_location_get_type (void) ;
-GType moko_gsm_location_get_type (void) ;
-GType moko_journal_entry_get_type (void) ;
-
-MokoLocation* moko_location_copy (const MokoLocation*) ;
-void          moko_location_free (MokoLocation*) ;
-
-MokoGSMLocation* moko_gsm_location_copy (const MokoGSMLocation*);
-void             moko_gsm_location_free (MokoGSMLocation*);
-
-MokoJournalEntry* moko_journal_entry_ref (MokoJournalEntry*);
-void              moko_journal_entry_unref (MokoJournalEntry*);
-
-/*</helpers for bindings>*/
-
 G_END_DECLS
 
 #endif /*__MOKO_JOURNAL_H__*/





More information about the commitlog mailing list