improved doxygen
This commit is contained in:
		| @@ -10,7 +10,7 @@ SUBDIRS = examples | ||||
| develdir = ${pkgdatadir}/doc | ||||
| devel_DATA = html/index.html | ||||
|  | ||||
| ALL_SRC = ${top_srcdir}/src/*.[ch]xx | ||||
| ALL_SRC = ${top_srcdir}/src/*.[ch]xx ${top_srcdir}/src/*.doc | ||||
| #${top_srcdir}/test/*.[ch]xx | ||||
|  | ||||
| DIRS = html | ||||
|   | ||||
| @@ -23,7 +23,13 @@ | ||||
|  | ||||
| #include <iostream> // debug | ||||
|  | ||||
| //! C++ Wrapper around Cryptoki API | ||||
| /*! @defgroup gcryptoki C++ Wrapper around Cryptoki API */ | ||||
| //@{ | ||||
| /*! @defgroup cryptokilib Cryptoki C++ Library */ | ||||
| /*! @defgroup cryptokitypes Cryptoki C++ Types and Auxiliary */ | ||||
| /*! @defgroup cryptokiexceptions Cryptoki Exceptions */ | ||||
|  | ||||
| //! @see gcryptoki | ||||
| namespace cryptoki { | ||||
|  | ||||
|   #ifndef CRYPTOKI_FN_LOG | ||||
| @@ -37,6 +43,9 @@ namespace cryptoki { | ||||
|     #define UNDEF_CRYPTOKI_FN_LOG | ||||
|   #endif | ||||
|  | ||||
|   //! @addtogroup cryptokitypes | ||||
|   //@{ | ||||
|    | ||||
|   static const std::string LETTER_CHARS | ||||
|       ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); | ||||
|   static const std::string NUMBER_CHARS | ||||
| @@ -95,7 +104,13 @@ namespace cryptoki { | ||||
|   #define CRYPTOKI_TO_VECTOR(ARRAY) \ | ||||
|     toVector<sizeof(ARRAY)/sizeof(ARRAY[0])>(ARRAY) | ||||
|  | ||||
|   //@} | ||||
|  | ||||
|   //============================================================================ | ||||
|   /*! @addtogroup cryptokiexceptions */ | ||||
|   //@{ | ||||
|    | ||||
|   //---------------------------------------------------------------------------- | ||||
|   class exception: public std::exception { | ||||
|     public: | ||||
|       exception(const std::string& reason) throw(): | ||||
| @@ -122,6 +137,10 @@ namespace cryptoki { | ||||
|           exception("smardcard access error:\n"+reason) { | ||||
|       } | ||||
|   }; | ||||
|   //@} | ||||
|    | ||||
|   /*! @addtogroup cryptokitypes */ | ||||
|   //@{ | ||||
|  | ||||
|   class Slot; | ||||
|   typedef std::vector<Slot> SlotList; | ||||
| @@ -585,6 +604,11 @@ namespace cryptoki { | ||||
|       CK_VERSION libraryVersion; | ||||
|   }; | ||||
|  | ||||
|   //@} | ||||
|  | ||||
|   /*! @addtogroup cryptokilib */ | ||||
|   //@{ | ||||
|  | ||||
|   //! to be instanciated before first use | ||||
|   class Init { | ||||
|  | ||||
| @@ -1751,6 +1775,7 @@ namespace cryptoki { | ||||
|       //@} | ||||
|        | ||||
|   }; | ||||
|   //@} | ||||
|    | ||||
|   #ifdef UNDEF_CRYPTOKI_FN_LOG // cleanup if it was set in here | ||||
|     #undef CRYPTOKI_FN_LOG | ||||
| @@ -1758,4 +1783,5 @@ namespace cryptoki { | ||||
|   #endif | ||||
|  | ||||
| } | ||||
| //@} | ||||
| #endif | ||||
|   | ||||
| @@ -16,10 +16,20 @@ | ||||
| #include <openssl/err.h> | ||||
| #include <cstdio> | ||||
|  | ||||
| /*! @defgroup gopenssl C++ Wrapper around OpenSSL API */ | ||||
| //@{ | ||||
| //! @defgroup openssllib OpenSSL C++ Library | ||||
| //! @defgroup opensslexceptions OpenSSL Exceptions | ||||
|  | ||||
| //! @see gopenssl | ||||
| namespace openssl { | ||||
|  | ||||
|  | ||||
|   //============================================================================ | ||||
|   //! @addtogroup opensslexceptions | ||||
|   //@{ | ||||
|  | ||||
|   //---------------------------------------------------------------------------- | ||||
|   class exception: public std::exception { | ||||
|     public: | ||||
|       exception(const std::string& reason) throw(): | ||||
| @@ -126,6 +136,10 @@ namespace openssl { | ||||
|           bio_error("connection failed to: "+hostPort) { | ||||
|       } | ||||
|   }; | ||||
|   //@} | ||||
|  | ||||
|   //! @addtogroup openssllib | ||||
|   //@{ | ||||
|    | ||||
|   //============================================================================ | ||||
|   class Init { | ||||
| @@ -275,6 +289,9 @@ namespace openssl { | ||||
|       ::BIO* _bio; | ||||
|   }; | ||||
|    | ||||
|   //@} | ||||
|    | ||||
| } | ||||
| //@} | ||||
|  | ||||
| #endif | ||||
|   | ||||
							
								
								
									
										23
									
								
								src/overview.doc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/overview.doc
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,23 @@ | ||||
| /*! @file | ||||
|  | ||||
|     @id $Id$ | ||||
| */ | ||||
| //       1         2         3         4         5         6         7         8 | ||||
| // 45678901234567890123456789012345678901234567890123456789012345678901234567890 | ||||
|  | ||||
| /*! @mainpage | ||||
|  | ||||
|     There are three namespaces which correspond to the three modules | ||||
|     that are implemented here: | ||||
|      | ||||
|     - @ref gpcsc | ||||
|     - @ref gcryptoki | ||||
|     - @ref gopenssl | ||||
|  | ||||
|     All these three libraries deal with hardware token cryptografy and | ||||
|     all three libraries are implemented in ugliest C manner. The | ||||
|     warpper cares about memory- and resource-management and implements | ||||
|     a simple and easy C++ interface, including exceptions for error | ||||
|     handling. | ||||
|      | ||||
|     */ | ||||
							
								
								
									
										29
									
								
								src/pcsc.hxx
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								src/pcsc.hxx
									
									
									
									
									
								
							| @@ -49,8 +49,10 @@ | ||||
| #include <sstream> | ||||
| #include <iomanip> | ||||
|  | ||||
| //! This library is a C++ wrapper to the awful pcsc-lite interface. | ||||
| /*! The reason for this wrapper is to get a nice object oriented | ||||
| /*! @defgroup gpcsc C++ Wrapper around pcsc-lite API | ||||
|  | ||||
|     This library is a C++ wrapper to the awful pcsc-lite interface. | ||||
|     The reason for this wrapper is to get a nice object oriented | ||||
|     interface written in C++ manner and using standard types and so to | ||||
|     avoid the ugly M$-C-quirks. This interface is memory clean. | ||||
|     @todo: Not implemented, not supported: | ||||
| @@ -64,8 +66,17 @@ | ||||
|     required.  If you need something that is not yet supported, please | ||||
|     let me know, what you need and why. Then I'll add it so that it | ||||
|     best fits the common needs. */ | ||||
| //@{ | ||||
| /*! @defgroup pcsclib PCSC C++ Library */ | ||||
| /*! @defgroup pcsctypes PCSC Types and Auxiliary */ | ||||
| /*! @defgroup pcscexceptions PCSC Exceptions */ | ||||
|  | ||||
| //! @see gpcsc | ||||
| namespace pcsc { | ||||
|  | ||||
|   //! @addtogroup pcsctypes | ||||
|   //@{ | ||||
|    | ||||
|   std::string hex(const std::string& data) { | ||||
|     std::stringstream res; | ||||
|     for (std::string::const_iterator it(data.begin()); it!=data.end(); ++it) | ||||
| @@ -74,7 +85,13 @@ namespace pcsc { | ||||
|     return res.str(); | ||||
|   } | ||||
|  | ||||
|   //@} | ||||
|  | ||||
|   //============================================================================ | ||||
|   //! @addtogroup pcsclib | ||||
|   //@{ | ||||
|  | ||||
|   //---------------------------------------------------------------------------- | ||||
|   class exception: public std::exception { | ||||
|     public: | ||||
|       exception(const std::string& reason) throw(): _what("pcsc: "+reason) {} | ||||
| @@ -99,7 +116,11 @@ namespace pcsc { | ||||
|           exception("smardcard access error:\n"+reason) { | ||||
|       } | ||||
|   }; | ||||
|   //@} | ||||
|  | ||||
|   //! @addtogroup pcsclib | ||||
|   //@{ | ||||
|    | ||||
|   //============================================================================ | ||||
|   class Connection { | ||||
|        | ||||
| @@ -695,5 +716,9 @@ namespace pcsc { | ||||
|  | ||||
|   }; | ||||
|  | ||||
|   //@} | ||||
|    | ||||
| } | ||||
| //@} | ||||
|  | ||||
| #endif | ||||
|   | ||||
		Reference in New Issue
	
	Block a user