#include #include #include "vcaltmp.h" #if 0 This testcase would generate a file call "frankcal.vcf" with the following content: BEGIN:VCALENDAR DCREATED:19960523T100522 GEO:37.24,-17.87 PRODID:-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN VERSION:0.3 BEGIN:VEVENT DTSTART:19960523T120000 DTEND:19960523T130000 DESCRIPTION;QUOTED-PRINTABLE:VERSIT PDI PR Teleconference/Interview =0A= With Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar=0A= activities with European Press representatives. SUMMARY:VERSIT PDI PR Teleconference/Interview SUBTYPE:PHONE CALL STATUS:CONFIRMED TRANSP:19960523T100522-4000F100582713-009251 UID:http://www.ibm.com/raleigh/fdawson/~c:\or2\orgfiles\versit.or2 DALARM:19960523T114500;5;3;Your Telecon Starts At Noon!!!; MALARM:19960522T120000;;;fdawson@raleigh.ibm.com;Remember 05/23 Noon Telecon!!!; PALARM:19960523T115500;;;c:\or2\organize.exe c:\or2\orgfiles\versit.or2; X-LDC-OR2-OLE:c:\temp\agenda.doc END:VEVENT BEGIN:VTODO DUE:19960614T0173000 DESCRIPTION:Review VCalendar helper API. END:VTODO END:VCALENDAR #endif FILE *cfp; void testVcalAPIs() { FILE *fp; VObject *vcal, *vevent; #if _CONSOLE cfp = stdout; #else cfp = fopen("vcaltest.out","w"); #endif if (cfp == 0) return; vcal = vcsCreateVCal( "19960523T100522", "37.24,-17.87", "-//Frank Dawson/Hand Crafted In North Carolina//NONSGML Made By Hand//EN", 0, "0.3" ); vevent = vcsAddEvent( vcal, "19960523T120000", "19960523T130000", "VERSIT PDI PR Teleconference/Interview \nWith Tom Streeter and Frank Dawson - Discuss VERSIT PDI project and vCard and vCalendar\nactivities with European Press representatives.", "VERSIT PDI PR Teleconference/Interview", "PHONE CALL", 0, "CONFIRMED", "19960523T100522-4000F100582713-009251", "http://www.ibm.com/raleigh/fdawson/~c:\\or2\\orgfiles\\versit.or2", 0 ); vcsAddDAlarm(vevent, "19960523T114500", "5", "3", "Your Telecon Starts At Noon!!!"); vcsAddMAlarm(vevent, "19960522T120000", 0, 0, "fdawson@raleigh.ibm.com", "Remember 05/23 Noon Telecon!!!"); vcsAddPAlarm(vevent, "19960523T115500", 0 ,0, "c:\\or2\\organize.exe c:\\or2\\orgfiles\\versit.or2"); addPropValue(vevent, "X-LDC-OR2-OLE", "c:\\temp\\agenda.doc"); vcsAddTodo( vcal, 0, "19960614T0173000", 0, "Review VCalendar helper API.", 0, 0, 0, 0, 0, 0 ); /* now do something to the resulting VObject */ /* pretty print on stdout for fun */ printVObject(cfp,vcal); /* open the output text file */ #define OUTFILE "frankcal.vcf" fp = fopen(OUTFILE, "w"); if (fp) { /* write it in text form */ writeVObject(fp,vcal); fclose(fp); } else { fprintf(cfp,"open output file '%s' failed\n", OUTFILE); } if (cfp != stdout) fclose(cfp); } void main() { testVcalAPIs(); } en' name='id' value='483ebae5399d6aa7d63e471ea6000021a4be94fb'/>
blob: 46773c139b3557be3ab923dfe4bbfa3f07121777 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* e-folder-tree.h
 *
 * Copyright (C) 2000  Helix Code, Inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Author: Ettore Perazzoli
 */

#ifndef _E_FOLDER_TREE_H_
#define _E_FOLDER_TREE_H_

#include <glib.h>


typedef struct _EFolderTree EFolderTree;

typedef void (* EFolderDestroyNotify)   (EFolderTree *tree, const char *path, void *data, void *closure);
typedef void (* EFolderTreeForeachFunc) (EFolderTree *tree, const char *path, void *data, void *closure);


EFolderTree *e_folder_tree_new               (EFolderDestroyNotify    folder_destroy_notify,
                          void                   *closure);
                        
void        e_folder_tree_destroy            (EFolderTree            *folder_tree);
                        
gboolean    e_folder_tree_add                (EFolderTree            *folder_tree,
                          const char             *path,
                          void                   *data);
gboolean    e_folder_tree_remove             (EFolderTree            *folder_tree,
                          const char             *path);
                        
void       *e_folder_tree_get_folder         (EFolderTree            *folder_tree,
                          const char             *path);
GList      *e_folder_tree_get_subfolders     (EFolderTree            *folder_tree,
                          const char             *path);
                        
void        e_folder_tree_foreach            (EFolderTree            *folder_tree,
                          EFolderTreeForeachFunc  foreach_func,
                          void                   *data);

const char *e_folder_tree_get_path_for_data  (EFolderTree            *folder_tree,
                          const void             *data);

#endif /* _E_FOLDER_TREE_H_ */