bin: Use the new group-id field of the stream-start message for stream-start message...
[platform/upstream/gstreamer.git] / gst / gstdatetime.h
index 96d8bbd..08139d7 100644 (file)
@@ -13,8 +13,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 #ifndef __GST_DATE_TIME_H__
@@ -36,31 +36,71 @@ G_BEGIN_DECLS
  */
 typedef struct _GstDateTime GstDateTime;
 
-gint    gst_date_time_get_year             (const GstDateTime * datetime);
-gint    gst_date_time_get_month            (const GstDateTime * datetime);
-gint    gst_date_time_get_day              (const GstDateTime * datetime);
-gint    gst_date_time_get_hour             (const GstDateTime * datetime);
-gint    gst_date_time_get_minute           (const GstDateTime * datetime);
-gint    gst_date_time_get_second           (const GstDateTime * datetime);
-gint    gst_date_time_get_microsecond      (const GstDateTime * datetime);
-gfloat  gst_date_time_get_time_zone_offset (const GstDateTime * datetime);
+/* query which fields are set */
+
+gboolean        gst_date_time_has_year                (const GstDateTime * datetime);
+gboolean        gst_date_time_has_month               (const GstDateTime * datetime);
+gboolean        gst_date_time_has_day                 (const GstDateTime * datetime);
+gboolean        gst_date_time_has_time                (const GstDateTime * datetime);
+gboolean        gst_date_time_has_second              (const GstDateTime * datetime);
+
+/* field getters */
+
+gint            gst_date_time_get_year                (const GstDateTime * datetime);
+gint            gst_date_time_get_month               (const GstDateTime * datetime);
+gint            gst_date_time_get_day                 (const GstDateTime * datetime);
+gint            gst_date_time_get_hour                (const GstDateTime * datetime);
+gint            gst_date_time_get_minute              (const GstDateTime * datetime);
+gint            gst_date_time_get_second              (const GstDateTime * datetime);
+gint            gst_date_time_get_microsecond         (const GstDateTime * datetime);
+gfloat          gst_date_time_get_time_zone_offset    (const GstDateTime * datetime);
+
+/* constructors */
 
 GstDateTime *   gst_date_time_new_from_unix_epoch_local_time (gint64 secs) G_GNUC_MALLOC;
+
 GstDateTime *   gst_date_time_new_from_unix_epoch_utc   (gint64 secs) G_GNUC_MALLOC;
-GstDateTime *   gst_date_time_new_local_time            (gint year, gint month,
-                                                         gint day, gint hour,
+
+GstDateTime *   gst_date_time_new_local_time            (gint year,
+                                                         gint month,
+                                                         gint day,
+                                                         gint hour,
                                                          gint minute,
                                                          gdouble seconds) G_GNUC_MALLOC;
+
+GstDateTime *   gst_date_time_new_y                     (gint year) G_GNUC_MALLOC;
+
+GstDateTime *   gst_date_time_new_ym                    (gint year,
+                                                         gint month) G_GNUC_MALLOC;
+
+GstDateTime *   gst_date_time_new_ymd                   (gint year,
+                                                         gint month,
+                                                         gint day) G_GNUC_MALLOC;
+
 GstDateTime *   gst_date_time_new                       (gfloat tzoffset,
                                                          gint year, gint month,
                                                          gint day, gint hour,
                                                          gint minute,
                                                          gdouble seconds) G_GNUC_MALLOC;
+
 GstDateTime *   gst_date_time_new_now_local_time (void) G_GNUC_MALLOC;
+
 GstDateTime *   gst_date_time_new_now_utc        (void) G_GNUC_MALLOC;
 
+
+gchar *         gst_date_time_to_iso8601_string  (GstDateTime * datetime) G_GNUC_MALLOC;
+GstDateTime *   gst_date_time_new_from_iso8601_string  (const gchar * string) G_GNUC_MALLOC;
+
+GDateTime *     gst_date_time_to_g_date_time       (GstDateTime * datetime);
+
+GstDateTime *   gst_date_time_new_from_g_date_time (GDateTime * dt);
+
+/* refcounting */
+
 GstDateTime *   gst_date_time_ref                (GstDateTime * datetime);
+
 void            gst_date_time_unref              (GstDateTime * datetime);
 
 G_END_DECLS
+
 #endif /* __GST_DATE_TIME_H__ */