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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934
|
<?xml version="1.0" encoding="iso-8859-1"?>
<reference id="ref.mcal">
<title>MCAL Funktionen</title>
<titleabbrev>MCAL</titleabbrev>
<partintro>
<para>
MCAL bedeutet Modular Calendar Access Library.</para>
<para>
Libmcal ist eine C Bibliothek fr den Zugriff auf Kalender. Sie ist sehr
modular programmiert, mit austauschbaren Treibern. MCAL ist das Kalendergegenstck
zum IMAP Modul fr Mailboxen.</para>
<para>
Mit Hilfe der mcal-Untersttzung kann ein Kalender-Stream, hnlich wie ein
Mailbox-Stream mit der IMAP-Untersttzung, geffnet werden. Kalender knnen lokale
Dateispeicher, entfernte ICAP-Server oder andere Formate,von der mcal-Bibliothek untersttzt
werden, sein.</para>
<para>
Kalendereintrge knnen aufgerufen, abgefragt und gespeichert werden. Desweiteren
werden Kalendertermine (Alarm) und wiederkehrende Termine untersttzt.</para>
<para>
Mit libmcal kann auf zentrale Kalenderserver zugegriffen und diese benutzt werden,
was die Programmierung einer bestimmten Datenbank oder einer Datei unntig macht.</para>
<para>
Um diese Funktionen benutzen zu knnen, mu PHP mit der Option
<option role="configure">--with-mcal</option> kompiliert werden. Dies setzt eine installierte
mcal-Bibliothek vorraus. Holen Sie sich die aktuelle Version unter <ulink url="&url.mcal;">&url.mcal;</ulink> und
kompilieren und installieren Sie sie.</para>
<para>
Die folgenden Konstanten werden definiert, wenn das mcal-Modul verwendet wird:
MCAL_SUNDAY,
MCAL_MONDAY,
MCAL_TUESDAY,
MCAL_WEDNESDAY,
MCAL_THURSDAY,
MCAL_FRIDAY,
MCAL_SATURDAY,
MCAL_RECUR_NONE,
MCAL_RECUR_DAILY,
MCAL_RECUR_WEEKLY,
MCAL_RECUR_MONTHLY_MDAY,
MCAL_RECUR_MONTHLY_WDAY,
MCAL_RECUR_YEARLY,
MCAL_JANUARY,
MCAL_FEBRUARY,
MCAL_MARCH,
MCAL_APRIL,
MCAL_MAY,
MCAL_JUNE,
MCAL_JULY,
MCAL_AUGUGT,
MCAL_SEPTEMBER,
MCAL_OCTOBER,
MCAL_NOVEMBER, and
MCAL_DECEMBER.
Die meisten dieser Funktionen benutzen eine interne Ereignisstruktur, die einzigartig fr
jeden Stream ist. Dies vermindert die Notwendigkeit, groe Objekte zwischen Funktionen
auszutauschen. Es gibt Hilfsfunktionen fr Einstellung, Initialisierung und
Abruf der Ereignisstruktur.</para>
</partintro>
<refentry id="function.mcal-open">
<refnamediv>
<refname>mcal_open</refname>
<refpurpose>Stellt eine MCAL-Verbindung her</refpurpose>
</refnamediv>
<refsect1>
<title>Beschreibung</title>
<methodsynopsis>
<type>int</type><methodname>mcal_open</methodname>
<methodparam><type>string</type><parameter>calendar</parameter></methodparam>
<methodparam><type>string</type><parameter>username</parameter></methodparam>
<methodparam><type>string</type><parameter>password</parameter></methodparam>
<methodparam><type>string</type><parameter>options</parameter></methodparam>
</methodsynopsis>
<para>
Bringt bei Erfolg einen MCAL-Stream und &false; bei einem Fehler.</para>
<para>
<function>mcal_open</function> ffnet eine MCAL-Verbidnung zu dem angegebenen
<parameter>calendar</parameter> Speicher. Wenn der optionale Parameter
<parameter>options</parameter> benutzt wird, wird
<parameter>options</parameter> auch an die Mailbox weitergegeben. Die
interne Ereignisstruktur der Streams wird auch bei der Verbindung initialisiert.</para>
<para></para>
</refsect1>
</refentry>
<refentry id="function.mcal-close">
<refnamediv>
<refname>mcal_close</refname>
<refpurpose>Schlieen eines MCAL-Streams</refpurpose>
</refnamediv>
<refsect1>
<title>Beschreibung</title>
<methodsynopsis>
<type>int</type><methodname>mcal_close</methodname>
<methodparam><type>int</type><parameter>mcal_stream</parameter></methodparam>
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<para>
Schliet einen offenen mcal-Stream.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-fetch-event">
<refnamediv>
<refname>mcal_fetch_event</refname>
<refpurpose>
Holt ein Ereignis aus einem Kalender-Stream.
</refpurpose>
</refnamediv>
<refsect1>
<title>Beschreibung</title>
<methodsynopsis>
<type>object</type><methodname>mcal_fetch_event</methodname>
<methodparam><type>int</type><parameter>mcal_stream</parameter></methodparam>
<methodparam><type>int</type><parameter>event_id</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_fetch_event</function> holt ein Ereignis aus dem
Kalender-Stream, der in <parameter>id</parameter> angegeben wurde.</para>
<para>
Zeigt ein Ereignis-Objekt an,welches aus folgendem besteht:
<itemizedlist>
<listitem><simpara>
int id - ID des Ereignisses.</simpara></listitem>
<listitem><simpara>
int public - &true; wenn das Ereignis ffentlich ist, &false; wenn es
privat ist.</simpara></listitem>
<listitem><simpara>
string category - Kategorie des Ereignisses.</simpara></listitem>
<listitem><simpara>
string title - Titel des Ereignisses.</simpara></listitem>
<listitem><simpara>
string description - Beschreibung des Ereignisses.</simpara></listitem>
<listitem><simpara>
int alarm - Anzahl der Minuten, bevor das Ereignis einen Alarm bzw. eine Erinnerung
sendet.</simpara></listitem>
<listitem><simpara>
object start - Objekt, welches einen Eintrag zu Datum und Uhrzeit enthlt.</simpara></listitem>
<listitem><simpara>
object end - Objekt, welches einen Eintrag zu Datum und Uhrzeit enthlt.</simpara></listitem>
<listitem><simpara>
int recur_type - Typ des erneuten Auftretens</simpara></listitem>
<listitem><simpara>
int recur_interval - Zeitabstand bis zum erneuten Auftretens</simpara></listitem>
<listitem><simpara>
datetime recur_enddate - Enddatum des erneuten Auftretens</simpara></listitem>
<listitem><simpara>
int recur_data - Daten des erneuten Auftretens</simpara></listitem>
</itemizedlist>
Alle Zeitpunkteintrge bestehen aus einem Objekt, welches folgendes enthlt:
<itemizedlist>
<listitem><simpara>
int year - Jahr</simpara></listitem>
<listitem><simpara>
int month - Monat</simpara></listitem>
<listitem><simpara>
int mday - Tag des Monats</simpara></listitem>
<listitem><simpara>
int hour - Stunde</simpara></listitem>
<listitem><simpara>
int min - Minuten</simpara></listitem>
<listitem><simpara>
int sec - Sekunden</simpara></listitem>
<listitem><simpara>
int alarm - Minuten bis zum Zeitpunkt, wenn ein Eintrag einen Alarm sendet</simpara></listitem>
</itemizedlist></para>
</refsect1>
</refentry>
<refentry id="function.mcal-list-events">
<refnamediv>
<refname>mcal_list_events</refname>
<refpurpose>
Zeigt eine Liste der Eintrge zwischen zwei Zeitpunkten an
</refpurpose>
</refnamediv>
<refsect1>
<title>Beschreibung</title>
<methodsynopsis>
<type>array</type><methodname>mcal_list_events</methodname>
<methodparam><type>int</type><parameter>mcal_stream</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>begin_year</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>begin_month</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>begin_day</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>end_year</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>end_month</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>end_day</parameter></methodparam>
</methodsynopsis>
<para>
Returns an array of event ID's that are between the start and end
dates, or if just a stream is given, uses the start and end dates
in the global event structure.</para>
<para>
<function>mcal_list_events</function> function takes in an
optional beginning date and an end date for a calendar stream. An
array of event id's that are between the given dates or the
internal event dates are returned.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-append-event">
<refnamediv>
<refname>mcal_append_event</refname>
<refpurpose>Store a new event into an MCAL calendar</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_append_event</methodname>
<methodparam><type>int</type><parameter>mcal_stream</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_append_event</function> Stores the global event
into an MCAL calendar for the given stream.</para>
<para>
Returns the uid of the newly inserted event.</para>
<para></para>
</refsect1>
</refentry>
<refentry id="function.mcal-store-event">
<refnamediv>
<refname>mcal_store_event</refname>
<refpurpose>Modify an existing event in an MCAL calendar</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_store_event</methodname>
<methodparam><type>int</type><parameter>mcal_stream</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_store_event</function> Stores the modifications
to the current global event for the given stream.</para>
<para>
Returns &true; on success and &false; on error.</para>
<para></para>
</refsect1>
</refentry>
<refentry id="function.mcal-delete-event">
<refnamediv>
<refname>mcal_delete_event</refname>
<refpurpose>Delete an event from an MCAL calendar</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_delete_event</methodname>
<methodparam><type>int</type><parameter>uid</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_delete_event</function> deletes the calendar event
specified by the uid.</para>
<para>
Returns &true;.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-snooze">
<refnamediv>
<refname>mcal_snooze</refname>
<refpurpose>Turn off an alarm for an event</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_snooze</methodname>
<methodparam><type>int</type><parameter>uid</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_snooze</function> turns off an alarm for a
calendar event specified by the uid.</para>
<para>
Returns &true;.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-list-alarms">
<refnamediv>
<refname>mcal_list_alarms</refname>
<refpurpose>
Return a list of events that has an alarm triggered at the given
datetime
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>mcal_list_events</methodname>
<methodparam><type>int</type><parameter>mcal_stream</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>begin_year</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>begin_month</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>begin_day</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>end_year</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>end_month</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>end_day</parameter></methodparam>
</methodsynopsis>
<para>
Returns an array of event ID's that has an alarm going off
between the start and end dates, or if just a stream is given,
uses the start and end dates in the global event structure.</para>
<para>
<function>mcal_list_events</function> function takes in an
optional beginning date and an end date for a calendar stream. An
array of event id's that are between the given dates or the
internal event dates are returned.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-init">
<refnamediv>
<refname>mcal_event_init</refname>
<refpurpose>
Initializes a streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_init</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_init</function> initializes a streams global
event structure. this effectively sets all elements of the
structure to 0, or the default settings.</para>
<para>
Returns &true;.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-category">
<refnamediv>
<refname>mcal_event_set_category</refname>
<refpurpose>
Sets the category of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_category</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>string</type><parameter>category</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_category</function> sets the streams
global event structure's category to the given string.</para>
<para>
Returns &true;.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-title">
<refnamediv>
<refname>mcal_event_set_title</refname>
<refpurpose>
Sets the title of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_title</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>string</type><parameter>title</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_title</function> sets the streams global
event structure's title to the given string.</para>
<para>
Returns &true;.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-description">
<refnamediv>
<refname>mcal_event_set_description</refname>
<refpurpose>
Sets the description of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_description</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>string</type><parameter>description</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_description</function> sets the streams
global event structure's description to the given string.</para>
<para>
Returns &true;.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-start">
<refnamediv>
<refname>mcal_event_set_start</refname>
<refpurpose>
Sets the start date and time of the streams global event
structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_start</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>
day
</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>
hour
</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>
min</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>
sec
</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_start</function> sets the streams global
event structure's start date and time to the given values.</para>
<para>
Returns &true;.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-end">
<refnamediv>
<refname>mcal_event_set_end</refname>
<refpurpose>
Sets the end date and time of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_end</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>
day
</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>
hour
</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>
min
</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>
sec
</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_end</function> sets the streams global
event structure's end date and time to the given values.</para>
<para>
Returns &true;.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-alarm">
<refnamediv>
<refname>mcal_event_set_alarm</refname>
<refpurpose>
Sets the alarm of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_alarm</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>int</type><parameter>alarm</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_alarm</function> sets the streams global
event structure's alarm to the given minutes before the event.</para>
<para>
Returns &true;.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-class">
<refnamediv>
<refname>mcal_event_set_class</refname>
<refpurpose>
Sets the class of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_class</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>int</type><parameter>class</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_class</function> sets the streams global
event structure's class to the given value. The class is either 1
for public, or 0 for private.</para>
<para>
Returns &true;.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-is-leap-year">
<refnamediv>
<refname>mcal_is_leap_year</refname>
<refpurpose>
Returns if the given year is a leap year or not
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_is_leap_year</methodname>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_is_leap_year</function> returns 1 if the given
year is a leap year, 1 if not.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-days-in-month">
<refnamediv>
<refname>mcal_days_in_month</refname>
<refpurpose>
Returns the number of days in the given month
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_days_in_month</methodname>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>leap year</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_days_in_month</function> Returns the number of
days in the given month, taking into account if the given year is
a leap year or not.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-date-valid">
<refnamediv>
<refname>mcal_date_valid</refname>
<refpurpose>
Returns &true; if the given year, month, day is a valid date
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_date_valid</methodname>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>day</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_date_valid</function> Returns &true; if the given
year, month and day is a valid date, &false; if not.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-time-valid">
<refnamediv>
<refname>mcal_time_valid</refname>
<refpurpose>
Returns &true; if the given year, month, day is a valid time
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_time_valid</methodname>
<methodparam><type>int</type><parameter>hour</parameter></methodparam>
<methodparam><type>int</type><parameter>minutes</parameter></methodparam>
<methodparam><type>int</type><parameter>seconds</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_time_valid</function> Returns &true; if the given
hour, minutes and seconds is a valid time, &false; if not.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-day-of-week">
<refnamediv>
<refname>mcal_day_of_week</refname>
<refpurpose>
Returns the day of the week of the given date
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_</methodname>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>day</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_day_of_week</function> returns the day of the week
of the given date</para>
</refsect1>
</refentry>
<refentry id="function.mcal-day-of-year">
<refnamediv>
<refname>mcal_day_of_year</refname>
<refpurpose>
Returns the day of the year of the given date
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_</methodname>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>day</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_day_of_year</function> returns the day of the year
of the given date</para>
</refsect1>
</refentry>
<refentry id="function.mcal-date-compare">
<refnamediv>
<refname>mcal_date_compare</refname>
<refpurpose>Compares two dates</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_date_compare</methodname>
<methodparam><type>int</type><parameter>a_year</parameter></methodparam>
<methodparam><type>int</type><parameter>a_month</parameter></methodparam>
<methodparam><type>int</type><parameter>a_day</parameter></methodparam>
<methodparam><type>int</type><parameter>b_year</parameter></methodparam>
<methodparam><type>int</type><parameter>b_month</parameter></methodparam>
<methodparam><type>int</type><parameter>b_day</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_date_compare</function> Compares the two given
dates, returns <0, 0, >0 if a<b, a==b, a>b respectively</para>
</refsect1>
</refentry>
<refentry id="function.mcal-next-recurrence">
<refnamediv>
<refname>mcal_next_recurrence</refname>
<refpurpose>Returns the next recurrence of the event</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_next_recurrence</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>int</type><parameter>weekstart</parameter></methodparam>
<methodparam><type>array</type><parameter>next</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_next_recurrence</function> returns an object
filled with the next date the event occurs, on or after the
supplied date. Returns empty date field if event does not occur
or something is invalid. Uses weekstart to determine what day is
considered the beginning of the week.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-recur-none">
<refnamediv>
<refname>mcal_event_set_recur_none</refname>
<refpurpose>
Sets the recurrence of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_recur_none</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_recur_none</function> sets the streams
global event structure to not recur (event->recur_type is set to
MCAL_RECUR_NONE).</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-recur-daily">
<refnamediv>
<refname>mcal_event_set_recur_daily</refname>
<refpurpose>
Sets the recurrence of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_recur_daily</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>day</parameter></methodparam>
<methodparam><type>int</type><parameter>interval</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_recur_daily</function> sets the streams
global event structure's recurrence to the given value to be
reoccuring on a daily basis, ending at the given date.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-recur-weekly">
<refnamediv>
<refname>mcal_event_set_recur_weekly</refname>
<refpurpose>
Sets the recurrence of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_recur_weekly</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>day</parameter></methodparam>
<methodparam><type>int</type><parameter>interval</parameter></methodparam>
<methodparam><type>int</type><parameter>weekdays</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_recur_weekly</function> sets the streams
global event structure's recurrence to the given value to be
reoccuring on a weekly basis, ending at the given date.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-recur-monthly-mday">
<refnamediv>
<refname>mcal_event_set_recur_monthly_mday</refname>
<refpurpose>
Sets the recurrence of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_recur_monthly_mday</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>day</parameter></methodparam>
<methodparam><type>int</type><parameter>interval</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_recur_monthly_mday</function> sets the
streams global event structure's recurrence to the given value to
be reoccuring on a monthly by month day basis, ending at the
given date.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-recur-monthly-wday">
<refnamediv>
<refname>mcal_event_set_recur_monthly_wday</refname>
<refpurpose>
Sets the recurrence of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_recur_monthly_wday</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>day</parameter></methodparam>
<methodparam><type>int</type><parameter>interval</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_recur_monthly_wday</function> sets the
streams global event structure's recurrence to the given value to
be reoccuring on a monthly by week basis, ending at the given
date.</para>
</refsect1>
</refentry>
<refentry id="function.mcal-event-set-recur-yearly">
<refnamediv>
<refname>mcal_event_set_recur_yearly</refname>
<refpurpose>
Sets the recurrence of the streams global event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_event_set_recur_yearly</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
<methodparam><type>int</type><parameter>year</parameter></methodparam>
<methodparam><type>int</type><parameter>month</parameter></methodparam>
<methodparam><type>int</type><parameter>day</parameter></methodparam>
<methodparam><type>int</type><parameter>interval</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_set_recur_yearly</function> sets the streams
global event structure's recurrence to the given value to be
reoccuring on a yearly basis,ending at the given date .</para>
</refsect1>
</refentry>
<refentry id="function.mcal-fetch-current-stream-event">
<refnamediv>
<refname>mcal_fetch_current_stream_event</refname>
<refpurpose>
Returns an object containing the current streams event structure
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>mcal_fetch_current_stream_event</methodname>
<methodparam><type>int</type><parameter>stream</parameter></methodparam>
</methodsynopsis>
<para>
<function>mcal_event_fetch_current_stream_event</function>
returns the current stream's event structure as an object
containing:
<itemizedlist>
<listitem><simpara>
int id - ID of that event.</simpara></listitem>
<listitem><simpara>
int public - &true; if the event if public, &false; if it is
private.</simpara></listitem>
<listitem><simpara>
string category - Category string of the event.</simpara></listitem>
<listitem><simpara>
string title - Title string of the event.</simpara></listitem>
<listitem><simpara>
string description - Description string of the event.</simpara></listitem>
<listitem><simpara>
int alarm - number of minutes before the event to send an
alarm/reminder.</simpara></listitem>
<listitem><simpara>
object start - Object containing a datetime entry.</simpara></listitem>
<listitem><simpara>
object end - Object containing a datetime entry.</simpara></listitem>
<listitem><simpara>
int recur_type - recurrence type</simpara></listitem>
<listitem><simpara>
int recur_interval - recurrence interval</simpara></listitem>
<listitem><simpara>
datetime recur_enddate - recurrence end date</simpara></listitem>
<listitem><simpara>
int recur_data - recurrence data</simpara></listitem>
</itemizedlist>
All datetime entries consist of an object that contains:
<itemizedlist>
<listitem><simpara>
int year - year</simpara></listitem>
<listitem><simpara>
int month - month</simpara></listitem>
<listitem><simpara>
int mday - day of month</simpara></listitem>
<listitem><simpara>
int hour - hour</simpara></listitem>
<listitem><simpara>
int min - minutes</simpara></listitem>
<listitem><simpara>
int sec - seconds</simpara></listitem>
<listitem><simpara>
int alarm - minutes before event to send an alarm</simpara></listitem>
</itemizedlist></para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
|