diff options
27 files changed, 203 insertions, 167 deletions
diff --git a/src/libical-glib/ICalGLib.metadata.in b/src/libical-glib/ICalGLib.metadata.in index e10ef217..207b492a 100644 --- a/src/libical-glib/ICalGLib.metadata.in +++ b/src/libical-glib/ICalGLib.metadata.in @@ -1,2 +1,38 @@ _* skip=true memory_* parent="ICal.Memory" name="memory_(.+)" +Component + .kind_from_string parent="ICal.ComponentKind" name="from_string" + .kind_is_valid parent="ICal.ComponentKind" symbol_type="method" instance_idx=0 name="is_valid" + .kind_to_string parent="ICal.ComponentKind" symbol_type="method" instance_idx=0 name="to_string" +Property + .status_from_string parent="ICal.PropertyStatus" name="from_string" + .status_to_string parent="ICal.PropertyStatus" symbol_type="method" instance_idx=0 name="to_string" + .kind_from_string parent="ICal.PropertyKind" name="from_string" + .kind_is_valid parent="ICal.PropertyKind" symbol_type="method" instance_idx=0 name="is_valid" + .kind_to_string parent="ICal.PropertyKind" symbol_type="method" instance_idx=0 name="to_string" + .kind_to_value_kind parent="ICal.PropertyKind" symbol_type="method" instance_idx=0 name="to_value_kind" + .kind_has_property parent="ICal.PropertyKind" symbol_type="method" instance_idx=0 name="has_property" + .method_from_string parent="ICal.PropertyMethod" name="from_string" + .method_to_string parent="ICal.PropertyMethod" symbol_type="method" instance_idx=0 name="to_string" +Parameter + .kind_from_string parent="ICal.ParameterKind" name="from_string" + .kind_is_valid parent="ICal.ParameterKind" symbol_type="method" instance_idx=0 name="is_valid" + .kind_to_string parent="ICal.ParameterKind" symbol_type="method" instance_idx=0 name="to_string" + .value_to_value_kind parent="ICal.ParameterValue" symbol_type="method" instance_idx=0 name="to_value_kind" +Value + .kind_from_string parent="ICal.ValueKind" name="from_string" + .kind_is_valid parent="ICal.ValueKind" symbol_type="method" instance_idx=0 name="is_valid" + .kind_to_string parent="ICal.ValueKind" symbol_type="method" instance_idx=0 name="to_string" + .kind_to_property_kind parent="ICal.ValueKind" symbol_type="method" instance_idx=0 name="to_property_kind" +Timezone + .array_append_from_vtimezone parent="ICal.Array" symbol_type="method" instance_idx=0 name="append_timezone_from_vtimezone" + .array_element_at parent="ICal.Array" symbol_type="method" instance_idx=0 name="timezone_element_at" + .array_new parent="ICal.Array" name="new_timezone" + .dump_changes.fp type="GLib.FileStream" +Recurrence + .frequency_to_string parent="ICal.RecurrenceFrequency" symbol_type="method" instance_idx=0 name="to_string" + .frequency_from_string parent="ICal.RecurrenceFrequency" name="from_string" + .skip_to_string parent="ICal.RecurrenceSkip" symbol_type="method" instance_idx=0 name="to_string" + .skip_from_string parent="ICal.RecurrenceSkip" name="from_string" + .weekday_to_string parent="ICal.RecurrenceWeekday" symbol_type="method" instance_idx=0 name="to_string" + .weekday_from_string parent="ICal.RecurrenceWeekday" name="from_string" diff --git a/src/libical-glib/api/i-cal-comp-iter.xml b/src/libical-glib/api/i-cal-comp-iter.xml index 1e958f75..a54ef30d 100644 --- a/src/libical-glib/api/i-cal-comp-iter.xml +++ b/src/libical-glib/api/i-cal-comp-iter.xml @@ -14,7 +14,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. --> <structure namespace="ICal" name="CompIter" native="struct icalcompiter" is_bare="true" default_native="i_cal_comp_iter_new_default ()"> - <method name="i_cal_comp_iter_new_default" corresponds="CUSTOM" kind="private" since="1.0"> + <method name="i_cal_comp_iter_new_default" corresponds="CUSTOM" kind="private" since="1.0" annotation="skip"> <returns type="struct icalcompiter" annotation="transfer none" comment="The newly created default native icalcompiter"/> <custom> icalcompiter compiter; compiter.iter = 0; diff --git a/src/libical-glib/api/i-cal-component.xml b/src/libical-glib/api/i-cal-component.xml index 2bd4c05e..1e104d59 100644 --- a/src/libical-glib/api/i-cal-component.xml +++ b/src/libical-glib/api/i-cal-component.xml @@ -19,7 +19,7 @@ <returns type="ICalComponent *" annotation="transfer full" comment="The newly created #ICalComponent."/> <comment xml:space="preserve">Create a new #ICalComponent with specific type.</comment> </method> - <method name="i_cal_component_new_clone" corresponds="icalcomponent_new_clone" kind="clone" since="1.0"> + <method name="i_cal_component_clone" corresponds="icalcomponent_new_clone" kind="clone" since="1.0"> <parameter type="ICalComponent *" name="component" comment="The #ICalComponent to be created."/> <returns type="ICalComponent *" annotation="transfer full" comment="The newly deeply cloned #ICalComponent."/> <comment xml:space="preserve">Deeply clone a #ICalComponent.</comment> @@ -38,7 +38,7 @@ <parameter type="ICalComponent *" name="component" comment="The #ICalComponent to be freed."/> <comment xml:space="preserve">Free a #ICalComponent.</comment> </method> - <method name="i_cal_component_as_ical_string_r" corresponds="icalcomponent_as_ical_string_r" since="1.0"> + <method name="i_cal_component_as_ical_string" corresponds="icalcomponent_as_ical_string_r" since="1.0"> <parameter type="ICalComponent *" name="component" comment="The #ICalComponent to be converted."/> <returns type="gchar *" annotation="transfer full" comment="The string representation of #ICalComponent."/> <comment xml:space="preserve">Convert a #ICalComponent to a string.</comment> @@ -232,7 +232,7 @@ <returns type="gboolean" comment="1 if @kind id a #ICalComponent but not the I_CAL_NO_COMPONENT, 0 if not."/> <comment xml:space="preserve">Check if a #ICalComponentKind is valid.</comment> </method> - <method name="i_cal_component_string_to_kind" corresponds="icalcomponent_string_to_kind" since="1.0"> + <method name="i_cal_component_kind_from_string" corresponds="icalcomponent_string_to_kind" since="1.0"> <parameter type="const gchar *" name="string" comment="A string."/> <returns type="ICalComponentKind" error_return_value="I_CAL_NO_COMPONENT" comment="A #ICalComponentKind"/> <comment xml:space="preserve">Convert a string to a #ICalComponentKind.</comment> diff --git a/src/libical-glib/api/i-cal-duration.xml b/src/libical-glib/api/i-cal-duration.xml index cb955b51..8557a35e 100644 --- a/src/libical-glib/api/i-cal-duration.xml +++ b/src/libical-glib/api/i-cal-duration.xml @@ -98,12 +98,12 @@ <custom> g_return_if_fail (duration != NULL && I_CAL_IS_DURATION (duration)); ((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->seconds = seconds;</custom> </method> - <method name="i_cal_duration_from_int" corresponds="icaldurationtype_from_int" kind="constructor" since="1.0"> + <method name="i_cal_duration_new_from_int" corresponds="icaldurationtype_from_int" kind="constructor" since="1.0"> <parameter type="gint" name="t" comment="the duration in second"/> <returns type="ICalDuration *" annotation="transfer full" comment="The newly created #ICalDuration" /> <comment xml:space="preserve">Create a #ICalDuration from the duration in second</comment> </method> - <method name="i_cal_duration_from_string" corresponds="icaldurationtype_from_string" kind="constructor" since="1.0"> + <method name="i_cal_duration_new_from_string" corresponds="icaldurationtype_from_string" kind="constructor" since="1.0"> <parameter type="const gchar *" name="str" comment="The string representation of the duration"/> <returns type="ICalDuration *" annotation="transfer full" comment="The newly created #ICalDuration" /> <comment xml:space="preserve">Create a #ICalDuration from the duration in string</comment> @@ -113,16 +113,16 @@ <returns type="gint" comment="The duration in second" /> <comment xml:space="preserve">Convert the #ICalDuration to the representation in second</comment> </method> - <method name="i_cal_duration_as_ical_string_r" corresponds="icaldurationtype_as_ical_string_r" kind="others" since="1.0"> + <method name="i_cal_duration_as_ical_string" corresponds="icaldurationtype_as_ical_string_r" kind="others" since="1.0"> <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be converted"/> <returns type="gchar *" annotation="transfer full" comment="The duration in string" /> <comment xml:space="preserve">Convert the #ICalDuration to the representation in string</comment> </method> - <method name="i_cal_duration_null_duration" corresponds="icaldurationtype_null_duration" kind="constructor" since="1.0"> + <method name="i_cal_duration_new_null_duration" corresponds="icaldurationtype_null_duration" kind="constructor" since="1.0"> <returns type="ICalDuration *" annotation="transfer full" comment="The newly created #ICalDuration" /> <comment xml:space="preserve">Create a #ICalDuration with all the fields to be zero</comment> </method> - <method name="i_cal_duration_bad_duration" corresponds="icaldurationtype_bad_duration" kind="constructor" since="1.0"> + <method name="i_cal_duration_new_bad_duration" corresponds="icaldurationtype_bad_duration" kind="constructor" since="1.0"> <returns type="ICalDuration *" annotation="transfer full" comment="The newly created #ICalDuration" /> <comment xml:space="preserve">Create a bad #ICalDuration</comment> </method> diff --git a/src/libical-glib/api/i-cal-enums.xml b/src/libical-glib/api/i-cal-enums.xml index d6c40350..4a2e7e47 100644 --- a/src/libical-glib/api/i-cal-enums.xml +++ b/src/libical-glib/api/i-cal-enums.xml @@ -88,30 +88,30 @@ <element name="ICAL_6_1_CONTAINER_NOT_FOUND"/> <element name="ICAL_9_0_UNRECOGNIZED_COMMAND"/> </enum> - <method name="i_cal_enum_reqstat_desc" corresponds="icalenum_reqstat_desc" since="1.0"> + <method name="i_cal_request_status_desc" corresponds="icalenum_reqstat_desc" since="1.0"> <parameter type="ICalRequestStatus" name="stat" comment="The #ICalRequestStatus to be translated"/> <returns type="const gchar *" comment="The description of the @stat" /> <comment xml:space="preserve">Return the descriptive text for a request status</comment> </method> - <method name="i_cal_enum_reqstat_major" corresponds="icalenum_reqstat_major" since="1.0"> + <method name="i_cal_request_status_major" corresponds="icalenum_reqstat_major" since="1.0"> <parameter type="ICalRequestStatus" name="stat" comment="The #ICalRequestStatus to be queried"/> <returns type="gshort" comment="The major number for a request status" /> <comment xml:space="preserve">Return the major number for a request status</comment> </method> - <method name="i_cal_enum_reqstat_minor" corresponds="icalenum_reqstat_minor" since="1.0"> + <method name="i_cal_request_status_minor" corresponds="icalenum_reqstat_minor" since="1.0"> <parameter type="ICalRequestStatus" name="stat" comment="The #ICalRequestStatus to be queried"/> <returns type="gshort" comment="The minor number for a request status" /> <comment xml:space="preserve">Return the minor number for a request status</comment> </method> - <method name="i_cal_enum_num_to_reqstat" corresponds="icalenum_num_to_reqstat" since="1.0"> + <method name="i_cal_request_status_from_num" corresponds="icalenum_num_to_reqstat" since="1.0"> <parameter type="gshort" name="major" comment="The major number"/> <parameter type="gshort" name="minor" comment="The minor number"/> <returns type="ICalRequestStatus" comment="The corresponding #ICalRequestStatus" /> <comment xml:space="preserve">Return a request status for major/minor status numbers</comment> </method> - <method name="i_cal_enum_reqstat_code_r" corresponds="icalenum_reqstat_code_r" since="1.0"> + <method name="i_cal_request_status_code" corresponds="icalenum_reqstat_code_r" since="1.0"> <parameter type="ICalRequestStatus" name="stat" comment="The #ICalRequestStatus to be queried"/> <returns type="gchar *" annotation="transfer full" comment="The code for a request status" /> - <comment xml:space="preserve">eturn the code for a request status</comment> + <comment xml:space="preserve">Return the code for a request status</comment> </method> </structure> diff --git a/src/libical-glib/api/i-cal-geo.xml b/src/libical-glib/api/i-cal-geo.xml index 94931713..dedcf7c1 100644 --- a/src/libical-glib/api/i-cal-geo.xml +++ b/src/libical-glib/api/i-cal-geo.xml @@ -35,7 +35,7 @@ return i_cal_geo_new_full(geo);</custom> </method> - <method name="i_cal_geo_new_clone" corresponds="CUSTOM" kind="constructor" since="1.0"> + <method name="i_cal_geo_clone" corresponds="CUSTOM" kind="clone" since="1.0"> <parameter type="const ICalGeo *" name="geo" comment="The #ICalGeo to clone."/> <returns type="ICalGeo *" annotation="transfer full" comment="The newly created #ICalGeo, copy of @geo." /> <comment xml:space="preserve">Create a new #ICalGeo, copy of @geo.</comment> diff --git a/src/libical-glib/api/i-cal-parameter.xml b/src/libical-glib/api/i-cal-parameter.xml index 4a85a02c..9f0ee414 100644 --- a/src/libical-glib/api/i-cal-parameter.xml +++ b/src/libical-glib/api/i-cal-parameter.xml @@ -19,7 +19,7 @@ <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter." /> <comment xml:space="preserve">Create a new #ICalParameter according to the kind type</comment> </method> - <method name="i_cal_parameter_new_clone" corresponds="icalparameter_new_clone" kind="clone" since="1.0"> + <method name="i_cal_parameter_clone" corresponds="icalparameter_new_clone" kind="clone" since="1.0"> <parameter type="ICalParameter *" name="p" annotation="in" comment="The #ICalParameter to be cloned"/> <returns type="ICalParameter *" annotation="transfer full" comment="The newly created #ICalParameter with the same properties as the @p." /> <comment xml:space="preserve">Deep clone a #ICalParameter</comment> @@ -39,7 +39,7 @@ <parameter type="ICalParameter *" name="parameter" annotation="in" comment="The #ICalParameter to be freeed."/> <comment xml:space="preserve">Free the native part of the ICalParameter.</comment> </method> - <method name="i_cal_parameter_as_ical_string_r" corresponds="icalparameter_as_ical_string_r" kind="others" since="1.0"> + <method name="i_cal_parameter_as_ical_string" corresponds="icalparameter_as_ical_string_r" kind="others" since="1.0"> <parameter type="ICalParameter *" name="parameter" annotation="in" comment="The #ICalParameter to be converted."/> <returns type="gchar *" annotation="transfer full" comment="The string representation of the @parameter." /> <comment xml:space="preserve">Convert an #ICalParameter to the string representation.</comment> @@ -105,7 +105,7 @@ <returns type="const gchar *" comment="The string representation of @kind." /> <comment xml:space="preserve">Convert the #ICalParameter to the string representation</comment> </method> - <method name="i_cal_parameter_string_to_kind" corresponds="icalparameter_string_to_kind" kind="others" since="1.0"> + <method name="i_cal_parameter_kind_from_string" corresponds="icalparameter_string_to_kind" kind="others" since="1.0"> <parameter type="const gchar *" name="string" comment="The string representation of the #ICalParameter"/> <returns type="ICalParameterKind" comment="The #ICalParameterKind converted from @string" /> <comment xml:space="preserve">Convert a string to the #ICalParameterKind</comment> diff --git a/src/libical-glib/api/i-cal-period.xml b/src/libical-glib/api/i-cal-period.xml index 14d7d7ae..108738a4 100644 --- a/src/libical-glib/api/i-cal-period.xml +++ b/src/libical-glib/api/i-cal-period.xml @@ -80,17 +80,17 @@ periodtype = (struct icalperiodtype *)i_cal_object_get_native ((ICalObject *)period); periodtype->duration = (* (struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration));</custom> </method> - <method name="i_cal_period_from_string" corresponds="icalperiodtype_from_string" kind="constructor" since="1.0"> + <method name="i_cal_period_new_from_string" corresponds="icalperiodtype_from_string" kind="constructor" since="1.0"> <parameter type="const gchar *" name="str" comment="The string used to create the #ICalPeriod"/> <returns type="ICalPeriod *" annotation="transfer full" comment="The newly created #ICalPeriod"/> <comment xml:space="preserve">Create a #ICalPeriod from a string.</comment> </method> - <method name="i_cal_period_as_ical_string_r" corresponds="icalperiodtype_as_ical_string_r" since="1.0"> + <method name="i_cal_period_as_ical_string" corresponds="icalperiodtype_as_ical_string_r" since="1.0"> <parameter type="ICalPeriod *" name="p" comment="The #ICalPeriod to be translated."/> <returns type="gchar *" annotation="transfer full" comment="The string representation of #ICalPeriod."/> <comment xml:space="preserve">Translate #ICalPeriod to string.</comment> </method> - <method name="i_cal_period_null_period" corresponds="icalperiodtype_null_period" since="1.0"> + <method name="i_cal_period_new_null_period" corresponds="icalperiodtype_null_period" kind="constructor" since="1.0"> <returns type="ICalPeriod *" annotation="transfer full" comment="The newly created default #ICalPeriod"/> <comment xml:space="preserve">Create a default #ICalPeriod.</comment> </method> diff --git a/src/libical-glib/api/i-cal-property.xml b/src/libical-glib/api/i-cal-property.xml index d23741e0..16845ae2 100644 --- a/src/libical-glib/api/i-cal-property.xml +++ b/src/libical-glib/api/i-cal-property.xml @@ -19,7 +19,7 @@ <returns type="ICalProperty *" annotation="transfer full" comment="The newly created #ICalProperty with the type @kind."/> <comment xml:space="preserve">Create a #ICalProperty of the target type.</comment> </method> - <method name="i_cal_property_new_clone" corresponds="icalproperty_new_clone" kind="clone" since="1.0"> + <method name="i_cal_property_clone" corresponds="icalproperty_new_clone" kind="clone" since="1.0"> <parameter type="ICalProperty *" name="prop" comment="The #ICalProperty to be cloned."/> <returns type="ICalProperty *" annotation="transfer full" comment="The newly created #ICalProperty deeply cloned from @prop."/> <comment xml:space="preserve">Deeply clone a #ICalProperty.</comment> @@ -29,7 +29,7 @@ <returns type="ICalProperty *" annotation="transfer full" comment="The newly created #ICalProperty from @str."/> <comment xml:space="preserve">Create a #ICalProperty from a string.</comment> </method> - <method name="i_cal_property_as_ical_string_r" corresponds="icalproperty_as_ical_string_r" since="1.0"> + <method name="i_cal_property_as_ical_string" corresponds="icalproperty_as_ical_string_r" since="1.0"> <parameter type="ICalProperty *" name="prop" comment="The #ICalProperty to be converted."/> <returns type="gchar *" annotation="transfer full" comment="The string representation of @prop."/> <comment xml:space="preserve">Convert a #ICalProperty to a string representation.</comment> @@ -74,7 +74,7 @@ <parameter type="const gchar *" name="value" comment="The value of the parameter."/> <comment xml:space="preserve">Set the #ICalProperty with the parameter defined by the name and value.</comment> </method> - <method name="i_cal_property_get_parameter_as_string_r" corresponds="icalproperty_get_parameter_as_string_r" since="1.0"> + <method name="i_cal_property_get_parameter_as_string" corresponds="icalproperty_get_parameter_as_string_r" since="1.0"> <parameter type="ICalProperty *" name="prop" comment="The #ICalProperty to be queried."/> <parameter type="const gchar *" name="name" comment="The name of the target parameter."/> <returns type="gchar *" annotation="transfer full" comment="The string representation of the parameter."/> @@ -138,7 +138,7 @@ <returns type="ICalValue *" annotation="transfer full" translator_argus="(GObject *)prop" comment="The #ICalValue of @prop."/> <comment xml:space="preserve">Get the #ICalValue of #ICalProperty.</comment> </method> - <method name="i_cal_property_get_value_as_string_r" corresponds="icalproperty_get_value_as_string_r" since="1.0"> + <method name="i_cal_property_get_value_as_string" corresponds="icalproperty_get_value_as_string_r" since="1.0"> <parameter type="const ICalProperty *" name="prop" comment="The #ICalProperty to be queried."/> <returns type="gchar *" annotation="transfer full" comment="The string representation of the value of the #ICalProperty."/> <comment xml:space="preserve">Get the string representation of the value in #ICalProperty.</comment> @@ -170,10 +170,10 @@ </method> <method name="i_cal_property_get_x_name" corresponds="icalproperty_get_x_name" since="1.0"> <parameter type="ICalProperty *" name="prop" comment="A #ICalProperty."/> - <returns type="const gchar *" annotation="transfer full" comment="The name of x property."/> + <returns type="const gchar *" annotation="nullable" comment="The name of x property."/> <comment xml:space="preserve">Get the name of x property.</comment> </method> - <method name="i_cal_property_get_property_name_r" corresponds="icalproperty_get_property_name_r" since="1.0"> + <method name="i_cal_property_get_property_name" corresponds="icalproperty_get_property_name_r" since="1.0"> <parameter type="const ICalProperty *" name="prop" comment="A #ICalProperty."/> <returns type="gchar *" annotation="transfer full" comment="Property name of #ICalProperty."/> <comment xml:space="preserve">Get the property name of #ICalProperty.</comment> @@ -188,7 +188,7 @@ <returns type="ICalValueKind" comment="The #ICalValueKind"/> <comment xml:space="preserve">Convert the #ICalPropertyKind to #ICalValueKind.</comment> </method> - <method name="i_cal_property_value_kind_to_kind" corresponds="icalproperty_value_kind_to_kind" since="1.0"> + <method name="i_cal_value_kind_to_property_kind" corresponds="icalproperty_value_kind_to_kind" since="1.0"> <parameter type="ICalValueKind" name="kind" comment="A #ICalValueKind"/> <returns type="ICalPropertyKind" comment="The #ICalPropertyKind."/> <comment xml:space="preserve">Convert a #ICalValueKind to a #ICalPropertyKind.</comment> @@ -198,7 +198,7 @@ <returns type="const gchar *" comment="The string representation of @kind."/> <comment xml:space="preserve">Convert the #ICalPropertyKind to a string.</comment> </method> - <method name="i_cal_property_string_to_kind" corresponds="icalproperty_string_to_kind" since="1.0"> + <method name="i_cal_property_kind_from_string" corresponds="icalproperty_string_to_kind" since="1.0"> <parameter type="const gchar *" name="string" comment="A string representing #ICalPropertyKind."/> <returns type="ICalPropertyKind" comment="The #ICalPropertyKind."/> <comment xml:space="preserve">Convert the string to #ICalPropertyKind.</comment> @@ -208,7 +208,7 @@ <returns type="gboolean" comment="1 if valid, 0 if not."/> <comment xml:space="preserve">Check whether #ICalPropertyKind is valid.</comment> </method> - <method name="i_cal_property_string_to_method" corresponds="icalproperty_string_to_method" since="1.0"> + <method name="i_cal_property_method_from_string" corresponds="icalproperty_string_to_method" since="1.0"> <parameter type="const gchar *" name="str" comment="A string."/> <returns type="ICalPropertyMethod" comment="The #ICalPropertyMethod."/> <comment xml:space="preserve">Convert the string to #ICalPropertyKind.</comment> @@ -218,7 +218,7 @@ <returns type="const gchar *" comment="The string representation of #ICalPropertyMethod."/> <comment xml:space="preserve">Convert the #ICalPropertyMethod to string.</comment> </method> - <method name="i_cal_property_enum_to_string_r" corresponds="icalproperty_enum_to_string_r" since="1.0"> + <method name="i_cal_property_enum_to_string" corresponds="icalproperty_enum_to_string_r" since="1.0"> <parameter type="gint" name="e" comment="The enum to be converted."/> <returns type="gchar *" annotation="transfer full" comment="The string representation of @e."/> <comment xml:space="preserve">Convert the enum to string.</comment> @@ -229,7 +229,7 @@ <returns type="gint" comment="The enum."/> <comment xml:space="preserve">Convert a integer and string into an enum.</comment> </method> - <method name="i_cal_property_string_to_status" corresponds="icalproperty_string_to_status" since="1.0"> + <method name="i_cal_property_status_from_string" corresponds="icalproperty_string_to_status" since="1.0"> <parameter type="const gchar *" name="str" comment="A string."/> <returns type="ICalPropertyStatus" comment="The #ICalPropertyStatus."/> <comment xml:space="preserve">Convert the string to #ICalPropertyKind.</comment> @@ -239,7 +239,7 @@ <returns type="const gchar *" comment="The string representation of #ICalPropertyStatus."/> <comment xml:space="preserve">Convert the #ICalPropertyStatus to string.</comment> </method> - <method name="i_cal_property_enum_belongs_to_property" corresponds="icalproperty_enum_belongs_to_property" since="1.0"> + <method name="i_cal_property_kind_has_property" corresponds="icalproperty_enum_belongs_to_property" since="1.0"> <parameter type="ICalPropertyKind" name="kind" comment="A #ICalPropertyKind"/> <parameter type="gint" name="e" comment="The enum to be checked."/> <returns type="gint" comment="1 if yes, 0 if not."/> diff --git a/src/libical-glib/api/i-cal-recur.xml b/src/libical-glib/api/i-cal-recur.xml index 018e6edc..62c1ced8 100644 --- a/src/libical-glib/api/i-cal-recur.xml +++ b/src/libical-glib/api/i-cal-recur.xml @@ -36,32 +36,32 @@ return garray; }</custom> </method> - <method name="i_cal_recur_string_to_weekday" corresponds="icalrecur_string_to_weekday" since="1.0"> + <method name="i_cal_recurrence_weekday_from_string" corresponds="icalrecur_string_to_weekday" since="1.0"> <parameter type="const gchar *" name="str" comment="The string representation of the weekday."/> <returns type="ICalRecurrenceWeekday" comment="The enum representation of the weekday."/> <comment xml:space="preserve">Convert a string representation to an enum representation for the weekday.</comment> </method> - <method name="i_cal_recur_weekday_to_string" corresponds="icalrecur_weekday_to_string" since="2.0"> + <method name="i_cal_recurrence_weekday_to_string" corresponds="icalrecur_weekday_to_string" since="2.0"> <parameter type="ICalRecurrenceWeekday" name="kind" comment="The freqeuncy enum"/> <returns type="const gchar *" comment="The string representation of weekday"/> <comment xml:space="preserve">Convert a enum representation to a string representation for the weekday.</comment> </method> - <method name="i_cal_recur_string_to_freq" corresponds="icalrecur_string_to_freq" since="2.0"> + <method name="i_cal_recurrence_frequency_from_string" corresponds="icalrecur_string_to_freq" since="2.0"> <parameter type="const gchar *" name="str" comment="The string representation of the frequency."/> <returns type="ICalRecurrenceFrequency" comment="The enum representation of the frequency."/> <comment xml:space="preserve">Convert a string representation to an enum representation for the frequency.</comment> </method> - <method name="i_cal_recur_freq_to_string" corresponds="icalrecur_freq_to_string" since="2.0"> + <method name="i_cal_recurrence_frequency_to_string" corresponds="icalrecur_freq_to_string" since="2.0"> <parameter type="ICalRecurrenceFrequency" name="kind" comment="The freqeuncy enum"/> <returns type="const gchar *" comment="The string representation of frequency"/> <comment xml:space="preserve">Convert a enum representation to a string representation for the frequency.</comment> </method> - <method name="i_cal_recur_string_to_skip" corresponds="icalrecur_string_to_skip" since="2.0"> + <method name="i_cal_recurrence_skip_from_string" corresponds="icalrecur_string_to_skip" since="2.0"> <parameter type="const gchar *" name="str" comment="The string representation of the skip."/> <returns type="ICalRecurrenceSkip" comment="The enum representation of the skip."/> <comment xml:space="preserve">Convert a string representation to an enum representation for the skip.</comment> </method> - <method name="i_cal_recur_skip_to_string" corresponds="icalrecur_skip_to_string" since="2.0"> + <method name="i_cal_recurrence_skip_to_string" corresponds="icalrecur_skip_to_string" since="2.0"> <parameter type="ICalRecurrenceSkip" name="kind" comment="The freqeuncy enum"/> <returns type="const gchar *" comment="The string representation of skip"/> <comment xml:space="preserve">Convert a enum representation to a string representation for the skip.</comment> diff --git a/src/libical-glib/api/i-cal-recurrence.xml b/src/libical-glib/api/i-cal-recurrence.xml index d69b50bf..69d71a02 100644 --- a/src/libical-glib/api/i-cal-recurrence.xml +++ b/src/libical-glib/api/i-cal-recurrence.xml @@ -115,12 +115,12 @@ <returns type="gshort" comment="Encoded @month and @is_leap."/> <comment xml:space="preserve">Encodes the @month and the @is_leap flag into a single value, which can be split by i_cal_recurrence_month_is_leap() and i_cal_recurrence_month_month().</comment> </method> - <method name="i_cal_recurrence_from_string" corresponds="icalrecurrencetype_from_string" since="1.0"> + <method name="i_cal_recurrence_new_from_string" corresponds="icalrecurrencetype_from_string" since="1.0"> <parameter type="const gchar *" name="str" comment="The string representation of the #ICalRecurrence"/> <returns type="ICalRecurrence *" annotation="transfer full" comment="The #ICalRecurrence converted from @str."/> <comment xml:space="preserve">Convert a string to a #ICalRecurrence.</comment> </method> - <method name="i_cal_recurrence_as_string_r" corresponds="icalrecurrencetype_as_string_r" since="1.0"> + <method name="i_cal_recurrence_to_string" corresponds="icalrecurrencetype_as_string_r" since="1.0"> <parameter type="ICalRecurrence *" name="recur" native_op="POINTER" comment="The #ICalRecurrence to be converted."/> <returns type="gchar *" annotation="transfer full" comment="The string representation of @recur."/> <comment xml:space="preserve">Convert a #ICalRecurrence to a string.</comment> diff --git a/src/libical-glib/api/i-cal-reqstat.xml b/src/libical-glib/api/i-cal-reqstat.xml index 6394b2d6..78a3c547 100644 --- a/src/libical-glib/api/i-cal-reqstat.xml +++ b/src/libical-glib/api/i-cal-reqstat.xml @@ -14,17 +14,17 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. --> <structure namespace="ICal" name="Reqstat" native="struct icalreqstattype" is_bare="true" default_native="i_cal_reqstat_new_default ()"> - <method name="i_cal_reqstat_from_string" corresponds="icalreqstattype_from_string" kind="constructor" since="1.0"> + <method name="i_cal_reqstat_new_from_string" corresponds="icalreqstattype_from_string" kind="constructor" since="1.0"> <parameter type="const gchar *" name="str" comment="A string."/> <returns type="ICalReqstat *" annotation="transfer full" comment="The newly created #ICalReqstat."/> <comment xml:space="preserve">Create a #ICalReqstat from string.</comment> </method> - <method name="i_cal_reqstat_as_string_r" corresponds="icalreqstattype_as_string_r" since="1.0"> + <method name="i_cal_reqstat_to_string" corresponds="icalreqstattype_as_string_r" since="1.0"> <parameter type="ICalReqstat *" name="stat" comment="A #ICalReqstat."/> <returns type="gchar *" annotation="transfer full" comment="A string."/> <comment xml:space="preserve">Convert #ICalReqstat to a string representation.</comment> </method> - <method name="i_cal_reqstat_new_default" corresponds="CUSTOM" kind="private" since="1.0"> + <method name="i_cal_reqstat_new_default" corresponds="CUSTOM" kind="private" annotation="skip" since="1.0"> <returns type="struct icalreqstattype" annotation="transfer full" comment="The newly created #ICalReqstat" /> <comment xml:space="preserve">Create a new default #ICalReqstat</comment> <custom> struct icalreqstattype reqstattype; diff --git a/src/libical-glib/api/i-cal-time-span.xml b/src/libical-glib/api/i-cal-time-span.xml index b2164c50..c3c0481e 100644 --- a/src/libical-glib/api/i-cal-time-span.xml +++ b/src/libical-glib/api/i-cal-time-span.xml @@ -26,7 +26,7 @@ span.is_busy = is_busy ? 1 : 0; return i_cal_time_span_new_full(span);</custom> </method> - <method name="i_cal_time_span_new_clone" corresponds="CUSTOM" kind="constructor" since="3.0.5"> + <method name="i_cal_time_span_clone" corresponds="CUSTOM" kind="constructor" since="3.0.5"> <parameter type="const ICalTimeSpan *" name="src" comment="A time span to clone."/> <returns type="ICalTimeSpan *" annotation="transfer full" comment="The newly created #ICalTimeSpan, clone of @src." /> <comment xml:space="preserve">Create a new #ICalTimeSpan, clone of @src. Free it with g_object_unref(), when no longer needed.</comment> diff --git a/src/libical-glib/api/i-cal-time.xml b/src/libical-glib/api/i-cal-time.xml index d604eb78..e9a77a65 100644 --- a/src/libical-glib/api/i-cal-time.xml +++ b/src/libical-glib/api/i-cal-time.xml @@ -19,7 +19,7 @@ <comment xml:space="preserve">Create a new #ICalTime.</comment> <custom> return i_cal_time_new_full(icaltime_null_time());</custom> </method> - <method name="i_cal_time_new_clone" corresponds="CUSTOM" kind="constructor" since="1.0"> + <method name="i_cal_time_clone" corresponds="CUSTOM" kind="constructor" since="1.0"> <parameter type="const ICalTime *" name="timetype" comment="The #ICalTime to clone."/> <returns type="ICalTime *" annotation="transfer full" comment="The newly created #ICalTime, copy of @timetype." /> <comment xml:space="preserve">Create a new #ICalTime, copy of @timetype.</comment> @@ -32,36 +32,36 @@ return i_cal_time_new_full(*itt);</custom> </method> - <method name="i_cal_time_null_time" corresponds="icaltime_null_time" kind="constructor" since="1.0"> + <method name="i_cal_time_new_null_time" corresponds="icaltime_null_time" kind="constructor" since="1.0"> <returns type="ICalTime *" annotation="transfer full" comment="The newly created #ICalTime" /> <comment xml:space="preserve">Create a default time which is an epoch time</comment> </method> - <method name="i_cal_time_null_date" corresponds="icaltime_null_date" kind="constructor" since="1.0"> + <method name="i_cal_time_new_null_date" corresponds="icaltime_null_date" kind="constructor" since="1.0"> <returns type="ICalTime *" annotation="transfer full" comment="The newly created #ICalTime" /> <comment xml:space="preserve">Create a null date, which indicates no time has been set</comment> </method> - <method name="i_cal_time_current_time_with_zone" corresponds="icaltime_current_time_with_zone" kind="others" since="1.0"> + <method name="i_cal_time_new_current_with_zone" corresponds="icaltime_current_time_with_zone" kind="others" since="1.0"> <parameter type="ICalTimezone *" name="zone" annotation="nullable" comment="The timezone used to create a #ICalTime according to the current time"/> <returns type="ICalTime *" annotation="transfer full" comment="The newly created #ICalTime" /> <comment xml:space="preserve">Create a #ICalTime according to the timezone and current time</comment> </method> - <method name="i_cal_time_today" corresponds="icaltime_today" kind="others" since="1.0"> + <method name="i_cal_time_new_today" corresponds="icaltime_today" kind="others" since="1.0"> <returns type="ICalTime *" annotation="transfer full" comment="The newly created #ICalTime" /> <comment xml:space="preserve">Create a #ICalTime representing today</comment> </method> - <method name="i_cal_time_from_timet_with_zone" corresponds="icaltime_from_timet_with_zone" kind="others" since="1.0"> + <method name="i_cal_time_new_from_timet_with_zone" corresponds="icaltime_from_timet_with_zone" kind="others" since="1.0"> <parameter type="const time_t" name="v" comment="The seconds past since epoch time"/> <parameter type="gint" name="is_date" comment="Whether it is a date type, 1 if yes, 0 if not."/> <parameter type="ICalTimezone *" name="zone" annotation="nullable" comment="The timezone, or %NULL"/> <returns type="ICalTime *" annotation="transfer full" comment="The newly created #ICalTime" /> <comment xml:space="preserve">Convert seconds past UNIX epoch to a timetype, using timezones.</comment> </method> - <method name="i_cal_time_from_string" corresponds="icaltime_from_string" kind="others" since="1.0"> + <method name="i_cal_time_new_from_string" corresponds="icaltime_from_string" kind="others" since="1.0"> <parameter type="const gchar *" name="str" comment="The ISO format string"/> <returns type="ICalTime *" annotation="transfer full" comment="The newly created #ICalTime" /> <comment xml:space="preserve">create a time from an ISO format string</comment> </method> - <method name="i_cal_time_from_day_of_year" corresponds="icaltime_from_day_of_year" kind="constructor" since="1.0"> + <method name="i_cal_time_new_from_day_of_year" corresponds="icaltime_from_day_of_year" kind="constructor" since="1.0"> <parameter type="const gint" name="day" comment="The day of a year"/> <parameter type="const gint" name="year" comment="The year"/> <returns type="ICalTime *" annotation="transfer full" comment="The newly created #ICalTime" /> @@ -78,7 +78,7 @@ <returns type="time_t" comment="the time as seconds past the UNIX epoch" /> <comment xml:space="preserve">Return the time as seconds past the UNIX epoch, using timezones.</comment> </method> - <method name="i_cal_time_as_ical_string_r" corresponds="icaltime_as_ical_string_r" since="1.0"> + <method name="i_cal_time_as_ical_string" corresponds="icaltime_as_ical_string_r" since="1.0"> <parameter type="const ICalTime *" name="tt" comment="The #ICalTime to be converted"/> <returns type="gchar *" annotation="transfer full" comment="The string representation" /> <comment xml:space="preserve">Return a string represention of the time, in RFC2445 format.</comment> @@ -358,20 +358,20 @@ </method> <method name="i_cal_time_get_date" corresponds="CUSTOM" kind="get" since="1.0"> <parameter type="const ICalTime *" name="timetype" comment="The #ICalTime to be queried."/> - <parameter type="gint *" name="out_year" annotation="out caller-allocates" comment="Out parameter for the 'year' part of the date."/> - <parameter type="gint *" name="out_month" annotation="out caller-allocates" comment="Out parameter for the 'month' part of the date."/> - <parameter type="gint *" name="out_day" annotation="out caller-allocates" comment="Out parameter for the 'day' part of the date."/> + <parameter type="gint *" name="year" annotation="out caller-allocates, optional" comment="Out parameter for the 'year' part of the date."/> + <parameter type="gint *" name="month" annotation="out caller-allocates, optional" comment="Out parameter for the 'month' part of the date."/> + <parameter type="gint *" name="day" annotation="out caller-allocates, optional" comment="Out parameter for the 'day' part of the date."/> <comment xml:space="preserve">Get the year/month/date parts of the @timetype in one call.</comment> <custom> icaltimetype *itt; g_return_if_fail(timetype != NULL); itt = (struct icaltimetype *)i_cal_object_get_native ((ICalObject *)timetype); g_return_if_fail(itt != NULL); - if(out_year) - *out_year = itt->year; - if(out_month) - *out_month = itt->month; - if(out_day) - *out_day = itt->day; </custom> + if(year) + *year = itt->year; + if(month) + *month = itt->month; + if(day) + *day = itt->day; </custom> </method> <method name="i_cal_time_set_date" corresponds="CUSTOM" kind="set" since="1.0"> <parameter type="ICalTime *" name="timetype" comment="The #ICalTime to be set to."/> @@ -389,20 +389,20 @@ </method> <method name="i_cal_time_get_time" corresponds="CUSTOM" kind="get" since="1.0"> <parameter type="const ICalTime *" name="timetype" comment="The #ICalTime to be queried."/> - <parameter type="gint *" name="out_hour" annotation="out caller-allocates" comment="Out parameter for the 'hour' part of the time."/> - <parameter type="gint *" name="out_minute" annotation="out caller-allocates" comment="Out parameter for the 'minute' part of the time."/> - <parameter type="gint *" name="out_second" annotation="out caller-allocates" comment="Out parameter for the 'second' part of the time."/> + <parameter type="gint *" name="hour" annotation="out caller-allocates, optional" comment="Out parameter for the 'hour' part of the time."/> + <parameter type="gint *" name="minute" annotation="out caller-allocates, optional" comment="Out parameter for the 'minute' part of the time."/> + <parameter type="gint *" name="second" annotation="out caller-allocates, optional" comment="Out parameter for the 'second' part of the time."/> <comment xml:space="preserve">Get the hour/minute/second parts of the @timetype in one call.</comment> <custom> icaltimetype *itt; g_return_if_fail(timetype != NULL); itt = (struct icaltimetype *)i_cal_object_get_native ((ICalObject *)timetype); g_return_if_fail(itt != NULL); - if(out_hour) - *out_hour = itt->hour; - if(out_minute) - *out_minute = itt->minute; - if(out_second) - *out_second = itt->second; </custom> + if(hour) + *hour = itt->hour; + if(minute) + *minute = itt->minute; + if(second) + *second = itt->second; </custom> </method> <method name="i_cal_time_set_time" corresponds="CUSTOM" kind="set" since="1.0"> <parameter type="ICalTime *" name="timetype" comment="The #ICalTime to be set to."/> diff --git a/src/libical-glib/api/i-cal-timezone.xml b/src/libical-glib/api/i-cal-timezone.xml index 6eb72335..ca8d136f 100644 --- a/src/libical-glib/api/i-cal-timezone.xml +++ b/src/libical-glib/api/i-cal-timezone.xml @@ -113,7 +113,7 @@ <returns type="const gchar *" comment="The display name of @zone"/> <comment xml:space="preserve">Get the display name of the @zone.</comment> </method> - <method name="i_cal_timezone_convert_time" corresponds="icaltimezone_convert_time" kind="other" since="1.0"> + <method name="i_cal_time_convert_timezone" corresponds="icaltimezone_convert_time" kind="other" since="1.0"> <parameter type="ICalTime *" name="tt" native_op="POINTER" comment="The time to be converted"/> <parameter type="ICalTimezone *" name="from_zone" annotation="nullable" comment="from timezone"/> <parameter type="ICalTimezone *" name="to_zone" annotation="nullable" comment="to timezone"/> @@ -121,15 +121,15 @@ </method> <method name="i_cal_timezone_get_utc_offset" corresponds="icaltimezone_get_utc_offset" kind="get" since="1.0"> <parameter type="ICalTimezone *" name="zone" annotation="nullable" comment="The given #ICalTimezone."/> - <parameter type="ICalTime *" name="tt" annotation="nullable" native_op="POINTER" comment="The local time."/> - <parameter type="gint *" name="is_daylight" comment="whether it is day light."/> + <parameter type="ICalTime *" name="tt" annotation="nullable, out" native_op="POINTER" comment="The local time."/> + <parameter type="gint *" name="is_daylight" annotation="out" comment="whether it is day light."/> <returns type="gint" comment="UTC offset of the @zone"/> <comment>Calculates the UTC offset of a given local time in the given timezone. It is the number of seconds to add to UTC to get local time. The is_daylight flag is set to 1 if the time is in daylight-savings time.</comment> </method> <method name="i_cal_timezone_get_utc_offset_of_utc_time" corresponds="icaltimezone_get_utc_offset_of_utc_time" kind="get" since="1.0"> <parameter type="ICalTimezone *" name="zone" annotation="nullable" comment="The given #ICalTimezone."/> - <parameter type="ICalTime *" name="tt" native_op="POINTER" comment="The local time."/> - <parameter type="gint *" name="is_daylight" annotation="nullable" comment="whether it is day light, can be %NULL"/> + <parameter type="ICalTime *" name="tt" annotation="out" native_op="POINTER" comment="The local time."/> + <parameter type="gint *" name="is_daylight" annotation="out, optional" comment="whether it is day light, can be %NULL"/> <returns type="gint" comment="UTC offset of the @zone"/> <comment>Calculates the UTC offset of a given UTC time in the given timezone. It is the number of seconds to add to UTC to get local time. The is_daylight flag is set to 1 if the time is in daylight-savings time.</comment> </method> diff --git a/src/libical-glib/api/i-cal-trigger.xml b/src/libical-glib/api/i-cal-trigger.xml index bed85e17..dce2e2cb 100644 --- a/src/libical-glib/api/i-cal-trigger.xml +++ b/src/libical-glib/api/i-cal-trigger.xml @@ -14,12 +14,12 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. --> <structure namespace="ICal" name="Trigger" native="struct icaltriggertype" is_bare="true" default_native="icaltriggertype_from_int (0)"> - <method name="i_cal_trigger_from_int" corresponds="icaltriggertype_from_int" kind="constructor" since="1.0"> + <method name="i_cal_trigger_new_from_int" corresponds="icaltriggertype_from_int" kind="constructor" since="1.0"> <parameter type="const gint" name="reltime" comment="An integer."/> <returns type="ICalTrigger *" annotation="transfer full" comment="The newly created #ICalTrigger."/> <comment xml:space="preserve">Create a #ICalTrigger from integer.</comment> </method> - <method name="i_cal_trigger_from_string" corresponds="icaltriggertype_from_string" kind="constructor" since="1.0"> + <method name="i_cal_trigger_new_from_string" corresponds="icaltriggertype_from_string" kind="constructor" since="1.0"> <parameter type="const gchar *" name="str" comment="A string."/> <returns type="ICalTrigger *" annotation="transfer full" comment="The newly created #ICalTrigger."/> <comment xml:space="preserve">Create a #ICalTrigger from a string.</comment> diff --git a/src/libical-glib/api/i-cal-value.xml b/src/libical-glib/api/i-cal-value.xml index 88ec769b..ed54e510 100644 --- a/src/libical-glib/api/i-cal-value.xml +++ b/src/libical-glib/api/i-cal-value.xml @@ -19,7 +19,7 @@ <returns type="ICalValue *" annotation="transfer full" comment="The newly created #ICalValue."/> <comment xml:space="preserve">Create a new #ICalValue with specific kind.</comment> </method> - <method name="i_cal_value_new_clone" corresponds="icalvalue_new_clone" kind="clone" since="1.0"> + <method name="i_cal_value_clone" corresponds="icalvalue_new_clone" kind="clone" since="1.0"> <parameter type="const ICalValue *" name="value" comment="The #ICalValue to be cloned."/> <returns type="ICalValue *" annotation="transfer full" comment="The newly created #ICalValue with the same property as @value."/> <comment xml:space="preserve">Deeply clone a #ICalValue.</comment> @@ -39,7 +39,7 @@ <returns type="gboolean" comment="1 if valid, 0 if not."/> <comment xml:space="preserve">Check if #ICalValue is valid.</comment> </method> - <method name="i_cal_value_as_ical_string_r" corresponds="icalvalue_as_ical_string_r" since="1.0"> + <method name="i_cal_value_as_ical_string" corresponds="icalvalue_as_ical_string_r" since="1.0"> <parameter type="const ICalValue *" name="value" comment="A #ICalValue."/> <returns type="gchar *" annotation="transfer full" comment="The string representation."/> <comment xml:space="preserve">Convert the #ICalValue to a string.</comment> @@ -60,7 +60,7 @@ <returns type="ICalParameterXliccomparetype" comment="The compare result."/> <comment xml:space="preserve">Compare two #ICalValue.</comment> </method> - <method name="i_cal_value_string_to_kind" corresponds="icalvalue_string_to_kind" since="1.0"> + <method name="i_cal_value_kind_from_string" corresponds="icalvalue_string_to_kind" since="1.0"> <parameter type="const gchar *" name="str" comment="A string."/> <returns type="ICalValueKind" comment="A #ICalValueKind."/> <comment xml:space="preserve">Convert a string to #ICalValueKind.</comment> diff --git a/src/test/libical-glib/component.py b/src/test/libical-glib/component.py index 870589be..d8443d4e 100755 --- a/src/test/libical-glib/component.py +++ b/src/test/libical-glib/component.py @@ -127,13 +127,13 @@ def foreachRecurrenceCb(comp, span, user_data): ############################################################# def main(): - #Test as_ical_string_r + #Test as_ical_string comp = ICalGLib.Component.new_from_string(event_str1); - string = comp.as_ical_string_r(); + string = comp.as_ical_string(); #Test new_clone - clone = comp.new_clone(); - string1 = clone.as_ical_string_r(); + clone = comp.clone(); + string1 = clone.as_ical_string(); assert(string == string1); assert(comp.is_valid() == 1); assert(comp.isa_component() == 1); @@ -150,7 +150,7 @@ def main(): #Test kind_to_string kind_string = ICalGLib.Component.kind_to_string(ICalGLib.ComponentKind.VEVENT_COMPONENT); - assert(ICalGLib.Component.string_to_kind(kind_string) == ICalGLib.ComponentKind.VEVENT_COMPONENT); + assert(ICalGLib.Component.kind_from_string(kind_string) == ICalGLib.ComponentKind.VEVENT_COMPONENT); #Test child component manipulation parent = ICalGLib.Component.new_from_string(event_str1); @@ -227,20 +227,20 @@ def main(): component.add_property(ICalGLib.Property.new_from_string("SUMMARY:20140306T090000")); assert(component.count_properties(ICalGLib.PropertyKind.SUMMARY_PROPERTY) == 3); property1 = component.get_first_property(ICalGLib.PropertyKind.SUMMARY_PROPERTY); - assert(property1.as_ical_string_r().split('\n', 1)[0] == "SUMMARY:Bastille Day Party\r"); + assert(property1.as_ical_string().split('\n', 1)[0] == "SUMMARY:Bastille Day Party\r"); property2 = component.get_next_property(ICalGLib.PropertyKind.SUMMARY_PROPERTY); - assert(property2.as_ical_string_r().split('\n', 1)[0] == "SUMMARY:event-uid-123\r"); + assert(property2.as_ical_string().split('\n', 1)[0] == "SUMMARY:event-uid-123\r"); property3 = component.get_next_property(ICalGLib.PropertyKind.SUMMARY_PROPERTY); - assert(property3.as_ical_string_r().split('\n', 1)[0] == "SUMMARY:20140306T090000\r"); + assert(property3.as_ical_string().split('\n', 1)[0] == "SUMMARY:20140306T090000\r"); #Test getters and setters #Test get_dtstart and get_dtend comp = ICalGLib.Component.new_from_string(event_str1); dtstart = comp.get_dtstart(); - start_string = ICalGLib.Time.as_ical_string_r(dtstart); + start_string = ICalGLib.Time.as_ical_string(dtstart); assert(start_string == "20140306T090000"); dtend = comp.get_dtend(); - end_string = dtend.as_ical_string_r(); + end_string = dtend.as_ical_string(); assert(end_string == "20140306T093000"); #Test span @@ -249,8 +249,8 @@ def main(): assert(span.get_end() == 1394098200); assert(span.get_is_busy() == 1); utc = ICalGLib.Timezone.get_utc_timezone(); - comp.set_dtstart(ICalGLib.Time.from_timet_with_zone(1494096400, 0, utc)); - comp.set_dtend(ICalGLib.Time.from_timet_with_zone(1494098200, 0, utc)); + comp.set_dtstart(ICalGLib.Time.new_from_timet_with_zone(1494096400, 0, utc)); + comp.set_dtend(ICalGLib.Time.new_from_timet_with_zone(1494098200, 0, utc)); span = comp.get_span(); assert(span.get_start() == 1494096400); assert(span.get_end() == 1494098200); @@ -299,7 +299,7 @@ def main(): counter = TestCounter() comp = ICalGLib.Component.new_from_string(recurring_str) - comp.foreach_recurrence(ICalGLib.Time.from_string("20180321T000000Z"), ICalGLib.Time.from_string("20180323T235959Z"), foreachRecurrenceCb, counter) + comp.foreach_recurrence(ICalGLib.Time.new_from_string("20180321T000000Z"), ICalGLib.Time.new_from_string("20180323T235959Z"), foreachRecurrenceCb, counter) assert counter.counter == 3 comp = ICalGLib.Component.new_from_string(event_str1); diff --git a/src/test/libical-glib/comprehensive.py b/src/test/libical-glib/comprehensive.py index d1ffed3a..09495864 100755 --- a/src/test/libical-glib/comprehensive.py +++ b/src/test/libical-glib/comprehensive.py @@ -179,7 +179,7 @@ def main(): parent.add_component(comp3); parent.add_component(comp4); - assert parent.as_ical_string_r() == combined_string; + assert parent.as_ical_string() == combined_string; count = parent.count_components(ICalGLib.ComponentKind.VEVENT_COMPONENT); child_component = parent.get_first_component(ICalGLib.ComponentKind.VEVENT_COMPONENT); @@ -187,8 +187,8 @@ def main(): if (child_component.get_summary() == "childEvent2"): child_component.set_summary("childEventTwo"); - start = ICalGLib.Time.from_string("20141115T211923"); - end = ICalGLib.Time.from_string("20141115T221923"); + start = ICalGLib.Time.new_from_string("20141115T211923"); + end = ICalGLib.Time.new_from_string("20141115T221923"); child_component.set_dtstart(start); child_component.set_dtend(end); @@ -202,7 +202,7 @@ def main(): if (i != count-1): child_component = parent.get_next_component(ICalGLib.ComponentKind.VEVENT_COMPONENT); - modifiedCombinedString = parent.as_ical_string_r(); + modifiedCombinedString = parent.as_ical_string(); newParent = ICalGLib.Component.new_from_string(modifiedCombinedString); count = parent.count_components(ICalGLib.ComponentKind.VEVENT_COMPONENT); @@ -212,19 +212,19 @@ def main(): child_component.set_summary("childEventTwo"); dtstart = child_component.get_dtstart(); - start_string = ICalGLib.Time.as_ical_string_r(dtstart); + start_string = ICalGLib.Time.as_ical_string(dtstart); assert(start_string == "20141115T211923"); dtend = child_component.get_dtend(); - end_string = ICalGLib.Time.as_ical_string_r(dtend); + end_string = ICalGLib.Time.as_ical_string(dtend); assert(end_string == "20141115T221923"); timestamp = child_component.get_dtstamp(); - assert(ICalGLib.Time.as_ical_string_r(timestamp) == "20141115T211923"); + assert(ICalGLib.Time.as_ical_string(timestamp) == "20141115T211923"); assert(child_component.get_location() == "East Lansing, MI, US"); assert(child_component.get_relcalid() == "relcalid for childEventTwo"); recurProperty = child_component.get_first_property(ICalGLib.PropertyKind.RRULE_PROPERTY); - assert recurProperty.as_ical_string_r() == "RRULE:FREQ=DAILY;COUNT=5;INTERVAL=10\r\n"; + assert recurProperty.as_ical_string() == "RRULE:FREQ=DAILY;COUNT=5;INTERVAL=10\r\n"; if (i != count-1): child_component = parent.get_next_component(ICalGLib.ComponentKind.VEVENT_COMPONENT); diff --git a/src/test/libical-glib/duration.py b/src/test/libical-glib/duration.py index 6cfcdba2..ecd52b69 100755 --- a/src/test/libical-glib/duration.py +++ b/src/test/libical-glib/duration.py @@ -27,16 +27,16 @@ from gi.repository import ICalGLib length = 1000000000; bad_string = "This is a bad string"; -duration = ICalGLib.Duration.from_int(length); +duration = ICalGLib.Duration.new_from_int(length); assert(duration.as_int() == length); -length_in_string = duration.as_ical_string_r(); -duration1 = ICalGLib.Duration.from_string(length_in_string); -assert(duration1.as_ical_string_r() == length_in_string); +length_in_string = duration.as_ical_string(); +duration1 = ICalGLib.Duration.new_from_string(length_in_string); +assert(duration1.as_ical_string() == length_in_string); assert(length == duration1.as_int()); -duration = ICalGLib.Duration.from_string(bad_string); -duration_bad = ICalGLib.Duration.bad_duration(); -assert(duration.as_ical_string_r() == duration_bad.as_ical_string_r()); +duration = ICalGLib.Duration.new_from_string(bad_string); +duration_bad = ICalGLib.Duration.new_bad_duration(); +assert(duration.as_ical_string() == duration_bad.as_ical_string()); assert(duration.is_bad_duration() == 1); -duration_null = ICalGLib.Duration.null_duration(); +duration_null = ICalGLib.Duration.new_null_duration(); assert(duration_null.is_null_duration() == 1); diff --git a/src/test/libical-glib/misc.py b/src/test/libical-glib/misc.py index b7772180..2959fa97 100755 --- a/src/test/libical-glib/misc.py +++ b/src/test/libical-glib/misc.py @@ -27,7 +27,7 @@ from gi.repository import ICalGLib geo = ICalGLib.Geo.new(10.0, 20.0) assert geo.get_lat() == 10.0 assert geo.get_lon() == 20.0 -geo_clone = geo.new_clone() +geo_clone = geo.clone() assert geo.get_lat() == geo_clone.get_lat() assert geo.get_lon() == geo_clone.get_lon() geo_clone.set_lat(30.0) @@ -37,14 +37,14 @@ assert geo_clone.get_lon() == 40.0 assert geo.get_lat() != geo_clone.get_lat() assert geo.get_lon() != geo_clone.get_lon() -start = ICalGLib.Time.from_string("20190130T111213Z"); -end = ICalGLib.Time.from_string("20190203T100908Z") +start = ICalGLib.Time.new_from_string("20190130T111213Z"); +end = ICalGLib.Time.new_from_string("20190203T100908Z") span = ICalGLib.TimeSpan.new(start, end, 0); assert span.get_start() == start.as_timet() assert span.get_end() == end.as_timet() assert span.get_is_busy() == 0 -start = ICalGLib.Time.from_string("20190330T131415Z"); -end = ICalGLib.Time.from_string("20190403T070605Z") +start = ICalGLib.Time.new_from_string("20190330T131415Z"); +end = ICalGLib.Time.new_from_string("20190403T070605Z") span = ICalGLib.TimeSpan.new(start, end, 1); assert span.get_start() == start.as_timet() assert span.get_end() == end.as_timet() @@ -54,7 +54,7 @@ span = ICalGLib.TimeSpan.new_timet(11, 22, 1) assert span.get_start() == 11 assert span.get_end() == 22 assert span.get_is_busy() == 1 -span_clone = span.new_clone() +span_clone = span.clone() assert span.get_start() == span_clone.get_start() assert span.get_end() == span_clone.get_end() assert span.get_is_busy() == span_clone.get_is_busy() diff --git a/src/test/libical-glib/parameter.py b/src/test/libical-glib/parameter.py index f7cdbc10..cf4861cd 100755 --- a/src/test/libical-glib/parameter.py +++ b/src/test/libical-glib/parameter.py @@ -49,24 +49,24 @@ kind = ICalGLib.ParameterKind.ACTIONPARAM_PARAMETER; parameter = ICalGLib.Parameter.new(kind); assert(parameter.isa() == kind); assert(parameter.isa_parameter() == 1); -string = parameter.as_ical_string_r(); +string = parameter.as_ical_string(); assert(string == None); -clone = parameter.new_clone(); +clone = parameter.clone(); assert(clone.isa() == kind); assert(clone.isa_parameter() == 1); -string = clone.as_ical_string_r(); +string = clone.as_ical_string(); assert(string == None); string = ICalGLib.Parameter.kind_to_string(kind); assert(string == "ACTIONPARAM"); -assert(ICalGLib.Parameter.string_to_kind(string) == kind); +assert(ICalGLib.Parameter.kind_from_string(string) == kind); value = "This is a value"; typevalue = string + "=" + value; parameter = ICalGLib.Parameter.new_from_string(typevalue); -assert(parameter.as_ical_string_r() == typevalue); +assert(parameter.as_ical_string() == typevalue); assert(parameter.isa() == kind); assert(parameter.isa_parameter() == 1); another_parameter = ICalGLib.Parameter.new_from_value_string(kind, value); -assert(another_parameter.as_ical_string_r() == typevalue); +assert(another_parameter.as_ical_string() == typevalue); diff --git a/src/test/libical-glib/period.py b/src/test/libical-glib/period.py index bdcbfb7e..955eac15 100755 --- a/src/test/libical-glib/period.py +++ b/src/test/libical-glib/period.py @@ -26,11 +26,11 @@ from gi.repository import ICalGLib string = "19970101T183248Z/19970102T071625Z"; -period = ICalGLib.Period.from_string(string); -retrieved_string = period.as_ical_string_r(); +period = ICalGLib.Period.new_from_string(string); +retrieved_string = period.as_ical_string(); assert(retrieved_string == string); -null_period = ICalGLib.Period.null_period(); +null_period = ICalGLib.Period.new_null_period(); assert(null_period.is_null_period() == 1); assert(period.is_null_period() == 0); @@ -57,8 +57,8 @@ duration = period.get_duration(); assert(duration.as_int() == 0); string = "19970101T182346Z/PT5H30M"; -period = ICalGLib.Period.from_string(string); -retrieved_string = period.as_ical_string_r(); +period = ICalGLib.Period.new_from_string(string); +retrieved_string = period.as_ical_string(); assert(retrieved_string == string); start = period.get_start(); @@ -78,4 +78,4 @@ assert(end.get_minute() == 0); assert(end.get_second() == 0); duration = period.get_duration(); -assert(duration.as_ical_string_r() == "PT5H30M"); +assert(duration.as_ical_string() == "PT5H30M"); diff --git a/src/test/libical-glib/property.py b/src/test/libical-glib/property.py index cec09501..dbf056e6 100755 --- a/src/test/libical-glib/property.py +++ b/src/test/libical-glib/property.py @@ -25,16 +25,16 @@ gi.require_version('ICalGLib', '3.0') from gi.repository import ICalGLib action_property = ICalGLib.Property.new(ICalGLib.PropertyKind.ACKNOWLEDGED_PROPERTY); -action_property_clone = action_property.new_clone(); -assert(action_property_clone.as_ical_string_r() == action_property.as_ical_string_r()); +action_property_clone = action_property.clone(); +assert(action_property_clone.as_ical_string() == action_property.as_ical_string()); property_string = "SUMMARY:Bastille Day Party"; string_property = ICalGLib.Property.new_from_string(property_string); -string_property_clone = string_property.new_clone(); -assert(string_property.as_ical_string_r() == string_property_clone.as_ical_string_r()); +string_property_clone = string_property.clone(); +assert(string_property.as_ical_string() == string_property_clone.as_ical_string()); assert(string_property.isa() == ICalGLib.PropertyKind.SUMMARY_PROPERTY); assert(string_property.isa_property() == 1); -assert(string_property.get_property_name_r() == "SUMMARY"); +assert(string_property.get_property_name() == "SUMMARY"); altrep1 = "This is an altrep 1"; parameter1 = ICalGLib.Parameter.new_altrep(altrep1); @@ -46,11 +46,11 @@ string_property.set_parameter_from_string("ACTIONPARAM", "This is a action param assert(string_property.count_parameters() == 3); retrieved_parameter1 = string_property.get_first_parameter(ICalGLib.ParameterKind.ALTREP_PARAMETER); -assert(retrieved_parameter1.as_ical_string_r() == parameter1.as_ical_string_r()); +assert(retrieved_parameter1.as_ical_string() == parameter1.as_ical_string()); retrieved_parameter2 = string_property.get_next_parameter(ICalGLib.ParameterKind.ALTREP_PARAMETER); -assert(retrieved_parameter2.as_ical_string_r() == parameter2.as_ical_string_r()); +assert(retrieved_parameter2.as_ical_string() == parameter2.as_ical_string()); retrieved_parameter3 = string_property.get_first_parameter(ICalGLib.ParameterKind.ACTIONPARAM_PARAMETER); -assert(retrieved_parameter3.as_ical_string_r() == "ACTIONPARAM=This is a action param"); +assert(retrieved_parameter3.as_ical_string() == "ACTIONPARAM=This is a action param"); string_property.remove_parameter_by_kind(ICalGLib.ParameterKind.CHARSET_PARAMETER); assert(string_property.count_parameters() == 3); @@ -63,15 +63,15 @@ kind = ICalGLib.ValueKind.ATTACH_VALUE; string = "This is a link"; value_from_string = ICalGLib.Value.new_from_string(kind, string); string_property.set_value(value_from_string); -string_from_property_api = string_property.get_value_as_string_r(); +string_from_property_api = string_property.get_value_as_string(); assert(string_from_property_api == string); value_got_from_property = string_property.get_value(); -assert(value_got_from_property.as_ical_string_r() == string); +assert(value_got_from_property.as_ical_string() == string); string_property.set_value_from_string(string, ICalGLib.Value.kind_to_string(kind)); -string_from_property_api = string_property.get_value_as_string_r(); +string_from_property_api = string_property.get_value_as_string(); assert(string_from_property_api == string); value_got_from_property = string_property.get_value(); -assert(value_got_from_property.as_ical_string_r() == string); +assert(value_got_from_property.as_ical_string() == string); string_property.set_x_name("This is an x name!"); assert(string_property.get_x_name() == "This is an x name!"); @@ -81,17 +81,17 @@ assert(valuekind_from_parametervalue == ICalGLib.ValueKind.BINARY_VALUE); valuekind_from_property_kind = ICalGLib.Property.kind_to_value_kind(ICalGLib.PropertyKind.ACKNOWLEDGED_PROPERTY); assert(valuekind_from_property_kind == ICalGLib.ValueKind.DATETIME_VALUE); -propertyKind = ICalGLib.Property.value_kind_to_kind(valuekind_from_property_kind); +propertyKind = ICalGLib.Value.kind_to_property_kind(valuekind_from_property_kind); assert(propertyKind == ICalGLib.PropertyKind.ACKNOWLEDGED_PROPERTY); string = ICalGLib.Property.kind_to_string(ICalGLib.PropertyKind.ACKNOWLEDGED_PROPERTY); assert(string == "ACKNOWLEDGED"); -kind = ICalGLib.Property.string_to_kind(string); +kind = ICalGLib.Property.kind_from_string(string); assert(kind == ICalGLib.PropertyKind.ACKNOWLEDGED_PROPERTY); string = ICalGLib.Property.method_to_string(ICalGLib.PropertyMethod.PUBLISH); -assert(ICalGLib.Property.string_to_method(string) == ICalGLib.PropertyMethod.PUBLISH); +assert(ICalGLib.Property.method_from_string(string) == ICalGLib.PropertyMethod.PUBLISH); -string = ICalGLib.Property.enum_to_string_r(ICalGLib.PropertyMethod.PUBLISH); +string = ICalGLib.Property.enum_to_string(ICalGLib.PropertyMethod.PUBLISH); assert(string == "PUBLISH"); #Test i_cal_value_set_parent. No error will be thrown. diff --git a/src/test/libical-glib/recurrence.py b/src/test/libical-glib/recurrence.py index e5e99fb2..56520525 100755 --- a/src/test/libical-glib/recurrence.py +++ b/src/test/libical-glib/recurrence.py @@ -54,8 +54,8 @@ assert(ICalGLib.Recurrence.month_month(encoded) == 12) assert(ICalGLib.Recurrence.month_is_leap(encoded)) string = "COUNT=10;FREQ=DAILY" -recurrence = ICalGLib.Recurrence.from_string(string) -assert(recurrence.as_string_r() == "FREQ=DAILY;COUNT=10") +recurrence = ICalGLib.Recurrence.new_from_string(string) +assert(recurrence.to_string() == "FREQ=DAILY;COUNT=10") by_second = recurrence.get_by_second_array() # The value is dependent on the libical version. @@ -248,9 +248,9 @@ recurrence.set_by_second(0, 13) by_second = recurrence.get_by_second_array() assert by_second[0] == 13 -recurrence = ICalGLib.Recurrence.from_string(string) +recurrence = ICalGLib.Recurrence.new_from_string(string) -assert(ICalGLib.recur_string_to_weekday("MO") == ICalGLib.RecurrenceWeekday.MONDAY_WEEKDAY) +assert(ICalGLib.Recurrence.weekday_from_string("MO") == ICalGLib.RecurrenceWeekday.MONDAY_WEEKDAY) start = 100000 result = ICalGLib.recur_expand_recurrence(string, start, 10) @@ -260,7 +260,7 @@ for i in range(0, 9): string = "19970101T183248Z/19970102T071625Z" -period = ICalGLib.Period.from_string(string) +period = ICalGLib.Period.new_from_string(string) start = period.get_start() iter = ICalGLib.RecurIterator.new(recurrence, start) @@ -273,21 +273,21 @@ while day != 0: timetype = iter.next() day = timetype.get_day() -recurrence = ICalGLib.Recurrence.from_string("FREQ=YEARLY;COUNT=10") -start = ICalGLib.Time.from_string("20161224T000000Z") +recurrence = ICalGLib.Recurrence.new_from_string("FREQ=YEARLY;COUNT=10") +start = ICalGLib.Time.new_from_string("20161224T000000Z") iter = ICalGLib.RecurIterator.new(recurrence, start) -start = ICalGLib.Time.from_string("20181224T000000Z") +start = ICalGLib.Time.new_from_string("20181224T000000Z") assert ICalGLib.RecurIterator.set_start(iter, start) == 0 -recurrence = ICalGLib.Recurrence.from_string("FREQ=YEARLY") -start = ICalGLib.Time.from_string("20161224T000000Z") +recurrence = ICalGLib.Recurrence.new_from_string("FREQ=YEARLY") +start = ICalGLib.Time.new_from_string("20161224T000000Z") iter = ICalGLib.RecurIterator.new(recurrence, start) -start = ICalGLib.Time.from_string("20181224T000000Z") +start = ICalGLib.Time.new_from_string("20181224T000000Z") assert ICalGLib.RecurIterator.set_start(iter, start) == 1 timetype = iter.next() diff --git a/src/test/libical-glib/timezone.py b/src/test/libical-glib/timezone.py index bb8ef238..2be519b6 100755 --- a/src/test/libical-glib/timezone.py +++ b/src/test/libical-glib/timezone.py @@ -64,7 +64,7 @@ assert utc == utc2 time = ICalGLib.Time.new(); before = time.get_hour(); -ICalGLib.timezone_convert_time(time, la, chicago); +ICalGLib.Time.convert_timezone(time, la, chicago); after = time.get_hour(); assert abs(after - before) == 2; ICalGLib.Time.set_timezone(time, utc); @@ -72,7 +72,7 @@ assert ICalGLib.Time.get_timezone(time) == utc; ICalGLib.Time.set_timezone(time, la); assert ICalGLib.Time.get_timezone(time) == la; -timeclone = time.new_clone() +timeclone = time.clone() assert time != timeclone time = ICalGLib.Time.convert_to_zone(time, chicago) timeclone.convert_to_zone_inplace(chicago) @@ -87,7 +87,7 @@ assert time.is_date() == timeclone.is_date(); assert time.is_daylight() == timeclone.is_daylight(); assert time.is_utc() == timeclone.is_utc(); -timeclone = ICalGLib.Time.new_clone(time); +timeclone = ICalGLib.Time.clone(time); assert time != timeclone; assert ICalGLib.Time.get_year(time) == ICalGLib.Time.get_year(timeclone); assert ICalGLib.Time.get_month(time) == ICalGLib.Time.get_month(timeclone); @@ -124,12 +124,12 @@ assert array[2] == 10 component = la.get_component(); timezone = ICalGLib.Timezone.new(); -timezone.set_component(ICalGLib.Component.new_clone(component)); +timezone.set_component(ICalGLib.Component.clone(component)); assert timezone.get_location() == la.get_location(); array = ICalGLib.Timezone.array_new(); -ICalGLib.Timezone.array_append_from_vtimezone(array, ICalGLib.Component.new_clone(la.get_component())); -ICalGLib.Timezone.array_append_from_vtimezone(array, ICalGLib.Component.new_clone(chicago.get_component())); +ICalGLib.Timezone.array_append_from_vtimezone(array, ICalGLib.Component.clone(la.get_component())); +ICalGLib.Timezone.array_append_from_vtimezone(array, ICalGLib.Component.clone(chicago.get_component())); assert array.size() == 2; timezone1 = ICalGLib.Timezone.array_element_at(array, 0); assert timezone1.get_display_name() == la.get_display_name(); diff --git a/src/test/libical-glib/value.py b/src/test/libical-glib/value.py index 45e32d8d..6ae2615b 100755 --- a/src/test/libical-glib/value.py +++ b/src/test/libical-glib/value.py @@ -32,13 +32,13 @@ assert(value.isa_value() == 1); string = "This is a link"; value_from_string = ICalGLib.Value.new_from_string(kind, string); -assert(value_from_string.as_ical_string_r() == string); +assert(value_from_string.as_ical_string() == string); assert(value_from_string.is_valid() == 1); assert(value_from_string.isa() == kind); assert(value_from_string.isa_value() == 1); -value_from_string_clone = value_from_string.new_clone(); -assert(value_from_string_clone.as_ical_string_r() == string); +value_from_string_clone = value_from_string.clone(); +assert(value_from_string_clone.as_ical_string() == string); assert(value_from_string_clone.is_valid() == 1); assert(value_from_string_clone.isa() == kind); assert(value_from_string_clone.isa_value() == 1); @@ -64,7 +64,7 @@ assert(compare_result == ICalGLib.ParameterXliccomparetype.NOTEQUAL); kind_string = ICalGLib.Value.kind_to_string(kind); assert(kind_string == "ATTACH"); -converted_kind = ICalGLib.Value.string_to_kind(kind_string); +converted_kind = ICalGLib.Value.kind_from_string(kind_string); assert(converted_kind == kind); szText = "This is a text\nand this is a new line"; |