aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src/libical/icalrestriction.c.in
diff options
context:
space:
mode:
Diffstat (limited to 'libical/src/libical/icalrestriction.c.in')
-rw-r--r--libical/src/libical/icalrestriction.c.in30
1 files changed, 6 insertions, 24 deletions
diff --git a/libical/src/libical/icalrestriction.c.in b/libical/src/libical/icalrestriction.c.in
index 05cdc9d413..454442531f 100644
--- a/libical/src/libical/icalrestriction.c.in
+++ b/libical/src/libical/icalrestriction.c.in
@@ -19,11 +19,6 @@
#define TMP_BUF_SIZE 1024
-#ifdef WIN32
-#define snprintf _snprintf
-#define strcasecmp stricmp
-#endif
-
/* Define the structs for the restrictions. these data are filled out
in machine generated code below */
@@ -66,7 +61,7 @@ icalrestriction_property_record null_prop_record = {ICAL_METHOD_NONE,ICAL_NO_C
icalrestriction_component_record null_comp_record = {ICAL_METHOD_NONE,ICAL_NO_COMPONENT,ICAL_NO_COMPONENT,ICAL_RESTRICTION_UNKNOWN,0};
-/** The each row gives the result of comparing a restriction against a
+/* The each row gives the result of comparing a restriction against a
count. The columns in each row represent 0,1,2+. '-1' indicates
'invalid, 'don't care' or 'needs more analysis' So, for
ICAL_RESTRICTION_ONE, if there is 1 of a property with that
@@ -224,7 +219,7 @@ char* icalrestriction_must_have_duration(icalrestriction_property_record *rec,
if( !icalcomponent_get_first_property(comp,ICAL_DURATION_PROPERTY)){
- return "Failed iTIP restrictions. This component must have a DURATION property";
+ return "Failed iTIP restrictions for STATUS property. This component must have a DURATION property";
}
@@ -235,7 +230,7 @@ char* icalrestriction_must_have_repeat(icalrestriction_property_record *rec,
icalproperty* prop){
if( !icalcomponent_get_first_property(comp,ICAL_REPEAT_PROPERTY)){
- return "Failed iTIP restrictions. This component must have a REPEAT property";
+ return "Failed iTIP restrictions for STATUS property. This component must have a REPEAT property";
}
@@ -252,9 +247,9 @@ char* icalrestriction_no_dtend(icalrestriction_property_record *rec,
icalcomponent* comp,
icalproperty* prop){
- if( icalcomponent_get_first_property(comp,ICAL_DTEND_PROPERTY)){
+ if( !icalcomponent_get_first_property(comp,ICAL_DTEND_PROPERTY)){
- return "Failed iTIP restrictions. The component must not have both DURATION and DTEND";
+ return "Failed iTIP restrictions for STATUS property. The component must not have both DURATION and DTEND";
}
@@ -267,21 +262,7 @@ char* icalrestriction_no_duration(icalrestriction_property_record *rec,
/* _no_dtend takes care of this one */
return 0;
}
-char* icalrestriction_must_be_email(
- icalrestriction_property_record *rec,
- icalcomponent* comp,
- icalproperty* prop)
-{
- icalproperty_status stat = icalproperty_get_action(prop);
- if( !( stat == ICAL_ACTION_EMAIL)){
-
- return "Failed iTIP restrictions for ACTION property. Value must be EMAIL.";
-
- }
-
- return 0;
-}
int icalrestriction_check_component(icalproperty_method method,
icalcomponent* comp)
@@ -290,6 +271,7 @@ int icalrestriction_check_component(icalproperty_method method,
icalcomponent_kind comp_kind;
icalrestriction_kind restr;
icalrestriction_property_record *prop_record;
+ icalrestriction_component_record *comp_record;
char* funcr = 0;
icalproperty *prop;