22.12.2012 Views

Front cover - IBM Redbooks

Front cover - IBM Redbooks

Front cover - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

{<br />

/*<br />

* Description: Provide a main entry point for the Notes API to<br />

* initialize inside of this shared library. We need<br />

* this entry point because we want to be able to lookup<br />

* user information in the name and address book via the<br />

* Notes SDK API.<br />

*<br />

* Input: nothing<br />

* Output: nothing<br />

* Return: NOERROR<br />

*/<br />

return NOERROR;<br />

}<br />

/*---<br />

* filter initialization<br />

*/<br />

unsigned int FilterInit(FilterInitData* filterInitData)<br />

{<br />

/*<br />

* Description: Filter initialization is performed when the filter<br />

* shared library is dynamically loaded.<br />

*<br />

* Input: filterInitData dsapi specification controls the format<br />

* of data<br />

* Output: filterInitData several fields are filled in<br />

*<br />

* Return: kFilterHandledEvent<br />

*/<br />

printf("\nFilterInitData() is getting called.\n");<br />

/*Required*/<br />

filterInitData->appFilterVersion = kInterfaceVersion;<br />

/* Modify the following code to set the flags you want */<br />

filterInitData->eventFlags = kFilterAuthenticate;<br />

/* Set a short description for your filter */<br />

strcpy(filterInitData->filterDesc,<br />

"Operating System Authentication Filter");<br />

/* insert any global initialization code here... */<br />

/* Output sent to stdout and stderr is displayed on the<br />

* server console, but is not written to the server log file.<br />

*/<br />

printf("\nDSAPI Authentication filter initialized\n");<br />

return kFilterHandledEvent;<br />

Appendix B. A sample DSAPI program 645

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!