Create a new #ICalAttach from the url Create a new #ICalAttach from the data. g_return_val_if_fail (data != NULL, NULL); return i_cal_attach_new_full (icalattach_new_from_data (data, (icalattach_free_fn_t) (free_fn), free_fn_data), NULL); static void unref_g_bytes(char *data, void *user_data) { GBytes *bytes = user_data; g_return_if_fail (data != NULL); g_return_if_fail (bytes != NULL); g_bytes_unref(bytes); } Create a new #ICalAttach from the data in bytes. Takes a reference of @bytes, increase the reference before calling this function if you with to use it afterward. The stored bytes should be already encoded with used encoding (like base64). g_return_val_if_fail (bytes != NULL, NULL); return i_cal_attach_new_full (icalattach_new_from_data (g_bytes_get_data (bytes, NULL), unref_g_bytes, bytes), NULL); Increase the ref counter by 1 for the @attach Decrese the ref counter by 1 for the @attach Check whether the #ICalAttach is built from url Get the url, if the #ICalAttach is built from the url. Get the data, if the #ICalAttach is built from the data. g_return_val_if_fail (I_CAL_IS_ATTACH (attach), NULL); return (const gchar *) (icalattach_get_data ((icalattach *)i_cal_object_get_native (I_CAL_OBJECT (attach))));