diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:00:17 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:00:17 +0200 |
commit | fd0853d2623dd278b08288331ed42e3be59252fb (patch) | |
tree | a7645daeaef8bdbed064faf4eb88e72cee58726c /shared/inotify | |
parent | 2.1 (diff) | |
download | FreeFileSync-fd0853d2623dd278b08288331ed42e3be59252fb.tar.gz FreeFileSync-fd0853d2623dd278b08288331ed42e3be59252fb.tar.bz2 FreeFileSync-fd0853d2623dd278b08288331ed42e3be59252fb.zip |
2.2
Diffstat (limited to 'shared/inotify')
45 files changed, 8505 insertions, 0 deletions
diff --git a/shared/inotify/CHANGELOG b/shared/inotify/CHANGELOG new file mode 100644 index 00000000..8830d918 --- /dev/null +++ b/shared/inotify/CHANGELOG @@ -0,0 +1,95 @@ +0.7.2 2007-04-18 + * added #include <stdint.h> (required for Debian Sarge, #0000155) + +0.7.1 2007-01-20 + * incorrect event name handling fixed (#0000135) + +0.7.0 2007-01-13 + * added Inotify::SetCloseOnExec() for simple setting this feature + + +0.6.3 2007-01-06 + * incorrect behavior for IN_IGNORED fixed (#0000124) + + +0.6.2 2007-01-03 + * bad IN_MOVE_SELF dumping in IN_ALL_EVENTS fixed (#0000118) + + +0.6.1 2006-12-30 + * fixed incorrect behavior for IN_ONESHOT (#0000113) + + +0.6.0 2006-12-28 + * added methods for getting/setting inotify capabilities and limits + * added IN_SELF_MOVED flag (if defined) + * added Inotify::IsRecursive() for identifying recursive watches + (will be implemented in future versions) + +0.5.3 2006-12-06 + * fixed incorrect error handling in WaitForEvents() + + +0.5.2 2006-11-12 + * problem with ignoring IN_OPEN has been fixed (#0000102) + + +0.5.1 2006-11-10 + * problems with includes have been fixed (#0000099) + + +0.5.0 2006-10-29 + * partial thread safety has been implemented (using rwlocks) + * Inotify::GetEnabledCount() method has been added + + +0.4.1 2006-10-14 + * wrong value returned by Inotify::GetWatchCount() has been fixed + (#0000092) + + +0.4.0 2006-10-13 + * two additional flags (IN_ONLYDIR and IN_DONT_FOLLOW) may be used + if available (#0000086) + * "errorneous" multiple watches on the same path are no longer + possible (#0000087) + * tarball structure has been fixed (#0000088) + * inotify-syscalls.h is included only if inotify.h doesn't contain + syscall definitions (#0000090) + * enabling/disabling is now done through watch presence in the kernel + instead of dropping events (#0000091) + * InotifyWatch::SetMask() method has been added to allow later mask + modification + + +0.3.1 2006-10-03 + * fixed: wrong behavior for EWOULDBLOCK (Inotify::WaitForEvents()) + + +0.3.0 2006-10-03 + * all errors now handled using exceptions (InotifyException) + * InotifyEvent no longer use struct inotity_event as its + internal data structure + * removed InotifyEvent::GetData() - internal data changed + * removed Inotify::IsReady() - no longer necessary + * added Inotify::GetDescriptor() - returns inotify file descriptor + * added Inotify::SetNonBlock() - switches nonblocking mode on/off + * added possibility to enable/disable watches + * some code cleanups + + +0.2.0 2006-09-15 + * InotifyEvent now contains a pointer to the source InotifyWatch + * fixed: InotifyEvent::IsType() - it now handles the mask correctly + * added a static method (InotifyEvent::GetMaskByName()) for finding a mask + for a name + * added a static version of InotifyEvent::DumpTypes() method + * added a static version of InotifyEvent::IsType() method + * dumped types (InotifyEvent::DumpTypes()) now separated by commas + instead of spaces + * InotifyEvent::DumpTypes() methods now use as general types as possible + * InotifyWatch now contains a pointer to the related Inotify + + +0.1.0 2006-09-04 +first alpha version diff --git a/shared/inotify/COPYING b/shared/inotify/COPYING new file mode 100644 index 00000000..272a9567 --- /dev/null +++ b/shared/inotify/COPYING @@ -0,0 +1,13 @@ +inotify C++ interface + +Copyright (C) 2006, 2007 Lukas Jelinek, <lukas@aiken.cz> + +This program is free software; you can redistribute it and/or +modify it under the terms of one of the following licenses: + +1. X11 license (see LICENSE-X11) +2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) +3. GNU General Public License, version 2 (see LICENSE-GPL) + +If you want to help with choosing the best license for you, +please visit http://www.gnu.org/licenses/license-list.html. diff --git a/shared/inotify/LICENSE-GPL b/shared/inotify/LICENSE-GPL new file mode 100644 index 00000000..a43ea212 --- /dev/null +++ b/shared/inotify/LICENSE-GPL @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/shared/inotify/LICENSE-LGPL b/shared/inotify/LICENSE-LGPL new file mode 100644 index 00000000..8add30ad --- /dev/null +++ b/shared/inotify/LICENSE-LGPL @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/shared/inotify/LICENSE-X11 b/shared/inotify/LICENSE-X11 new file mode 100644 index 00000000..d632087f --- /dev/null +++ b/shared/inotify/LICENSE-X11 @@ -0,0 +1,22 @@ +Copyright (c) 2006, 2007 Lukas Jelinek + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/shared/inotify/README b/shared/inotify/README new file mode 100644 index 00000000..f3dc0db0 --- /dev/null +++ b/shared/inotify/README @@ -0,0 +1,70 @@ + +inotify C++ interface + +(c) Lukas Jelinek, 2006, 2007 + +1. About +2. Requirements +3. How to use +4. Bugs, suggestions +5. Licensing +6. Documentation + + +======================================================================== + + +1. About +This program is the inotify C++ interface. It is designed for easy use +of Linux inotify technology in C++ applications. You need not to deal +with file descriptors and such uncomfortable things. Instead you can +use a few simple C++ classes. + + +2. Requirements +* Linux kernel 2.6.13 or later (with inotify compiled in) +* inotify header(s) installed in <INCLUDE_DIR>/sys. The most common + place is /usr/include/sys. Some Linux distributions contain only + inotify.h which defines everything needed. But sometimes must + be used inotify.h and inotify-syscalls.h as available e.g. at + the inotify-cxx homepage. +* GCC 4.x compiler (probably works also with GCC 3.4, possibly with + older versions too) + + +3. How to use +Include inotify-cxx.h into your sources and add inotify-cxx.cpp for +compiling (e.g. through your makefile). + +If you have installed it into your system-wide include dir (e.g. +/usr/include), use #include <inotify-cxx.h> or similar. +Otherwise use #include "inotify-cxx.h". + +For thread-safe behavior, define the INOTIFY_THREAD_SAFE symbol +(eg. -DINOTIFY_THREAD_SAFE on gcc's command line). See documentation +for details about thread safety. + + +4. Bugs, suggestions +THIS PROGRAM IS AN ALPHA VERSION. IT PROBABLY CONTAINS BUGS AND +THEREFORE IT IS NOT INTENDED FOR PRODUCTION USE. + +If you find a bug or have a suggestion how to improve the program, +please use the bug tracking system at http://bts.aiken.cz. + + +5. Licensing +This program is free software; you can redistribute it and/or +modify it under the terms of one of the following licenses: + +1. X11 license (see LICENSE-X11) +2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) +3. GNU General Public License, version 2 (see LICENSE-GPL) + +If you want to help with choosing the best license for you, +please visit http://www.gnu.org/licenses/license-list.html. + + +6. Documentation +The API reference documentation is present in the HTML and man format. +It was generated using the doxygen program. diff --git a/shared/inotify/TODO b/shared/inotify/TODO new file mode 100644 index 00000000..7d493c05 --- /dev/null +++ b/shared/inotify/TODO @@ -0,0 +1,3 @@ +Currently pending tasks: + +* recursive watches (for watching whole directory subtrees) diff --git a/shared/inotify/VERSION b/shared/inotify/VERSION new file mode 100644 index 00000000..7486fdbc --- /dev/null +++ b/shared/inotify/VERSION @@ -0,0 +1 @@ +0.7.2 diff --git a/shared/inotify/doc/html/annotated.html b/shared/inotify/doc/html/annotated.html new file mode 100644 index 00000000..29fc335f --- /dev/null +++ b/shared/inotify/doc/html/annotated.html @@ -0,0 +1,29 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Class List</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li id="current"><a href="annotated.html"><span>Class List</span></a></li> + <li><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<h1>inotify-cxx Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table> + <tr><td class="indexkey"><a class="el" href="classInotify.html">Inotify</a></td><td class="indexvalue"><a class="el" href="classInotify.html">Inotify</a> class </td></tr> + <tr><td class="indexkey"><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td class="indexvalue"><a class="el" href="classInotify.html">Inotify</a> event class </td></tr> + <tr><td class="indexkey"><a class="el" href="classInotifyException.html">InotifyException</a></td><td class="indexvalue">Class for inotify exceptions </td></tr> + <tr><td class="indexkey"><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td class="indexvalue"><a class="el" href="classInotify.html">Inotify</a> watch class </td></tr> +</table> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/classInotify-members.html b/shared/inotify/doc/html/classInotify-members.html new file mode 100644 index 00000000..45fd612d --- /dev/null +++ b/shared/inotify/doc/html/classInotify-members.html @@ -0,0 +1,54 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Member List</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<h1>Inotify Member List</h1>This is the complete list of members for <a class="el" href="classInotify.html">Inotify</a>, including all inherited members.<p><table> + <tr class="memlist"><td><a class="el" href="classInotify.html#2ef771ebaf982d76ebe19b3f5bc9cd83">Add</a>(InotifyWatch *pWatch)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#35dab56d3e10bf28b5e457871adddb58">Add</a>(InotifyWatch &rWatch)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#86ae86c43ea1a72f562ca46393309635">Close</a>()</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#182d19b667c9e0899802b70a579eff40">FindWatch</a>(int iDescriptor)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#a4d6b9d1a9a496862febbe5bffd798c2">FindWatch</a>(const std::string &rPath)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#70b3b57e8661fbb4c5bc404b86225c3b">GetCapability</a>(InotifyCapability_t cap)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#678271faf4799840ad71805163a24b13">GetDescriptor</a>() const</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#9bf5f7716649d5b5f468c2242fb5e099">GetEnabledCount</a>() const</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#490a3f824c6d041d31ccaabe9bd92008">GetEvent</a>(InotifyEvent *pEvt)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#b028c8fa988f6bbb2ef773db3ea3a2d3">GetEvent</a>(InotifyEvent &rEvt)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#a3c533f956871f904949832ac8f5fbde">GetEventCount</a>()</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#d8e4a4a87d005c71c0b5ea9c6dd53c42">GetMaxEvents</a>()</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline, static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#c18b7732f67832260fbbd47aebb8af51">GetMaxInstances</a>()</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline, static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#86dae1b7a72c0d8fc2a632444a0f2f1f">GetMaxWatches</a>()</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline, static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#b53b7935bda7425b002946d78bfe5863">GetWatchCount</a>() const</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#a6fe6e9cb3343665eb968fcd5170cfb9">Inotify</a>()</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#10880f490c33acd8bd24664fc7bce4ae">InotifyWatch</a> class</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [friend]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#19cde43d082ff92bd02654610019300d">PeekEvent</a>(InotifyEvent *pEvt)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#287dc0d238fa6edc3269441cb284f979">PeekEvent</a>(InotifyEvent &rEvt)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#21c39bb8e5bbc1941b945c18f9005b84">Remove</a>(InotifyWatch *pWatch)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#ac1a52b2ff6bfec07021a44e55d496a6">Remove</a>(InotifyWatch &rWatch)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#bc1fd5830ca561efb69bcd2283981741">RemoveAll</a>()</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#734538233ba2136164f76f4df6c3654e">SetCapability</a>(InotifyCapability_t cap, uint32_t val)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#124dd5816205900af61034d47ae65255">SetCloseOnExec</a>(bool fClOnEx)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#66d90ebfa516d4bd1463749def2b58f9">SetMaxEvents</a>(uint32_t val)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline, static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#620c891962fe5acd26485c64e9b28d19">SetMaxInstances</a>(uint32_t val)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline, static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#5064380cdb4a726ab33f3fa18d15c77a">SetMaxWatches</a>(uint32_t val)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td><code> [inline, static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#b2c8ab8ad4322fb6f0dae0eae442402b">SetNonBlock</a>(bool fNonBlock)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#139c27c6643bb199619f3eae9b32e53b">WaitForEvents</a>(bool fNoIntr=false)</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotify.html#f19dd5e491395673e4798eb9dbf5f682">~Inotify</a>()</td><td><a class="el" href="classInotify.html">Inotify</a></td><td></td></tr> +</table><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/classInotify.html b/shared/inotify/doc/html/classInotify.html new file mode 100644 index 00000000..f37e55f6 --- /dev/null +++ b/shared/inotify/doc/html/classInotify.html @@ -0,0 +1,1016 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Inotify Class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<h1>Inotify Class Reference</h1><!-- doxytag: class="Inotify" -->inotify class +<a href="#_details">More...</a> +<p> +<code>#include <<a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a>></code> +<p> +<a href="classInotify-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> +<tr><td></td></tr> +<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#a6fe6e9cb3343665eb968fcd5170cfb9">Inotify</a> () throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#a6fe6e9cb3343665eb968fcd5170cfb9"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#f19dd5e491395673e4798eb9dbf5f682">~Inotify</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#f19dd5e491395673e4798eb9dbf5f682"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#86ae86c43ea1a72f562ca46393309635">Close</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes all watches and closes the inotify device. <a href="#86ae86c43ea1a72f562ca46393309635"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#2ef771ebaf982d76ebe19b3f5bc9cd83">Add</a> (<a class="el" href="classInotifyWatch.html">InotifyWatch</a> *pWatch) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a new watch. <a href="#2ef771ebaf982d76ebe19b3f5bc9cd83"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#35dab56d3e10bf28b5e457871adddb58">Add</a> (<a class="el" href="classInotifyWatch.html">InotifyWatch</a> &rWatch) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a new watch. <a href="#35dab56d3e10bf28b5e457871adddb58"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#21c39bb8e5bbc1941b945c18f9005b84">Remove</a> (<a class="el" href="classInotifyWatch.html">InotifyWatch</a> *pWatch) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes a watch. <a href="#21c39bb8e5bbc1941b945c18f9005b84"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#ac1a52b2ff6bfec07021a44e55d496a6">Remove</a> (<a class="el" href="classInotifyWatch.html">InotifyWatch</a> &rWatch) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes a watch. <a href="#ac1a52b2ff6bfec07021a44e55d496a6"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#bc1fd5830ca561efb69bcd2283981741">RemoveAll</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes all watches. <a href="#bc1fd5830ca561efb69bcd2283981741"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#b53b7935bda7425b002946d78bfe5863">GetWatchCount</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the count of watches. <a href="#b53b7935bda7425b002946d78bfe5863"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#9bf5f7716649d5b5f468c2242fb5e099">GetEnabledCount</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the count of enabled watches. <a href="#9bf5f7716649d5b5f468c2242fb5e099"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#139c27c6643bb199619f3eae9b32e53b">WaitForEvents</a> (bool fNoIntr=false) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Waits for inotify events. <a href="#139c27c6643bb199619f3eae9b32e53b"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#a3c533f956871f904949832ac8f5fbde">GetEventCount</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the count of received and queued events. <a href="#a3c533f956871f904949832ac8f5fbde"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#490a3f824c6d041d31ccaabe9bd92008">GetEvent</a> (<a class="el" href="classInotifyEvent.html">InotifyEvent</a> *pEvt) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Extracts a queued inotify event. <a href="#490a3f824c6d041d31ccaabe9bd92008"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#b028c8fa988f6bbb2ef773db3ea3a2d3">GetEvent</a> (<a class="el" href="classInotifyEvent.html">InotifyEvent</a> &rEvt) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Extracts a queued inotify event. <a href="#b028c8fa988f6bbb2ef773db3ea3a2d3"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#19cde43d082ff92bd02654610019300d">PeekEvent</a> (<a class="el" href="classInotifyEvent.html">InotifyEvent</a> *pEvt) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Extracts a queued inotify event (without removing). <a href="#19cde43d082ff92bd02654610019300d"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#287dc0d238fa6edc3269441cb284f979">PeekEvent</a> (<a class="el" href="classInotifyEvent.html">InotifyEvent</a> &rEvt) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Extracts a queued inotify event (without removing). <a href="#287dc0d238fa6edc3269441cb284f979"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classInotifyWatch.html">InotifyWatch</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#182d19b667c9e0899802b70a579eff40">FindWatch</a> (int iDescriptor)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Searches for a watch by a watch descriptor. <a href="#182d19b667c9e0899802b70a579eff40"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classInotifyWatch.html">InotifyWatch</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#a4d6b9d1a9a496862febbe5bffd798c2">FindWatch</a> (const std::string &rPath)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Searches for a watch by a filesystem path. <a href="#a4d6b9d1a9a496862febbe5bffd798c2"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#678271faf4799840ad71805163a24b13">GetDescriptor</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the file descriptor. <a href="#678271faf4799840ad71805163a24b13"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#b2c8ab8ad4322fb6f0dae0eae442402b">SetNonBlock</a> (bool fNonBlock) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Enables/disables non-blocking mode. <a href="#b2c8ab8ad4322fb6f0dae0eae442402b"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#124dd5816205900af61034d47ae65255">SetCloseOnExec</a> (bool fClOnEx) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Enables/disables closing on exec. <a href="#124dd5816205900af61034d47ae65255"></a><br></td></tr> +<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#70b3b57e8661fbb4c5bc404b86225c3b">GetCapability</a> (<a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> cap) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Acquires a particular inotify capability/limit. <a href="#70b3b57e8661fbb4c5bc404b86225c3b"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#734538233ba2136164f76f4df6c3654e">SetCapability</a> (<a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> cap, uint32_t val) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Modifies a particular inotify capability/limit. <a href="#734538233ba2136164f76f4df6c3654e"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#d8e4a4a87d005c71c0b5ea9c6dd53c42">GetMaxEvents</a> () throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the maximum number of events in the kernel queue. <a href="#d8e4a4a87d005c71c0b5ea9c6dd53c42"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#66d90ebfa516d4bd1463749def2b58f9">SetMaxEvents</a> (uint32_t val) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the maximum number of events in the kernel queue. <a href="#66d90ebfa516d4bd1463749def2b58f9"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#c18b7732f67832260fbbd47aebb8af51">GetMaxInstances</a> () throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the maximum number of inotify instances per process. <a href="#c18b7732f67832260fbbd47aebb8af51"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#620c891962fe5acd26485c64e9b28d19">SetMaxInstances</a> (uint32_t val) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the maximum number of inotify instances per process. <a href="#620c891962fe5acd26485c64e9b28d19"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#86dae1b7a72c0d8fc2a632444a0f2f1f">GetMaxWatches</a> () throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the maximum number of inotify watches per instance. <a href="#86dae1b7a72c0d8fc2a632444a0f2f1f"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#5064380cdb4a726ab33f3fa18d15c77a">SetMaxWatches</a> (uint32_t val) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the maximum number of inotify watches per instance. <a href="#5064380cdb4a726ab33f3fa18d15c77a"></a><br></td></tr> +<tr><td colspan="2"><br><h2>Friends</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html#10880f490c33acd8bd24664fc7bce4ae">InotifyWatch</a></td></tr> + +</table> +<hr><a name="_details"></a><h2>Detailed Description</h2> +inotify class +<p> +It holds information about the inotify device descriptor and manages the event queue.<p> +If the INOTIFY_THREAD_SAFE is defined this class is thread-safe. +<p> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="a6fe6e9cb3343665eb968fcd5170cfb9"></a><!-- doxytag: member="Inotify::Inotify" ref="a6fe6e9cb3343665eb968fcd5170cfb9" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">Inotify::Inotify </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Constructor. +<p> +Creates and initializes an instance of inotify communication object (opens the inotify device).<p> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if inotify isn't available </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="f19dd5e491395673e4798eb9dbf5f682"></a><!-- doxytag: member="Inotify::~Inotify" ref="f19dd5e491395673e4798eb9dbf5f682" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">Inotify::~Inotify </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Destructor. +<p> +Calls <a class="el" href="classInotify.html#86ae86c43ea1a72f562ca46393309635">Close()</a> due to clean-up. +</div> +</div><p> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="86ae86c43ea1a72f562ca46393309635"></a><!-- doxytag: member="Inotify::Close" ref="86ae86c43ea1a72f562ca46393309635" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Inotify::Close </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Removes all watches and closes the inotify device. +<p> + +</div> +</div><p> +<a class="anchor" name="2ef771ebaf982d76ebe19b3f5bc9cd83"></a><!-- doxytag: member="Inotify::Add" ref="2ef771ebaf982d76ebe19b3f5bc9cd83" args="(InotifyWatch *pWatch)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Inotify::Add </td> + <td>(</td> + <td class="paramtype"><a class="el" href="classInotifyWatch.html">InotifyWatch</a> * </td> + <td class="paramname"> <em>pWatch</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Adds a new watch. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pWatch</em> </td><td>inotify watch</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if adding failed </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="35dab56d3e10bf28b5e457871adddb58"></a><!-- doxytag: member="Inotify::Add" ref="35dab56d3e10bf28b5e457871adddb58" args="(InotifyWatch &rWatch)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Inotify::Add </td> + <td>(</td> + <td class="paramtype"><a class="el" href="classInotifyWatch.html">InotifyWatch</a> & </td> + <td class="paramname"> <em>rWatch</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Adds a new watch. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>rWatch</em> </td><td>inotify watch</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if adding failed </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="21c39bb8e5bbc1941b945c18f9005b84"></a><!-- doxytag: member="Inotify::Remove" ref="21c39bb8e5bbc1941b945c18f9005b84" args="(InotifyWatch *pWatch)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Inotify::Remove </td> + <td>(</td> + <td class="paramtype"><a class="el" href="classInotifyWatch.html">InotifyWatch</a> * </td> + <td class="paramname"> <em>pWatch</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Removes a watch. +<p> +If the given watch is not present it does nothing.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pWatch</em> </td><td>inotify watch</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if removing failed </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="ac1a52b2ff6bfec07021a44e55d496a6"></a><!-- doxytag: member="Inotify::Remove" ref="ac1a52b2ff6bfec07021a44e55d496a6" args="(InotifyWatch &rWatch)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Inotify::Remove </td> + <td>(</td> + <td class="paramtype"><a class="el" href="classInotifyWatch.html">InotifyWatch</a> & </td> + <td class="paramname"> <em>rWatch</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Removes a watch. +<p> +If the given watch is not present it does nothing.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>rWatch</em> </td><td>inotify watch</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if removing failed </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="bc1fd5830ca561efb69bcd2283981741"></a><!-- doxytag: member="Inotify::RemoveAll" ref="bc1fd5830ca561efb69bcd2283981741" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Inotify::RemoveAll </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Removes all watches. +<p> + +</div> +</div><p> +<a class="anchor" name="b53b7935bda7425b002946d78bfe5863"></a><!-- doxytag: member="Inotify::GetWatchCount" ref="b53b7935bda7425b002946d78bfe5863" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t Inotify::GetWatchCount </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the count of watches. +<p> +This is the total count of all watches (regardless whether enabled or not).<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>count of watches</dd></dl> +<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classInotify.html#9bf5f7716649d5b5f468c2242fb5e099">GetEnabledCount()</a> </dd></dl> + +</div> +</div><p> +<a class="anchor" name="9bf5f7716649d5b5f468c2242fb5e099"></a><!-- doxytag: member="Inotify::GetEnabledCount" ref="9bf5f7716649d5b5f468c2242fb5e099" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t Inotify::GetEnabledCount </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the count of enabled watches. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>count of enabled watches</dd></dl> +<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classInotify.html#b53b7935bda7425b002946d78bfe5863">GetWatchCount()</a> </dd></dl> + +</div> +</div><p> +<a class="anchor" name="139c27c6643bb199619f3eae9b32e53b"></a><!-- doxytag: member="Inotify::WaitForEvents" ref="139c27c6643bb199619f3eae9b32e53b" args="(bool fNoIntr=false)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Inotify::WaitForEvents </td> + <td>(</td> + <td class="paramtype">bool </td> + <td class="paramname"> <em>fNoIntr</em> = <code>false</code> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Waits for inotify events. +<p> +It waits until one or more events occur. When called in nonblocking mode it only retrieves occurred events to the internal queue and exits.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>fNoIntr</em> </td><td>if true it re-calls the system call after a handled signal</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if reading events failed</td></tr> + </table> +</dl> +<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classInotify.html#b2c8ab8ad4322fb6f0dae0eae442402b">SetNonBlock()</a> </dd></dl> + +</div> +</div><p> +<a class="anchor" name="a3c533f956871f904949832ac8f5fbde"></a><!-- doxytag: member="Inotify::GetEventCount" ref="a3c533f956871f904949832ac8f5fbde" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">size_t Inotify::GetEventCount </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"><code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the count of received and queued events. +<p> +This number is related to the events in the queue inside this object, not to the events pending in the kernel.<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>count of events </dd></dl> + +</div> +</div><p> +<a class="anchor" name="490a3f824c6d041d31ccaabe9bd92008"></a><!-- doxytag: member="Inotify::GetEvent" ref="490a3f824c6d041d31ccaabe9bd92008" args="(InotifyEvent *pEvt)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool Inotify::GetEvent </td> + <td>(</td> + <td class="paramtype"><a class="el" href="classInotifyEvent.html">InotifyEvent</a> * </td> + <td class="paramname"> <em>pEvt</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Extracts a queued inotify event. +<p> +The extracted event is removed from the queue. If the pointer is NULL it does nothing.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>pEvt</em> </td><td>event object</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if the provided pointer is NULL </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="b028c8fa988f6bbb2ef773db3ea3a2d3"></a><!-- doxytag: member="Inotify::GetEvent" ref="b028c8fa988f6bbb2ef773db3ea3a2d3" args="(InotifyEvent &rEvt)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool Inotify::GetEvent </td> + <td>(</td> + <td class="paramtype"><a class="el" href="classInotifyEvent.html">InotifyEvent</a> & </td> + <td class="paramname"> <em>rEvt</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Extracts a queued inotify event. +<p> +The extracted event is removed from the queue.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>rEvt</em> </td><td>event object</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown only in very anomalous cases </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="19cde43d082ff92bd02654610019300d"></a><!-- doxytag: member="Inotify::PeekEvent" ref="19cde43d082ff92bd02654610019300d" args="(InotifyEvent *pEvt)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool Inotify::PeekEvent </td> + <td>(</td> + <td class="paramtype"><a class="el" href="classInotifyEvent.html">InotifyEvent</a> * </td> + <td class="paramname"> <em>pEvt</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Extracts a queued inotify event (without removing). +<p> +The extracted event stays in the queue. If the pointer is NULL it does nothing.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>pEvt</em> </td><td>event object</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if the provided pointer is NULL </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="287dc0d238fa6edc3269441cb284f979"></a><!-- doxytag: member="Inotify::PeekEvent" ref="287dc0d238fa6edc3269441cb284f979" args="(InotifyEvent &rEvt)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool Inotify::PeekEvent </td> + <td>(</td> + <td class="paramtype"><a class="el" href="classInotifyEvent.html">InotifyEvent</a> & </td> + <td class="paramname"> <em>rEvt</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Extracts a queued inotify event (without removing). +<p> +The extracted event stays in the queue.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in,out]</tt> </td><td valign="top"><em>rEvt</em> </td><td>event object</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown only in very anomalous cases </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="182d19b667c9e0899802b70a579eff40"></a><!-- doxytag: member="Inotify::FindWatch" ref="182d19b667c9e0899802b70a579eff40" args="(int iDescriptor)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="classInotifyWatch.html">InotifyWatch</a> * Inotify::FindWatch </td> + <td>(</td> + <td class="paramtype">int </td> + <td class="paramname"> <em>iDescriptor</em> </td> + <td> ) </td> + <td width="100%"></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Searches for a watch by a watch descriptor. +<p> +It tries to find a watch by the given descriptor.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>iDescriptor</em> </td><td>watch descriptor </td></tr> + </table> +</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>pointer to a watch; NULL if no such watch exists </dd></dl> + +</div> +</div><p> +<a class="anchor" name="a4d6b9d1a9a496862febbe5bffd798c2"></a><!-- doxytag: member="Inotify::FindWatch" ref="a4d6b9d1a9a496862febbe5bffd798c2" args="(const std::string &rPath)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="classInotifyWatch.html">InotifyWatch</a> * Inotify::FindWatch </td> + <td>(</td> + <td class="paramtype">const std::string & </td> + <td class="paramname"> <em>rPath</em> </td> + <td> ) </td> + <td width="100%"></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Searches for a watch by a filesystem path. +<p> +It tries to find a watch by the given filesystem path.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>rPath</em> </td><td>filesystem path </td></tr> + </table> +</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>pointer to a watch; NULL if no such watch exists</dd></dl> +<dl class="attention" compact><dt><b>Attention:</b></dt><dd>The path must be exactly identical to the one used for the searched watch. Be careful about absolute/relative and case-insensitive paths. </dd></dl> + +</div> +</div><p> +<a class="anchor" name="678271faf4799840ad71805163a24b13"></a><!-- doxytag: member="Inotify::GetDescriptor" ref="678271faf4799840ad71805163a24b13" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int Inotify::GetDescriptor </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the file descriptor. +<p> +The descriptor can be used in standard low-level file functions (poll(), select(), fcntl() etc.).<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>valid file descriptor or -1 for inactive object</dd></dl> +<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classInotify.html#b2c8ab8ad4322fb6f0dae0eae442402b">SetNonBlock()</a> </dd></dl> + +</div> +</div><p> +<a class="anchor" name="b2c8ab8ad4322fb6f0dae0eae442402b"></a><!-- doxytag: member="Inotify::SetNonBlock" ref="b2c8ab8ad4322fb6f0dae0eae442402b" args="(bool fNonBlock)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Inotify::SetNonBlock </td> + <td>(</td> + <td class="paramtype">bool </td> + <td class="paramname"> <em>fNonBlock</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Enables/disables non-blocking mode. +<p> +Use this mode if you want to monitor the descriptor (acquired thru <a class="el" href="classInotify.html#678271faf4799840ad71805163a24b13">GetDescriptor()</a>) in functions such as poll(), select() etc.<p> +Non-blocking mode is disabled by default.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>fNonBlock</em> </td><td>enable/disable non-blocking mode</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if setting mode failed</td></tr> + </table> +</dl> +<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classInotify.html#678271faf4799840ad71805163a24b13">GetDescriptor()</a>, <a class="el" href="classInotify.html#124dd5816205900af61034d47ae65255">SetCloseOnExec()</a> </dd></dl> + +</div> +</div><p> +<a class="anchor" name="124dd5816205900af61034d47ae65255"></a><!-- doxytag: member="Inotify::SetCloseOnExec" ref="124dd5816205900af61034d47ae65255" args="(bool fClOnEx)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Inotify::SetCloseOnExec </td> + <td>(</td> + <td class="paramtype">bool </td> + <td class="paramname"> <em>fClOnEx</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Enables/disables closing on exec. +<p> +Enable this if you want to close the descriptor when executing another program. Otherwise, the descriptor will be inherited.<p> +Closing on exec is disabled by default.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>fClOnEx</em> </td><td>enable/disable closing on exec</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if setting failed</td></tr> + </table> +</dl> +<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classInotify.html#678271faf4799840ad71805163a24b13">GetDescriptor()</a>, <a class="el" href="classInotify.html#b2c8ab8ad4322fb6f0dae0eae442402b">SetNonBlock()</a> </dd></dl> + +</div> +</div><p> +<a class="anchor" name="70b3b57e8661fbb4c5bc404b86225c3b"></a><!-- doxytag: member="Inotify::GetCapability" ref="70b3b57e8661fbb4c5bc404b86225c3b" args="(InotifyCapability_t cap)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">uint32_t Inotify::GetCapability </td> + <td>(</td> + <td class="paramtype"><a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> </td> + <td class="paramname"> <em>cap</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Acquires a particular inotify capability/limit. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>cap</em> </td><td>capability/limit identifier </td></tr> + </table> +</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>capability/limit value </dd></dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if the given value cannot be acquired </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="734538233ba2136164f76f4df6c3654e"></a><!-- doxytag: member="Inotify::SetCapability" ref="734538233ba2136164f76f4df6c3654e" args="(InotifyCapability_t cap, uint32_t val)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void Inotify::SetCapability </td> + <td>(</td> + <td class="paramtype"><a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> </td> + <td class="paramname"> <em>cap</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">uint32_t </td> + <td class="paramname"> <em>val</em></td><td> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td><td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Modifies a particular inotify capability/limit. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>cap</em> </td><td>capability/limit identifier </td></tr> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>val</em> </td><td>new capability/limit value </td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if the given value cannot be set </td></tr> + </table> +</dl> +<dl class="attention" compact><dt><b>Attention:</b></dt><dd>Using this function requires root privileges. Beware of setting extensive values - it may seriously affect system performance and/or stability. </dd></dl> + +</div> +</div><p> +<a class="anchor" name="d8e4a4a87d005c71c0b5ea9c6dd53c42"></a><!-- doxytag: member="Inotify::GetMaxEvents" ref="d8e4a4a87d005c71c0b5ea9c6dd53c42" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">static uint32_t Inotify::GetMaxEvents </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [inline, static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the maximum number of events in the kernel queue. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>maximum number of events in the kernel queue </dd></dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if the given value cannot be acquired </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="66d90ebfa516d4bd1463749def2b58f9"></a><!-- doxytag: member="Inotify::SetMaxEvents" ref="66d90ebfa516d4bd1463749def2b58f9" args="(uint32_t val)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">static void Inotify::SetMaxEvents </td> + <td>(</td> + <td class="paramtype">uint32_t </td> + <td class="paramname"> <em>val</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [inline, static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Sets the maximum number of events in the kernel queue. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>val</em> </td><td>new value </td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if the given value cannot be set </td></tr> + </table> +</dl> +<dl class="attention" compact><dt><b>Attention:</b></dt><dd>Using this function requires root privileges. Beware of setting extensive values - the greater value is set here the more physical memory may be used for the inotify infrastructure. </dd></dl> + +</div> +</div><p> +<a class="anchor" name="c18b7732f67832260fbbd47aebb8af51"></a><!-- doxytag: member="Inotify::GetMaxInstances" ref="c18b7732f67832260fbbd47aebb8af51" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">static uint32_t Inotify::GetMaxInstances </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [inline, static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the maximum number of inotify instances per process. +<p> +It means the maximum number of open inotify file descriptors per running process.<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>maximum number of inotify instances </dd></dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if the given value cannot be acquired </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="620c891962fe5acd26485c64e9b28d19"></a><!-- doxytag: member="Inotify::SetMaxInstances" ref="620c891962fe5acd26485c64e9b28d19" args="(uint32_t val)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">static void Inotify::SetMaxInstances </td> + <td>(</td> + <td class="paramtype">uint32_t </td> + <td class="paramname"> <em>val</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [inline, static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Sets the maximum number of inotify instances per process. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>val</em> </td><td>new value </td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if the given value cannot be set </td></tr> + </table> +</dl> +<dl class="attention" compact><dt><b>Attention:</b></dt><dd>Using this function requires root privileges. Beware of setting extensive values - the greater value is set here the more physical memory may be used for the inotify infrastructure. </dd></dl> + +</div> +</div><p> +<a class="anchor" name="86dae1b7a72c0d8fc2a632444a0f2f1f"></a><!-- doxytag: member="Inotify::GetMaxWatches" ref="86dae1b7a72c0d8fc2a632444a0f2f1f" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">static uint32_t Inotify::GetMaxWatches </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [inline, static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the maximum number of inotify watches per instance. +<p> +It means the maximum number of inotify watches per inotify file descriptor.<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>maximum number of inotify watches </dd></dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if the given value cannot be acquired </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="5064380cdb4a726ab33f3fa18d15c77a"></a><!-- doxytag: member="Inotify::SetMaxWatches" ref="5064380cdb4a726ab33f3fa18d15c77a" args="(uint32_t val)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">static void Inotify::SetMaxWatches </td> + <td>(</td> + <td class="paramtype">uint32_t </td> + <td class="paramname"> <em>val</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)<code> [inline, static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Sets the maximum number of inotify watches per instance. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>val</em> </td><td>new value </td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if the given value cannot be set </td></tr> + </table> +</dl> +<dl class="attention" compact><dt><b>Attention:</b></dt><dd>Using this function requires root privileges. Beware of setting extensive values - the greater value is set here the more physical memory may be used for the inotify infrastructure. </dd></dl> + +</div> +</div><p> +<hr><h2>Friends And Related Function Documentation</h2> +<a class="anchor" name="10880f490c33acd8bd24664fc7bce4ae"></a><!-- doxytag: member="Inotify::InotifyWatch" ref="10880f490c33acd8bd24664fc7bce4ae" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">friend class <a class="el" href="classInotifyWatch.html">InotifyWatch</a><code> [friend]</code> </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a><li><a class="el" href="inotify-cxx_8cpp.html">inotify-cxx.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/classInotifyEvent-members.html b/shared/inotify/doc/html/classInotifyEvent-members.html new file mode 100644 index 00000000..47f8fdc1 --- /dev/null +++ b/shared/inotify/doc/html/classInotifyEvent-members.html @@ -0,0 +1,39 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Member List</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<h1>InotifyEvent Member List</h1>This is the complete list of members for <a class="el" href="classInotifyEvent.html">InotifyEvent</a>, including all inherited members.<p><table> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#c08a0a26ea33dbe94aaf1ac830c103a5">DumpTypes</a>(uint32_t uValue, std::string &rStr)</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#517abc6bd54c57cb767107187ea6a8fd">DumpTypes</a>(std::string &rStr) const</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#441dfd50abda0e81eb7e4f6d33c68e96">GetCookie</a>() const</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#83958af6b634d47173bde81b3bd5bbe6">GetDescriptor</a>() const</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#111954d74f0320745a68ef030064e987">GetLength</a>() const</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#2aadeb49530a62b06d98e22c335b1ec8">GetMask</a>() const</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#eced3a88a6dea190c5df19c2a6599010">GetMaskByName</a>(const std::string &rName)</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#a0524029d360591567c88595cb31df66">GetName</a>() const</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#e053c52feebf6dae5a762e6baeba93db">GetName</a>(std::string &rName) const</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#979cd46f53ed674331a5a6d47d1cde92">GetWatch</a>()</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#f416dbbd4e6ddd3c0eea6cb540f0b046">InotifyEvent</a>()</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#6d7f3fc0f51580da4a3ec2348609df64">InotifyEvent</a>(const struct inotify_event *pEvt, InotifyWatch *pWatch)</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#309ebf3c5b131522295185a926d551bb">IsType</a>(uint32_t uValue, uint32_t uType)</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline, static]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#7fdee6664ec63ccc87ff1221abba9abc">IsType</a>(uint32_t uType) const</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyEvent.html#a48030da1d3a1b1741ca791c9e129888">~InotifyEvent</a>()</td><td><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td><td><code> [inline]</code></td></tr> +</table><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/classInotifyEvent.html b/shared/inotify/doc/html/classInotifyEvent.html new file mode 100644 index 00000000..7b864a5c --- /dev/null +++ b/shared/inotify/doc/html/classInotifyEvent.html @@ -0,0 +1,487 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: InotifyEvent Class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<h1>InotifyEvent Class Reference</h1><!-- doxytag: class="InotifyEvent" -->inotify event class +<a href="#_details">More...</a> +<p> +<code>#include <<a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a>></code> +<p> +<a href="classInotifyEvent-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> +<tr><td></td></tr> +<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#f416dbbd4e6ddd3c0eea6cb540f0b046">InotifyEvent</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#f416dbbd4e6ddd3c0eea6cb540f0b046"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#6d7f3fc0f51580da4a3ec2348609df64">InotifyEvent</a> (const struct inotify_event *pEvt, <a class="el" href="classInotifyWatch.html">InotifyWatch</a> *pWatch)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#6d7f3fc0f51580da4a3ec2348609df64"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#a48030da1d3a1b1741ca791c9e129888">~InotifyEvent</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a48030da1d3a1b1741ca791c9e129888"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#83958af6b634d47173bde81b3bd5bbe6">GetDescriptor</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the event watch descriptor. <a href="#83958af6b634d47173bde81b3bd5bbe6"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#2aadeb49530a62b06d98e22c335b1ec8">GetMask</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the event mask. <a href="#2aadeb49530a62b06d98e22c335b1ec8"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#7fdee6664ec63ccc87ff1221abba9abc">IsType</a> (uint32_t uType) const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Checks for the event type. <a href="#7fdee6664ec63ccc87ff1221abba9abc"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#441dfd50abda0e81eb7e4f6d33c68e96">GetCookie</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the event cookie. <a href="#441dfd50abda0e81eb7e4f6d33c68e96"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#111954d74f0320745a68ef030064e987">GetLength</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the event name length. <a href="#111954d74f0320745a68ef030064e987"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#a0524029d360591567c88595cb31df66">GetName</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the event name. <a href="#a0524029d360591567c88595cb31df66"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#e053c52feebf6dae5a762e6baeba93db">GetName</a> (std::string &rName) const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Extracts the event name. <a href="#e053c52feebf6dae5a762e6baeba93db"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classInotifyWatch.html">InotifyWatch</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#979cd46f53ed674331a5a6d47d1cde92">GetWatch</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the source watch. <a href="#979cd46f53ed674331a5a6d47d1cde92"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#517abc6bd54c57cb767107187ea6a8fd">DumpTypes</a> (std::string &rStr) const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Fills the string with all types contained in the event mask. <a href="#517abc6bd54c57cb767107187ea6a8fd"></a><br></td></tr> +<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#309ebf3c5b131522295185a926d551bb">IsType</a> (uint32_t uValue, uint32_t uType)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Checks a value for the event type. <a href="#309ebf3c5b131522295185a926d551bb"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#eced3a88a6dea190c5df19c2a6599010">GetMaskByName</a> (const std::string &rName)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Finds the appropriate mask for a name. <a href="#eced3a88a6dea190c5df19c2a6599010"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html#c08a0a26ea33dbe94aaf1ac830c103a5">DumpTypes</a> (uint32_t uValue, std::string &rStr)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Fills the string with all types contained in an event mask value. <a href="#c08a0a26ea33dbe94aaf1ac830c103a5"></a><br></td></tr> +</table> +<hr><a name="_details"></a><h2>Detailed Description</h2> +inotify event class +<p> +It holds all information about inotify event and provides access to its particular values.<p> +This class is not (and is not intended to be) thread-safe and therefore it must not be used concurrently in multiple threads. +<p> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="f416dbbd4e6ddd3c0eea6cb540f0b046"></a><!-- doxytag: member="InotifyEvent::InotifyEvent" ref="f416dbbd4e6ddd3c0eea6cb540f0b046" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">InotifyEvent::InotifyEvent </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"><code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Constructor. +<p> +Creates a plain event. +</div> +</div><p> +<a class="anchor" name="6d7f3fc0f51580da4a3ec2348609df64"></a><!-- doxytag: member="InotifyEvent::InotifyEvent" ref="6d7f3fc0f51580da4a3ec2348609df64" args="(const struct inotify_event *pEvt, InotifyWatch *pWatch)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">InotifyEvent::InotifyEvent </td> + <td>(</td> + <td class="paramtype">const struct inotify_event * </td> + <td class="paramname"> <em>pEvt</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"><a class="el" href="classInotifyWatch.html">InotifyWatch</a> * </td> + <td class="paramname"> <em>pWatch</em></td><td> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td><td width="100%"><code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Constructor. +<p> +Creates an event based on inotify event data. For NULL pointers it works the same way as <a class="el" href="classInotifyEvent.html#f416dbbd4e6ddd3c0eea6cb540f0b046">InotifyEvent()</a>.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pEvt</em> </td><td>event data </td></tr> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pWatch</em> </td><td>inotify watch </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="a48030da1d3a1b1741ca791c9e129888"></a><!-- doxytag: member="InotifyEvent::~InotifyEvent" ref="a48030da1d3a1b1741ca791c9e129888" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">InotifyEvent::~InotifyEvent </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"><code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Destructor. +<p> + +</div> +</div><p> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="83958af6b634d47173bde81b3bd5bbe6"></a><!-- doxytag: member="InotifyEvent::GetDescriptor" ref="83958af6b634d47173bde81b3bd5bbe6" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int32_t InotifyEvent::GetDescriptor </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the event watch descriptor. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>watch descriptor</dd></dl> +<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classInotifyWatch.html#df771e1f81e2a6cc2780c9d2470e34c6">InotifyWatch::GetDescriptor()</a> </dd></dl> + +</div> +</div><p> +<a class="anchor" name="2aadeb49530a62b06d98e22c335b1ec8"></a><!-- doxytag: member="InotifyEvent::GetMask" ref="2aadeb49530a62b06d98e22c335b1ec8" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">uint32_t InotifyEvent::GetMask </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the event mask. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>event mask</dd></dl> +<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classInotifyWatch.html#bab761a989c9fdf73aaad2a58e1ba7a0">InotifyWatch::GetMask()</a> </dd></dl> + +</div> +</div><p> +<a class="anchor" name="309ebf3c5b131522295185a926d551bb"></a><!-- doxytag: member="InotifyEvent::IsType" ref="309ebf3c5b131522295185a926d551bb" args="(uint32_t uValue, uint32_t uType)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">static bool InotifyEvent::IsType </td> + <td>(</td> + <td class="paramtype">uint32_t </td> + <td class="paramname"> <em>uValue</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">uint32_t </td> + <td class="paramname"> <em>uType</em></td><td> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td><td width="100%"><code> [inline, static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Checks a value for the event type. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>uValue</em> </td><td>checked value </td></tr> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>uType</em> </td><td>type which is checked for </td></tr> + </table> +</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>true = the value contains the given type, false = otherwise </dd></dl> + +</div> +</div><p> +<a class="anchor" name="7fdee6664ec63ccc87ff1221abba9abc"></a><!-- doxytag: member="InotifyEvent::IsType" ref="7fdee6664ec63ccc87ff1221abba9abc" args="(uint32_t uType) const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool InotifyEvent::IsType </td> + <td>(</td> + <td class="paramtype">uint32_t </td> + <td class="paramname"> <em>uType</em> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Checks for the event type. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>uType</em> </td><td>type which is checked for </td></tr> + </table> +</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>true = event mask contains the given type, false = otherwise </dd></dl> + +</div> +</div><p> +<a class="anchor" name="441dfd50abda0e81eb7e4f6d33c68e96"></a><!-- doxytag: member="InotifyEvent::GetCookie" ref="441dfd50abda0e81eb7e4f6d33c68e96" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">uint32_t InotifyEvent::GetCookie </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the event cookie. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>event cookie </dd></dl> + +</div> +</div><p> +<a class="anchor" name="111954d74f0320745a68ef030064e987"></a><!-- doxytag: member="InotifyEvent::GetLength" ref="111954d74f0320745a68ef030064e987" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">uint32_t InotifyEvent::GetLength </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the event name length. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>event name length </dd></dl> + +</div> +</div><p> +<a class="anchor" name="a0524029d360591567c88595cb31df66"></a><!-- doxytag: member="InotifyEvent::GetName" ref="a0524029d360591567c88595cb31df66" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const std::string& InotifyEvent::GetName </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the event name. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>event name </dd></dl> + +</div> +</div><p> +<a class="anchor" name="e053c52feebf6dae5a762e6baeba93db"></a><!-- doxytag: member="InotifyEvent::GetName" ref="e053c52feebf6dae5a762e6baeba93db" args="(std::string &rName) const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void InotifyEvent::GetName </td> + <td>(</td> + <td class="paramtype">std::string & </td> + <td class="paramname"> <em>rName</em> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Extracts the event name. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>rName</em> </td><td>event name </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="979cd46f53ed674331a5a6d47d1cde92"></a><!-- doxytag: member="InotifyEvent::GetWatch" ref="979cd46f53ed674331a5a6d47d1cde92" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="classInotifyWatch.html">InotifyWatch</a>* InotifyEvent::GetWatch </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"><code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the source watch. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>source watch </dd></dl> + +</div> +</div><p> +<a class="anchor" name="eced3a88a6dea190c5df19c2a6599010"></a><!-- doxytag: member="InotifyEvent::GetMaskByName" ref="eced3a88a6dea190c5df19c2a6599010" args="(const std::string &rName)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">uint32_t InotifyEvent::GetMaskByName </td> + <td>(</td> + <td class="paramtype">const std::string & </td> + <td class="paramname"> <em>rName</em> </td> + <td> ) </td> + <td width="100%"><code> [static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Finds the appropriate mask for a name. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>rName</em> </td><td>mask name </td></tr> + </table> +</dl> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>mask for name; 0 on failure </dd></dl> + +</div> +</div><p> +<a class="anchor" name="c08a0a26ea33dbe94aaf1ac830c103a5"></a><!-- doxytag: member="InotifyEvent::DumpTypes" ref="c08a0a26ea33dbe94aaf1ac830c103a5" args="(uint32_t uValue, std::string &rStr)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void InotifyEvent::DumpTypes </td> + <td>(</td> + <td class="paramtype">uint32_t </td> + <td class="paramname"> <em>uValue</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">std::string & </td> + <td class="paramname"> <em>rStr</em></td><td> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td><td width="100%"><code> [static]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Fills the string with all types contained in an event mask value. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>uValue</em> </td><td>event mask value </td></tr> + <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>rStr</em> </td><td>dumped event types </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="517abc6bd54c57cb767107187ea6a8fd"></a><!-- doxytag: member="InotifyEvent::DumpTypes" ref="517abc6bd54c57cb767107187ea6a8fd" args="(std::string &rStr) const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void InotifyEvent::DumpTypes </td> + <td>(</td> + <td class="paramtype">std::string & </td> + <td class="paramname"> <em>rStr</em> </td> + <td> ) </td> + <td width="100%"> const</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Fills the string with all types contained in the event mask. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>rStr</em> </td><td>dumped event types </td></tr> + </table> +</dl> + +</div> +</div><p> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a><li><a class="el" href="inotify-cxx_8cpp.html">inotify-cxx.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/classInotifyException-members.html b/shared/inotify/doc/html/classInotifyException-members.html new file mode 100644 index 00000000..edd5ac6b --- /dev/null +++ b/shared/inotify/doc/html/classInotifyException-members.html @@ -0,0 +1,31 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Member List</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<h1>InotifyException Member List</h1>This is the complete list of members for <a class="el" href="classInotifyException.html">InotifyException</a>, including all inherited members.<p><table> + <tr class="memlist"><td><a class="el" href="classInotifyException.html#3fda7827f1561f610e40bcd217bdc6fe">GetErrorNumber</a>() const</td><td><a class="el" href="classInotifyException.html">InotifyException</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyException.html#1c19a6c919c76332c95970ce7983d016">GetMessage</a>() const</td><td><a class="el" href="classInotifyException.html">InotifyException</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyException.html#568200b75da77cc24927922760b3a5d3">GetSource</a>() const</td><td><a class="el" href="classInotifyException.html">InotifyException</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyException.html#900dc29e5cfb3ece6c1651d04773b2bb">InotifyException</a>(const std::string &rMsg="", int iErr=0, void *pSrc=NULL)</td><td><a class="el" href="classInotifyException.html">InotifyException</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyException.html#aa8a163c661ce70e34b3e3e7ad700854">m_err</a></td><td><a class="el" href="classInotifyException.html">InotifyException</a></td><td><code> [protected]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyException.html#c113719bd6f4352e12876b2322f1c92c">m_msg</a></td><td><a class="el" href="classInotifyException.html">InotifyException</a></td><td><code> [protected]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyException.html#dd106c2255890025561245cf91fe1427">m_pSrc</a></td><td><a class="el" href="classInotifyException.html">InotifyException</a></td><td><code> [mutable, protected]</code></td></tr> +</table><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/classInotifyException.html b/shared/inotify/doc/html/classInotifyException.html new file mode 100644 index 00000000..6e5f01e5 --- /dev/null +++ b/shared/inotify/doc/html/classInotifyException.html @@ -0,0 +1,227 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: InotifyException Class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<h1>InotifyException Class Reference</h1><!-- doxytag: class="InotifyException" -->Class for inotify exceptions. +<a href="#_details">More...</a> +<p> +<code>#include <<a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a>></code> +<p> +<a href="classInotifyException-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> +<tr><td></td></tr> +<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyException.html#900dc29e5cfb3ece6c1651d04773b2bb">InotifyException</a> (const std::string &rMsg="", int iErr=0, void *pSrc=NULL)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#900dc29e5cfb3ece6c1651d04773b2bb"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyException.html#1c19a6c919c76332c95970ce7983d016">GetMessage</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the exception message. <a href="#1c19a6c919c76332c95970ce7983d016"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyException.html#3fda7827f1561f610e40bcd217bdc6fe">GetErrorNumber</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the exception error number. <a href="#3fda7827f1561f610e40bcd217bdc6fe"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyException.html#568200b75da77cc24927922760b3a5d3">GetSource</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the exception source. <a href="#568200b75da77cc24927922760b3a5d3"></a><br></td></tr> +<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyException.html#c113719bd6f4352e12876b2322f1c92c">m_msg</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">message <a href="#c113719bd6f4352e12876b2322f1c92c"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyException.html#aa8a163c661ce70e34b3e3e7ad700854">m_err</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">error number <a href="#aa8a163c661ce70e34b3e3e7ad700854"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyException.html#dd106c2255890025561245cf91fe1427">m_pSrc</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">source <a href="#dd106c2255890025561245cf91fe1427"></a><br></td></tr> +</table> +<hr><a name="_details"></a><h2>Detailed Description</h2> +Class for inotify exceptions. +<p> +This class allows to acquire information about exceptional events. It makes easier to log or display error messages and to identify problematic code locations.<p> +Although this class is basically thread-safe it is not intended to be shared between threads. +<p> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="900dc29e5cfb3ece6c1651d04773b2bb"></a><!-- doxytag: member="InotifyException::InotifyException" ref="900dc29e5cfb3ece6c1651d04773b2bb" args="(const std::string &rMsg="", int iErr=0, void *pSrc=NULL)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">InotifyException::InotifyException </td> + <td>(</td> + <td class="paramtype">const std::string & </td> + <td class="paramname"> <em>rMsg</em> = <code>""</code>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">int </td> + <td class="paramname"> <em>iErr</em> = <code>0</code>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">void * </td> + <td class="paramname"> <em>pSrc</em> = <code>NULL</code></td><td> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td><td width="100%"><code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Constructor. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>rMsg</em> </td><td>message </td></tr> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>iErr</em> </td><td>error number (see errno.h) </td></tr> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>pSrc</em> </td><td>source </td></tr> + </table> +</dl> + +</div> +</div><p> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="1c19a6c919c76332c95970ce7983d016"></a><!-- doxytag: member="InotifyException::GetMessage" ref="1c19a6c919c76332c95970ce7983d016" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const std::string& InotifyException::GetMessage </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the exception message. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>message </dd></dl> + +</div> +</div><p> +<a class="anchor" name="3fda7827f1561f610e40bcd217bdc6fe"></a><!-- doxytag: member="InotifyException::GetErrorNumber" ref="3fda7827f1561f610e40bcd217bdc6fe" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int InotifyException::GetErrorNumber </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the exception error number. +<p> +If not applicable this value is 0 (zero).<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>error number (standardized; see errno.h) </dd></dl> + +</div> +</div><p> +<a class="anchor" name="568200b75da77cc24927922760b3a5d3"></a><!-- doxytag: member="InotifyException::GetSource" ref="568200b75da77cc24927922760b3a5d3" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void* InotifyException::GetSource </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the exception source. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>source </dd></dl> + +</div> +</div><p> +<hr><h2>Member Data Documentation</h2> +<a class="anchor" name="c113719bd6f4352e12876b2322f1c92c"></a><!-- doxytag: member="InotifyException::m_msg" ref="c113719bd6f4352e12876b2322f1c92c" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">std::string <a class="el" href="classInotifyException.html#c113719bd6f4352e12876b2322f1c92c">InotifyException::m_msg</a><code> [protected]</code> </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +message +<p> + +</div> +</div><p> +<a class="anchor" name="aa8a163c661ce70e34b3e3e7ad700854"></a><!-- doxytag: member="InotifyException::m_err" ref="aa8a163c661ce70e34b3e3e7ad700854" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int <a class="el" href="classInotifyException.html#aa8a163c661ce70e34b3e3e7ad700854">InotifyException::m_err</a><code> [protected]</code> </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +error number +<p> + +</div> +</div><p> +<a class="anchor" name="dd106c2255890025561245cf91fe1427"></a><!-- doxytag: member="InotifyException::m_pSrc" ref="dd106c2255890025561245cf91fe1427" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void* <a class="el" href="classInotifyException.html#dd106c2255890025561245cf91fe1427">InotifyException::m_pSrc</a><code> [mutable, protected]</code> </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +source +<p> + +</div> +</div><p> +<hr>The documentation for this class was generated from the following file:<ul> +<li><a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/classInotifyWatch-members.html b/shared/inotify/doc/html/classInotifyWatch-members.html new file mode 100644 index 00000000..1809af8b --- /dev/null +++ b/shared/inotify/doc/html/classInotifyWatch-members.html @@ -0,0 +1,35 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Member List</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<h1>InotifyWatch Member List</h1>This is the complete list of members for <a class="el" href="classInotifyWatch.html">InotifyWatch</a>, including all inherited members.<p><table> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#df771e1f81e2a6cc2780c9d2470e34c6">GetDescriptor</a>() const</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#cbf0042d06841f9503405b104e4c35d0">GetInotify</a>()</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#bab761a989c9fdf73aaad2a58e1ba7a0">GetMask</a>() const</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#89f897a4d98fa54de27730dd8be67966">GetPath</a>() const</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#94bfb861dc18ca5d16abfcff90db8c86">Inotify</a> class</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td><code> [friend]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#c9c02f1dbd143eebd711eba03ac366e9">InotifyWatch</a>(const std::string &rPath, int32_t uMask, bool fEnabled=true)</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#3d2a5c58a07449bc6ff192f6c14c4de0">IsEnabled</a>() const</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#1c8ab316b54cb7d1d0b17cbbe6b7d2f8">IsRecursive</a>() const</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td><code> [inline]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#a71aff8650fadff32a3c655ca50945f1">SetEnabled</a>(bool fEnabled)</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#3ad7fbc55c21b3fcd08c2d1d388e14b6">SetMask</a>(uint32_t uMask)</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td></td></tr> + <tr class="memlist"><td><a class="el" href="classInotifyWatch.html#871c16b01aa8841b36246e5b629ecaef">~InotifyWatch</a>()</td><td><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td><td><code> [inline]</code></td></tr> +</table><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/classInotifyWatch.html b/shared/inotify/doc/html/classInotifyWatch.html new file mode 100644 index 00000000..119c7873 --- /dev/null +++ b/shared/inotify/doc/html/classInotifyWatch.html @@ -0,0 +1,358 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: InotifyWatch Class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<h1>InotifyWatch Class Reference</h1><!-- doxytag: class="InotifyWatch" -->inotify watch class +<a href="#_details">More...</a> +<p> +<code>#include <<a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a>></code> +<p> +<a href="classInotifyWatch-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> +<tr><td></td></tr> +<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#c9c02f1dbd143eebd711eba03ac366e9">InotifyWatch</a> (const std::string &rPath, int32_t uMask, bool fEnabled=true)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#c9c02f1dbd143eebd711eba03ac366e9"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#871c16b01aa8841b36246e5b629ecaef">~InotifyWatch</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#871c16b01aa8841b36246e5b629ecaef"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#df771e1f81e2a6cc2780c9d2470e34c6">GetDescriptor</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the watch descriptor. <a href="#df771e1f81e2a6cc2780c9d2470e34c6"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string & </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#89f897a4d98fa54de27730dd8be67966">GetPath</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the watched file path. <a href="#89f897a4d98fa54de27730dd8be67966"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#bab761a989c9fdf73aaad2a58e1ba7a0">GetMask</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the watch event mask. <a href="#bab761a989c9fdf73aaad2a58e1ba7a0"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#3ad7fbc55c21b3fcd08c2d1d388e14b6">SetMask</a> (uint32_t uMask) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the watch event mask. <a href="#3ad7fbc55c21b3fcd08c2d1d388e14b6"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classInotify.html">Inotify</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#cbf0042d06841f9503405b104e4c35d0">GetInotify</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the appropriate inotify class instance. <a href="#cbf0042d06841f9503405b104e4c35d0"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#a71aff8650fadff32a3c655ca50945f1">SetEnabled</a> (bool fEnabled) throw (InotifyException)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Enables/disables the watch. <a href="#a71aff8650fadff32a3c655ca50945f1"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#3d2a5c58a07449bc6ff192f6c14c4de0">IsEnabled</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Checks whether the watch is enabled. <a href="#3d2a5c58a07449bc6ff192f6c14c4de0"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#1c8ab316b54cb7d1d0b17cbbe6b7d2f8">IsRecursive</a> () const</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Checks whether the watch is recursive. <a href="#1c8ab316b54cb7d1d0b17cbbe6b7d2f8"></a><br></td></tr> +<tr><td colspan="2"><br><h2>Friends</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#94bfb861dc18ca5d16abfcff90db8c86">Inotify</a></td></tr> + +</table> +<hr><a name="_details"></a><h2>Detailed Description</h2> +inotify watch class +<p> +It holds information about the inotify watch on a particular inode.<p> +If the INOTIFY_THREAD_SAFE is defined this class is thread-safe. +<p> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="c9c02f1dbd143eebd711eba03ac366e9"></a><!-- doxytag: member="InotifyWatch::InotifyWatch" ref="c9c02f1dbd143eebd711eba03ac366e9" args="(const std::string &rPath, int32_t uMask, bool fEnabled=true)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">InotifyWatch::InotifyWatch </td> + <td>(</td> + <td class="paramtype">const std::string & </td> + <td class="paramname"> <em>rPath</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">int32_t </td> + <td class="paramname"> <em>uMask</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">bool </td> + <td class="paramname"> <em>fEnabled</em> = <code>true</code></td><td> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td><td width="100%"><code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Constructor. +<p> +Creates an inotify watch. Because this watch is inactive it has an invalid descriptor (-1).<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>rPath</em> </td><td>watched file path </td></tr> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>uMask</em> </td><td>mask for events </td></tr> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>fEnabled</em> </td><td>events enabled yes/no </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="871c16b01aa8841b36246e5b629ecaef"></a><!-- doxytag: member="InotifyWatch::~InotifyWatch" ref="871c16b01aa8841b36246e5b629ecaef" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">InotifyWatch::~InotifyWatch </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"><code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Destructor. +<p> + +</div> +</div><p> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="df771e1f81e2a6cc2780c9d2470e34c6"></a><!-- doxytag: member="InotifyWatch::GetDescriptor" ref="df771e1f81e2a6cc2780c9d2470e34c6" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">int32_t InotifyWatch::GetDescriptor </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the watch descriptor. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>watch descriptor; -1 for inactive watch </dd></dl> + +</div> +</div><p> +<a class="anchor" name="89f897a4d98fa54de27730dd8be67966"></a><!-- doxytag: member="InotifyWatch::GetPath" ref="89f897a4d98fa54de27730dd8be67966" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">const std::string& InotifyWatch::GetPath </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the watched file path. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>file path </dd></dl> + +</div> +</div><p> +<a class="anchor" name="bab761a989c9fdf73aaad2a58e1ba7a0"></a><!-- doxytag: member="InotifyWatch::GetMask" ref="bab761a989c9fdf73aaad2a58e1ba7a0" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">uint32_t InotifyWatch::GetMask </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the watch event mask. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>event mask </dd></dl> + +</div> +</div><p> +<a class="anchor" name="3ad7fbc55c21b3fcd08c2d1d388e14b6"></a><!-- doxytag: member="InotifyWatch::SetMask" ref="3ad7fbc55c21b3fcd08c2d1d388e14b6" args="(uint32_t uMask)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void InotifyWatch::SetMask </td> + <td>(</td> + <td class="paramtype">uint32_t </td> + <td class="paramname"> <em>uMask</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Sets the watch event mask. +<p> +If the watch is active (added to an instance of <a class="el" href="classInotify.html">Inotify</a>) this method may fail due to unsuccessful re-setting the watch in the kernel.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>uMask</em> </td><td>event mask</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if changing fails </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="cbf0042d06841f9503405b104e4c35d0"></a><!-- doxytag: member="InotifyWatch::GetInotify" ref="cbf0042d06841f9503405b104e4c35d0" args="()" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname"><a class="el" href="classInotify.html">Inotify</a>* InotifyWatch::GetInotify </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"><code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the appropriate inotify class instance. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>inotify instance </dd></dl> + +</div> +</div><p> +<a class="anchor" name="a71aff8650fadff32a3c655ca50945f1"></a><!-- doxytag: member="InotifyWatch::SetEnabled" ref="a71aff8650fadff32a3c655ca50945f1" args="(bool fEnabled)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">void InotifyWatch::SetEnabled </td> + <td>(</td> + <td class="paramtype">bool </td> + <td class="paramname"> <em>fEnabled</em> </td> + <td> ) </td> + <td width="100%"> throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Enables/disables the watch. +<p> +If the watch is active (added to an instance of <a class="el" href="classInotify.html">Inotify</a>) this method may fail due to unsuccessful re-setting the watch in the kernel.<p> +Re-setting the current state has no effect.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>fEnabled</em> </td><td>set enabled yes/no</td></tr> + </table> +</dl> +<dl compact><dt><b>Exceptions:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html">InotifyException</a></em> </td><td>thrown if enabling/disabling fails </td></tr> + </table> +</dl> + +</div> +</div><p> +<a class="anchor" name="3d2a5c58a07449bc6ff192f6c14c4de0"></a><!-- doxytag: member="InotifyWatch::IsEnabled" ref="3d2a5c58a07449bc6ff192f6c14c4de0" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool InotifyWatch::IsEnabled </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Checks whether the watch is enabled. +<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>true = enables, false = disabled </dd></dl> + +</div> +</div><p> +<a class="anchor" name="1c8ab316b54cb7d1d0b17cbbe6b7d2f8"></a><!-- doxytag: member="InotifyWatch::IsRecursive" ref="1c8ab316b54cb7d1d0b17cbbe6b7d2f8" args="() const" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">bool InotifyWatch::IsRecursive </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> const<code> [inline]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Checks whether the watch is recursive. +<p> +A recursive watch monitors a directory itself and all its subdirectories. This watch is a logical object which may have many underlying kernel watches.<p> +<dl class="return" compact><dt><b>Returns:</b></dt><dd>currently always false (recursive watches not yet supported) </dd></dl> +<dl class="attention" compact><dt><b>Attention:</b></dt><dd>Recursive watches are currently NOT supported. They are planned for future versions. </dd></dl> + +</div> +</div><p> +<hr><h2>Friends And Related Function Documentation</h2> +<a class="anchor" name="94bfb861dc18ca5d16abfcff90db8c86"></a><!-- doxytag: member="InotifyWatch::Inotify" ref="94bfb861dc18ca5d16abfcff90db8c86" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">friend class <a class="el" href="classInotify.html">Inotify</a><code> [friend]</code> </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a><li><a class="el" href="inotify-cxx_8cpp.html">inotify-cxx.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/doxygen.css b/shared/inotify/doc/html/doxygen.css new file mode 100644 index 00000000..c7db1a8a --- /dev/null +++ b/shared/inotify/doc/html/doxygen.css @@ -0,0 +1,358 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; +} +H1 { + text-align: center; + font-size: 160%; +} +H2 { + font-size: 120%; +} +H3 { + font-size: 100%; +} +CAPTION { font-weight: bold } +DIV.qindex { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.nav { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; +} +A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } +A.el { text-decoration: none; font-weight: bold } +A.elRef { font-weight: bold } +A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} +A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} +A.codeRef:link { font-weight: normal; color: #0000FF} +A.codeRef:visited { font-weight: normal; color: #0000FF} +A:hover { text-decoration: none; background-color: #f2f2ff } +DL.el { margin-left: -1cm } +.fragment { + font-family: monospace, fixed; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } + +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #e8eef2; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #e8eef2; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { text-align: center; } +IMG.formulaDsp { } +IMG.formulaInl { vertical-align: middle; } +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +TD.tiny { font-size: 75%; +} +a { + color: #1A41A8; +} +a:visited { + color: #2A3798; +} +.dirtab { padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} +TH.dirtab { background: #e8eef2; + font-weight: bold; +} +HR { height: 1px; + border: none; + border-top: 1px solid black; +} + +/* Style for detailed member documentation */ +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; +} +.memnav { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +.memitem { + padding: 4px; + background-color: #eef3f5; + border-width: 1px; + border-style: solid; + border-color: #dedeee; + -moz-border-radius: 8px 8px 8px 8px; +} +.memname { + white-space: nowrap; + font-weight: bold; +} +.memdoc{ + padding-left: 10px; +} +.memproto { + background-color: #d5e1e8; + width: 100%; + border-width: 1px; + border-style: solid; + border-color: #84b0c7; + font-weight: bold; + -moz-border-radius: 8px 8px 8px 8px; +} +.paramkey { + text-align: right; +} +.paramtype { + white-space: nowrap; +} +.paramname { + color: #602020; + font-style: italic; + white-space: nowrap; +} +/* End Styling for detailed member documentation */ + +/* for the tree view */ +.ftvtree { + font-family: sans-serif; + margin:0.5em; +} +.directory { font-size: 9pt; font-weight: bold; } +.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } +.directory > h3 { margin-top: 0; } +.directory p { margin: 0px; white-space: nowrap; } +.directory div { display: none; margin: 0px; } +.directory img { vertical-align: -30%; } diff --git a/shared/inotify/doc/html/doxygen.png b/shared/inotify/doc/html/doxygen.png Binary files differnew file mode 100644 index 00000000..f0a274bb --- /dev/null +++ b/shared/inotify/doc/html/doxygen.png diff --git a/shared/inotify/doc/html/files.html b/shared/inotify/doc/html/files.html new file mode 100644 index 00000000..de3d916f --- /dev/null +++ b/shared/inotify/doc/html/files.html @@ -0,0 +1,27 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: File Index</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li id="current"><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li id="current"><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul></div> +<h1>inotify-cxx File List</h1>Here is a list of all files with brief descriptions:<table> + <tr><td class="indexkey"><a class="el" href="inotify-cxx_8cpp.html">inotify-cxx.cpp</a></td><td class="indexvalue"><a class="el" href="classInotify.html">Inotify</a> C++ interface implementation </td></tr> + <tr><td class="indexkey"><a class="el" href="inotify-cxx_8h.html">inotify-cxx.h</a> <a href="inotify-cxx_8h-source.html">[code]</a></td><td class="indexvalue"><a class="el" href="classInotify.html">Inotify</a> C++ interface header </td></tr> +</table> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/functions.html b/shared/inotify/doc/html/functions.html new file mode 100644 index 00000000..e6c66f90 --- /dev/null +++ b/shared/inotify/doc/html/functions.html @@ -0,0 +1,178 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Class Members</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li id="current"><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li id="current"><a href="functions.html"><span>All</span></a></li> + <li><a href="functions_func.html"><span>Functions</span></a></li> + <li><a href="functions_vars.html"><span>Variables</span></a></li> + <li><a href="functions_rela.html"><span>Related Functions</span></a></li> + </ul> +</div> +<div class="tabs"> + <ul> + <li><a href="#index_a"><span>a</span></a></li> + <li><a href="#index_c"><span>c</span></a></li> + <li><a href="#index_d"><span>d</span></a></li> + <li><a href="#index_f"><span>f</span></a></li> + <li><a href="#index_g"><span>g</span></a></li> + <li><a href="#index_i"><span>i</span></a></li> + <li><a href="#index_m"><span>m</span></a></li> + <li><a href="#index_p"><span>p</span></a></li> + <li><a href="#index_r"><span>r</span></a></li> + <li><a href="#index_s"><span>s</span></a></li> + <li><a href="#index_w"><span>w</span></a></li> + <li><a href="#index_~"><span>~</span></a></li> + </ul> +</div> + +<p> +Here is a list of all class members with links to the classes they belong to: +<p> +<h3><a class="anchor" name="index_a">- a -</a></h3><ul> +<li>Add() +: <a class="el" href="classInotify.html#2ef771ebaf982d76ebe19b3f5bc9cd83">Inotify</a> +</ul> +<h3><a class="anchor" name="index_c">- c -</a></h3><ul> +<li>Close() +: <a class="el" href="classInotify.html#86ae86c43ea1a72f562ca46393309635">Inotify</a> +</ul> +<h3><a class="anchor" name="index_d">- d -</a></h3><ul> +<li>DumpTypes() +: <a class="el" href="classInotifyEvent.html#c08a0a26ea33dbe94aaf1ac830c103a5">InotifyEvent</a> +</ul> +<h3><a class="anchor" name="index_f">- f -</a></h3><ul> +<li>FindWatch() +: <a class="el" href="classInotify.html#182d19b667c9e0899802b70a579eff40">Inotify</a> +</ul> +<h3><a class="anchor" name="index_g">- g -</a></h3><ul> +<li>GetCapability() +: <a class="el" href="classInotify.html#70b3b57e8661fbb4c5bc404b86225c3b">Inotify</a> +<li>GetCookie() +: <a class="el" href="classInotifyEvent.html#441dfd50abda0e81eb7e4f6d33c68e96">InotifyEvent</a> +<li>GetDescriptor() +: <a class="el" href="classInotify.html#678271faf4799840ad71805163a24b13">Inotify</a> +, <a class="el" href="classInotifyEvent.html#83958af6b634d47173bde81b3bd5bbe6">InotifyEvent</a> +, <a class="el" href="classInotifyWatch.html#df771e1f81e2a6cc2780c9d2470e34c6">InotifyWatch</a> +<li>GetEnabledCount() +: <a class="el" href="classInotify.html#9bf5f7716649d5b5f468c2242fb5e099">Inotify</a> +<li>GetErrorNumber() +: <a class="el" href="classInotifyException.html#3fda7827f1561f610e40bcd217bdc6fe">InotifyException</a> +<li>GetEvent() +: <a class="el" href="classInotify.html#490a3f824c6d041d31ccaabe9bd92008">Inotify</a> +<li>GetEventCount() +: <a class="el" href="classInotify.html#a3c533f956871f904949832ac8f5fbde">Inotify</a> +<li>GetInotify() +: <a class="el" href="classInotifyWatch.html#cbf0042d06841f9503405b104e4c35d0">InotifyWatch</a> +<li>GetLength() +: <a class="el" href="classInotifyEvent.html#111954d74f0320745a68ef030064e987">InotifyEvent</a> +<li>GetMask() +: <a class="el" href="classInotifyEvent.html#2aadeb49530a62b06d98e22c335b1ec8">InotifyEvent</a> +, <a class="el" href="classInotifyWatch.html#bab761a989c9fdf73aaad2a58e1ba7a0">InotifyWatch</a> +<li>GetMaskByName() +: <a class="el" href="classInotifyEvent.html#eced3a88a6dea190c5df19c2a6599010">InotifyEvent</a> +<li>GetMaxEvents() +: <a class="el" href="classInotify.html#d8e4a4a87d005c71c0b5ea9c6dd53c42">Inotify</a> +<li>GetMaxInstances() +: <a class="el" href="classInotify.html#c18b7732f67832260fbbd47aebb8af51">Inotify</a> +<li>GetMaxWatches() +: <a class="el" href="classInotify.html#86dae1b7a72c0d8fc2a632444a0f2f1f">Inotify</a> +<li>GetMessage() +: <a class="el" href="classInotifyException.html#1c19a6c919c76332c95970ce7983d016">InotifyException</a> +<li>GetName() +: <a class="el" href="classInotifyEvent.html#a0524029d360591567c88595cb31df66">InotifyEvent</a> +<li>GetPath() +: <a class="el" href="classInotifyWatch.html#89f897a4d98fa54de27730dd8be67966">InotifyWatch</a> +<li>GetSource() +: <a class="el" href="classInotifyException.html#568200b75da77cc24927922760b3a5d3">InotifyException</a> +<li>GetWatch() +: <a class="el" href="classInotifyEvent.html#979cd46f53ed674331a5a6d47d1cde92">InotifyEvent</a> +<li>GetWatchCount() +: <a class="el" href="classInotify.html#b53b7935bda7425b002946d78bfe5863">Inotify</a> +</ul> +<h3><a class="anchor" name="index_i">- i -</a></h3><ul> +<li>Inotify +: <a class="el" href="classInotifyWatch.html#94bfb861dc18ca5d16abfcff90db8c86">InotifyWatch</a> +, <a class="el" href="classInotify.html#a6fe6e9cb3343665eb968fcd5170cfb9">Inotify</a> +<li>InotifyEvent() +: <a class="el" href="classInotifyEvent.html#6d7f3fc0f51580da4a3ec2348609df64">InotifyEvent</a> +<li>InotifyException() +: <a class="el" href="classInotifyException.html#900dc29e5cfb3ece6c1651d04773b2bb">InotifyException</a> +<li>InotifyWatch +: <a class="el" href="classInotify.html#10880f490c33acd8bd24664fc7bce4ae">Inotify</a> +, <a class="el" href="classInotifyWatch.html#c9c02f1dbd143eebd711eba03ac366e9">InotifyWatch</a> +<li>IsEnabled() +: <a class="el" href="classInotifyWatch.html#3d2a5c58a07449bc6ff192f6c14c4de0">InotifyWatch</a> +<li>IsRecursive() +: <a class="el" href="classInotifyWatch.html#1c8ab316b54cb7d1d0b17cbbe6b7d2f8">InotifyWatch</a> +<li>IsType() +: <a class="el" href="classInotifyEvent.html#309ebf3c5b131522295185a926d551bb">InotifyEvent</a> +</ul> +<h3><a class="anchor" name="index_m">- m -</a></h3><ul> +<li>m_err +: <a class="el" href="classInotifyException.html#aa8a163c661ce70e34b3e3e7ad700854">InotifyException</a> +<li>m_msg +: <a class="el" href="classInotifyException.html#c113719bd6f4352e12876b2322f1c92c">InotifyException</a> +<li>m_pSrc +: <a class="el" href="classInotifyException.html#dd106c2255890025561245cf91fe1427">InotifyException</a> +</ul> +<h3><a class="anchor" name="index_p">- p -</a></h3><ul> +<li>PeekEvent() +: <a class="el" href="classInotify.html#19cde43d082ff92bd02654610019300d">Inotify</a> +</ul> +<h3><a class="anchor" name="index_r">- r -</a></h3><ul> +<li>Remove() +: <a class="el" href="classInotify.html#21c39bb8e5bbc1941b945c18f9005b84">Inotify</a> +<li>RemoveAll() +: <a class="el" href="classInotify.html#bc1fd5830ca561efb69bcd2283981741">Inotify</a> +</ul> +<h3><a class="anchor" name="index_s">- s -</a></h3><ul> +<li>SetCapability() +: <a class="el" href="classInotify.html#734538233ba2136164f76f4df6c3654e">Inotify</a> +<li>SetCloseOnExec() +: <a class="el" href="classInotify.html#124dd5816205900af61034d47ae65255">Inotify</a> +<li>SetEnabled() +: <a class="el" href="classInotifyWatch.html#a71aff8650fadff32a3c655ca50945f1">InotifyWatch</a> +<li>SetMask() +: <a class="el" href="classInotifyWatch.html#3ad7fbc55c21b3fcd08c2d1d388e14b6">InotifyWatch</a> +<li>SetMaxEvents() +: <a class="el" href="classInotify.html#66d90ebfa516d4bd1463749def2b58f9">Inotify</a> +<li>SetMaxInstances() +: <a class="el" href="classInotify.html#620c891962fe5acd26485c64e9b28d19">Inotify</a> +<li>SetMaxWatches() +: <a class="el" href="classInotify.html#5064380cdb4a726ab33f3fa18d15c77a">Inotify</a> +<li>SetNonBlock() +: <a class="el" href="classInotify.html#b2c8ab8ad4322fb6f0dae0eae442402b">Inotify</a> +</ul> +<h3><a class="anchor" name="index_w">- w -</a></h3><ul> +<li>WaitForEvents() +: <a class="el" href="classInotify.html#139c27c6643bb199619f3eae9b32e53b">Inotify</a> +</ul> +<h3><a class="anchor" name="index_~">- ~ -</a></h3><ul> +<li>~Inotify() +: <a class="el" href="classInotify.html#f19dd5e491395673e4798eb9dbf5f682">Inotify</a> +<li>~InotifyEvent() +: <a class="el" href="classInotifyEvent.html#a48030da1d3a1b1741ca791c9e129888">InotifyEvent</a> +<li>~InotifyWatch() +: <a class="el" href="classInotifyWatch.html#871c16b01aa8841b36246e5b629ecaef">InotifyWatch</a> +</ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/functions_func.html b/shared/inotify/doc/html/functions_func.html new file mode 100644 index 00000000..eee3f008 --- /dev/null +++ b/shared/inotify/doc/html/functions_func.html @@ -0,0 +1,167 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Class Members - Functions</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li id="current"><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="functions.html"><span>All</span></a></li> + <li id="current"><a href="functions_func.html"><span>Functions</span></a></li> + <li><a href="functions_vars.html"><span>Variables</span></a></li> + <li><a href="functions_rela.html"><span>Related Functions</span></a></li> + </ul> +</div> +<div class="tabs"> + <ul> + <li><a href="#index_a"><span>a</span></a></li> + <li><a href="#index_c"><span>c</span></a></li> + <li><a href="#index_d"><span>d</span></a></li> + <li><a href="#index_f"><span>f</span></a></li> + <li><a href="#index_g"><span>g</span></a></li> + <li><a href="#index_i"><span>i</span></a></li> + <li><a href="#index_p"><span>p</span></a></li> + <li><a href="#index_r"><span>r</span></a></li> + <li><a href="#index_s"><span>s</span></a></li> + <li><a href="#index_w"><span>w</span></a></li> + <li><a href="#index_~"><span>~</span></a></li> + </ul> +</div> + +<p> + +<p> +<h3><a class="anchor" name="index_a">- a -</a></h3><ul> +<li>Add() +: <a class="el" href="classInotify.html#2ef771ebaf982d76ebe19b3f5bc9cd83">Inotify</a> +</ul> +<h3><a class="anchor" name="index_c">- c -</a></h3><ul> +<li>Close() +: <a class="el" href="classInotify.html#86ae86c43ea1a72f562ca46393309635">Inotify</a> +</ul> +<h3><a class="anchor" name="index_d">- d -</a></h3><ul> +<li>DumpTypes() +: <a class="el" href="classInotifyEvent.html#c08a0a26ea33dbe94aaf1ac830c103a5">InotifyEvent</a> +</ul> +<h3><a class="anchor" name="index_f">- f -</a></h3><ul> +<li>FindWatch() +: <a class="el" href="classInotify.html#182d19b667c9e0899802b70a579eff40">Inotify</a> +</ul> +<h3><a class="anchor" name="index_g">- g -</a></h3><ul> +<li>GetCapability() +: <a class="el" href="classInotify.html#70b3b57e8661fbb4c5bc404b86225c3b">Inotify</a> +<li>GetCookie() +: <a class="el" href="classInotifyEvent.html#441dfd50abda0e81eb7e4f6d33c68e96">InotifyEvent</a> +<li>GetDescriptor() +: <a class="el" href="classInotify.html#678271faf4799840ad71805163a24b13">Inotify</a> +, <a class="el" href="classInotifyEvent.html#83958af6b634d47173bde81b3bd5bbe6">InotifyEvent</a> +, <a class="el" href="classInotifyWatch.html#df771e1f81e2a6cc2780c9d2470e34c6">InotifyWatch</a> +<li>GetEnabledCount() +: <a class="el" href="classInotify.html#9bf5f7716649d5b5f468c2242fb5e099">Inotify</a> +<li>GetErrorNumber() +: <a class="el" href="classInotifyException.html#3fda7827f1561f610e40bcd217bdc6fe">InotifyException</a> +<li>GetEvent() +: <a class="el" href="classInotify.html#490a3f824c6d041d31ccaabe9bd92008">Inotify</a> +<li>GetEventCount() +: <a class="el" href="classInotify.html#a3c533f956871f904949832ac8f5fbde">Inotify</a> +<li>GetInotify() +: <a class="el" href="classInotifyWatch.html#cbf0042d06841f9503405b104e4c35d0">InotifyWatch</a> +<li>GetLength() +: <a class="el" href="classInotifyEvent.html#111954d74f0320745a68ef030064e987">InotifyEvent</a> +<li>GetMask() +: <a class="el" href="classInotifyEvent.html#2aadeb49530a62b06d98e22c335b1ec8">InotifyEvent</a> +, <a class="el" href="classInotifyWatch.html#bab761a989c9fdf73aaad2a58e1ba7a0">InotifyWatch</a> +<li>GetMaskByName() +: <a class="el" href="classInotifyEvent.html#eced3a88a6dea190c5df19c2a6599010">InotifyEvent</a> +<li>GetMaxEvents() +: <a class="el" href="classInotify.html#d8e4a4a87d005c71c0b5ea9c6dd53c42">Inotify</a> +<li>GetMaxInstances() +: <a class="el" href="classInotify.html#c18b7732f67832260fbbd47aebb8af51">Inotify</a> +<li>GetMaxWatches() +: <a class="el" href="classInotify.html#86dae1b7a72c0d8fc2a632444a0f2f1f">Inotify</a> +<li>GetMessage() +: <a class="el" href="classInotifyException.html#1c19a6c919c76332c95970ce7983d016">InotifyException</a> +<li>GetName() +: <a class="el" href="classInotifyEvent.html#a0524029d360591567c88595cb31df66">InotifyEvent</a> +<li>GetPath() +: <a class="el" href="classInotifyWatch.html#89f897a4d98fa54de27730dd8be67966">InotifyWatch</a> +<li>GetSource() +: <a class="el" href="classInotifyException.html#568200b75da77cc24927922760b3a5d3">InotifyException</a> +<li>GetWatch() +: <a class="el" href="classInotifyEvent.html#979cd46f53ed674331a5a6d47d1cde92">InotifyEvent</a> +<li>GetWatchCount() +: <a class="el" href="classInotify.html#b53b7935bda7425b002946d78bfe5863">Inotify</a> +</ul> +<h3><a class="anchor" name="index_i">- i -</a></h3><ul> +<li>Inotify() +: <a class="el" href="classInotify.html#a6fe6e9cb3343665eb968fcd5170cfb9">Inotify</a> +<li>InotifyEvent() +: <a class="el" href="classInotifyEvent.html#f416dbbd4e6ddd3c0eea6cb540f0b046">InotifyEvent</a> +<li>InotifyException() +: <a class="el" href="classInotifyException.html#900dc29e5cfb3ece6c1651d04773b2bb">InotifyException</a> +<li>InotifyWatch() +: <a class="el" href="classInotifyWatch.html#c9c02f1dbd143eebd711eba03ac366e9">InotifyWatch</a> +<li>IsEnabled() +: <a class="el" href="classInotifyWatch.html#3d2a5c58a07449bc6ff192f6c14c4de0">InotifyWatch</a> +<li>IsRecursive() +: <a class="el" href="classInotifyWatch.html#1c8ab316b54cb7d1d0b17cbbe6b7d2f8">InotifyWatch</a> +<li>IsType() +: <a class="el" href="classInotifyEvent.html#309ebf3c5b131522295185a926d551bb">InotifyEvent</a> +</ul> +<h3><a class="anchor" name="index_p">- p -</a></h3><ul> +<li>PeekEvent() +: <a class="el" href="classInotify.html#19cde43d082ff92bd02654610019300d">Inotify</a> +</ul> +<h3><a class="anchor" name="index_r">- r -</a></h3><ul> +<li>Remove() +: <a class="el" href="classInotify.html#21c39bb8e5bbc1941b945c18f9005b84">Inotify</a> +<li>RemoveAll() +: <a class="el" href="classInotify.html#bc1fd5830ca561efb69bcd2283981741">Inotify</a> +</ul> +<h3><a class="anchor" name="index_s">- s -</a></h3><ul> +<li>SetCapability() +: <a class="el" href="classInotify.html#734538233ba2136164f76f4df6c3654e">Inotify</a> +<li>SetCloseOnExec() +: <a class="el" href="classInotify.html#124dd5816205900af61034d47ae65255">Inotify</a> +<li>SetEnabled() +: <a class="el" href="classInotifyWatch.html#a71aff8650fadff32a3c655ca50945f1">InotifyWatch</a> +<li>SetMask() +: <a class="el" href="classInotifyWatch.html#3ad7fbc55c21b3fcd08c2d1d388e14b6">InotifyWatch</a> +<li>SetMaxEvents() +: <a class="el" href="classInotify.html#66d90ebfa516d4bd1463749def2b58f9">Inotify</a> +<li>SetMaxInstances() +: <a class="el" href="classInotify.html#620c891962fe5acd26485c64e9b28d19">Inotify</a> +<li>SetMaxWatches() +: <a class="el" href="classInotify.html#5064380cdb4a726ab33f3fa18d15c77a">Inotify</a> +<li>SetNonBlock() +: <a class="el" href="classInotify.html#b2c8ab8ad4322fb6f0dae0eae442402b">Inotify</a> +</ul> +<h3><a class="anchor" name="index_w">- w -</a></h3><ul> +<li>WaitForEvents() +: <a class="el" href="classInotify.html#139c27c6643bb199619f3eae9b32e53b">Inotify</a> +</ul> +<h3><a class="anchor" name="index_~">- ~ -</a></h3><ul> +<li>~Inotify() +: <a class="el" href="classInotify.html#f19dd5e491395673e4798eb9dbf5f682">Inotify</a> +<li>~InotifyEvent() +: <a class="el" href="classInotifyEvent.html#a48030da1d3a1b1741ca791c9e129888">InotifyEvent</a> +<li>~InotifyWatch() +: <a class="el" href="classInotifyWatch.html#871c16b01aa8841b36246e5b629ecaef">InotifyWatch</a> +</ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/functions_rela.html b/shared/inotify/doc/html/functions_rela.html new file mode 100644 index 00000000..c7108d04 --- /dev/null +++ b/shared/inotify/doc/html/functions_rela.html @@ -0,0 +1,39 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Class Members - Related Functions</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li id="current"><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="functions.html"><span>All</span></a></li> + <li><a href="functions_func.html"><span>Functions</span></a></li> + <li><a href="functions_vars.html"><span>Variables</span></a></li> + <li id="current"><a href="functions_rela.html"><span>Related Functions</span></a></li> + </ul> +</div> + +<p> +<ul> +<li>Inotify +: <a class="el" href="classInotifyWatch.html#94bfb861dc18ca5d16abfcff90db8c86">InotifyWatch</a> +<li>InotifyWatch +: <a class="el" href="classInotify.html#10880f490c33acd8bd24664fc7bce4ae">Inotify</a> +</ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/functions_vars.html b/shared/inotify/doc/html/functions_vars.html new file mode 100644 index 00000000..56dfc9b5 --- /dev/null +++ b/shared/inotify/doc/html/functions_vars.html @@ -0,0 +1,41 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Class Members - Variables</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li id="current"><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="annotated.html"><span>Class List</span></a></li> + <li id="current"><a href="functions.html"><span>Class Members</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="functions.html"><span>All</span></a></li> + <li><a href="functions_func.html"><span>Functions</span></a></li> + <li id="current"><a href="functions_vars.html"><span>Variables</span></a></li> + <li><a href="functions_rela.html"><span>Related Functions</span></a></li> + </ul> +</div> + +<p> +<ul> +<li>m_err +: <a class="el" href="classInotifyException.html#aa8a163c661ce70e34b3e3e7ad700854">InotifyException</a> +<li>m_msg +: <a class="el" href="classInotifyException.html#c113719bd6f4352e12876b2322f1c92c">InotifyException</a> +<li>m_pSrc +: <a class="el" href="classInotifyException.html#dd106c2255890025561245cf91fe1427">InotifyException</a> +</ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/globals.html b/shared/inotify/doc/html/globals.html new file mode 100644 index 00000000..c7601336 --- /dev/null +++ b/shared/inotify/doc/html/globals.html @@ -0,0 +1,76 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Class Members</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li id="current"><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="files.html"><span>File List</span></a></li> + <li id="current"><a href="globals.html"><span>File Members</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li id="current"><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Defines</span></a></li> + </ul> +</div> +Here is a list of all file members with links to the files they belong to: +<p> +<ul> +<li>DUMP_SEP +: <a class="el" href="inotify-cxx_8cpp.html#6e5d8f74743466e712bbaf3b1de1e93d">inotify-cxx.cpp</a> +<li>IN_EXC_MSG +: <a class="el" href="inotify-cxx_8h.html#fe6b93f7e09db7022f1f9dd102932e12">inotify-cxx.h</a> +<li>IN_LOCK_DECL +: <a class="el" href="inotify-cxx_8h.html#904d25c0fd931e1bad4f9d5cd346a766">inotify-cxx.h</a> +<li>IN_LOCK_DONE +: <a class="el" href="inotify-cxx_8h.html#08422ec66fb587c1684afbaa575a53dd">inotify-cxx.h</a> +<li>IN_LOCK_INIT +: <a class="el" href="inotify-cxx_8h.html#981aa546075fba39715fd2f63a41f575">inotify-cxx.h</a> +<li>IN_MAX_EVENTS +: <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1">inotify-cxx.h</a> +<li>IN_MAX_INSTANCES +: <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9">inotify-cxx.h</a> +<li>IN_MAX_WATCHES +: <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429">inotify-cxx.h</a> +<li>IN_READ_BEGIN +: <a class="el" href="inotify-cxx_8h.html#963a97dc42487e86715b4e04639b0db8">inotify-cxx.h</a> +<li>IN_READ_END +: <a class="el" href="inotify-cxx_8h.html#0b82080ab6709175341b97e1f3c3955d">inotify-cxx.h</a> +<li>IN_READ_END_NOTHROW +: <a class="el" href="inotify-cxx_8h.html#5c6a5be1898ef17662795cc4b420c851">inotify-cxx.h</a> +<li>IN_WATCH_MAP +: <a class="el" href="inotify-cxx_8h.html#e6b5ebcb4e0d6a9f5ca8da26bc00cc2a">inotify-cxx.h</a> +<li>IN_WP_MAP +: <a class="el" href="inotify-cxx_8h.html#5dd7761ff5a6b7cc7271950aebb7ddf6">inotify-cxx.h</a> +<li>IN_WRITE_BEGIN +: <a class="el" href="inotify-cxx_8h.html#c3a6d87ace9403f7ac58f931bbcd9599">inotify-cxx.h</a> +<li>IN_WRITE_END +: <a class="el" href="inotify-cxx_8h.html#f8aeac51b3b4ef56f1791c5c1a2e9cf5">inotify-cxx.h</a> +<li>IN_WRITE_END_NOTHROW +: <a class="el" href="inotify-cxx_8h.html#7e68c4884137939c5e3301f40c198dc7">inotify-cxx.h</a> +<li>INOTIFY_BUFLEN +: <a class="el" href="inotify-cxx_8h.html#a84911f8e42d71161b60d4a28940abb4">inotify-cxx.h</a> +<li>INOTIFY_EVENT_SIZE +: <a class="el" href="inotify-cxx_8h.html#f64b4cc985ba26f31a9cb242153a5014">inotify-cxx.h</a> +<li>InotifyCapability_t +: <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">inotify-cxx.h</a> +<li>PROCFS_INOTIFY_BASE +: <a class="el" href="inotify-cxx_8cpp.html#481097f28678020b2cbb26dd071a0085">inotify-cxx.cpp</a> +</ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/globals_defs.html b/shared/inotify/doc/html/globals_defs.html new file mode 100644 index 00000000..33cb5703 --- /dev/null +++ b/shared/inotify/doc/html/globals_defs.html @@ -0,0 +1,64 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Class Members</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li id="current"><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="files.html"><span>File List</span></a></li> + <li id="current"><a href="globals.html"><span>File Members</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li id="current"><a href="globals_defs.html"><span>Defines</span></a></li> + </ul> +</div> + +<p> +<ul> +<li>DUMP_SEP +: <a class="el" href="inotify-cxx_8cpp.html#6e5d8f74743466e712bbaf3b1de1e93d">inotify-cxx.cpp</a> +<li>IN_EXC_MSG +: <a class="el" href="inotify-cxx_8h.html#fe6b93f7e09db7022f1f9dd102932e12">inotify-cxx.h</a> +<li>IN_LOCK_DECL +: <a class="el" href="inotify-cxx_8h.html#904d25c0fd931e1bad4f9d5cd346a766">inotify-cxx.h</a> +<li>IN_LOCK_DONE +: <a class="el" href="inotify-cxx_8h.html#08422ec66fb587c1684afbaa575a53dd">inotify-cxx.h</a> +<li>IN_LOCK_INIT +: <a class="el" href="inotify-cxx_8h.html#981aa546075fba39715fd2f63a41f575">inotify-cxx.h</a> +<li>IN_READ_BEGIN +: <a class="el" href="inotify-cxx_8h.html#963a97dc42487e86715b4e04639b0db8">inotify-cxx.h</a> +<li>IN_READ_END +: <a class="el" href="inotify-cxx_8h.html#0b82080ab6709175341b97e1f3c3955d">inotify-cxx.h</a> +<li>IN_READ_END_NOTHROW +: <a class="el" href="inotify-cxx_8h.html#5c6a5be1898ef17662795cc4b420c851">inotify-cxx.h</a> +<li>IN_WRITE_BEGIN +: <a class="el" href="inotify-cxx_8h.html#c3a6d87ace9403f7ac58f931bbcd9599">inotify-cxx.h</a> +<li>IN_WRITE_END +: <a class="el" href="inotify-cxx_8h.html#f8aeac51b3b4ef56f1791c5c1a2e9cf5">inotify-cxx.h</a> +<li>IN_WRITE_END_NOTHROW +: <a class="el" href="inotify-cxx_8h.html#7e68c4884137939c5e3301f40c198dc7">inotify-cxx.h</a> +<li>INOTIFY_BUFLEN +: <a class="el" href="inotify-cxx_8h.html#a84911f8e42d71161b60d4a28940abb4">inotify-cxx.h</a> +<li>INOTIFY_EVENT_SIZE +: <a class="el" href="inotify-cxx_8h.html#f64b4cc985ba26f31a9cb242153a5014">inotify-cxx.h</a> +<li>PROCFS_INOTIFY_BASE +: <a class="el" href="inotify-cxx_8cpp.html#481097f28678020b2cbb26dd071a0085">inotify-cxx.cpp</a> +</ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/globals_enum.html b/shared/inotify/doc/html/globals_enum.html new file mode 100644 index 00000000..f5505c8a --- /dev/null +++ b/shared/inotify/doc/html/globals_enum.html @@ -0,0 +1,38 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Class Members</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li id="current"><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="files.html"><span>File List</span></a></li> + <li id="current"><a href="globals.html"><span>File Members</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li id="current"><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Defines</span></a></li> + </ul> +</div> + +<p> +<ul> +<li>InotifyCapability_t +: <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">inotify-cxx.h</a> +</ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/globals_eval.html b/shared/inotify/doc/html/globals_eval.html new file mode 100644 index 00000000..3e27eec9 --- /dev/null +++ b/shared/inotify/doc/html/globals_eval.html @@ -0,0 +1,42 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Class Members</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li id="current"><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="files.html"><span>File List</span></a></li> + <li id="current"><a href="globals.html"><span>File Members</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="globals.html"><span>All</span></a></li> + <li><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li id="current"><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Defines</span></a></li> + </ul> +</div> + +<p> +<ul> +<li>IN_MAX_EVENTS +: <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1">inotify-cxx.h</a> +<li>IN_MAX_INSTANCES +: <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9">inotify-cxx.h</a> +<li>IN_MAX_WATCHES +: <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429">inotify-cxx.h</a> +</ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/globals_type.html b/shared/inotify/doc/html/globals_type.html new file mode 100644 index 00000000..1e371ed2 --- /dev/null +++ b/shared/inotify/doc/html/globals_type.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Class Members</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li id="current"><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="files.html"><span>File List</span></a></li> + <li id="current"><a href="globals.html"><span>File Members</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="globals.html"><span>All</span></a></li> + <li id="current"><a href="globals_type.html"><span>Typedefs</span></a></li> + <li><a href="globals_enum.html"><span>Enumerations</span></a></li> + <li><a href="globals_eval.html"><span>Enumerator</span></a></li> + <li><a href="globals_defs.html"><span>Defines</span></a></li> + </ul> +</div> + +<p> +<ul> +<li>IN_WATCH_MAP +: <a class="el" href="inotify-cxx_8h.html#e6b5ebcb4e0d6a9f5ca8da26bc00cc2a">inotify-cxx.h</a> +<li>IN_WP_MAP +: <a class="el" href="inotify-cxx_8h.html#5dd7761ff5a6b7cc7271950aebb7ddf6">inotify-cxx.h</a> +</ul> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/index.html b/shared/inotify/doc/html/index.html new file mode 100644 index 00000000..aa2d9b87 --- /dev/null +++ b/shared/inotify/doc/html/index.html @@ -0,0 +1,20 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: Main Page</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li id="current"><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li><a href="files.html"><span>Files</span></a></li> + </ul></div> +<h1>inotify-cxx Documentation</h1> +<p> +<h3 align="center">0.7.2 </h3><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/inotify-cxx_8cpp.html b/shared/inotify/doc/html/inotify-cxx_8cpp.html new file mode 100644 index 00000000..3fdd5140 --- /dev/null +++ b/shared/inotify/doc/html/inotify-cxx_8cpp.html @@ -0,0 +1,90 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: inotify-cxx.cpp File Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li id="current"><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul></div> +<h1>inotify-cxx.cpp File Reference</h1>inotify C++ interface implementation <a href="#_details">More...</a> +<p> +<code>#include <errno.h></code><br> +<code>#include <unistd.h></code><br> +<code>#include <fcntl.h></code><br> +<code>#include "<a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a>"</code><br> +<table border="0" cellpadding="0" cellspacing="0"> +<tr><td></td></tr> +<tr><td colspan="2"><br><h2>Defines</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8cpp.html#481097f28678020b2cbb26dd071a0085">PROCFS_INOTIFY_BASE</a> "/proc/sys/fs/inotify/"</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">procfs inotify base path <a href="#481097f28678020b2cbb26dd071a0085"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8cpp.html#6e5d8f74743466e712bbaf3b1de1e93d">DUMP_SEP</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">dump separator (between particular entries) <a href="#6e5d8f74743466e712bbaf3b1de1e93d"></a><br></td></tr> +</table> +<hr><a name="_details"></a><h2>Detailed Description</h2> +inotify C++ interface implementation +<p> +inotify C++ interface<p> +Copyright (C) 2006, 2007 Lukas Jelinek <<a href="mailto:lukas@aiken.cz">lukas@aiken.cz</a>><p> +This program is free software; you can redistribute it and/or modify it under the terms of one of the following licenses:<p> +<ul> +<li>1. X11-style license (see LICENSE-X11) </li> +<li>2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) </li> +<li>3. GNU General Public License, version 2 (see LICENSE-GPL)</li> +</ul> +If you want to help with choosing the best license for you, please visit <a href="http://www.gnu.org/licenses/license-list.html.">http://www.gnu.org/licenses/license-list.html.</a> <hr><h2>Define Documentation</h2> +<a class="anchor" name="6e5d8f74743466e712bbaf3b1de1e93d"></a><!-- doxytag: member="inotify-cxx.cpp::DUMP_SEP" ref="6e5d8f74743466e712bbaf3b1de1e93d" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define DUMP_SEP </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +<b>Value:</b><div class="fragment"><pre class="fragment">({ \ + <span class="keywordflow">if</span> (!rStr.empty()) { \ + rStr.append(<span class="stringliteral">","</span>); \ + } \ + }) +</pre></div>dump separator (between particular entries) +<p> + +</div> +</div><p> +<a class="anchor" name="481097f28678020b2cbb26dd071a0085"></a><!-- doxytag: member="inotify-cxx.cpp::PROCFS_INOTIFY_BASE" ref="481097f28678020b2cbb26dd071a0085" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define PROCFS_INOTIFY_BASE "/proc/sys/fs/inotify/" </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +procfs inotify base path +<p> + +</div> +</div><p> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/inotify-cxx_8h-source.html b/shared/inotify/doc/html/inotify-cxx_8h-source.html new file mode 100644 index 00000000..5500b217 --- /dev/null +++ b/shared/inotify/doc/html/inotify-cxx_8h-source.html @@ -0,0 +1,505 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: inotify-cxx.h Source File</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li id="current"><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul></div> +<h1>inotify-cxx.h</h1><a href="inotify-cxx_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 +<a name="l00003"></a>00003 +<a name="l00026"></a>00026 <span class="preprocessor">#ifndef _INOTIFYCXX_H_</span> +<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define _INOTIFYCXX_H_</span> +<a name="l00028"></a>00028 <span class="preprocessor"></span> +<a name="l00029"></a>00029 <span class="preprocessor">#include <stdint.h></span> +<a name="l00030"></a>00030 <span class="preprocessor">#include <string></span> +<a name="l00031"></a>00031 <span class="preprocessor">#include <deque></span> +<a name="l00032"></a>00032 <span class="preprocessor">#include <map></span> +<a name="l00033"></a>00033 +<a name="l00034"></a>00034 <span class="comment">// Please ensure that the following headers take the right place</span> +<a name="l00035"></a>00035 <span class="preprocessor">#include <sys/syscall.h></span> +<a name="l00036"></a>00036 <span class="preprocessor">#include <sys/inotify.h></span> +<a name="l00037"></a>00037 +<a name="l00038"></a>00038 <span class="comment">// Use this if syscalls not defined</span> +<a name="l00039"></a>00039 <span class="preprocessor">#ifndef __NR_inotify_init</span> +<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#include <sys/inotify-syscalls.h></span> +<a name="l00041"></a>00041 <span class="preprocessor">#endif // __NR_inotify_init</span> +<a name="l00042"></a>00042 <span class="preprocessor"></span> +<a name="l00044"></a><a class="code" href="inotify-cxx_8h.html#f64b4cc985ba26f31a9cb242153a5014">00044</a> <span class="preprocessor">#define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event))</span> +<a name="l00045"></a>00045 <span class="preprocessor"></span> +<a name="l00047"></a><a class="code" href="inotify-cxx_8h.html#a84911f8e42d71161b60d4a28940abb4">00047</a> <span class="preprocessor">#define INOTIFY_BUFLEN (1024 * (INOTIFY_EVENT_SIZE + 16))</span> +<a name="l00048"></a>00048 <span class="preprocessor"></span> +<a name="l00050"></a>00050 +<a name="l00053"></a><a class="code" href="inotify-cxx_8h.html#fe6b93f7e09db7022f1f9dd102932e12">00053</a> <span class="preprocessor">#define IN_EXC_MSG(msg) (std::string(__PRETTY_FUNCTION__) + ": " + msg)</span> +<a name="l00054"></a>00054 <span class="preprocessor"></span> +<a name="l00056"></a><a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">00056</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> +<a name="l00057"></a>00057 { +<a name="l00058"></a>00058 <a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1">IN_MAX_EVENTS</a> = 0, +<a name="l00059"></a>00059 <a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9">IN_MAX_INSTANCES</a> = 1, +<a name="l00060"></a><a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429">00060</a> <a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429">IN_MAX_WATCHES</a> = 2 +<a name="l00061"></a>00061 } <a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a>; +<a name="l00062"></a>00062 +<a name="l00064"></a>00064 +<a name="l00082"></a>00082 <span class="preprocessor">#ifdef INOTIFY_THREAD_SAFE</span> +<a name="l00083"></a>00083 <span class="preprocessor"></span> +<a name="l00084"></a>00084 <span class="preprocessor">#include <pthread.h></span> +<a name="l00085"></a>00085 +<a name="l00086"></a>00086 <span class="preprocessor">#define IN_LOCK_DECL mutable pthread_rwlock_t __m_lock;</span> +<a name="l00087"></a>00087 <span class="preprocessor"></span> +<a name="l00088"></a>00088 <span class="preprocessor">#define IN_LOCK_INIT \</span> +<a name="l00089"></a>00089 <span class="preprocessor"> { \</span> +<a name="l00090"></a>00090 <span class="preprocessor"> pthread_rwlockattr_t attr; \</span> +<a name="l00091"></a>00091 <span class="preprocessor"> int res = 0; \</span> +<a name="l00092"></a>00092 <span class="preprocessor"> if ((res = pthread_rwlockattr_init(&attr)) != 0) \</span> +<a name="l00093"></a>00093 <span class="preprocessor"> throw InotifyException(IN_EXC_MSG("cannot initialize lock attributes"), res, this); \</span> +<a name="l00094"></a>00094 <span class="preprocessor"> if ((res = pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NP)) != 0) \</span> +<a name="l00095"></a>00095 <span class="preprocessor"> throw InotifyException(IN_EXC_MSG("cannot set lock kind"), res, this); \</span> +<a name="l00096"></a>00096 <span class="preprocessor"> if ((res = pthread_rwlock_init(&__m_lock, &attr)) != 0) \</span> +<a name="l00097"></a>00097 <span class="preprocessor"> throw InotifyException(IN_EXC_MSG("cannot initialize lock"), res, this); \</span> +<a name="l00098"></a>00098 <span class="preprocessor"> pthread_rwlockattr_destroy(&attr); \</span> +<a name="l00099"></a>00099 <span class="preprocessor"> }</span> +<a name="l00100"></a>00100 <span class="preprocessor"></span> +<a name="l00101"></a>00101 <span class="preprocessor">#define IN_LOCK_DONE pthread_rwlock_destroy(&__m_lock);</span> +<a name="l00102"></a>00102 <span class="preprocessor"></span> +<a name="l00103"></a>00103 <span class="preprocessor">#define IN_READ_BEGIN \</span> +<a name="l00104"></a>00104 <span class="preprocessor"> { \</span> +<a name="l00105"></a>00105 <span class="preprocessor"> int res = pthread_rwlock_rdlock(&__m_lock); \</span> +<a name="l00106"></a>00106 <span class="preprocessor"> if (res != 0) \</span> +<a name="l00107"></a>00107 <span class="preprocessor"> throw InotifyException(IN_EXC_MSG("locking for reading failed"), res, (void*) this); \</span> +<a name="l00108"></a>00108 <span class="preprocessor"> }</span> +<a name="l00109"></a>00109 <span class="preprocessor"></span> +<a name="l00110"></a>00110 <span class="preprocessor">#define IN_READ_END \</span> +<a name="l00111"></a>00111 <span class="preprocessor"> { \</span> +<a name="l00112"></a>00112 <span class="preprocessor"> int res = pthread_rwlock_unlock(&__m_lock); \</span> +<a name="l00113"></a>00113 <span class="preprocessor"> if (res != 0) \</span> +<a name="l00114"></a>00114 <span class="preprocessor"> throw InotifyException(IN_EXC_MSG("unlocking failed"), res, (void*) this); \</span> +<a name="l00115"></a>00115 <span class="preprocessor"> }</span> +<a name="l00116"></a>00116 <span class="preprocessor"></span> +<a name="l00117"></a>00117 <span class="preprocessor">#define IN_READ_END_NOTHROW pthread_rwlock_unlock(&__m_lock);</span> +<a name="l00118"></a>00118 <span class="preprocessor"></span> +<a name="l00119"></a>00119 <span class="preprocessor">#define IN_WRITE_BEGIN \</span> +<a name="l00120"></a>00120 <span class="preprocessor"> { \</span> +<a name="l00121"></a>00121 <span class="preprocessor"> int res = pthread_rwlock_wrlock(&__m_lock); \</span> +<a name="l00122"></a>00122 <span class="preprocessor"> if (res != 0) \</span> +<a name="l00123"></a>00123 <span class="preprocessor"> throw InotifyException(IN_EXC_MSG("locking for writing failed"), res, (void*) this); \</span> +<a name="l00124"></a>00124 <span class="preprocessor"> }</span> +<a name="l00125"></a>00125 <span class="preprocessor"></span> +<a name="l00126"></a>00126 <span class="preprocessor">#define IN_WRITE_END IN_READ_END</span> +<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#define IN_WRITE_END_NOTHROW IN_READ_END_NOTHROW</span> +<a name="l00128"></a>00128 <span class="preprocessor"></span> +<a name="l00129"></a>00129 <span class="preprocessor">#else // INOTIFY_THREAD_SAFE</span> +<a name="l00130"></a>00130 <span class="preprocessor"></span> +<a name="l00131"></a><a class="code" href="inotify-cxx_8h.html#904d25c0fd931e1bad4f9d5cd346a766">00131</a> <span class="preprocessor">#define IN_LOCK_DECL</span> +<a name="l00132"></a><a class="code" href="inotify-cxx_8h.html#981aa546075fba39715fd2f63a41f575">00132</a> <span class="preprocessor"></span><span class="preprocessor">#define IN_LOCK_INIT</span> +<a name="l00133"></a><a class="code" href="inotify-cxx_8h.html#08422ec66fb587c1684afbaa575a53dd">00133</a> <span class="preprocessor"></span><span class="preprocessor">#define IN_LOCK_DONE</span> +<a name="l00134"></a><a class="code" href="inotify-cxx_8h.html#963a97dc42487e86715b4e04639b0db8">00134</a> <span class="preprocessor"></span><span class="preprocessor">#define IN_READ_BEGIN</span> +<a name="l00135"></a><a class="code" href="inotify-cxx_8h.html#0b82080ab6709175341b97e1f3c3955d">00135</a> <span class="preprocessor"></span><span class="preprocessor">#define IN_READ_END</span> +<a name="l00136"></a><a class="code" href="inotify-cxx_8h.html#5c6a5be1898ef17662795cc4b420c851">00136</a> <span class="preprocessor"></span><span class="preprocessor">#define IN_READ_END_NOTHROW</span> +<a name="l00137"></a><a class="code" href="inotify-cxx_8h.html#c3a6d87ace9403f7ac58f931bbcd9599">00137</a> <span class="preprocessor"></span><span class="preprocessor">#define IN_WRITE_BEGIN</span> +<a name="l00138"></a><a class="code" href="inotify-cxx_8h.html#f8aeac51b3b4ef56f1791c5c1a2e9cf5">00138</a> <span class="preprocessor"></span><span class="preprocessor">#define IN_WRITE_END</span> +<a name="l00139"></a><a class="code" href="inotify-cxx_8h.html#7e68c4884137939c5e3301f40c198dc7">00139</a> <span class="preprocessor"></span><span class="preprocessor">#define IN_WRITE_END_NOTHROW</span> +<a name="l00140"></a>00140 <span class="preprocessor"></span> +<a name="l00141"></a>00141 <span class="preprocessor">#endif // INOTIFY_THREAD_SAFE</span> +<a name="l00142"></a>00142 <span class="preprocessor"></span> +<a name="l00143"></a>00143 +<a name="l00144"></a>00144 +<a name="l00145"></a>00145 +<a name="l00146"></a>00146 <span class="comment">// forward declaration</span> +<a name="l00147"></a>00147 <span class="keyword">class </span><a class="code" href="classInotifyWatch.html">InotifyWatch</a>; +<a name="l00148"></a>00148 <span class="keyword">class </span><a class="code" href="classInotify.html">Inotify</a>; +<a name="l00149"></a>00149 +<a name="l00150"></a>00150 +<a name="l00152"></a>00152 +<a name="l00160"></a><a class="code" href="classInotifyException.html">00160</a> <span class="keyword">class </span><a class="code" href="classInotifyException.html">InotifyException</a> +<a name="l00161"></a>00161 { +<a name="l00162"></a>00162 <span class="keyword">public</span>: +<a name="l00164"></a>00164 +<a name="l00169"></a><a class="code" href="classInotifyException.html#900dc29e5cfb3ece6c1651d04773b2bb">00169</a> <a class="code" href="classInotifyException.html#900dc29e5cfb3ece6c1651d04773b2bb">InotifyException</a>(<span class="keyword">const</span> std::string& rMsg = <span class="stringliteral">""</span>, <span class="keywordtype">int</span> iErr = 0, <span class="keywordtype">void</span>* pSrc = NULL) +<a name="l00170"></a>00170 : <a class="code" href="classInotifyException.html#c113719bd6f4352e12876b2322f1c92c">m_msg</a>(rMsg), +<a name="l00171"></a>00171 <a class="code" href="classInotifyException.html#aa8a163c661ce70e34b3e3e7ad700854">m_err</a>(iErr) +<a name="l00172"></a>00172 { +<a name="l00173"></a>00173 <a class="code" href="classInotifyException.html#dd106c2255890025561245cf91fe1427">m_pSrc</a> = pSrc; +<a name="l00174"></a>00174 } +<a name="l00175"></a>00175 +<a name="l00177"></a>00177 +<a name="l00180"></a><a class="code" href="classInotifyException.html#1c19a6c919c76332c95970ce7983d016">00180</a> <span class="keyword">inline</span> <span class="keyword">const</span> std::string& <a class="code" href="classInotifyException.html#1c19a6c919c76332c95970ce7983d016">GetMessage</a>()<span class="keyword"> const</span> +<a name="l00181"></a>00181 <span class="keyword"> </span>{ +<a name="l00182"></a>00182 <span class="keywordflow">return</span> <a class="code" href="classInotifyException.html#c113719bd6f4352e12876b2322f1c92c">m_msg</a>; +<a name="l00183"></a>00183 } +<a name="l00184"></a>00184 +<a name="l00186"></a>00186 +<a name="l00191"></a><a class="code" href="classInotifyException.html#3fda7827f1561f610e40bcd217bdc6fe">00191</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classInotifyException.html#3fda7827f1561f610e40bcd217bdc6fe">GetErrorNumber</a>()<span class="keyword"> const</span> +<a name="l00192"></a>00192 <span class="keyword"> </span>{ +<a name="l00193"></a>00193 <span class="keywordflow">return</span> <a class="code" href="classInotifyException.html#aa8a163c661ce70e34b3e3e7ad700854">m_err</a>; +<a name="l00194"></a>00194 } +<a name="l00195"></a>00195 +<a name="l00197"></a>00197 +<a name="l00200"></a><a class="code" href="classInotifyException.html#568200b75da77cc24927922760b3a5d3">00200</a> <span class="keyword">inline</span> <span class="keywordtype">void</span>* <a class="code" href="classInotifyException.html#568200b75da77cc24927922760b3a5d3">GetSource</a>()<span class="keyword"> const</span> +<a name="l00201"></a>00201 <span class="keyword"> </span>{ +<a name="l00202"></a>00202 <span class="keywordflow">return</span> <a class="code" href="classInotifyException.html#dd106c2255890025561245cf91fe1427">m_pSrc</a>; +<a name="l00203"></a>00203 } +<a name="l00204"></a>00204 +<a name="l00205"></a>00205 <span class="keyword">protected</span>: +<a name="l00206"></a><a class="code" href="classInotifyException.html#c113719bd6f4352e12876b2322f1c92c">00206</a> std::string <a class="code" href="classInotifyException.html#c113719bd6f4352e12876b2322f1c92c">m_msg</a>; +<a name="l00207"></a><a class="code" href="classInotifyException.html#aa8a163c661ce70e34b3e3e7ad700854">00207</a> <span class="keywordtype">int</span> <a class="code" href="classInotifyException.html#aa8a163c661ce70e34b3e3e7ad700854">m_err</a>; +<a name="l00208"></a><a class="code" href="classInotifyException.html#dd106c2255890025561245cf91fe1427">00208</a> <span class="keyword">mutable</span> <span class="keywordtype">void</span>* <a class="code" href="classInotifyException.html#dd106c2255890025561245cf91fe1427">m_pSrc</a>; +<a name="l00209"></a>00209 }; +<a name="l00210"></a>00210 +<a name="l00211"></a>00211 +<a name="l00213"></a>00213 +<a name="l00221"></a><a class="code" href="classInotifyEvent.html">00221</a> <span class="keyword">class </span><a class="code" href="classInotifyEvent.html">InotifyEvent</a> +<a name="l00222"></a>00222 { +<a name="l00223"></a>00223 <span class="keyword">public</span>: +<a name="l00225"></a>00225 +<a name="l00228"></a><a class="code" href="classInotifyEvent.html#f416dbbd4e6ddd3c0eea6cb540f0b046">00228</a> <a class="code" href="classInotifyEvent.html#f416dbbd4e6ddd3c0eea6cb540f0b046">InotifyEvent</a>() +<a name="l00229"></a>00229 : m_uMask(0), +<a name="l00230"></a>00230 m_uCookie(0) +<a name="l00231"></a>00231 { +<a name="l00232"></a>00232 m_pWatch = NULL; +<a name="l00233"></a>00233 } +<a name="l00234"></a>00234 +<a name="l00236"></a>00236 +<a name="l00243"></a><a class="code" href="classInotifyEvent.html#6d7f3fc0f51580da4a3ec2348609df64">00243</a> <a class="code" href="classInotifyEvent.html#f416dbbd4e6ddd3c0eea6cb540f0b046">InotifyEvent</a>(<span class="keyword">const</span> <span class="keyword">struct</span> inotify_event* pEvt, <a class="code" href="classInotifyWatch.html">InotifyWatch</a>* pWatch) +<a name="l00244"></a>00244 : m_uMask(0), +<a name="l00245"></a>00245 m_uCookie(0) +<a name="l00246"></a>00246 { +<a name="l00247"></a>00247 <span class="keywordflow">if</span> (pEvt != NULL) { +<a name="l00248"></a>00248 m_uMask = (uint32_t) pEvt->mask; +<a name="l00249"></a>00249 m_uCookie = (uint32_t) pEvt->cookie; +<a name="l00250"></a>00250 <span class="keywordflow">if</span> (pEvt->name != NULL) { +<a name="l00251"></a>00251 m_name = pEvt->len > 0 +<a name="l00252"></a>00252 ? pEvt->name +<a name="l00253"></a>00253 : <span class="stringliteral">""</span>; +<a name="l00254"></a>00254 } +<a name="l00255"></a>00255 m_pWatch = pWatch; +<a name="l00256"></a>00256 } +<a name="l00257"></a>00257 <span class="keywordflow">else</span> { +<a name="l00258"></a>00258 m_pWatch = NULL; +<a name="l00259"></a>00259 } +<a name="l00260"></a>00260 } +<a name="l00261"></a>00261 +<a name="l00263"></a><a class="code" href="classInotifyEvent.html#a48030da1d3a1b1741ca791c9e129888">00263</a> <a class="code" href="classInotifyEvent.html#a48030da1d3a1b1741ca791c9e129888">~InotifyEvent</a>() {} +<a name="l00264"></a>00264 +<a name="l00266"></a>00266 +<a name="l00271"></a>00271 int32_t <a class="code" href="classInotifyEvent.html#83958af6b634d47173bde81b3bd5bbe6">GetDescriptor</a>() <span class="keyword">const</span>; +<a name="l00272"></a>00272 +<a name="l00274"></a>00274 +<a name="l00279"></a><a class="code" href="classInotifyEvent.html#2aadeb49530a62b06d98e22c335b1ec8">00279</a> <span class="keyword">inline</span> uint32_t <a class="code" href="classInotifyEvent.html#2aadeb49530a62b06d98e22c335b1ec8">GetMask</a>()<span class="keyword"> const</span> +<a name="l00280"></a>00280 <span class="keyword"> </span>{ +<a name="l00281"></a>00281 <span class="keywordflow">return</span> m_uMask; +<a name="l00282"></a>00282 } +<a name="l00283"></a>00283 +<a name="l00285"></a>00285 +<a name="l00290"></a><a class="code" href="classInotifyEvent.html#309ebf3c5b131522295185a926d551bb">00290</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classInotifyEvent.html#309ebf3c5b131522295185a926d551bb">IsType</a>(uint32_t uValue, uint32_t uType) +<a name="l00291"></a>00291 { +<a name="l00292"></a>00292 <span class="keywordflow">return</span> ((uValue & uType) != 0) && ((~uValue & uType) == 0); +<a name="l00293"></a>00293 } +<a name="l00294"></a>00294 +<a name="l00296"></a>00296 +<a name="l00300"></a><a class="code" href="classInotifyEvent.html#7fdee6664ec63ccc87ff1221abba9abc">00300</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classInotifyEvent.html#309ebf3c5b131522295185a926d551bb">IsType</a>(uint32_t uType)<span class="keyword"> const</span> +<a name="l00301"></a>00301 <span class="keyword"> </span>{ +<a name="l00302"></a>00302 <span class="keywordflow">return</span> <a class="code" href="classInotifyEvent.html#309ebf3c5b131522295185a926d551bb">IsType</a>(m_uMask, uType); +<a name="l00303"></a>00303 } +<a name="l00304"></a>00304 +<a name="l00306"></a>00306 +<a name="l00309"></a><a class="code" href="classInotifyEvent.html#441dfd50abda0e81eb7e4f6d33c68e96">00309</a> <span class="keyword">inline</span> uint32_t <a class="code" href="classInotifyEvent.html#441dfd50abda0e81eb7e4f6d33c68e96">GetCookie</a>()<span class="keyword"> const</span> +<a name="l00310"></a>00310 <span class="keyword"> </span>{ +<a name="l00311"></a>00311 <span class="keywordflow">return</span> m_uCookie; +<a name="l00312"></a>00312 } +<a name="l00313"></a>00313 +<a name="l00315"></a>00315 +<a name="l00318"></a><a class="code" href="classInotifyEvent.html#111954d74f0320745a68ef030064e987">00318</a> <span class="keyword">inline</span> uint32_t <a class="code" href="classInotifyEvent.html#111954d74f0320745a68ef030064e987">GetLength</a>()<span class="keyword"> const</span> +<a name="l00319"></a>00319 <span class="keyword"> </span>{ +<a name="l00320"></a>00320 <span class="keywordflow">return</span> (uint32_t) m_name.length(); +<a name="l00321"></a>00321 } +<a name="l00322"></a>00322 +<a name="l00324"></a>00324 +<a name="l00327"></a><a class="code" href="classInotifyEvent.html#a0524029d360591567c88595cb31df66">00327</a> <span class="keyword">inline</span> <span class="keyword">const</span> std::string& <a class="code" href="classInotifyEvent.html#a0524029d360591567c88595cb31df66">GetName</a>()<span class="keyword"> const</span> +<a name="l00328"></a>00328 <span class="keyword"> </span>{ +<a name="l00329"></a>00329 <span class="keywordflow">return</span> m_name; +<a name="l00330"></a>00330 } +<a name="l00331"></a>00331 +<a name="l00333"></a>00333 +<a name="l00336"></a><a class="code" href="classInotifyEvent.html#e053c52feebf6dae5a762e6baeba93db">00336</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classInotifyEvent.html#a0524029d360591567c88595cb31df66">GetName</a>(std::string& rName)<span class="keyword"> const</span> +<a name="l00337"></a>00337 <span class="keyword"> </span>{ +<a name="l00338"></a>00338 rName = <a class="code" href="classInotifyEvent.html#a0524029d360591567c88595cb31df66">GetName</a>(); +<a name="l00339"></a>00339 } +<a name="l00340"></a>00340 +<a name="l00342"></a>00342 +<a name="l00345"></a><a class="code" href="classInotifyEvent.html#979cd46f53ed674331a5a6d47d1cde92">00345</a> <span class="keyword">inline</span> <a class="code" href="classInotifyWatch.html">InotifyWatch</a>* <a class="code" href="classInotifyEvent.html#979cd46f53ed674331a5a6d47d1cde92">GetWatch</a>() +<a name="l00346"></a>00346 { +<a name="l00347"></a>00347 <span class="keywordflow">return</span> m_pWatch; +<a name="l00348"></a>00348 } +<a name="l00349"></a>00349 +<a name="l00351"></a>00351 +<a name="l00355"></a>00355 <span class="keyword">static</span> uint32_t <a class="code" href="classInotifyEvent.html#eced3a88a6dea190c5df19c2a6599010">GetMaskByName</a>(<span class="keyword">const</span> std::string& rName); +<a name="l00356"></a>00356 +<a name="l00358"></a>00358 +<a name="l00362"></a>00362 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classInotifyEvent.html#c08a0a26ea33dbe94aaf1ac830c103a5">DumpTypes</a>(uint32_t uValue, std::string& rStr); +<a name="l00363"></a>00363 +<a name="l00365"></a>00365 +<a name="l00368"></a>00368 <span class="keywordtype">void</span> <a class="code" href="classInotifyEvent.html#c08a0a26ea33dbe94aaf1ac830c103a5">DumpTypes</a>(std::string& rStr) <span class="keyword">const</span>; +<a name="l00369"></a>00369 +<a name="l00370"></a>00370 <span class="keyword">private</span>: +<a name="l00371"></a>00371 uint32_t m_uMask; +<a name="l00372"></a>00372 uint32_t m_uCookie; +<a name="l00373"></a>00373 std::string m_name; +<a name="l00374"></a>00374 <a class="code" href="classInotifyWatch.html">InotifyWatch</a>* m_pWatch; +<a name="l00375"></a>00375 }; +<a name="l00376"></a>00376 +<a name="l00377"></a>00377 +<a name="l00378"></a>00378 +<a name="l00380"></a>00380 +<a name="l00386"></a><a class="code" href="classInotifyWatch.html">00386</a> <span class="keyword">class </span><a class="code" href="classInotifyWatch.html">InotifyWatch</a> +<a name="l00387"></a>00387 { +<a name="l00388"></a>00388 <span class="keyword">public</span>: +<a name="l00390"></a>00390 +<a name="l00398"></a><a class="code" href="classInotifyWatch.html#c9c02f1dbd143eebd711eba03ac366e9">00398</a> <a class="code" href="classInotifyWatch.html#c9c02f1dbd143eebd711eba03ac366e9">InotifyWatch</a>(<span class="keyword">const</span> std::string& rPath, int32_t uMask, <span class="keywordtype">bool</span> fEnabled = <span class="keyword">true</span>) +<a name="l00399"></a>00399 : m_path(rPath), +<a name="l00400"></a>00400 m_uMask(uMask), +<a name="l00401"></a>00401 m_wd((int32_t) -1), +<a name="l00402"></a>00402 m_fEnabled(fEnabled) +<a name="l00403"></a>00403 { +<a name="l00404"></a>00404 <a class="code" href="inotify-cxx_8h.html#981aa546075fba39715fd2f63a41f575">IN_LOCK_INIT</a> +<a name="l00405"></a>00405 } +<a name="l00406"></a>00406 +<a name="l00408"></a><a class="code" href="classInotifyWatch.html#871c16b01aa8841b36246e5b629ecaef">00408</a> <a class="code" href="classInotifyWatch.html#871c16b01aa8841b36246e5b629ecaef">~InotifyWatch</a>() +<a name="l00409"></a>00409 { +<a name="l00410"></a>00410 <a class="code" href="inotify-cxx_8h.html#08422ec66fb587c1684afbaa575a53dd">IN_LOCK_DONE</a> +<a name="l00411"></a>00411 } +<a name="l00412"></a>00412 +<a name="l00414"></a>00414 +<a name="l00417"></a><a class="code" href="classInotifyWatch.html#df771e1f81e2a6cc2780c9d2470e34c6">00417</a> <span class="keyword">inline</span> int32_t <a class="code" href="classInotifyWatch.html#df771e1f81e2a6cc2780c9d2470e34c6">GetDescriptor</a>()<span class="keyword"> const</span> +<a name="l00418"></a>00418 <span class="keyword"> </span>{ +<a name="l00419"></a>00419 <span class="keywordflow">return</span> m_wd; +<a name="l00420"></a>00420 } +<a name="l00421"></a>00421 +<a name="l00423"></a>00423 +<a name="l00426"></a><a class="code" href="classInotifyWatch.html#89f897a4d98fa54de27730dd8be67966">00426</a> <span class="keyword">inline</span> <span class="keyword">const</span> std::string& <a class="code" href="classInotifyWatch.html#89f897a4d98fa54de27730dd8be67966">GetPath</a>()<span class="keyword"> const</span> +<a name="l00427"></a>00427 <span class="keyword"> </span>{ +<a name="l00428"></a>00428 <span class="keywordflow">return</span> m_path; +<a name="l00429"></a>00429 } +<a name="l00430"></a>00430 +<a name="l00432"></a>00432 +<a name="l00435"></a><a class="code" href="classInotifyWatch.html#bab761a989c9fdf73aaad2a58e1ba7a0">00435</a> <span class="keyword">inline</span> uint32_t <a class="code" href="classInotifyWatch.html#bab761a989c9fdf73aaad2a58e1ba7a0">GetMask</a>()<span class="keyword"> const</span> +<a name="l00436"></a>00436 <span class="keyword"> </span>{ +<a name="l00437"></a>00437 <span class="keywordflow">return</span> (uint32_t) m_uMask; +<a name="l00438"></a>00438 } +<a name="l00439"></a>00439 +<a name="l00441"></a>00441 +<a name="l00450"></a>00450 <span class="keywordtype">void</span> <a class="code" href="classInotifyWatch.html#3ad7fbc55c21b3fcd08c2d1d388e14b6">SetMask</a>(uint32_t uMask) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00451"></a>00451 +<a name="l00453"></a>00453 +<a name="l00456"></a><a class="code" href="classInotifyWatch.html#cbf0042d06841f9503405b104e4c35d0">00456</a> <span class="keyword">inline</span> <a class="code" href="classInotify.html">Inotify</a>* <a class="code" href="classInotifyWatch.html#cbf0042d06841f9503405b104e4c35d0">GetInotify</a>() +<a name="l00457"></a>00457 { +<a name="l00458"></a>00458 <span class="keywordflow">return</span> m_pInotify; +<a name="l00459"></a>00459 } +<a name="l00460"></a>00460 +<a name="l00462"></a>00462 +<a name="l00473"></a>00473 <span class="keywordtype">void</span> <a class="code" href="classInotifyWatch.html#a71aff8650fadff32a3c655ca50945f1">SetEnabled</a>(<span class="keywordtype">bool</span> fEnabled) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00474"></a>00474 +<a name="l00476"></a>00476 +<a name="l00479"></a><a class="code" href="classInotifyWatch.html#3d2a5c58a07449bc6ff192f6c14c4de0">00479</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classInotifyWatch.html#3d2a5c58a07449bc6ff192f6c14c4de0">IsEnabled</a>()<span class="keyword"> const</span> +<a name="l00480"></a>00480 <span class="keyword"> </span>{ +<a name="l00481"></a>00481 <span class="keywordflow">return</span> m_fEnabled; +<a name="l00482"></a>00482 } +<a name="l00483"></a>00483 +<a name="l00485"></a>00485 +<a name="l00494"></a><a class="code" href="classInotifyWatch.html#1c8ab316b54cb7d1d0b17cbbe6b7d2f8">00494</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classInotifyWatch.html#1c8ab316b54cb7d1d0b17cbbe6b7d2f8">IsRecursive</a>()<span class="keyword"> const</span> +<a name="l00495"></a>00495 <span class="keyword"> </span>{ +<a name="l00496"></a>00496 <span class="keywordflow">return</span> <span class="keyword">false</span>; +<a name="l00497"></a>00497 } +<a name="l00498"></a>00498 +<a name="l00499"></a>00499 <span class="keyword">private</span>: +<a name="l00500"></a><a class="code" href="classInotifyWatch.html#94bfb861dc18ca5d16abfcff90db8c86">00500</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classInotify.html">Inotify</a>; +<a name="l00501"></a>00501 +<a name="l00502"></a>00502 std::string m_path; +<a name="l00503"></a>00503 uint32_t m_uMask; +<a name="l00504"></a>00504 int32_t m_wd; +<a name="l00505"></a>00505 <a class="code" href="classInotify.html">Inotify</a>* m_pInotify; +<a name="l00506"></a>00506 <span class="keywordtype">bool</span> m_fEnabled; +<a name="l00507"></a>00507 +<a name="l00508"></a>00508 <a class="code" href="inotify-cxx_8h.html#904d25c0fd931e1bad4f9d5cd346a766">IN_LOCK_DECL</a> +<a name="l00509"></a>00509 +<a name="l00511"></a>00511 +<a name="l00516"></a>00516 <span class="keywordtype">void</span> __Disable(); +<a name="l00517"></a>00517 }; +<a name="l00518"></a>00518 +<a name="l00519"></a>00519 +<a name="l00521"></a><a class="code" href="inotify-cxx_8h.html#e6b5ebcb4e0d6a9f5ca8da26bc00cc2a">00521</a> <span class="keyword">typedef</span> std::map<int32_t, InotifyWatch*> <a class="code" href="inotify-cxx_8h.html#e6b5ebcb4e0d6a9f5ca8da26bc00cc2a">IN_WATCH_MAP</a>; +<a name="l00522"></a>00522 +<a name="l00524"></a><a class="code" href="inotify-cxx_8h.html#5dd7761ff5a6b7cc7271950aebb7ddf6">00524</a> <span class="keyword">typedef</span> std::map<std::string, InotifyWatch*> <a class="code" href="inotify-cxx_8h.html#5dd7761ff5a6b7cc7271950aebb7ddf6">IN_WP_MAP</a>; +<a name="l00525"></a>00525 +<a name="l00526"></a>00526 +<a name="l00528"></a>00528 +<a name="l00534"></a><a class="code" href="classInotify.html">00534</a> <span class="keyword">class </span><a class="code" href="classInotify.html">Inotify</a> +<a name="l00535"></a>00535 { +<a name="l00536"></a>00536 <span class="keyword">public</span>: +<a name="l00538"></a>00538 +<a name="l00544"></a>00544 <a class="code" href="classInotify.html#a6fe6e9cb3343665eb968fcd5170cfb9">Inotify</a>() <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00545"></a>00545 +<a name="l00547"></a>00547 +<a name="l00550"></a>00550 <a class="code" href="classInotify.html#f19dd5e491395673e4798eb9dbf5f682">~Inotify</a>(); +<a name="l00551"></a>00551 +<a name="l00553"></a>00553 <span class="keywordtype">void</span> <a class="code" href="classInotify.html#86ae86c43ea1a72f562ca46393309635">Close</a>(); +<a name="l00554"></a>00554 +<a name="l00556"></a>00556 +<a name="l00561"></a>00561 <span class="keywordtype">void</span> <a class="code" href="classInotify.html#2ef771ebaf982d76ebe19b3f5bc9cd83">Add</a>(<a class="code" href="classInotifyWatch.html">InotifyWatch</a>* pWatch) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00562"></a>00562 +<a name="l00564"></a>00564 +<a name="l00569"></a><a class="code" href="classInotify.html#35dab56d3e10bf28b5e457871adddb58">00569</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classInotify.html#2ef771ebaf982d76ebe19b3f5bc9cd83">Add</a>(<a class="code" href="classInotifyWatch.html">InotifyWatch</a>& rWatch) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>) +<a name="l00570"></a>00570 { +<a name="l00571"></a>00571 <a class="code" href="classInotify.html#2ef771ebaf982d76ebe19b3f5bc9cd83">Add</a>(&rWatch); +<a name="l00572"></a>00572 } +<a name="l00573"></a>00573 +<a name="l00575"></a>00575 +<a name="l00582"></a>00582 <span class="keywordtype">void</span> <a class="code" href="classInotify.html#21c39bb8e5bbc1941b945c18f9005b84">Remove</a>(<a class="code" href="classInotifyWatch.html">InotifyWatch</a>* pWatch) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00583"></a>00583 +<a name="l00585"></a>00585 +<a name="l00592"></a><a class="code" href="classInotify.html#ac1a52b2ff6bfec07021a44e55d496a6">00592</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classInotify.html#21c39bb8e5bbc1941b945c18f9005b84">Remove</a>(<a class="code" href="classInotifyWatch.html">InotifyWatch</a>& rWatch) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>) +<a name="l00593"></a>00593 { +<a name="l00594"></a>00594 <a class="code" href="classInotify.html#21c39bb8e5bbc1941b945c18f9005b84">Remove</a>(&rWatch); +<a name="l00595"></a>00595 } +<a name="l00596"></a>00596 +<a name="l00598"></a>00598 <span class="keywordtype">void</span> <a class="code" href="classInotify.html#bc1fd5830ca561efb69bcd2283981741">RemoveAll</a>(); +<a name="l00599"></a>00599 +<a name="l00601"></a>00601 +<a name="l00609"></a><a class="code" href="classInotify.html#b53b7935bda7425b002946d78bfe5863">00609</a> <span class="keyword">inline</span> size_t <a class="code" href="classInotify.html#b53b7935bda7425b002946d78bfe5863">GetWatchCount</a>()<span class="keyword"> const</span> +<a name="l00610"></a>00610 <span class="keyword"> </span>{ +<a name="l00611"></a>00611 <a class="code" href="inotify-cxx_8h.html#963a97dc42487e86715b4e04639b0db8">IN_READ_BEGIN</a> +<a name="l00612"></a>00612 size_t n = (size_t) m_paths.size(); +<a name="l00613"></a>00613 <a class="code" href="inotify-cxx_8h.html#0b82080ab6709175341b97e1f3c3955d">IN_READ_END</a> +<a name="l00614"></a>00614 <span class="keywordflow">return</span> n; +<a name="l00615"></a>00615 } +<a name="l00616"></a>00616 +<a name="l00618"></a>00618 +<a name="l00623"></a><a class="code" href="classInotify.html#9bf5f7716649d5b5f468c2242fb5e099">00623</a> <span class="keyword">inline</span> size_t <a class="code" href="classInotify.html#9bf5f7716649d5b5f468c2242fb5e099">GetEnabledCount</a>()<span class="keyword"> const</span> +<a name="l00624"></a>00624 <span class="keyword"> </span>{ +<a name="l00625"></a>00625 <a class="code" href="inotify-cxx_8h.html#963a97dc42487e86715b4e04639b0db8">IN_READ_BEGIN</a> +<a name="l00626"></a>00626 size_t n = (size_t) m_watches.size(); +<a name="l00627"></a>00627 <a class="code" href="inotify-cxx_8h.html#0b82080ab6709175341b97e1f3c3955d">IN_READ_END</a> +<a name="l00628"></a>00628 <span class="keywordflow">return</span> n; +<a name="l00629"></a>00629 } +<a name="l00630"></a>00630 +<a name="l00632"></a>00632 +<a name="l00643"></a>00643 <span class="keywordtype">void</span> <a class="code" href="classInotify.html#139c27c6643bb199619f3eae9b32e53b">WaitForEvents</a>(<span class="keywordtype">bool</span> fNoIntr = <span class="keyword">false</span>) throw (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00644"></a>00644 +<a name="l00646"></a>00646 +<a name="l00652"></a><a class="code" href="classInotify.html#a3c533f956871f904949832ac8f5fbde">00652</a> inline size_t <a class="code" href="classInotify.html#a3c533f956871f904949832ac8f5fbde">GetEventCount</a>() +<a name="l00653"></a>00653 { +<a name="l00654"></a>00654 <a class="code" href="inotify-cxx_8h.html#963a97dc42487e86715b4e04639b0db8">IN_READ_BEGIN</a> +<a name="l00655"></a>00655 size_t n = (size_t) m_events.size(); +<a name="l00656"></a>00656 <a class="code" href="inotify-cxx_8h.html#0b82080ab6709175341b97e1f3c3955d">IN_READ_END</a> +<a name="l00657"></a>00657 <span class="keywordflow">return</span> n; +<a name="l00658"></a>00658 } +<a name="l00659"></a>00659 +<a name="l00661"></a>00661 +<a name="l00669"></a>00669 <span class="keywordtype">bool</span> <a class="code" href="classInotify.html#490a3f824c6d041d31ccaabe9bd92008">GetEvent</a>(<a class="code" href="classInotifyEvent.html">InotifyEvent</a>* pEvt) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00670"></a>00670 +<a name="l00672"></a>00672 +<a name="l00679"></a><a class="code" href="classInotify.html#b028c8fa988f6bbb2ef773db3ea3a2d3">00679</a> <span class="keywordtype">bool</span> <a class="code" href="classInotify.html#490a3f824c6d041d31ccaabe9bd92008">GetEvent</a>(<a class="code" href="classInotifyEvent.html">InotifyEvent</a>& rEvt) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>) +<a name="l00680"></a>00680 { +<a name="l00681"></a>00681 <span class="keywordflow">return</span> <a class="code" href="classInotify.html#490a3f824c6d041d31ccaabe9bd92008">GetEvent</a>(&rEvt); +<a name="l00682"></a>00682 } +<a name="l00683"></a>00683 +<a name="l00685"></a>00685 +<a name="l00693"></a>00693 <span class="keywordtype">bool</span> <a class="code" href="classInotify.html#19cde43d082ff92bd02654610019300d">PeekEvent</a>(<a class="code" href="classInotifyEvent.html">InotifyEvent</a>* pEvt) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00694"></a>00694 +<a name="l00696"></a>00696 +<a name="l00703"></a><a class="code" href="classInotify.html#287dc0d238fa6edc3269441cb284f979">00703</a> <span class="keywordtype">bool</span> <a class="code" href="classInotify.html#19cde43d082ff92bd02654610019300d">PeekEvent</a>(<a class="code" href="classInotifyEvent.html">InotifyEvent</a>& rEvt) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>) +<a name="l00704"></a>00704 { +<a name="l00705"></a>00705 <span class="keywordflow">return</span> <a class="code" href="classInotify.html#19cde43d082ff92bd02654610019300d">PeekEvent</a>(&rEvt); +<a name="l00706"></a>00706 } +<a name="l00707"></a>00707 +<a name="l00709"></a>00709 +<a name="l00715"></a>00715 <a class="code" href="classInotifyWatch.html">InotifyWatch</a>* <a class="code" href="classInotify.html#182d19b667c9e0899802b70a579eff40">FindWatch</a>(<span class="keywordtype">int</span> iDescriptor); +<a name="l00716"></a>00716 +<a name="l00718"></a>00718 +<a name="l00728"></a>00728 <a class="code" href="classInotifyWatch.html">InotifyWatch</a>* <a class="code" href="classInotify.html#182d19b667c9e0899802b70a579eff40">FindWatch</a>(<span class="keyword">const</span> std::string& rPath); +<a name="l00729"></a>00729 +<a name="l00731"></a>00731 +<a name="l00739"></a><a class="code" href="classInotify.html#678271faf4799840ad71805163a24b13">00739</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classInotify.html#678271faf4799840ad71805163a24b13">GetDescriptor</a>()<span class="keyword"> const</span> +<a name="l00740"></a>00740 <span class="keyword"> </span>{ +<a name="l00741"></a>00741 <span class="keywordflow">return</span> m_fd; +<a name="l00742"></a>00742 } +<a name="l00743"></a>00743 +<a name="l00745"></a>00745 +<a name="l00758"></a>00758 <span class="keywordtype">void</span> <a class="code" href="classInotify.html#b2c8ab8ad4322fb6f0dae0eae442402b">SetNonBlock</a>(<span class="keywordtype">bool</span> fNonBlock) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00759"></a>00759 +<a name="l00761"></a>00761 +<a name="l00774"></a>00774 <span class="keywordtype">void</span> <a class="code" href="classInotify.html#124dd5816205900af61034d47ae65255">SetCloseOnExec</a>(<span class="keywordtype">bool</span> fClOnEx) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00775"></a>00775 +<a name="l00777"></a>00777 +<a name="l00782"></a>00782 <span class="keyword">static</span> uint32_t <a class="code" href="classInotify.html#70b3b57e8661fbb4c5bc404b86225c3b">GetCapability</a>(<a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> cap) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00783"></a>00783 +<a name="l00785"></a>00785 +<a name="l00793"></a>00793 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classInotify.html#734538233ba2136164f76f4df6c3654e">SetCapability</a>(<a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> cap, uint32_t val) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00794"></a>00794 +<a name="l00796"></a>00796 +<a name="l00800"></a><a class="code" href="classInotify.html#d8e4a4a87d005c71c0b5ea9c6dd53c42">00800</a> <span class="keyword">inline</span> <span class="keyword">static</span> uint32_t <a class="code" href="classInotify.html#d8e4a4a87d005c71c0b5ea9c6dd53c42">GetMaxEvents</a>() throw (<a class="code" href="classInotifyException.html">InotifyException</a>) +<a name="l00801"></a>00801 { +<a name="l00802"></a>00802 <span class="keywordflow">return</span> <a class="code" href="classInotify.html#70b3b57e8661fbb4c5bc404b86225c3b">GetCapability</a>(<a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1">IN_MAX_EVENTS</a>); +<a name="l00803"></a>00803 } +<a name="l00804"></a>00804 +<a name="l00806"></a>00806 +<a name="l00814"></a><a class="code" href="classInotify.html#66d90ebfa516d4bd1463749def2b58f9">00814</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classInotify.html#66d90ebfa516d4bd1463749def2b58f9">SetMaxEvents</a>(uint32_t val) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>) +<a name="l00815"></a>00815 { +<a name="l00816"></a>00816 <a class="code" href="classInotify.html#734538233ba2136164f76f4df6c3654e">SetCapability</a>(<a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1">IN_MAX_EVENTS</a>, val); +<a name="l00817"></a>00817 } +<a name="l00818"></a>00818 +<a name="l00820"></a>00820 +<a name="l00827"></a><a class="code" href="classInotify.html#c18b7732f67832260fbbd47aebb8af51">00827</a> <span class="keyword">inline</span> <span class="keyword">static</span> uint32_t <a class="code" href="classInotify.html#c18b7732f67832260fbbd47aebb8af51">GetMaxInstances</a>() throw (<a class="code" href="classInotifyException.html">InotifyException</a>) +<a name="l00828"></a>00828 { +<a name="l00829"></a>00829 <span class="keywordflow">return</span> <a class="code" href="classInotify.html#70b3b57e8661fbb4c5bc404b86225c3b">GetCapability</a>(<a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9">IN_MAX_INSTANCES</a>); +<a name="l00830"></a>00830 } +<a name="l00831"></a>00831 +<a name="l00833"></a>00833 +<a name="l00841"></a><a class="code" href="classInotify.html#620c891962fe5acd26485c64e9b28d19">00841</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classInotify.html#620c891962fe5acd26485c64e9b28d19">SetMaxInstances</a>(uint32_t val) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>) +<a name="l00842"></a>00842 { +<a name="l00843"></a>00843 <a class="code" href="classInotify.html#734538233ba2136164f76f4df6c3654e">SetCapability</a>(<a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9">IN_MAX_INSTANCES</a>, val); +<a name="l00844"></a>00844 } +<a name="l00845"></a>00845 +<a name="l00847"></a>00847 +<a name="l00854"></a><a class="code" href="classInotify.html#86dae1b7a72c0d8fc2a632444a0f2f1f">00854</a> <span class="keyword">inline</span> <span class="keyword">static</span> uint32_t <a class="code" href="classInotify.html#86dae1b7a72c0d8fc2a632444a0f2f1f">GetMaxWatches</a>() throw (<a class="code" href="classInotifyException.html">InotifyException</a>) +<a name="l00855"></a>00855 { +<a name="l00856"></a>00856 <span class="keywordflow">return</span> <a class="code" href="classInotify.html#70b3b57e8661fbb4c5bc404b86225c3b">GetCapability</a>(<a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429">IN_MAX_WATCHES</a>); +<a name="l00857"></a>00857 } +<a name="l00858"></a>00858 +<a name="l00860"></a>00860 +<a name="l00868"></a><a class="code" href="classInotify.html#5064380cdb4a726ab33f3fa18d15c77a">00868</a> <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classInotify.html#5064380cdb4a726ab33f3fa18d15c77a">SetMaxWatches</a>(uint32_t val) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>) +<a name="l00869"></a>00869 { +<a name="l00870"></a>00870 <a class="code" href="classInotify.html#734538233ba2136164f76f4df6c3654e">SetCapability</a>(<a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429">IN_MAX_WATCHES</a>, val); +<a name="l00871"></a>00871 } +<a name="l00872"></a>00872 +<a name="l00873"></a>00873 <span class="keyword">private</span>: +<a name="l00874"></a>00874 <span class="keywordtype">int</span> m_fd; +<a name="l00875"></a>00875 IN_WATCH_MAP m_watches; +<a name="l00876"></a>00876 IN_WP_MAP m_paths; +<a name="l00877"></a>00877 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> m_buf[<a class="code" href="inotify-cxx_8h.html#a84911f8e42d71161b60d4a28940abb4">INOTIFY_BUFLEN</a>]; +<a name="l00878"></a>00878 std::deque<InotifyEvent> m_events; +<a name="l00879"></a>00879 +<a name="l00880"></a>00880 <a class="code" href="inotify-cxx_8h.html#904d25c0fd931e1bad4f9d5cd346a766">IN_LOCK_DECL</a> +<a name="l00881"></a>00881 +<a name="l00882"></a><a class="code" href="classInotify.html#10880f490c33acd8bd24664fc7bce4ae">00882</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classInotifyWatch.html">InotifyWatch</a>; +<a name="l00883"></a>00883 +<a name="l00884"></a>00884 <span class="keyword">static</span> std::string GetCapabilityPath(<a class="code" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> cap) <span class="keywordflow">throw</span> (<a class="code" href="classInotifyException.html">InotifyException</a>); +<a name="l00885"></a>00885 }; +<a name="l00886"></a>00886 +<a name="l00887"></a>00887 +<a name="l00888"></a>00888 <span class="preprocessor">#endif //_INOTIFYCXX_H_</span> +<a name="l00889"></a>00889 <span class="preprocessor"></span> +</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/inotify-cxx_8h.html b/shared/inotify/doc/html/inotify-cxx_8h.html new file mode 100644 index 00000000..1d6f065e --- /dev/null +++ b/shared/inotify/doc/html/inotify-cxx_8h.html @@ -0,0 +1,366 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>inotify-cxx: inotify-cxx.h File Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +<link href="tabs.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.5.1 --> +<div class="tabs"> + <ul> + <li><a href="index.html"><span>Main Page</span></a></li> + <li><a href="annotated.html"><span>Classes</span></a></li> + <li id="current"><a href="files.html"><span>Files</span></a></li> + </ul></div> +<div class="tabs"> + <ul> + <li><a href="files.html"><span>File List</span></a></li> + <li><a href="globals.html"><span>File Members</span></a></li> + </ul></div> +<h1>inotify-cxx.h File Reference</h1>inotify C++ interface header <a href="#_details">More...</a> +<p> +<code>#include <stdint.h></code><br> +<code>#include <string></code><br> +<code>#include <deque></code><br> +<code>#include <map></code><br> +<code>#include <sys/syscall.h></code><br> +<code>#include <sys/inotify.h></code><br> +<code>#include <sys/inotify-syscalls.h></code><br> + +<p> +<a href="inotify-cxx_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> +<tr><td></td></tr> +<tr><td colspan="2"><br><h2>Classes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyException.html">InotifyException</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Class for inotify exceptions. <a href="classInotifyException.html#_details">More...</a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">inotify event class <a href="classInotifyEvent.html#_details">More...</a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">inotify watch class <a href="classInotifyWatch.html#_details">More...</a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html">Inotify</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">inotify class <a href="classInotify.html#_details">More...</a><br></td></tr> +<tr><td colspan="2"><br><h2>Defines</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#f64b4cc985ba26f31a9cb242153a5014">INOTIFY_EVENT_SIZE</a> (sizeof(struct inotify_event))</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Event struct size. <a href="#f64b4cc985ba26f31a9cb242153a5014"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#a84911f8e42d71161b60d4a28940abb4">INOTIFY_BUFLEN</a> (1024 * (INOTIFY_EVENT_SIZE + 16))</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Event buffer length. <a href="#a84911f8e42d71161b60d4a28940abb4"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#fe6b93f7e09db7022f1f9dd102932e12">IN_EXC_MSG</a>(msg) (std::string(__PRETTY_FUNCTION__) + ": " + msg)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Helper macro for creating exception messages. <a href="#fe6b93f7e09db7022f1f9dd102932e12"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#904d25c0fd931e1bad4f9d5cd346a766">IN_LOCK_DECL</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">inotify-cxx thread safety <a href="#904d25c0fd931e1bad4f9d5cd346a766"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#981aa546075fba39715fd2f63a41f575">IN_LOCK_INIT</a></td></tr> + +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#08422ec66fb587c1684afbaa575a53dd">IN_LOCK_DONE</a></td></tr> + +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#963a97dc42487e86715b4e04639b0db8">IN_READ_BEGIN</a></td></tr> + +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#0b82080ab6709175341b97e1f3c3955d">IN_READ_END</a></td></tr> + +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#5c6a5be1898ef17662795cc4b420c851">IN_READ_END_NOTHROW</a></td></tr> + +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#c3a6d87ace9403f7ac58f931bbcd9599">IN_WRITE_BEGIN</a></td></tr> + +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#f8aeac51b3b4ef56f1791c5c1a2e9cf5">IN_WRITE_END</a></td></tr> + +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#7e68c4884137939c5e3301f40c198dc7">IN_WRITE_END_NOTHROW</a></td></tr> + +<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::map< int32_t,<br> + <a class="el" href="classInotifyWatch.html">InotifyWatch</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#e6b5ebcb4e0d6a9f5ca8da26bc00cc2a">IN_WATCH_MAP</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Mapping from watch descriptors to watch objects. <a href="#e6b5ebcb4e0d6a9f5ca8da26bc00cc2a"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::map< std::string,<br> + <a class="el" href="classInotifyWatch.html">InotifyWatch</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#5dd7761ff5a6b7cc7271950aebb7ddf6">IN_WP_MAP</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Mapping from paths to watch objects. <a href="#5dd7761ff5a6b7cc7271950aebb7ddf6"></a><br></td></tr> +<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> { <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1">IN_MAX_EVENTS</a> = 0, +<a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9">IN_MAX_INSTANCES</a> = 1, +<a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429">IN_MAX_WATCHES</a> = 2 + }</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">inotify capability/limit identifiers <a href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">More...</a><br></td></tr> +</table> +<hr><a name="_details"></a><h2>Detailed Description</h2> +inotify C++ interface header +<p> +inotify C++ interface<p> +Copyright (C) 2006, 2007 Lukas Jelinek, <<a href="mailto:lukas@aiken.cz">lukas@aiken.cz</a>><p> +This program is free software; you can redistribute it and/or modify it under the terms of one of the following licenses:<p> +<ul> +<li>1. X11-style license (see LICENSE-X11) </li> +<li>2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) </li> +<li>3. GNU General Public License, version 2 (see LICENSE-GPL)</li> +</ul> +If you want to help with choosing the best license for you, please visit <a href="http://www.gnu.org/licenses/license-list.html.">http://www.gnu.org/licenses/license-list.html.</a> <hr><h2>Define Documentation</h2> +<a class="anchor" name="fe6b93f7e09db7022f1f9dd102932e12"></a><!-- doxytag: member="inotify-cxx.h::IN_EXC_MSG" ref="fe6b93f7e09db7022f1f9dd102932e12" args="(msg)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define IN_EXC_MSG </td> + <td>(</td> + <td class="paramtype">msg </td> + <td class="paramname"> </td> + <td> ) </td> + <td width="100%"> (std::string(__PRETTY_FUNCTION__) + ": " + msg)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Helper macro for creating exception messages. +<p> +It prepends the message by the function name. +</div> +</div><p> +<a class="anchor" name="904d25c0fd931e1bad4f9d5cd346a766"></a><!-- doxytag: member="inotify-cxx.h::IN_LOCK_DECL" ref="904d25c0fd931e1bad4f9d5cd346a766" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define IN_LOCK_DECL </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +inotify-cxx thread safety +<p> +If this symbol is defined you can use this interface safely threaded applications. Remember that it slightly degrades performance.<p> +Even if INOTIFY_THREAD_SAFE is defined some classes stay unsafe. If you must use them (must you?) in more than one thread concurrently you need to implement explicite locking.<p> +You need not to define INOTIFY_THREAD_SAFE in that cases where the application is multithreaded but all the inotify infrastructure will be managed only in one thread. This is the recommended way.<p> +Locking may fail (it is very rare but not impossible). In this case an exception is thrown. But if unlocking fails in case of an error it does nothing (this failure is ignored). +</div> +</div><p> +<a class="anchor" name="08422ec66fb587c1684afbaa575a53dd"></a><!-- doxytag: member="inotify-cxx.h::IN_LOCK_DONE" ref="08422ec66fb587c1684afbaa575a53dd" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define IN_LOCK_DONE </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> +<a class="anchor" name="981aa546075fba39715fd2f63a41f575"></a><!-- doxytag: member="inotify-cxx.h::IN_LOCK_INIT" ref="981aa546075fba39715fd2f63a41f575" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define IN_LOCK_INIT </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> +<a class="anchor" name="963a97dc42487e86715b4e04639b0db8"></a><!-- doxytag: member="inotify-cxx.h::IN_READ_BEGIN" ref="963a97dc42487e86715b4e04639b0db8" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define IN_READ_BEGIN </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> +<a class="anchor" name="0b82080ab6709175341b97e1f3c3955d"></a><!-- doxytag: member="inotify-cxx.h::IN_READ_END" ref="0b82080ab6709175341b97e1f3c3955d" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define IN_READ_END </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> +<a class="anchor" name="5c6a5be1898ef17662795cc4b420c851"></a><!-- doxytag: member="inotify-cxx.h::IN_READ_END_NOTHROW" ref="5c6a5be1898ef17662795cc4b420c851" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define IN_READ_END_NOTHROW </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> +<a class="anchor" name="c3a6d87ace9403f7ac58f931bbcd9599"></a><!-- doxytag: member="inotify-cxx.h::IN_WRITE_BEGIN" ref="c3a6d87ace9403f7ac58f931bbcd9599" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define IN_WRITE_BEGIN </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> +<a class="anchor" name="f8aeac51b3b4ef56f1791c5c1a2e9cf5"></a><!-- doxytag: member="inotify-cxx.h::IN_WRITE_END" ref="f8aeac51b3b4ef56f1791c5c1a2e9cf5" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define IN_WRITE_END </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> +<a class="anchor" name="7e68c4884137939c5e3301f40c198dc7"></a><!-- doxytag: member="inotify-cxx.h::IN_WRITE_END_NOTHROW" ref="7e68c4884137939c5e3301f40c198dc7" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define IN_WRITE_END_NOTHROW </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> +<a class="anchor" name="a84911f8e42d71161b60d4a28940abb4"></a><!-- doxytag: member="inotify-cxx.h::INOTIFY_BUFLEN" ref="a84911f8e42d71161b60d4a28940abb4" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define INOTIFY_BUFLEN (1024 * (INOTIFY_EVENT_SIZE + 16)) </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Event buffer length. +<p> + +</div> +</div><p> +<a class="anchor" name="f64b4cc985ba26f31a9cb242153a5014"></a><!-- doxytag: member="inotify-cxx.h::INOTIFY_EVENT_SIZE" ref="f64b4cc985ba26f31a9cb242153a5014" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event)) </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Event struct size. +<p> + +</div> +</div><p> +<hr><h2>Typedef Documentation</h2> +<a class="anchor" name="e6b5ebcb4e0d6a9f5ca8da26bc00cc2a"></a><!-- doxytag: member="inotify-cxx.h::IN_WATCH_MAP" ref="e6b5ebcb4e0d6a9f5ca8da26bc00cc2a" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef std::map<int32_t, <a class="el" href="classInotifyWatch.html">InotifyWatch</a>*> <a class="el" href="inotify-cxx_8h.html#e6b5ebcb4e0d6a9f5ca8da26bc00cc2a">IN_WATCH_MAP</a> </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Mapping from watch descriptors to watch objects. +<p> + +</div> +</div><p> +<a class="anchor" name="5dd7761ff5a6b7cc7271950aebb7ddf6"></a><!-- doxytag: member="inotify-cxx.h::IN_WP_MAP" ref="5dd7761ff5a6b7cc7271950aebb7ddf6" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">typedef std::map<std::string, <a class="el" href="classInotifyWatch.html">InotifyWatch</a>*> <a class="el" href="inotify-cxx_8h.html#5dd7761ff5a6b7cc7271950aebb7ddf6">IN_WP_MAP</a> </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Mapping from paths to watch objects. +<p> + +</div> +</div><p> +<hr><h2>Enumeration Type Documentation</h2> +<a class="anchor" name="bccd39d32dd83905178cf42edaae5c4d"></a><!-- doxytag: member="inotify-cxx.h::InotifyCapability_t" ref="bccd39d32dd83905178cf42edaae5c4d" args="" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">enum <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> </td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +inotify capability/limit identifiers +<p> +<dl compact><dt><b>Enumerator: </b></dt><dd> +<table border="0" cellspacing="2" cellpadding="0"> +<tr><td valign="top"><em><a class="anchor" name="bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1"></a><!-- doxytag: member="IN_MAX_EVENTS" ref="bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1" args="" -->IN_MAX_EVENTS</em> </td><td> +max. events in the kernel queue </td></tr> +<tr><td valign="top"><em><a class="anchor" name="bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9"></a><!-- doxytag: member="IN_MAX_INSTANCES" ref="bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9" args="" -->IN_MAX_INSTANCES</em> </td><td> +max. inotify file descriptors per process </td></tr> +<tr><td valign="top"><em><a class="anchor" name="bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429"></a><!-- doxytag: member="IN_MAX_WATCHES" ref="bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429" args="" -->IN_MAX_WATCHES</em> </td><td> +max. watches per file descriptor </td></tr> +</table> +</dl> + +</div> +</div><p> +<hr size="1"><address style="align: right;"><small>Generated on Wed Apr 18 18:26:40 2007 for inotify-cxx by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> +</body> +</html> diff --git a/shared/inotify/doc/html/tab_b.gif b/shared/inotify/doc/html/tab_b.gif Binary files differnew file mode 100644 index 00000000..0d623483 --- /dev/null +++ b/shared/inotify/doc/html/tab_b.gif diff --git a/shared/inotify/doc/html/tab_l.gif b/shared/inotify/doc/html/tab_l.gif Binary files differnew file mode 100644 index 00000000..9b1e6337 --- /dev/null +++ b/shared/inotify/doc/html/tab_l.gif diff --git a/shared/inotify/doc/html/tab_r.gif b/shared/inotify/doc/html/tab_r.gif Binary files differnew file mode 100644 index 00000000..ce9dd9f5 --- /dev/null +++ b/shared/inotify/doc/html/tab_r.gif diff --git a/shared/inotify/doc/html/tabs.css b/shared/inotify/doc/html/tabs.css new file mode 100644 index 00000000..a61552a6 --- /dev/null +++ b/shared/inotify/doc/html/tabs.css @@ -0,0 +1,102 @@ +/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ + +DIV.tabs +{ + float : left; + width : 100%; + background : url("tab_b.gif") repeat-x bottom; + margin-bottom : 4px; +} + +DIV.tabs UL +{ + margin : 0px; + padding-left : 10px; + list-style : none; +} + +DIV.tabs LI, DIV.tabs FORM +{ + display : inline; + margin : 0px; + padding : 0px; +} + +DIV.tabs FORM +{ + float : right; +} + +DIV.tabs A +{ + float : left; + background : url("tab_r.gif") no-repeat right top; + border-bottom : 1px solid #84B0C7; + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + +DIV.tabs A:hover +{ + background-position: 100% -150px; +} + +DIV.tabs A:link, DIV.tabs A:visited, +DIV.tabs A:active, DIV.tabs A:hover +{ + color: #1A419D; +} + +DIV.tabs SPAN +{ + float : left; + display : block; + background : url("tab_l.gif") no-repeat left top; + padding : 5px 9px; + white-space : nowrap; +} + +DIV.tabs INPUT +{ + float : right; + display : inline; + font-size : 1em; +} + +DIV.tabs TD +{ + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + + + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +DIV.tabs SPAN {float : none;} +/* End IE5-Mac hack */ + +DIV.tabs A:hover SPAN +{ + background-position: 0% -150px; +} + +DIV.tabs LI#current A +{ + background-position: 100% -150px; + border-width : 0px; +} + +DIV.tabs LI#current SPAN +{ + background-position: 0% -150px; + padding-bottom : 6px; +} + +DIV.nav +{ + background : none; + border : none; + border-bottom : 1px solid #84B0C7; +} diff --git a/shared/inotify/doc/man/man3/Inotify.3 b/shared/inotify/doc/man/man3/Inotify.3 new file mode 100644 index 00000000..23188784 --- /dev/null +++ b/shared/inotify/doc/man/man3/Inotify.3 @@ -0,0 +1,642 @@ +.TH "Inotify" 3 "18 Apr 2007" "Version 0.7.2" "inotify-cxx" \" -*- nroff -*- +.ad l +.nh +.SH NAME +Inotify \- inotify class + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <inotify-cxx.h>\fP +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBInotify\fP () throw (InotifyException)" +.br +.RI "\fIConstructor. \fP" +.ti -1c +.RI "\fB~Inotify\fP ()" +.br +.RI "\fIDestructor. \fP" +.ti -1c +.RI "void \fBClose\fP ()" +.br +.RI "\fIRemoves all watches and closes the inotify device. \fP" +.ti -1c +.RI "void \fBAdd\fP (\fBInotifyWatch\fP *pWatch) throw (InotifyException)" +.br +.RI "\fIAdds a new watch. \fP" +.ti -1c +.RI "void \fBAdd\fP (\fBInotifyWatch\fP &rWatch) throw (InotifyException)" +.br +.RI "\fIAdds a new watch. \fP" +.ti -1c +.RI "void \fBRemove\fP (\fBInotifyWatch\fP *pWatch) throw (InotifyException)" +.br +.RI "\fIRemoves a watch. \fP" +.ti -1c +.RI "void \fBRemove\fP (\fBInotifyWatch\fP &rWatch) throw (InotifyException)" +.br +.RI "\fIRemoves a watch. \fP" +.ti -1c +.RI "void \fBRemoveAll\fP ()" +.br +.RI "\fIRemoves all watches. \fP" +.ti -1c +.RI "size_t \fBGetWatchCount\fP () const" +.br +.RI "\fIReturns the count of watches. \fP" +.ti -1c +.RI "size_t \fBGetEnabledCount\fP () const" +.br +.RI "\fIReturns the count of enabled watches. \fP" +.ti -1c +.RI "void \fBWaitForEvents\fP (bool fNoIntr=false) throw (InotifyException)" +.br +.RI "\fIWaits for inotify events. \fP" +.ti -1c +.RI "size_t \fBGetEventCount\fP ()" +.br +.RI "\fIReturns the count of received and queued events. \fP" +.ti -1c +.RI "bool \fBGetEvent\fP (\fBInotifyEvent\fP *pEvt) throw (InotifyException)" +.br +.RI "\fIExtracts a queued inotify event. \fP" +.ti -1c +.RI "bool \fBGetEvent\fP (\fBInotifyEvent\fP &rEvt) throw (InotifyException)" +.br +.RI "\fIExtracts a queued inotify event. \fP" +.ti -1c +.RI "bool \fBPeekEvent\fP (\fBInotifyEvent\fP *pEvt) throw (InotifyException)" +.br +.RI "\fIExtracts a queued inotify event (without removing). \fP" +.ti -1c +.RI "bool \fBPeekEvent\fP (\fBInotifyEvent\fP &rEvt) throw (InotifyException)" +.br +.RI "\fIExtracts a queued inotify event (without removing). \fP" +.ti -1c +.RI "\fBInotifyWatch\fP * \fBFindWatch\fP (int iDescriptor)" +.br +.RI "\fISearches for a watch by a watch descriptor. \fP" +.ti -1c +.RI "\fBInotifyWatch\fP * \fBFindWatch\fP (const std::string &rPath)" +.br +.RI "\fISearches for a watch by a filesystem path. \fP" +.ti -1c +.RI "int \fBGetDescriptor\fP () const" +.br +.RI "\fIReturns the file descriptor. \fP" +.ti -1c +.RI "void \fBSetNonBlock\fP (bool fNonBlock) throw (InotifyException)" +.br +.RI "\fIEnables/disables non-blocking mode. \fP" +.ti -1c +.RI "void \fBSetCloseOnExec\fP (bool fClOnEx) throw (InotifyException)" +.br +.RI "\fIEnables/disables closing on exec. \fP" +.in -1c +.SS "Static Public Member Functions" + +.in +1c +.ti -1c +.RI "static uint32_t \fBGetCapability\fP (\fBInotifyCapability_t\fP cap) throw (InotifyException)" +.br +.RI "\fIAcquires a particular inotify capability/limit. \fP" +.ti -1c +.RI "static void \fBSetCapability\fP (\fBInotifyCapability_t\fP cap, uint32_t val) throw (InotifyException)" +.br +.RI "\fIModifies a particular inotify capability/limit. \fP" +.ti -1c +.RI "static uint32_t \fBGetMaxEvents\fP () throw (InotifyException)" +.br +.RI "\fIReturns the maximum number of events in the kernel queue. \fP" +.ti -1c +.RI "static void \fBSetMaxEvents\fP (uint32_t val) throw (InotifyException)" +.br +.RI "\fISets the maximum number of events in the kernel queue. \fP" +.ti -1c +.RI "static uint32_t \fBGetMaxInstances\fP () throw (InotifyException)" +.br +.RI "\fIReturns the maximum number of inotify instances per process. \fP" +.ti -1c +.RI "static void \fBSetMaxInstances\fP (uint32_t val) throw (InotifyException)" +.br +.RI "\fISets the maximum number of inotify instances per process. \fP" +.ti -1c +.RI "static uint32_t \fBGetMaxWatches\fP () throw (InotifyException)" +.br +.RI "\fIReturns the maximum number of inotify watches per instance. \fP" +.ti -1c +.RI "static void \fBSetMaxWatches\fP (uint32_t val) throw (InotifyException)" +.br +.RI "\fISets the maximum number of inotify watches per instance. \fP" +.in -1c +.SS "Friends" + +.in +1c +.ti -1c +.RI "class \fBInotifyWatch\fP" +.br +.in -1c +.SH "Detailed Description" +.PP +inotify class + +It holds information about the inotify device descriptor and manages the event queue. +.PP +If the INOTIFY_THREAD_SAFE is defined this class is thread-safe. +.PP +.SH "Constructor & Destructor Documentation" +.PP +.SS "Inotify::Inotify () throw (\fBInotifyException\fP)" +.PP +Constructor. +.PP +Creates and initializes an instance of inotify communication object (opens the inotify device). +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if inotify isn't available +.RE +.PP + +.SS "Inotify::~Inotify ()" +.PP +Destructor. +.PP +Calls \fBClose()\fP due to clean-up. +.SH "Member Function Documentation" +.PP +.SS "void Inotify::Close ()" +.PP +Removes all watches and closes the inotify device. +.PP +.SS "void Inotify::Add (\fBInotifyWatch\fP * pWatch) throw (\fBInotifyException\fP)" +.PP +Adds a new watch. +.PP +\fBParameters:\fP +.RS 4 +\fIpWatch\fP inotify watch +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if adding failed +.RE +.PP + +.SS "void Inotify::Add (\fBInotifyWatch\fP & rWatch) throw (\fBInotifyException\fP)\fC [inline]\fP" +.PP +Adds a new watch. +.PP +\fBParameters:\fP +.RS 4 +\fIrWatch\fP inotify watch +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if adding failed +.RE +.PP + +.SS "void Inotify::Remove (\fBInotifyWatch\fP * pWatch) throw (\fBInotifyException\fP)" +.PP +Removes a watch. +.PP +If the given watch is not present it does nothing. +.PP +\fBParameters:\fP +.RS 4 +\fIpWatch\fP inotify watch +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if removing failed +.RE +.PP + +.SS "void Inotify::Remove (\fBInotifyWatch\fP & rWatch) throw (\fBInotifyException\fP)\fC [inline]\fP" +.PP +Removes a watch. +.PP +If the given watch is not present it does nothing. +.PP +\fBParameters:\fP +.RS 4 +\fIrWatch\fP inotify watch +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if removing failed +.RE +.PP + +.SS "void Inotify::RemoveAll ()" +.PP +Removes all watches. +.PP +.SS "size_t Inotify::GetWatchCount () const\fC [inline]\fP" +.PP +Returns the count of watches. +.PP +This is the total count of all watches (regardless whether enabled or not). +.PP +\fBReturns:\fP +.RS 4 +count of watches +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBGetEnabledCount()\fP +.RE +.PP + +.SS "size_t Inotify::GetEnabledCount () const\fC [inline]\fP" +.PP +Returns the count of enabled watches. +.PP +\fBReturns:\fP +.RS 4 +count of enabled watches +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBGetWatchCount()\fP +.RE +.PP + +.SS "void Inotify::WaitForEvents (bool fNoIntr = \fCfalse\fP) throw (\fBInotifyException\fP)" +.PP +Waits for inotify events. +.PP +It waits until one or more events occur. When called in nonblocking mode it only retrieves occurred events to the internal queue and exits. +.PP +\fBParameters:\fP +.RS 4 +\fIfNoIntr\fP if true it re-calls the system call after a handled signal +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if reading events failed +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBSetNonBlock()\fP +.RE +.PP + +.SS "size_t Inotify::GetEventCount ()\fC [inline]\fP" +.PP +Returns the count of received and queued events. +.PP +This number is related to the events in the queue inside this object, not to the events pending in the kernel. +.PP +\fBReturns:\fP +.RS 4 +count of events +.RE +.PP + +.SS "bool Inotify::GetEvent (\fBInotifyEvent\fP * pEvt) throw (\fBInotifyException\fP)" +.PP +Extracts a queued inotify event. +.PP +The extracted event is removed from the queue. If the pointer is NULL it does nothing. +.PP +\fBParameters:\fP +.RS 4 +\fIpEvt\fP event object +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the provided pointer is NULL +.RE +.PP + +.SS "bool Inotify::GetEvent (\fBInotifyEvent\fP & rEvt) throw (\fBInotifyException\fP)\fC [inline]\fP" +.PP +Extracts a queued inotify event. +.PP +The extracted event is removed from the queue. +.PP +\fBParameters:\fP +.RS 4 +\fIrEvt\fP event object +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown only in very anomalous cases +.RE +.PP + +.SS "bool Inotify::PeekEvent (\fBInotifyEvent\fP * pEvt) throw (\fBInotifyException\fP)" +.PP +Extracts a queued inotify event (without removing). +.PP +The extracted event stays in the queue. If the pointer is NULL it does nothing. +.PP +\fBParameters:\fP +.RS 4 +\fIpEvt\fP event object +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the provided pointer is NULL +.RE +.PP + +.SS "bool Inotify::PeekEvent (\fBInotifyEvent\fP & rEvt) throw (\fBInotifyException\fP)\fC [inline]\fP" +.PP +Extracts a queued inotify event (without removing). +.PP +The extracted event stays in the queue. +.PP +\fBParameters:\fP +.RS 4 +\fIrEvt\fP event object +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown only in very anomalous cases +.RE +.PP + +.SS "\fBInotifyWatch\fP * Inotify::FindWatch (int iDescriptor)" +.PP +Searches for a watch by a watch descriptor. +.PP +It tries to find a watch by the given descriptor. +.PP +\fBParameters:\fP +.RS 4 +\fIiDescriptor\fP watch descriptor +.RE +.PP +\fBReturns:\fP +.RS 4 +pointer to a watch; NULL if no such watch exists +.RE +.PP + +.SS "\fBInotifyWatch\fP * Inotify::FindWatch (const std::string & rPath)" +.PP +Searches for a watch by a filesystem path. +.PP +It tries to find a watch by the given filesystem path. +.PP +\fBParameters:\fP +.RS 4 +\fIrPath\fP filesystem path +.RE +.PP +\fBReturns:\fP +.RS 4 +pointer to a watch; NULL if no such watch exists +.RE +.PP +\fBAttention:\fP +.RS 4 +The path must be exactly identical to the one used for the searched watch. Be careful about absolute/relative and case-insensitive paths. +.RE +.PP + +.SS "int Inotify::GetDescriptor () const\fC [inline]\fP" +.PP +Returns the file descriptor. +.PP +The descriptor can be used in standard low-level file functions (poll(), select(), fcntl() etc.). +.PP +\fBReturns:\fP +.RS 4 +valid file descriptor or -1 for inactive object +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBSetNonBlock()\fP +.RE +.PP + +.SS "void Inotify::SetNonBlock (bool fNonBlock) throw (\fBInotifyException\fP)" +.PP +Enables/disables non-blocking mode. +.PP +Use this mode if you want to monitor the descriptor (acquired thru \fBGetDescriptor()\fP) in functions such as poll(), select() etc. +.PP +Non-blocking mode is disabled by default. +.PP +\fBParameters:\fP +.RS 4 +\fIfNonBlock\fP enable/disable non-blocking mode +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if setting mode failed +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBGetDescriptor()\fP, \fBSetCloseOnExec()\fP +.RE +.PP + +.SS "void Inotify::SetCloseOnExec (bool fClOnEx) throw (\fBInotifyException\fP)" +.PP +Enables/disables closing on exec. +.PP +Enable this if you want to close the descriptor when executing another program. Otherwise, the descriptor will be inherited. +.PP +Closing on exec is disabled by default. +.PP +\fBParameters:\fP +.RS 4 +\fIfClOnEx\fP enable/disable closing on exec +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if setting failed +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBGetDescriptor()\fP, \fBSetNonBlock()\fP +.RE +.PP + +.SS "uint32_t Inotify::GetCapability (\fBInotifyCapability_t\fP cap) throw (\fBInotifyException\fP)\fC [static]\fP" +.PP +Acquires a particular inotify capability/limit. +.PP +\fBParameters:\fP +.RS 4 +\fIcap\fP capability/limit identifier +.RE +.PP +\fBReturns:\fP +.RS 4 +capability/limit value +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be acquired +.RE +.PP + +.SS "void Inotify::SetCapability (\fBInotifyCapability_t\fP cap, uint32_t val) throw (\fBInotifyException\fP)\fC [static]\fP" +.PP +Modifies a particular inotify capability/limit. +.PP +\fBParameters:\fP +.RS 4 +\fIcap\fP capability/limit identifier +.br +\fIval\fP new capability/limit value +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be set +.RE +.PP +\fBAttention:\fP +.RS 4 +Using this function requires root privileges. Beware of setting extensive values - it may seriously affect system performance and/or stability. +.RE +.PP + +.SS "static uint32_t Inotify::GetMaxEvents () throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Returns the maximum number of events in the kernel queue. +.PP +\fBReturns:\fP +.RS 4 +maximum number of events in the kernel queue +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be acquired +.RE +.PP + +.SS "static void Inotify::SetMaxEvents (uint32_t val) throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Sets the maximum number of events in the kernel queue. +.PP +\fBParameters:\fP +.RS 4 +\fIval\fP new value +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be set +.RE +.PP +\fBAttention:\fP +.RS 4 +Using this function requires root privileges. Beware of setting extensive values - the greater value is set here the more physical memory may be used for the inotify infrastructure. +.RE +.PP + +.SS "static uint32_t Inotify::GetMaxInstances () throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Returns the maximum number of inotify instances per process. +.PP +It means the maximum number of open inotify file descriptors per running process. +.PP +\fBReturns:\fP +.RS 4 +maximum number of inotify instances +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be acquired +.RE +.PP + +.SS "static void Inotify::SetMaxInstances (uint32_t val) throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Sets the maximum number of inotify instances per process. +.PP +\fBParameters:\fP +.RS 4 +\fIval\fP new value +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be set +.RE +.PP +\fBAttention:\fP +.RS 4 +Using this function requires root privileges. Beware of setting extensive values - the greater value is set here the more physical memory may be used for the inotify infrastructure. +.RE +.PP + +.SS "static uint32_t Inotify::GetMaxWatches () throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Returns the maximum number of inotify watches per instance. +.PP +It means the maximum number of inotify watches per inotify file descriptor. +.PP +\fBReturns:\fP +.RS 4 +maximum number of inotify watches +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be acquired +.RE +.PP + +.SS "static void Inotify::SetMaxWatches (uint32_t val) throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Sets the maximum number of inotify watches per instance. +.PP +\fBParameters:\fP +.RS 4 +\fIval\fP new value +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be set +.RE +.PP +\fBAttention:\fP +.RS 4 +Using this function requires root privileges. Beware of setting extensive values - the greater value is set here the more physical memory may be used for the inotify infrastructure. +.RE +.PP + +.SH "Friends And Related Function Documentation" +.PP +.SS "friend class \fBInotifyWatch\fP\fC [friend]\fP" +.PP + + +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. diff --git a/shared/inotify/doc/man/man3/InotifyEvent.3 b/shared/inotify/doc/man/man3/InotifyEvent.3 new file mode 100644 index 00000000..51899460 --- /dev/null +++ b/shared/inotify/doc/man/man3/InotifyEvent.3 @@ -0,0 +1,268 @@ +.TH "InotifyEvent" 3 "18 Apr 2007" "Version 0.7.2" "inotify-cxx" \" -*- nroff -*- +.ad l +.nh +.SH NAME +InotifyEvent \- inotify event class + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <inotify-cxx.h>\fP +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBInotifyEvent\fP ()" +.br +.RI "\fIConstructor. \fP" +.ti -1c +.RI "\fBInotifyEvent\fP (const struct inotify_event *pEvt, \fBInotifyWatch\fP *pWatch)" +.br +.RI "\fIConstructor. \fP" +.ti -1c +.RI "\fB~InotifyEvent\fP ()" +.br +.RI "\fIDestructor. \fP" +.ti -1c +.RI "int32_t \fBGetDescriptor\fP () const" +.br +.RI "\fIReturns the event watch descriptor. \fP" +.ti -1c +.RI "uint32_t \fBGetMask\fP () const" +.br +.RI "\fIReturns the event mask. \fP" +.ti -1c +.RI "bool \fBIsType\fP (uint32_t uType) const" +.br +.RI "\fIChecks for the event type. \fP" +.ti -1c +.RI "uint32_t \fBGetCookie\fP () const" +.br +.RI "\fIReturns the event cookie. \fP" +.ti -1c +.RI "uint32_t \fBGetLength\fP () const" +.br +.RI "\fIReturns the event name length. \fP" +.ti -1c +.RI "const std::string & \fBGetName\fP () const" +.br +.RI "\fIReturns the event name. \fP" +.ti -1c +.RI "void \fBGetName\fP (std::string &rName) const" +.br +.RI "\fIExtracts the event name. \fP" +.ti -1c +.RI "\fBInotifyWatch\fP * \fBGetWatch\fP ()" +.br +.RI "\fIReturns the source watch. \fP" +.ti -1c +.RI "void \fBDumpTypes\fP (std::string &rStr) const" +.br +.RI "\fIFills the string with all types contained in the event mask. \fP" +.in -1c +.SS "Static Public Member Functions" + +.in +1c +.ti -1c +.RI "static bool \fBIsType\fP (uint32_t uValue, uint32_t uType)" +.br +.RI "\fIChecks a value for the event type. \fP" +.ti -1c +.RI "static uint32_t \fBGetMaskByName\fP (const std::string &rName)" +.br +.RI "\fIFinds the appropriate mask for a name. \fP" +.ti -1c +.RI "static void \fBDumpTypes\fP (uint32_t uValue, std::string &rStr)" +.br +.RI "\fIFills the string with all types contained in an event mask value. \fP" +.in -1c +.SH "Detailed Description" +.PP +inotify event class + +It holds all information about inotify event and provides access to its particular values. +.PP +This class is not (and is not intended to be) thread-safe and therefore it must not be used concurrently in multiple threads. +.PP +.SH "Constructor & Destructor Documentation" +.PP +.SS "InotifyEvent::InotifyEvent ()\fC [inline]\fP" +.PP +Constructor. +.PP +Creates a plain event. +.SS "InotifyEvent::InotifyEvent (const struct inotify_event * pEvt, \fBInotifyWatch\fP * pWatch)\fC [inline]\fP" +.PP +Constructor. +.PP +Creates an event based on inotify event data. For NULL pointers it works the same way as \fBInotifyEvent()\fP. +.PP +\fBParameters:\fP +.RS 4 +\fIpEvt\fP event data +.br +\fIpWatch\fP inotify watch +.RE +.PP + +.SS "InotifyEvent::~InotifyEvent ()\fC [inline]\fP" +.PP +Destructor. +.PP +.SH "Member Function Documentation" +.PP +.SS "int32_t InotifyEvent::GetDescriptor () const" +.PP +Returns the event watch descriptor. +.PP +\fBReturns:\fP +.RS 4 +watch descriptor +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBInotifyWatch::GetDescriptor()\fP +.RE +.PP + +.SS "uint32_t InotifyEvent::GetMask () const\fC [inline]\fP" +.PP +Returns the event mask. +.PP +\fBReturns:\fP +.RS 4 +event mask +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBInotifyWatch::GetMask()\fP +.RE +.PP + +.SS "static bool InotifyEvent::IsType (uint32_t uValue, uint32_t uType)\fC [inline, static]\fP" +.PP +Checks a value for the event type. +.PP +\fBParameters:\fP +.RS 4 +\fIuValue\fP checked value +.br +\fIuType\fP type which is checked for +.RE +.PP +\fBReturns:\fP +.RS 4 +true = the value contains the given type, false = otherwise +.RE +.PP + +.SS "bool InotifyEvent::IsType (uint32_t uType) const\fC [inline]\fP" +.PP +Checks for the event type. +.PP +\fBParameters:\fP +.RS 4 +\fIuType\fP type which is checked for +.RE +.PP +\fBReturns:\fP +.RS 4 +true = event mask contains the given type, false = otherwise +.RE +.PP + +.SS "uint32_t InotifyEvent::GetCookie () const\fC [inline]\fP" +.PP +Returns the event cookie. +.PP +\fBReturns:\fP +.RS 4 +event cookie +.RE +.PP + +.SS "uint32_t InotifyEvent::GetLength () const\fC [inline]\fP" +.PP +Returns the event name length. +.PP +\fBReturns:\fP +.RS 4 +event name length +.RE +.PP + +.SS "const std::string& InotifyEvent::GetName () const\fC [inline]\fP" +.PP +Returns the event name. +.PP +\fBReturns:\fP +.RS 4 +event name +.RE +.PP + +.SS "void InotifyEvent::GetName (std::string & rName) const\fC [inline]\fP" +.PP +Extracts the event name. +.PP +\fBParameters:\fP +.RS 4 +\fIrName\fP event name +.RE +.PP + +.SS "\fBInotifyWatch\fP* InotifyEvent::GetWatch ()\fC [inline]\fP" +.PP +Returns the source watch. +.PP +\fBReturns:\fP +.RS 4 +source watch +.RE +.PP + +.SS "uint32_t InotifyEvent::GetMaskByName (const std::string & rName)\fC [static]\fP" +.PP +Finds the appropriate mask for a name. +.PP +\fBParameters:\fP +.RS 4 +\fIrName\fP mask name +.RE +.PP +\fBReturns:\fP +.RS 4 +mask for name; 0 on failure +.RE +.PP + +.SS "void InotifyEvent::DumpTypes (uint32_t uValue, std::string & rStr)\fC [static]\fP" +.PP +Fills the string with all types contained in an event mask value. +.PP +\fBParameters:\fP +.RS 4 +\fIuValue\fP event mask value +.br +\fIrStr\fP dumped event types +.RE +.PP + +.SS "void InotifyEvent::DumpTypes (std::string & rStr) const" +.PP +Fills the string with all types contained in the event mask. +.PP +\fBParameters:\fP +.RS 4 +\fIrStr\fP dumped event types +.RE +.PP + + +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. diff --git a/shared/inotify/doc/man/man3/InotifyException.3 b/shared/inotify/doc/man/man3/InotifyException.3 new file mode 100644 index 00000000..90c5990d --- /dev/null +++ b/shared/inotify/doc/man/man3/InotifyException.3 @@ -0,0 +1,125 @@ +.TH "InotifyException" 3 "18 Apr 2007" "Version 0.7.2" "inotify-cxx" \" -*- nroff -*- +.ad l +.nh +.SH NAME +InotifyException \- Class for inotify exceptions. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <inotify-cxx.h>\fP +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBInotifyException\fP (const std::string &rMsg='', int iErr=0, void *pSrc=NULL)" +.br +.RI "\fIConstructor. \fP" +.ti -1c +.RI "const std::string & \fBGetMessage\fP () const" +.br +.RI "\fIReturns the exception message. \fP" +.ti -1c +.RI "int \fBGetErrorNumber\fP () const" +.br +.RI "\fIReturns the exception error number. \fP" +.ti -1c +.RI "void * \fBGetSource\fP () const" +.br +.RI "\fIReturns the exception source. \fP" +.in -1c +.SS "Protected Attributes" + +.in +1c +.ti -1c +.RI "std::string \fBm_msg\fP" +.br +.RI "\fImessage \fP" +.ti -1c +.RI "int \fBm_err\fP" +.br +.RI "\fIerror number \fP" +.ti -1c +.RI "void * \fBm_pSrc\fP" +.br +.RI "\fIsource \fP" +.in -1c +.SH "Detailed Description" +.PP +Class for inotify exceptions. + +This class allows to acquire information about exceptional events. It makes easier to log or display error messages and to identify problematic code locations. +.PP +Although this class is basically thread-safe it is not intended to be shared between threads. +.PP +.SH "Constructor & Destructor Documentation" +.PP +.SS "InotifyException::InotifyException (const std::string & rMsg = \fC''\fP, int iErr = \fC0\fP, void * pSrc = \fCNULL\fP)\fC [inline]\fP" +.PP +Constructor. +.PP +\fBParameters:\fP +.RS 4 +\fIrMsg\fP message +.br +\fIiErr\fP error number (see errno.h) +.br +\fIpSrc\fP source +.RE +.PP + +.SH "Member Function Documentation" +.PP +.SS "const std::string& InotifyException::GetMessage () const\fC [inline]\fP" +.PP +Returns the exception message. +.PP +\fBReturns:\fP +.RS 4 +message +.RE +.PP + +.SS "int InotifyException::GetErrorNumber () const\fC [inline]\fP" +.PP +Returns the exception error number. +.PP +If not applicable this value is 0 (zero). +.PP +\fBReturns:\fP +.RS 4 +error number (standardized; see errno.h) +.RE +.PP + +.SS "void* InotifyException::GetSource () const\fC [inline]\fP" +.PP +Returns the exception source. +.PP +\fBReturns:\fP +.RS 4 +source +.RE +.PP + +.SH "Member Data Documentation" +.PP +.SS "std::string \fBInotifyException::m_msg\fP\fC [protected]\fP" +.PP +message +.PP +.SS "int \fBInotifyException::m_err\fP\fC [protected]\fP" +.PP +error number +.PP +.SS "void* \fBInotifyException::m_pSrc\fP\fC [mutable, protected]\fP" +.PP +source +.PP + + +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. diff --git a/shared/inotify/doc/man/man3/InotifyWatch.3 b/shared/inotify/doc/man/man3/InotifyWatch.3 new file mode 100644 index 00000000..ea352997 --- /dev/null +++ b/shared/inotify/doc/man/man3/InotifyWatch.3 @@ -0,0 +1,207 @@ +.TH "InotifyWatch" 3 "18 Apr 2007" "Version 0.7.2" "inotify-cxx" \" -*- nroff -*- +.ad l +.nh +.SH NAME +InotifyWatch \- inotify watch class + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <inotify-cxx.h>\fP +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBInotifyWatch\fP (const std::string &rPath, int32_t uMask, bool fEnabled=true)" +.br +.RI "\fIConstructor. \fP" +.ti -1c +.RI "\fB~InotifyWatch\fP ()" +.br +.RI "\fIDestructor. \fP" +.ti -1c +.RI "int32_t \fBGetDescriptor\fP () const" +.br +.RI "\fIReturns the watch descriptor. \fP" +.ti -1c +.RI "const std::string & \fBGetPath\fP () const" +.br +.RI "\fIReturns the watched file path. \fP" +.ti -1c +.RI "uint32_t \fBGetMask\fP () const" +.br +.RI "\fIReturns the watch event mask. \fP" +.ti -1c +.RI "void \fBSetMask\fP (uint32_t uMask) throw (InotifyException)" +.br +.RI "\fISets the watch event mask. \fP" +.ti -1c +.RI "\fBInotify\fP * \fBGetInotify\fP ()" +.br +.RI "\fIReturns the appropriate inotify class instance. \fP" +.ti -1c +.RI "void \fBSetEnabled\fP (bool fEnabled) throw (InotifyException)" +.br +.RI "\fIEnables/disables the watch. \fP" +.ti -1c +.RI "bool \fBIsEnabled\fP () const" +.br +.RI "\fIChecks whether the watch is enabled. \fP" +.ti -1c +.RI "bool \fBIsRecursive\fP () const" +.br +.RI "\fIChecks whether the watch is recursive. \fP" +.in -1c +.SS "Friends" + +.in +1c +.ti -1c +.RI "class \fBInotify\fP" +.br +.in -1c +.SH "Detailed Description" +.PP +inotify watch class + +It holds information about the inotify watch on a particular inode. +.PP +If the INOTIFY_THREAD_SAFE is defined this class is thread-safe. +.PP +.SH "Constructor & Destructor Documentation" +.PP +.SS "InotifyWatch::InotifyWatch (const std::string & rPath, int32_t uMask, bool fEnabled = \fCtrue\fP)\fC [inline]\fP" +.PP +Constructor. +.PP +Creates an inotify watch. Because this watch is inactive it has an invalid descriptor (-1). +.PP +\fBParameters:\fP +.RS 4 +\fIrPath\fP watched file path +.br +\fIuMask\fP mask for events +.br +\fIfEnabled\fP events enabled yes/no +.RE +.PP + +.SS "InotifyWatch::~InotifyWatch ()\fC [inline]\fP" +.PP +Destructor. +.PP +.SH "Member Function Documentation" +.PP +.SS "int32_t InotifyWatch::GetDescriptor () const\fC [inline]\fP" +.PP +Returns the watch descriptor. +.PP +\fBReturns:\fP +.RS 4 +watch descriptor; -1 for inactive watch +.RE +.PP + +.SS "const std::string& InotifyWatch::GetPath () const\fC [inline]\fP" +.PP +Returns the watched file path. +.PP +\fBReturns:\fP +.RS 4 +file path +.RE +.PP + +.SS "uint32_t InotifyWatch::GetMask () const\fC [inline]\fP" +.PP +Returns the watch event mask. +.PP +\fBReturns:\fP +.RS 4 +event mask +.RE +.PP + +.SS "void InotifyWatch::SetMask (uint32_t uMask) throw (\fBInotifyException\fP)" +.PP +Sets the watch event mask. +.PP +If the watch is active (added to an instance of \fBInotify\fP) this method may fail due to unsuccessful re-setting the watch in the kernel. +.PP +\fBParameters:\fP +.RS 4 +\fIuMask\fP event mask +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if changing fails +.RE +.PP + +.SS "\fBInotify\fP* InotifyWatch::GetInotify ()\fC [inline]\fP" +.PP +Returns the appropriate inotify class instance. +.PP +\fBReturns:\fP +.RS 4 +inotify instance +.RE +.PP + +.SS "void InotifyWatch::SetEnabled (bool fEnabled) throw (\fBInotifyException\fP)" +.PP +Enables/disables the watch. +.PP +If the watch is active (added to an instance of \fBInotify\fP) this method may fail due to unsuccessful re-setting the watch in the kernel. +.PP +Re-setting the current state has no effect. +.PP +\fBParameters:\fP +.RS 4 +\fIfEnabled\fP set enabled yes/no +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if enabling/disabling fails +.RE +.PP + +.SS "bool InotifyWatch::IsEnabled () const\fC [inline]\fP" +.PP +Checks whether the watch is enabled. +.PP +\fBReturns:\fP +.RS 4 +true = enables, false = disabled +.RE +.PP + +.SS "bool InotifyWatch::IsRecursive () const\fC [inline]\fP" +.PP +Checks whether the watch is recursive. +.PP +A recursive watch monitors a directory itself and all its subdirectories. This watch is a logical object which may have many underlying kernel watches. +.PP +\fBReturns:\fP +.RS 4 +currently always false (recursive watches not yet supported) +.RE +.PP +\fBAttention:\fP +.RS 4 +Recursive watches are currently NOT supported. They are planned for future versions. +.RE +.PP + +.SH "Friends And Related Function Documentation" +.PP +.SS "friend class \fBInotify\fP\fC [friend]\fP" +.PP + + +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. diff --git a/shared/inotify/doc/man/man3/inotify-cxx.cpp.3 b/shared/inotify/doc/man/man3/inotify-cxx.cpp.3 new file mode 100644 index 00000000..dd326b47 --- /dev/null +++ b/shared/inotify/doc/man/man3/inotify-cxx.cpp.3 @@ -0,0 +1,70 @@ +.TH "inotify-cxx.cpp" 3 "18 Apr 2007" "Version 0.7.2" "inotify-cxx" \" -*- nroff -*- +.ad l +.nh +.SH NAME +inotify-cxx.cpp \- inotify C++ interface implementation +.SH SYNOPSIS +.br +.PP +\fC#include <errno.h>\fP +.br +\fC#include <unistd.h>\fP +.br +\fC#include <fcntl.h>\fP +.br +\fC#include 'inotify-cxx.h'\fP +.br + +.SS "Defines" + +.in +1c +.ti -1c +.RI "#define \fBPROCFS_INOTIFY_BASE\fP '/proc/sys/fs/inotify/'" +.br +.RI "\fIprocfs inotify base path \fP" +.ti -1c +.RI "#define \fBDUMP_SEP\fP" +.br +.RI "\fIdump separator (between particular entries) \fP" +.in -1c +.SH "Detailed Description" +.PP +inotify C++ interface implementation + +inotify C++ interface +.PP +Copyright (C) 2006, 2007 Lukas Jelinek <lukas@aiken.cz> +.PP +This program is free software; you can redistribute it and/or modify it under the terms of one of the following licenses: +.PP +.PD 0 +.IP "\(bu" 2 +1. X11-style license (see LICENSE-X11) +.IP "\(bu" 2 +2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) +.IP "\(bu" 2 +3. GNU General Public License, version 2 (see LICENSE-GPL) +.PP +If you want to help with choosing the best license for you, please visit http://www.gnu.org/licenses/license-list.html. +.SH "Define Documentation" +.PP +.SS "#define DUMP_SEP" +.PP +\fBValue:\fP +.PP +.nf +({ \ + if (!rStr.empty()) { \ + rStr.append(','); \ + } \ + }) +.fi +dump separator (between particular entries) +.PP +.SS "#define PROCFS_INOTIFY_BASE '/proc/sys/fs/inotify/'" +.PP +procfs inotify base path +.PP +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. diff --git a/shared/inotify/doc/man/man3/inotify-cxx.h.3 b/shared/inotify/doc/man/man3/inotify-cxx.h.3 new file mode 100644 index 00000000..4e0ec8b3 --- /dev/null +++ b/shared/inotify/doc/man/man3/inotify-cxx.h.3 @@ -0,0 +1,198 @@ +.TH "inotify-cxx.h" 3 "18 Apr 2007" "Version 0.7.2" "inotify-cxx" \" -*- nroff -*- +.ad l +.nh +.SH NAME +inotify-cxx.h \- inotify C++ interface header +.SH SYNOPSIS +.br +.PP +\fC#include <stdint.h>\fP +.br +\fC#include <string>\fP +.br +\fC#include <deque>\fP +.br +\fC#include <map>\fP +.br +\fC#include <sys/syscall.h>\fP +.br +\fC#include <sys/inotify.h>\fP +.br +\fC#include <sys/inotify-syscalls.h>\fP +.br + +.SS "Classes" + +.in +1c +.ti -1c +.RI "class \fBInotifyException\fP" +.br +.RI "\fIClass for inotify exceptions. \fP" +.ti -1c +.RI "class \fBInotifyEvent\fP" +.br +.RI "\fIinotify event class \fP" +.ti -1c +.RI "class \fBInotifyWatch\fP" +.br +.RI "\fIinotify watch class \fP" +.ti -1c +.RI "class \fBInotify\fP" +.br +.RI "\fIinotify class \fP" +.in -1c +.SS "Defines" + +.in +1c +.ti -1c +.RI "#define \fBINOTIFY_EVENT_SIZE\fP (sizeof(struct inotify_event))" +.br +.RI "\fIEvent struct size. \fP" +.ti -1c +.RI "#define \fBINOTIFY_BUFLEN\fP (1024 * (INOTIFY_EVENT_SIZE + 16))" +.br +.RI "\fIEvent buffer length. \fP" +.ti -1c +.RI "#define \fBIN_EXC_MSG\fP(msg) (std::string(__PRETTY_FUNCTION__) + ': ' + msg)" +.br +.RI "\fIHelper macro for creating exception messages. \fP" +.ti -1c +.RI "#define \fBIN_LOCK_DECL\fP" +.br +.RI "\fIinotify-cxx thread safety \fP" +.ti -1c +.RI "#define \fBIN_LOCK_INIT\fP" +.br +.ti -1c +.RI "#define \fBIN_LOCK_DONE\fP" +.br +.ti -1c +.RI "#define \fBIN_READ_BEGIN\fP" +.br +.ti -1c +.RI "#define \fBIN_READ_END\fP" +.br +.ti -1c +.RI "#define \fBIN_READ_END_NOTHROW\fP" +.br +.ti -1c +.RI "#define \fBIN_WRITE_BEGIN\fP" +.br +.ti -1c +.RI "#define \fBIN_WRITE_END\fP" +.br +.ti -1c +.RI "#define \fBIN_WRITE_END_NOTHROW\fP" +.br +.in -1c +.SS "Typedefs" + +.in +1c +.ti -1c +.RI "typedef std::map< int32_t, \fBInotifyWatch\fP * > \fBIN_WATCH_MAP\fP" +.br +.RI "\fIMapping from watch descriptors to watch objects. \fP" +.ti -1c +.RI "typedef std::map< std::string, \fBInotifyWatch\fP * > \fBIN_WP_MAP\fP" +.br +.RI "\fIMapping from paths to watch objects. \fP" +.in -1c +.SS "Enumerations" + +.in +1c +.ti -1c +.RI "enum \fBInotifyCapability_t\fP { \fBIN_MAX_EVENTS\fP = 0, \fBIN_MAX_INSTANCES\fP = 1, \fBIN_MAX_WATCHES\fP = 2 }" +.br +.RI "\fIinotify capability/limit identifiers \fP" +.in -1c +.SH "Detailed Description" +.PP +inotify C++ interface header + +inotify C++ interface +.PP +Copyright (C) 2006, 2007 Lukas Jelinek, <lukas@aiken.cz> +.PP +This program is free software; you can redistribute it and/or modify it under the terms of one of the following licenses: +.PP +.PD 0 +.IP "\(bu" 2 +1. X11-style license (see LICENSE-X11) +.IP "\(bu" 2 +2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) +.IP "\(bu" 2 +3. GNU General Public License, version 2 (see LICENSE-GPL) +.PP +If you want to help with choosing the best license for you, please visit http://www.gnu.org/licenses/license-list.html. +.SH "Define Documentation" +.PP +.SS "#define IN_EXC_MSG(msg) (std::string(__PRETTY_FUNCTION__) + ': ' + msg)" +.PP +Helper macro for creating exception messages. +.PP +It prepends the message by the function name. +.SS "#define IN_LOCK_DECL" +.PP +inotify-cxx thread safety +.PP +If this symbol is defined you can use this interface safely threaded applications. Remember that it slightly degrades performance. +.PP +Even if INOTIFY_THREAD_SAFE is defined some classes stay unsafe. If you must use them (must you?) in more than one thread concurrently you need to implement explicite locking. +.PP +You need not to define INOTIFY_THREAD_SAFE in that cases where the application is multithreaded but all the inotify infrastructure will be managed only in one thread. This is the recommended way. +.PP +Locking may fail (it is very rare but not impossible). In this case an exception is thrown. But if unlocking fails in case of an error it does nothing (this failure is ignored). +.SS "#define IN_LOCK_DONE" +.PP +.SS "#define IN_LOCK_INIT" +.PP +.SS "#define IN_READ_BEGIN" +.PP +.SS "#define IN_READ_END" +.PP +.SS "#define IN_READ_END_NOTHROW" +.PP +.SS "#define IN_WRITE_BEGIN" +.PP +.SS "#define IN_WRITE_END" +.PP +.SS "#define IN_WRITE_END_NOTHROW" +.PP +.SS "#define INOTIFY_BUFLEN (1024 * (INOTIFY_EVENT_SIZE + 16))" +.PP +Event buffer length. +.PP +.SS "#define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event))" +.PP +Event struct size. +.PP +.SH "Typedef Documentation" +.PP +.SS "typedef std::map<int32_t, \fBInotifyWatch\fP*> \fBIN_WATCH_MAP\fP" +.PP +Mapping from watch descriptors to watch objects. +.PP +.SS "typedef std::map<std::string, \fBInotifyWatch\fP*> \fBIN_WP_MAP\fP" +.PP +Mapping from paths to watch objects. +.PP +.SH "Enumeration Type Documentation" +.PP +.SS "enum \fBInotifyCapability_t\fP" +.PP +inotify capability/limit identifiers +.PP +\fBEnumerator: \fP +.in +1c +.TP +\fB\fIIN_MAX_EVENTS \fP\fP +max. events in the kernel queue +.TP +\fB\fIIN_MAX_INSTANCES \fP\fP +max. inotify file descriptors per process +.TP +\fB\fIIN_MAX_WATCHES \fP\fP +max. watches per file descriptor +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. diff --git a/shared/inotify/inotify-cxx.cpp b/shared/inotify/inotify-cxx.cpp new file mode 100644 index 00000000..7870e825 --- /dev/null +++ b/shared/inotify/inotify-cxx.cpp @@ -0,0 +1,630 @@ + +/// inotify C++ interface implementation +/** + * \file inotify-cxx.cpp + * + * inotify C++ interface + * + * Copyright (C) 2006, 2007 Lukas Jelinek <lukas@aiken.cz> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of one of the following licenses: + * + * \li 1. X11-style license (see LICENSE-X11) + * \li 2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) + * \li 3. GNU General Public License, version 2 (see LICENSE-GPL) + * + * If you want to help with choosing the best license for you, + * please visit http://www.gnu.org/licenses/license-list.html. + * + */ + + +#include <errno.h> +#include <unistd.h> +#include <fcntl.h> + +#include "inotify-cxx.h" + +/// procfs inotify base path +#define PROCFS_INOTIFY_BASE "/proc/sys/fs/inotify/" + +/// dump separator (between particular entries) +#define DUMP_SEP \ + ({ \ + if (!rStr.empty()) { \ + rStr.append(","); \ + } \ + }) + + + +int32_t InotifyEvent::GetDescriptor() const +{ + return m_pWatch != NULL // if watch exists + ? m_pWatch->GetDescriptor() // return its descriptor + : -1; // else return -1 +} + +uint32_t InotifyEvent::GetMaskByName(const std::string& rName) +{ + if (rName == "IN_ACCESS") + return IN_ACCESS; + else if (rName == "IN_MODIFY") + return IN_MODIFY; + else if (rName == "IN_ATTRIB") + return IN_ATTRIB; + else if (rName == "IN_CLOSE_WRITE") + return IN_CLOSE_WRITE; + else if (rName == "IN_CLOSE_NOWRITE") + return IN_CLOSE_NOWRITE; + else if (rName == "IN_OPEN") + return IN_OPEN; + else if (rName == "IN_MOVED_FROM") + return IN_MOVED_FROM; + else if (rName == "IN_MOVED_TO") + return IN_MOVED_TO; + else if (rName == "IN_CREATE") + return IN_CREATE; + else if (rName == "IN_DELETE") + return IN_DELETE; + else if (rName == "IN_DELETE_SELF") + return IN_DELETE_SELF; + else if (rName == "IN_UNMOUNT") + return IN_UNMOUNT; + else if (rName == "IN_Q_OVERFLOW") + return IN_Q_OVERFLOW; + else if (rName == "IN_IGNORED") + return IN_IGNORED; + else if (rName == "IN_CLOSE") + return IN_CLOSE; + else if (rName == "IN_MOVE") + return IN_MOVE; + else if (rName == "IN_ISDIR") + return IN_ISDIR; + else if (rName == "IN_ONESHOT") + return IN_ONESHOT; + else if (rName == "IN_ALL_EVENTS") + return IN_ALL_EVENTS; + +#ifdef IN_DONT_FOLLOW + else if (rName == "IN_DONT_FOLLOW") + return IN_DONT_FOLLOW; +#endif // IN_DONT_FOLLOW + +#ifdef IN_ONLYDIR + else if (rName == "IN_ONLYDIR") + return IN_ONLYDIR; +#endif // IN_ONLYDIR + +#ifdef IN_MOVE_SELF + else if (rName == "IN_MOVE_SELF") + return IN_MOVE_SELF; +#endif // IN_MOVE_SELF + + return (uint32_t) 0; +} + +void InotifyEvent::DumpTypes(uint32_t uValue, std::string& rStr) +{ + rStr = ""; + + if (IsType(uValue, IN_ALL_EVENTS)) { + rStr.append("IN_ALL_EVENTS"); + } + else { + if (IsType(uValue, IN_ACCESS)) { + DUMP_SEP; + rStr.append("IN_ACCESS"); + } + if (IsType(uValue, IN_MODIFY)) { + DUMP_SEP; + rStr.append("IN_MODIFY"); + } + if (IsType(uValue, IN_ATTRIB)) { + DUMP_SEP; + rStr.append("IN_ATTRIB"); + } + if (IsType(uValue, IN_CREATE)) { + DUMP_SEP; + rStr.append("IN_CREATE"); + } + if (IsType(uValue, IN_DELETE)) { + DUMP_SEP; + rStr.append("IN_DELETE"); + } + if (IsType(uValue, IN_DELETE_SELF)) { + DUMP_SEP; + rStr.append("IN_DELETE_SELF"); + } + if (IsType(uValue, IN_OPEN)) { + DUMP_SEP; + rStr.append("IN_OPEN"); + } + if (IsType(uValue, IN_CLOSE)) { + DUMP_SEP; + rStr.append("IN_CLOSE"); + } + +#ifdef IN_MOVE_SELF + if (IsType(uValue, IN_MOVE_SELF)) { + DUMP_SEP; + rStr.append("IN_MOVE_SELF"); + } +#endif // IN_MOVE_SELF + + else { + if (IsType(uValue, IN_CLOSE_WRITE)) { + DUMP_SEP; + rStr.append("IN_CLOSE_WRITE"); + } + if (IsType(uValue, IN_CLOSE_NOWRITE)) { + DUMP_SEP; + rStr.append("IN_CLOSE_NOWRITE"); + } + } + if (IsType(uValue, IN_MOVE)) { + DUMP_SEP; + rStr.append("IN_MOVE"); + } + else { + if (IsType(uValue, IN_MOVED_FROM)) { + DUMP_SEP; + rStr.append("IN_MOVED_FROM"); + } + if (IsType(uValue, IN_MOVED_TO)) { + DUMP_SEP; + rStr.append("IN_MOVED_TO"); + } + } + } + if (IsType(uValue, IN_UNMOUNT)) { + DUMP_SEP; + rStr.append("IN_UNMOUNT"); + } + if (IsType(uValue, IN_Q_OVERFLOW)) { + DUMP_SEP; + rStr.append("IN_Q_OVERFLOW"); + } + if (IsType(uValue, IN_IGNORED)) { + DUMP_SEP; + rStr.append("IN_IGNORED"); + } + if (IsType(uValue, IN_ISDIR)) { + DUMP_SEP; + rStr.append("IN_ISDIR"); + } + if (IsType(uValue, IN_ONESHOT)) { + DUMP_SEP; + rStr.append("IN_ONESHOT"); + } + +#ifdef IN_DONT_FOLLOW + if (IsType(uValue, IN_DONT_FOLLOW)) { + DUMP_SEP; + rStr.append("IN_DONT_FOLLOW"); + } +#endif // IN_DONT_FOLLOW + +#ifdef IN_ONLYDIR + if (IsType(uValue, IN_ONLYDIR)) { + DUMP_SEP; + rStr.append("IN_ONLYDIR"); + } +#endif // IN_ONLYDIR +} + +void InotifyEvent::DumpTypes(std::string& rStr) const +{ + DumpTypes(m_uMask, rStr); +} + + +void InotifyWatch::SetMask(uint32_t uMask) throw (InotifyException) +{ + IN_WRITE_BEGIN + + if (m_wd != -1) { + int wd = inotify_add_watch(m_pInotify->GetDescriptor(), m_path.c_str(), uMask); + if (wd != m_wd) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("changing mask failed"), wd == -1 ? errno : EINVAL, this); + } + } + + m_uMask = uMask; + + IN_WRITE_END +} + +void InotifyWatch::SetEnabled(bool fEnabled) throw (InotifyException) +{ + IN_WRITE_BEGIN + + if (fEnabled == m_fEnabled) { + IN_WRITE_END_NOTHROW + return; + } + + if (m_pInotify != NULL) { + if (fEnabled) { + m_wd = inotify_add_watch(m_pInotify->GetDescriptor(), m_path.c_str(), m_uMask); + if (m_wd == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("enabling watch failed"), errno, this); + } + m_pInotify->m_watches.insert(IN_WATCH_MAP::value_type(m_wd, this)); + } + else { + if (inotify_rm_watch(m_pInotify->GetDescriptor(), m_wd) != 0) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("disabling watch failed"), errno, this); + } + m_pInotify->m_watches.erase(m_wd); + m_wd = -1; + } + } + + m_fEnabled = fEnabled; + + IN_WRITE_END +} + +void InotifyWatch::__Disable() +{ + IN_WRITE_BEGIN + + if (!m_fEnabled) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("event cannot occur on disabled watch"), EINVAL, this); + } + + if (m_pInotify != NULL) { + m_pInotify->m_watches.erase(m_wd); + m_wd = -1; + } + + m_fEnabled = false; + + IN_WRITE_END +} + + +Inotify::Inotify() throw (InotifyException) +{ + IN_LOCK_INIT + + m_fd = inotify_init(); + if (m_fd == -1) { + IN_LOCK_DONE + throw InotifyException(IN_EXC_MSG("inotify init failed"), errno, NULL); + } +} + +Inotify::~Inotify() +{ + Close(); + + IN_LOCK_DONE +} + +void Inotify::Close() +{ + IN_WRITE_BEGIN + + if (m_fd != -1) { + RemoveAll(); + close(m_fd); + m_fd = -1; + } + + IN_WRITE_END +} + +void Inotify::Add(InotifyWatch* pWatch) throw (InotifyException) +{ + IN_WRITE_BEGIN + + // invalid descriptor - this case shouldn't occur - go away + if (m_fd == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("invalid file descriptor"), EBUSY, this); + } + + // this path already watched - go away + if (FindWatch(pWatch->GetPath()) != NULL) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("path already watched"), EBUSY, this); + } + + // for enabled watch + if (pWatch->IsEnabled()) { + + // try to add watch to kernel + int wd = inotify_add_watch(m_fd, pWatch->GetPath().c_str(), pWatch->GetMask()); + + // adding failed - go away + if (wd == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("adding watch failed"), errno, this); + } + + // this path already watched (but defined another way) + InotifyWatch* pW = FindWatch(wd); + if (pW != NULL) { + + // try to recover old watch because it may be modified - then go away + if (inotify_add_watch(m_fd, pW->GetPath().c_str(), pW->GetMask()) < 0) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("watch collision detected and recovery failed"), errno, this); + } + else { + // recovery failed - go away + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("path already watched (but defined another way)"), EBUSY, this); + } + } + + pWatch->m_wd = wd; + m_watches.insert(IN_WATCH_MAP::value_type(pWatch->m_wd, pWatch)); + } + + m_paths.insert(IN_WP_MAP::value_type(pWatch->m_path, pWatch)); + pWatch->m_pInotify = this; + + IN_WRITE_END +} + +void Inotify::Remove(InotifyWatch* pWatch) throw (InotifyException) +{ + IN_WRITE_BEGIN + + // invalid descriptor - this case shouldn't occur - go away + if (m_fd == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("invalid file descriptor"), EBUSY, this); + } + + // for enabled watch + if (pWatch->m_wd != -1) { + + // removing watch failed - go away + if (inotify_rm_watch(m_fd, pWatch->m_wd) == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("removing watch failed"), errno, this); + } + m_watches.erase(pWatch->m_wd); + pWatch->m_wd = -1; + } + + m_paths.erase(pWatch->m_path); + pWatch->m_pInotify = NULL; + + IN_WRITE_END +} + +void Inotify::RemoveAll() +{ + IN_WRITE_BEGIN + + IN_WP_MAP::iterator it = m_paths.begin(); + while (it != m_paths.end()) { + InotifyWatch* pW = (*it).second; + if (pW->m_wd != -1) { + inotify_rm_watch(m_fd, pW->m_wd); + pW->m_wd = -1; + } + pW->m_pInotify = NULL; + it++; + } + + m_watches.clear(); + m_paths.clear(); + + IN_WRITE_END +} + +void Inotify::WaitForEvents(bool fNoIntr) throw (InotifyException) +{ + ssize_t len = 0; + + do { + len = read(m_fd, m_buf, INOTIFY_BUFLEN); + } while (fNoIntr && len == -1 && errno == EINTR); + + if (len == -1 && !(errno == EWOULDBLOCK || errno == EINTR)) + throw InotifyException(IN_EXC_MSG("reading events failed"), errno, this); + + if (len == -1) + return; + + IN_WRITE_BEGIN + + ssize_t i = 0; + while (i < len) { + struct inotify_event* pEvt = (struct inotify_event*) &m_buf[i]; + InotifyWatch* pW = FindWatch(pEvt->wd); + if (pW != NULL) { + InotifyEvent evt(pEvt, pW); + if ( InotifyEvent::IsType(pW->GetMask(), IN_ONESHOT) + || InotifyEvent::IsType(evt.GetMask(), IN_IGNORED)) + pW->__Disable(); + m_events.push_back(evt); + } + i += INOTIFY_EVENT_SIZE + (ssize_t) pEvt->len; + } + + IN_WRITE_END +} + +bool Inotify::GetEvent(InotifyEvent* pEvt) throw (InotifyException) +{ + if (pEvt == NULL) + throw InotifyException(IN_EXC_MSG("null pointer to event"), EINVAL, this); + + IN_WRITE_BEGIN + + bool b = !m_events.empty(); + if (b) { + *pEvt = m_events.front(); + m_events.pop_front(); + } + + IN_WRITE_END + + return b; +} + +bool Inotify::PeekEvent(InotifyEvent* pEvt) throw (InotifyException) +{ + if (pEvt == NULL) + throw InotifyException(IN_EXC_MSG("null pointer to event"), EINVAL, this); + + IN_READ_BEGIN + + bool b = !m_events.empty(); + if (b) { + *pEvt = m_events.front(); + } + + IN_READ_END + + return b; +} + +InotifyWatch* Inotify::FindWatch(int iDescriptor) +{ + IN_READ_BEGIN + + IN_WATCH_MAP::iterator it = m_watches.find(iDescriptor); + InotifyWatch* pW = it == m_watches.end() ? NULL : (*it).second; + + IN_READ_END + + return pW; +} + +InotifyWatch* Inotify::FindWatch(const std::string& rPath) +{ + IN_READ_BEGIN + + IN_WP_MAP::iterator it = m_paths.find(rPath); + InotifyWatch* pW = it == m_paths.end() ? NULL : (*it).second; + + IN_READ_END + + return pW; +} + +void Inotify::SetNonBlock(bool fNonBlock) throw (InotifyException) +{ + IN_WRITE_BEGIN + + if (m_fd == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("invalid file descriptor"), EBUSY, this); + } + + int res = fcntl(m_fd, F_GETFL); + if (res == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("cannot get inotify flags"), errno, this); + } + + if (fNonBlock) { + res |= O_NONBLOCK; + } + else { + res &= ~O_NONBLOCK; + } + + if (fcntl(m_fd, F_SETFL, res) == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("cannot set inotify flags"), errno, this); + } + + IN_WRITE_END +} + +void Inotify::SetCloseOnExec(bool fClOnEx) throw (InotifyException) +{ + IN_WRITE_BEGIN + + if (m_fd == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("invalid file descriptor"), EBUSY, this); + } + + int res = fcntl(m_fd, F_GETFD); + if (res == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("cannot get inotify flags"), errno, this); + } + + if (fClOnEx) { + res |= FD_CLOEXEC; + } + else { + res &= ~FD_CLOEXEC; + } + + if (fcntl(m_fd, F_SETFD, res) == -1) { + IN_WRITE_END_NOTHROW + throw InotifyException(IN_EXC_MSG("cannot set inotify flags"), errno, this); + } + + IN_WRITE_END +} + +uint32_t Inotify::GetCapability(InotifyCapability_t cap) throw (InotifyException) +{ + FILE* f = fopen(GetCapabilityPath(cap).c_str(), "r"); + if (f == NULL) + throw InotifyException(IN_EXC_MSG("cannot get capability"), errno, NULL); + + unsigned int val = 0; + if (fscanf(f, "%u", &val) != 1) { + fclose(f); + throw InotifyException(IN_EXC_MSG("cannot get capability"), EIO, NULL); + } + + fclose(f); + + return (uint32_t) val; +} + +void Inotify::SetCapability(InotifyCapability_t cap, uint32_t val) throw (InotifyException) +{ + FILE* f = fopen(GetCapabilityPath(cap).c_str(), "w"); + if (f == NULL) + throw InotifyException(IN_EXC_MSG("cannot set capability"), errno, NULL); + + if (fprintf(f, "%u", (unsigned int) val) <= 0) { + fclose(f); + throw InotifyException(IN_EXC_MSG("cannot set capability"), EIO, NULL); + } + + fclose(f); +} + +std::string Inotify::GetCapabilityPath(InotifyCapability_t cap) throw (InotifyException) +{ + std::string path(PROCFS_INOTIFY_BASE); + + switch (cap) { + case IN_MAX_EVENTS: + path.append("max_queued_events"); + break; + case IN_MAX_INSTANCES: + path.append("max_user_instances"); + break; + case IN_MAX_WATCHES: + path.append("max_user_watches"); + break; + default: + throw InotifyException(IN_EXC_MSG("unknown capability type"), EINVAL, NULL); + } + + return path; +} + diff --git a/shared/inotify/inotify-cxx.h b/shared/inotify/inotify-cxx.h new file mode 100644 index 00000000..4170972f --- /dev/null +++ b/shared/inotify/inotify-cxx.h @@ -0,0 +1,889 @@ + +/// inotify C++ interface header +/** + * \file inotify-cxx.h + * + * inotify C++ interface + * + * Copyright (C) 2006, 2007 Lukas Jelinek, <lukas@aiken.cz> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of one of the following licenses: + * + * \li 1. X11-style license (see LICENSE-X11) + * \li 2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) + * \li 3. GNU General Public License, version 2 (see LICENSE-GPL) + * + * If you want to help with choosing the best license for you, + * please visit http://www.gnu.org/licenses/license-list.html. + * + */ + + + + + +#ifndef _INOTIFYCXX_H_ +#define _INOTIFYCXX_H_ + +#include <stdint.h> +#include <string> +#include <deque> +#include <map> + +// Please ensure that the following headers take the right place +#include <sys/syscall.h> +#include <sys/inotify.h> + +// Use this if syscalls not defined +#ifndef __NR_inotify_init +#include <sys/inotify-syscalls.h> +#endif // __NR_inotify_init + +/// Event struct size +#define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event)) + +/// Event buffer length +#define INOTIFY_BUFLEN (1024 * (INOTIFY_EVENT_SIZE + 16)) + +/// Helper macro for creating exception messages. +/** + * It prepends the message by the function name. + */ +#define IN_EXC_MSG(msg) (std::string(__PRETTY_FUNCTION__) + ": " + msg) + +/// inotify capability/limit identifiers +typedef enum +{ + IN_MAX_EVENTS = 0, ///< max. events in the kernel queue + IN_MAX_INSTANCES = 1, ///< max. inotify file descriptors per process + IN_MAX_WATCHES = 2 ///< max. watches per file descriptor +} InotifyCapability_t; + +/// inotify-cxx thread safety +/** + * If this symbol is defined you can use this interface safely + * threaded applications. Remember that it slightly degrades + * performance. + * + * Even if INOTIFY_THREAD_SAFE is defined some classes stay + * unsafe. If you must use them (must you?) in more than one + * thread concurrently you need to implement explicite locking. + * + * You need not to define INOTIFY_THREAD_SAFE in that cases + * where the application is multithreaded but all the inotify + * infrastructure will be managed only in one thread. This is + * the recommended way. + * + * Locking may fail (it is very rare but not impossible). In this + * case an exception is thrown. But if unlocking fails in case + * of an error it does nothing (this failure is ignored). + */ +#ifdef INOTIFY_THREAD_SAFE + +#include <pthread.h> + +#define IN_LOCK_DECL mutable pthread_rwlock_t __m_lock; + +#define IN_LOCK_INIT \ + { \ + pthread_rwlockattr_t attr; \ + int res = 0; \ + if ((res = pthread_rwlockattr_init(&attr)) != 0) \ + throw InotifyException(IN_EXC_MSG("cannot initialize lock attributes"), res, this); \ + if ((res = pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NP)) != 0) \ + throw InotifyException(IN_EXC_MSG("cannot set lock kind"), res, this); \ + if ((res = pthread_rwlock_init(&__m_lock, &attr)) != 0) \ + throw InotifyException(IN_EXC_MSG("cannot initialize lock"), res, this); \ + pthread_rwlockattr_destroy(&attr); \ + } + +#define IN_LOCK_DONE pthread_rwlock_destroy(&__m_lock); + +#define IN_READ_BEGIN \ + { \ + int res = pthread_rwlock_rdlock(&__m_lock); \ + if (res != 0) \ + throw InotifyException(IN_EXC_MSG("locking for reading failed"), res, (void*) this); \ + } + +#define IN_READ_END \ + { \ + int res = pthread_rwlock_unlock(&__m_lock); \ + if (res != 0) \ + throw InotifyException(IN_EXC_MSG("unlocking failed"), res, (void*) this); \ + } + +#define IN_READ_END_NOTHROW pthread_rwlock_unlock(&__m_lock); + +#define IN_WRITE_BEGIN \ + { \ + int res = pthread_rwlock_wrlock(&__m_lock); \ + if (res != 0) \ + throw InotifyException(IN_EXC_MSG("locking for writing failed"), res, (void*) this); \ + } + +#define IN_WRITE_END IN_READ_END +#define IN_WRITE_END_NOTHROW IN_READ_END_NOTHROW + +#else // INOTIFY_THREAD_SAFE + +#define IN_LOCK_DECL +#define IN_LOCK_INIT +#define IN_LOCK_DONE +#define IN_READ_BEGIN +#define IN_READ_END +#define IN_READ_END_NOTHROW +#define IN_WRITE_BEGIN +#define IN_WRITE_END +#define IN_WRITE_END_NOTHROW + +#endif // INOTIFY_THREAD_SAFE + + + + +// forward declaration +class InotifyWatch; +class Inotify; + + +/// Class for inotify exceptions +/** + * This class allows to acquire information about exceptional + * events. It makes easier to log or display error messages + * and to identify problematic code locations. + * + * Although this class is basically thread-safe it is not intended + * to be shared between threads. + */ +class InotifyException +{ +public: + /// Constructor + /** + * \param[in] rMsg message + * \param[in] iErr error number (see errno.h) + * \param[in] pSrc source + */ + InotifyException(const std::string& rMsg = "", int iErr = 0, void* pSrc = NULL) + : m_msg(rMsg), + m_err(iErr) + { + m_pSrc = pSrc; + } + + /// Returns the exception message. + /** + * \return message + */ + inline const std::string& GetMessage() const + { + return m_msg; + } + + /// Returns the exception error number. + /** + * If not applicable this value is 0 (zero). + * + * \return error number (standardized; see errno.h) + */ + inline int GetErrorNumber() const + { + return m_err; + } + + /// Returns the exception source. + /** + * \return source + */ + inline void* GetSource() const + { + return m_pSrc; + } + +protected: + std::string m_msg; ///< message + int m_err; ///< error number + mutable void* m_pSrc; ///< source +}; + + +/// inotify event class +/** + * It holds all information about inotify event and provides + * access to its particular values. + * + * This class is not (and is not intended to be) thread-safe + * and therefore it must not be used concurrently in multiple + * threads. + */ +class InotifyEvent +{ +public: + /// Constructor. + /** + * Creates a plain event. + */ + InotifyEvent() + : m_uMask(0), + m_uCookie(0) + { + m_pWatch = NULL; + } + + /// Constructor. + /** + * Creates an event based on inotify event data. + * For NULL pointers it works the same way as InotifyEvent(). + * + * \param[in] pEvt event data + * \param[in] pWatch inotify watch + */ + InotifyEvent(const struct inotify_event* pEvt, InotifyWatch* pWatch) + : m_uMask(0), + m_uCookie(0) + { + if (pEvt != NULL) { + m_uMask = (uint32_t) pEvt->mask; + m_uCookie = (uint32_t) pEvt->cookie; + if (pEvt->name != NULL) { + m_name = pEvt->len > 0 + ? pEvt->name + : ""; + } + m_pWatch = pWatch; + } + else { + m_pWatch = NULL; + } + } + + /// Destructor. + ~InotifyEvent() {} + + /// Returns the event watch descriptor. + /** + * \return watch descriptor + * + * \sa InotifyWatch::GetDescriptor() + */ + int32_t GetDescriptor() const; + + /// Returns the event mask. + /** + * \return event mask + * + * \sa InotifyWatch::GetMask() + */ + inline uint32_t GetMask() const + { + return m_uMask; + } + + /// Checks a value for the event type. + /** + * \param[in] uValue checked value + * \param[in] uType type which is checked for + * \return true = the value contains the given type, false = otherwise + */ + inline static bool IsType(uint32_t uValue, uint32_t uType) + { + return ((uValue & uType) != 0) && ((~uValue & uType) == 0); + } + + /// Checks for the event type. + /** + * \param[in] uType type which is checked for + * \return true = event mask contains the given type, false = otherwise + */ + inline bool IsType(uint32_t uType) const + { + return IsType(m_uMask, uType); + } + + /// Returns the event cookie. + /** + * \return event cookie + */ + inline uint32_t GetCookie() const + { + return m_uCookie; + } + + /// Returns the event name length. + /** + * \return event name length + */ + inline uint32_t GetLength() const + { + return (uint32_t) m_name.length(); + } + + /// Returns the event name. + /** + * \return event name + */ + inline const std::string& GetName() const + { + return m_name; + } + + /// Extracts the event name. + /** + * \param[out] rName event name + */ + inline void GetName(std::string& rName) const + { + rName = GetName(); + } + + /// Returns the source watch. + /** + * \return source watch + */ + inline InotifyWatch* GetWatch() + { + return m_pWatch; + } + + /// Finds the appropriate mask for a name. + /** + * \param[in] rName mask name + * \return mask for name; 0 on failure + */ + static uint32_t GetMaskByName(const std::string& rName); + + /// Fills the string with all types contained in an event mask value. + /** + * \param[in] uValue event mask value + * \param[out] rStr dumped event types + */ + static void DumpTypes(uint32_t uValue, std::string& rStr); + + /// Fills the string with all types contained in the event mask. + /** + * \param[out] rStr dumped event types + */ + void DumpTypes(std::string& rStr) const; + +private: + uint32_t m_uMask; ///< mask + uint32_t m_uCookie; ///< cookie + std::string m_name; ///< name + InotifyWatch* m_pWatch; ///< source watch +}; + + + +/// inotify watch class +/** + * It holds information about the inotify watch on a particular + * inode. + * + * If the INOTIFY_THREAD_SAFE is defined this class is thread-safe. + */ +class InotifyWatch +{ +public: + /// Constructor. + /** + * Creates an inotify watch. Because this watch is + * inactive it has an invalid descriptor (-1). + * + * \param[in] rPath watched file path + * \param[in] uMask mask for events + * \param[in] fEnabled events enabled yes/no + */ + InotifyWatch(const std::string& rPath, int32_t uMask, bool fEnabled = true) + : m_path(rPath), + m_uMask(uMask), + m_wd((int32_t) -1), + m_fEnabled(fEnabled) + { + IN_LOCK_INIT + } + + /// Destructor. + ~InotifyWatch() + { + IN_LOCK_DONE + } + + /// Returns the watch descriptor. + /** + * \return watch descriptor; -1 for inactive watch + */ + inline int32_t GetDescriptor() const + { + return m_wd; + } + + /// Returns the watched file path. + /** + * \return file path + */ + inline const std::string& GetPath() const + { + return m_path; + } + + /// Returns the watch event mask. + /** + * \return event mask + */ + inline uint32_t GetMask() const + { + return (uint32_t) m_uMask; + } + + /// Sets the watch event mask. + /** + * If the watch is active (added to an instance of Inotify) + * this method may fail due to unsuccessful re-setting + * the watch in the kernel. + * + * \param[in] uMask event mask + * + * \throw InotifyException thrown if changing fails + */ + void SetMask(uint32_t uMask) throw (InotifyException); + + /// Returns the appropriate inotify class instance. + /** + * \return inotify instance + */ + inline Inotify* GetInotify() + { + return m_pInotify; + } + + /// Enables/disables the watch. + /** + * If the watch is active (added to an instance of Inotify) + * this method may fail due to unsuccessful re-setting + * the watch in the kernel. + * + * Re-setting the current state has no effect. + * + * \param[in] fEnabled set enabled yes/no + * + * \throw InotifyException thrown if enabling/disabling fails + */ + void SetEnabled(bool fEnabled) throw (InotifyException); + + /// Checks whether the watch is enabled. + /** + * \return true = enables, false = disabled + */ + inline bool IsEnabled() const + { + return m_fEnabled; + } + + /// Checks whether the watch is recursive. + /** + * A recursive watch monitors a directory itself and all + * its subdirectories. This watch is a logical object + * which may have many underlying kernel watches. + * + * \return currently always false (recursive watches not yet supported) + * \attention Recursive watches are currently NOT supported. + * They are planned for future versions. + */ + inline bool IsRecursive() const + { + return false; + } + +private: + friend class Inotify; + + std::string m_path; ///< watched file path + uint32_t m_uMask; ///< event mask + int32_t m_wd; ///< watch descriptor + Inotify* m_pInotify; ///< inotify object + bool m_fEnabled; ///< events enabled yes/no + + IN_LOCK_DECL + + /// Disables the watch (due to removing by the kernel). + /** + * This method must be called after receiving an event. + * It ensures the watch object is consistent with the kernel + * data. + */ + void __Disable(); +}; + + +/// Mapping from watch descriptors to watch objects. +typedef std::map<int32_t, InotifyWatch*> IN_WATCH_MAP; + +/// Mapping from paths to watch objects. +typedef std::map<std::string, InotifyWatch*> IN_WP_MAP; + + +/// inotify class +/** + * It holds information about the inotify device descriptor + * and manages the event queue. + * + * If the INOTIFY_THREAD_SAFE is defined this class is thread-safe. + */ +class Inotify +{ +public: + /// Constructor. + /** + * Creates and initializes an instance of inotify communication + * object (opens the inotify device). + * + * \throw InotifyException thrown if inotify isn't available + */ + Inotify() throw (InotifyException); + + /// Destructor. + /** + * Calls Close() due to clean-up. + */ + ~Inotify(); + + /// Removes all watches and closes the inotify device. + void Close(); + + /// Adds a new watch. + /** + * \param[in] pWatch inotify watch + * + * \throw InotifyException thrown if adding failed + */ + void Add(InotifyWatch* pWatch) throw (InotifyException); + + /// Adds a new watch. + /** + * \param[in] rWatch inotify watch + * + * \throw InotifyException thrown if adding failed + */ + inline void Add(InotifyWatch& rWatch) throw (InotifyException) + { + Add(&rWatch); + } + + /// Removes a watch. + /** + * If the given watch is not present it does nothing. + * + * \param[in] pWatch inotify watch + * + * \throw InotifyException thrown if removing failed + */ + void Remove(InotifyWatch* pWatch) throw (InotifyException); + + /// Removes a watch. + /** + * If the given watch is not present it does nothing. + * + * \param[in] rWatch inotify watch + * + * \throw InotifyException thrown if removing failed + */ + inline void Remove(InotifyWatch& rWatch) throw (InotifyException) + { + Remove(&rWatch); + } + + /// Removes all watches. + void RemoveAll(); + + /// Returns the count of watches. + /** + * This is the total count of all watches (regardless whether + * enabled or not). + * + * \return count of watches + * + * \sa GetEnabledCount() + */ + inline size_t GetWatchCount() const + { + IN_READ_BEGIN + size_t n = (size_t) m_paths.size(); + IN_READ_END + return n; + } + + /// Returns the count of enabled watches. + /** + * \return count of enabled watches + * + * \sa GetWatchCount() + */ + inline size_t GetEnabledCount() const + { + IN_READ_BEGIN + size_t n = (size_t) m_watches.size(); + IN_READ_END + return n; + } + + /// Waits for inotify events. + /** + * It waits until one or more events occur. When called + * in nonblocking mode it only retrieves occurred events + * to the internal queue and exits. + * + * \param[in] fNoIntr if true it re-calls the system call after a handled signal + * + * \throw InotifyException thrown if reading events failed + * + * \sa SetNonBlock() + */ + void WaitForEvents(bool fNoIntr = false) throw (InotifyException); + + /// Returns the count of received and queued events. + /** + * This number is related to the events in the queue inside + * this object, not to the events pending in the kernel. + * + * \return count of events + */ + inline size_t GetEventCount() + { + IN_READ_BEGIN + size_t n = (size_t) m_events.size(); + IN_READ_END + return n; + } + + /// Extracts a queued inotify event. + /** + * The extracted event is removed from the queue. + * If the pointer is NULL it does nothing. + * + * \param[in,out] pEvt event object + * + * \throw InotifyException thrown if the provided pointer is NULL + */ + bool GetEvent(InotifyEvent* pEvt) throw (InotifyException); + + /// Extracts a queued inotify event. + /** + * The extracted event is removed from the queue. + * + * \param[in,out] rEvt event object + * + * \throw InotifyException thrown only in very anomalous cases + */ + bool GetEvent(InotifyEvent& rEvt) throw (InotifyException) + { + return GetEvent(&rEvt); + } + + /// Extracts a queued inotify event (without removing). + /** + * The extracted event stays in the queue. + * If the pointer is NULL it does nothing. + * + * \param[in,out] pEvt event object + * + * \throw InotifyException thrown if the provided pointer is NULL + */ + bool PeekEvent(InotifyEvent* pEvt) throw (InotifyException); + + /// Extracts a queued inotify event (without removing). + /** + * The extracted event stays in the queue. + * + * \param[in,out] rEvt event object + * + * \throw InotifyException thrown only in very anomalous cases + */ + bool PeekEvent(InotifyEvent& rEvt) throw (InotifyException) + { + return PeekEvent(&rEvt); + } + + /// Searches for a watch by a watch descriptor. + /** + * It tries to find a watch by the given descriptor. + * + * \param[in] iDescriptor watch descriptor + * \return pointer to a watch; NULL if no such watch exists + */ + InotifyWatch* FindWatch(int iDescriptor); + + /// Searches for a watch by a filesystem path. + /** + * It tries to find a watch by the given filesystem path. + * + * \param[in] rPath filesystem path + * \return pointer to a watch; NULL if no such watch exists + * + * \attention The path must be exactly identical to the one + * used for the searched watch. Be careful about + * absolute/relative and case-insensitive paths. + */ + InotifyWatch* FindWatch(const std::string& rPath); + + /// Returns the file descriptor. + /** + * The descriptor can be used in standard low-level file + * functions (poll(), select(), fcntl() etc.). + * + * \return valid file descriptor or -1 for inactive object + * + * \sa SetNonBlock() + */ + inline int GetDescriptor() const + { + return m_fd; + } + + /// Enables/disables non-blocking mode. + /** + * Use this mode if you want to monitor the descriptor + * (acquired thru GetDescriptor()) in functions such as + * poll(), select() etc. + * + * Non-blocking mode is disabled by default. + * + * \param[in] fNonBlock enable/disable non-blocking mode + * + * \throw InotifyException thrown if setting mode failed + * + * \sa GetDescriptor(), SetCloseOnExec() + */ + void SetNonBlock(bool fNonBlock) throw (InotifyException); + + /// Enables/disables closing on exec. + /** + * Enable this if you want to close the descriptor when + * executing another program. Otherwise, the descriptor + * will be inherited. + * + * Closing on exec is disabled by default. + * + * \param[in] fClOnEx enable/disable closing on exec + * + * \throw InotifyException thrown if setting failed + * + * \sa GetDescriptor(), SetNonBlock() + */ + void SetCloseOnExec(bool fClOnEx) throw (InotifyException); + + /// Acquires a particular inotify capability/limit. + /** + * \param[in] cap capability/limit identifier + * \return capability/limit value + * \throw InotifyException thrown if the given value cannot be acquired + */ + static uint32_t GetCapability(InotifyCapability_t cap) throw (InotifyException); + + /// Modifies a particular inotify capability/limit. + /** + * \param[in] cap capability/limit identifier + * \param[in] val new capability/limit value + * \throw InotifyException thrown if the given value cannot be set + * \attention Using this function requires root privileges. + * Beware of setting extensive values - it may seriously + * affect system performance and/or stability. + */ + static void SetCapability(InotifyCapability_t cap, uint32_t val) throw (InotifyException); + + /// Returns the maximum number of events in the kernel queue. + /** + * \return maximum number of events in the kernel queue + * \throw InotifyException thrown if the given value cannot be acquired + */ + inline static uint32_t GetMaxEvents() throw (InotifyException) + { + return GetCapability(IN_MAX_EVENTS); + } + + /// Sets the maximum number of events in the kernel queue. + /** + * \param[in] val new value + * \throw InotifyException thrown if the given value cannot be set + * \attention Using this function requires root privileges. + * Beware of setting extensive values - the greater value + * is set here the more physical memory may be used for the inotify + * infrastructure. + */ + inline static void SetMaxEvents(uint32_t val) throw (InotifyException) + { + SetCapability(IN_MAX_EVENTS, val); + } + + /// Returns the maximum number of inotify instances per process. + /** + * It means the maximum number of open inotify file descriptors + * per running process. + * + * \return maximum number of inotify instances + * \throw InotifyException thrown if the given value cannot be acquired + */ + inline static uint32_t GetMaxInstances() throw (InotifyException) + { + return GetCapability(IN_MAX_INSTANCES); + } + + /// Sets the maximum number of inotify instances per process. + /** + * \param[in] val new value + * \throw InotifyException thrown if the given value cannot be set + * \attention Using this function requires root privileges. + * Beware of setting extensive values - the greater value + * is set here the more physical memory may be used for the inotify + * infrastructure. + */ + inline static void SetMaxInstances(uint32_t val) throw (InotifyException) + { + SetCapability(IN_MAX_INSTANCES, val); + } + + /// Returns the maximum number of inotify watches per instance. + /** + * It means the maximum number of inotify watches per inotify + * file descriptor. + * + * \return maximum number of inotify watches + * \throw InotifyException thrown if the given value cannot be acquired + */ + inline static uint32_t GetMaxWatches() throw (InotifyException) + { + return GetCapability(IN_MAX_WATCHES); + } + + /// Sets the maximum number of inotify watches per instance. + /** + * \param[in] val new value + * \throw InotifyException thrown if the given value cannot be set + * \attention Using this function requires root privileges. + * Beware of setting extensive values - the greater value + * is set here the more physical memory may be used for the inotify + * infrastructure. + */ + inline static void SetMaxWatches(uint32_t val) throw (InotifyException) + { + SetCapability(IN_MAX_WATCHES, val); + } + +private: + int m_fd; ///< file descriptor + IN_WATCH_MAP m_watches; ///< watches (by descriptors) + IN_WP_MAP m_paths; ///< watches (by paths) + unsigned char m_buf[INOTIFY_BUFLEN]; ///< buffer for events + std::deque<InotifyEvent> m_events; ///< event queue + + IN_LOCK_DECL + + friend class InotifyWatch; + + static std::string GetCapabilityPath(InotifyCapability_t cap) throw (InotifyException); +}; + + +#endif //_INOTIFYCXX_H_ + |