Back to index

lightning-sunbird  0.9+nobinonly
Typedefs | Functions
icalcalendar.h File Reference
#include "ical.h"
#include "icalset.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct icalcalendar_impl

Functions

icalcalendar * icalcalendar_new (char *dir)
void icalcalendar_free (icalcalendar *calendar)
int icalcalendar_lock (icalcalendar *calendar)
int icalcalendar_unlock (icalcalendar *calendar)
int icalcalendar_islocked (icalcalendar *calendar)
int icalcalendar_ownlock (icalcalendar *calendar)
icalset * icalcalendar_get_booked (icalcalendar *calendar)
icalset * icalcalendar_get_incoming (icalcalendar *calendar)
icalset * icalcalendar_get_properties (icalcalendar *calendar)
icalset * icalcalendar_get_freebusy (icalcalendar *calendar)

Typedef Documentation

typedef struct icalcalendar_impl

Definition at line 41 of file icalcalendar.h.


Function Documentation

void icalcalendar_free ( icalcalendar *  calendar)

Definition at line 131 of file icalcalendar.c.

{
    if (impl->dir !=0){
       free(impl->dir);
    }

    if (impl->freebusy !=0){
       icalset_free(impl->booked);
    }

    if (impl->properties !=0){
       icalset_free(impl->properties);
    }

    if (impl->booked !=0){
       icalset_free(impl->booked);
    }

    if (impl->incoming !=0){
       icalset_free(impl->incoming);
    }

    impl->dir = 0;
    impl->freebusy = 0;
    impl->properties = 0;
    impl->booked = 0;
    impl->incoming = 0;


    free(impl);
}

Here is the call graph for this function:

Here is the caller graph for this function:

icalset* icalcalendar_get_booked ( icalcalendar *  calendar)

Definition at line 188 of file icalcalendar.c.

{
    char dir[PATH_MAX];

    icalerror_check_arg_rz((impl != 0),"impl");
    
    dir[0] = '\0';
    strcpy(dir,impl->dir);
    strcat(dir,"/");
    strcat(dir,BOOKED_DIR);

    if (impl->booked == 0){
       icalerror_clear_errno();
       impl->booked = icaldirset_new(dir);
       assert(icalerrno == ICAL_NO_ERROR);
    }

    return impl->booked;

}

Here is the call graph for this function:

Here is the caller graph for this function:

icalset* icalcalendar_get_freebusy ( icalcalendar *  calendar)

Definition at line 243 of file icalcalendar.c.

{
    char path[PATH_MAX];
    icalerror_check_arg_rz((impl != 0),"impl");

    path[0] = '\0';
    strcpy(path,impl->dir);
    strcat(path,"/");
    strcat(path,FBLIST_FILE);


    if (impl->freebusy == 0){
       impl->freebusy = icalfileset_new(path);
    }

    return impl->freebusy;
}

Here is the call graph for this function:

icalset* icalcalendar_get_incoming ( icalcalendar *  calendar)

Definition at line 209 of file icalcalendar.c.

{
    char path[PATH_MAX];
    icalerror_check_arg_rz((impl != 0),"impl");

    path[0] = '\0';
    strcpy(path,impl->dir);
    strcat(path,"/");
    strcat(path,INCOMING_FILE);

    if (impl->properties == 0){
       impl->properties = icalfileset_new(path);
    }

    return impl->properties;
}

Here is the call graph for this function:

icalset* icalcalendar_get_properties ( icalcalendar *  calendar)

Definition at line 226 of file icalcalendar.c.

{
    char path[PATH_MAX];
    icalerror_check_arg_rz((impl != 0),"impl");

    path[0] = '\0';
    strcpy(path,impl->dir);
    strcat(path,"/");
    strcat(path,PROP_FILE);

    if (impl->properties == 0){
       impl->properties = icalfileset_new(path);
    }

    return impl->properties;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int icalcalendar_islocked ( icalcalendar *  calendar)

Definition at line 176 of file icalcalendar.c.

{
    icalerror_check_arg_rz((impl != 0),"impl");
    return 0;
}
int icalcalendar_lock ( icalcalendar *  calendar)

Definition at line 164 of file icalcalendar.c.

{
    icalerror_check_arg_rz((impl != 0),"impl");
    return 0;
}
icalcalendar* icalcalendar_new ( char *  dir)

Definition at line 105 of file icalcalendar.c.

{
    struct icalcalendar_impl* impl;

    icalerror_check_arg_rz((dir != 0),"dir");
    
    impl = icalcalendar_new_impl();

    if (impl == 0){
       return 0;
    }

    impl->dir = (char*)strdup(dir);
    impl->freebusy = 0;
    impl->properties = 0;
    impl->booked = 0;
    impl->incoming = 0;

    if (icalcalendar_create(impl) != ICAL_NO_ERROR){
       free(impl);
       return 0;
    }

    return impl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int icalcalendar_ownlock ( icalcalendar *  calendar)

Definition at line 182 of file icalcalendar.c.

{
    icalerror_check_arg_rz((impl != 0),"impl");
    return 0;
}
int icalcalendar_unlock ( icalcalendar *  calendar)

Definition at line 170 of file icalcalendar.c.

{
    icalerror_check_arg_rz((impl != 0),"impl");
    return 0;
}