A vCard may contain multiple categories.
CATEGORIES property of VCalender includes comma ( , ) separated Categories
CATEGORIES:category1,category2
In the event that a category contains a comma this comma should be escaped.
For Example
CATEGORIES:this is\, category1,this is\, category2
there are following two functions available in libical
1) icalproperty_new_categories(const char * )
This function can be used in case there is only one Category and will replace commas(,) with \,
2) icalproperty_vanew_categories(const char *, .... )
This function is supposed to take all the categories and create a comma separated string out of it and add this to Categories.
but this function is not working properly and it add only first parameter.
In short this function is behaving in similar fashion as the first function.
Provided the above circumstances there is no way we can create a CATEGORIES: property containing the information of Multiple Categories.