next up previous contents
Next: Protected methods Up: PKGFS Previous: PKGFS   Indice

Public methods

Since we need C++ to communicate with C programming language (the lufsd language), we had to add the typical `` $ \texttt{extern C}$'' compatility layer. This layer affects PKGFS functions in several ways: first, as a convention to rename the functions, we replaced the ``pkgfs'' string in lufsd symbols, with the ``do''. The only exception are $ \texttt{pkgfs\_init}$ and $ \texttt{pkgfs\_free}$ that become respectively the class constructor and the destructor. Secondly, in C notation each function (except init()) gets a pointer to the structure allocated by init() in its first parameter. This structure acts as a local context and in the newer programming paradigm it is replaced by the object itself. A function that appearsin the interface as $ \texttt{pkgfs\_mount(void*)}$, becomes $ \texttt{PKGFS::do\_mount()}$.

Most file system operations return 0 on success and -1 on failure, unlike the $ \texttt{do\_mount()}$ one that will return 1 on success and 0 upon failure.

Description of interesting publicly available methods follows (we are using $ \texttt{PKGFS}$ namespace):


next up previous contents
Next: Protected methods Up: PKGFS Previous: PKGFS   Indice
2004-11-19