diff options
author | lloyd <[email protected]> | 2008-09-28 15:34:09 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 15:34:09 +0000 |
commit | ea32d18231b9c6c5c84b3754c4249170d3b4e4c0 (patch) | |
tree | cc179337d0594ed105768011722b9dbae105e07a /modules/es_beos | |
parent | b841401e095cfc1aa0708689d7920eb95ece71af (diff) |
This is the first checkin to net.randombit.botan.modularized, which
has the intent of modularizing Botan's source code, and making it
much easier to add or remove various things at compile time.
In this first checkin:
Add support for nested directories in modules/ and move all the modules
into grouped directories like entropy/ or compression/
Currently this is not ideal, it will _only_ find code in
modules/*/*/modinfo.txt, while it would be much better to allow for
arbitrary nestings under modules (find modules -name modinfo.txt)
for more complicated setups.
This 'new' (OMG I've found directories!) structure allows for a more free
naming convention (no need for leading es_, ml_, etc to group names, though
some keep it for lack of a more meaningful name being obvious to me right
at the moment).
Diffstat (limited to 'modules/es_beos')
-rw-r--r-- | modules/es_beos/es_beos.cpp | 65 | ||||
-rw-r--r-- | modules/es_beos/es_beos.h | 25 | ||||
-rw-r--r-- | modules/es_beos/modinfo.txt | 19 |
3 files changed, 0 insertions, 109 deletions
diff --git a/modules/es_beos/es_beos.cpp b/modules/es_beos/es_beos.cpp deleted file mode 100644 index 80d5605d0..000000000 --- a/modules/es_beos/es_beos.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************* -* BeOS EntropySource Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ - -#include <botan/es_beos.h> -#include <kernel/OS.h> -#include <kernel/image.h> -#include <interface/InterfaceDefs.h> - -namespace Botan { - -/************************************************* -* BeOS Fast Poll * -*************************************************/ -void BeOS_EntropySource::do_fast_poll() - { - system_info info_sys; - get_system_info(&info_sys); - add_bytes(&info_sys, sizeof(system_info)); - - key_info info_key; - get_key_info(&info_key); - add_bytes(&info_key, sizeof(key_info)); - - add_bytes(idle_time()); - } - -/************************************************* -* BeOS Slow Poll * -*************************************************/ -void BeOS_EntropySource::do_slow_poll() - { - team_info info_team; - int32 cookie_team = 0; - - while(get_next_team_info(&cookie_team, &info_team) == B_OK) - { - add_bytes(&info_team, sizeof(team_info)); - - team_id id = info_team.team; - int32 cookie = 0; - - thread_info info_thr; - while(get_next_thread_info(id, &cookie, &info_thr) == B_OK) - add_bytes(&info_thr, sizeof(thread_info)); - - cookie = 0; - image_info info_img; - while(get_next_image_info(id, &cookie, &info_img) == B_OK) - add_bytes(&info_img, sizeof(image_info)); - - cookie = 0; - sem_info info_sem; - while(get_next_sem_info(id, &cookie, &info_sem) == B_OK) - add_bytes(&info_sem, sizeof(sem_info)); - - cookie = 0; - area_info info_area; - while(get_next_area_info(id, &cookie, &info_area) == B_OK) - add_bytes(&info_area, sizeof(area_info)); - } - } - -} diff --git a/modules/es_beos/es_beos.h b/modules/es_beos/es_beos.h deleted file mode 100644 index 11808d2b8..000000000 --- a/modules/es_beos/es_beos.h +++ /dev/null @@ -1,25 +0,0 @@ -/************************************************* -* BeOS EntropySource Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ - -#ifndef BOTAN_EXT_ENTROPY_SRC_BEOS_H__ -#define BOTAN_EXT_ENTROPY_SRC_BEOS_H__ - -#include <botan/buf_es.h> - -namespace Botan { - -/************************************************* -* BeOS Entropy Source * -*************************************************/ -class BeOS_EntropySource : public Buffered_EntropySource - { - private: - void do_fast_poll(); - void do_slow_poll(); - }; - -} - -#endif diff --git a/modules/es_beos/modinfo.txt b/modules/es_beos/modinfo.txt deleted file mode 100644 index a7e62cfb3..000000000 --- a/modules/es_beos/modinfo.txt +++ /dev/null @@ -1,19 +0,0 @@ -realname "BeOS Entropy Source" - -define ENTROPY_SRC_BEOS -modset beos - -load_on auto - -<add> -es_beos.h -es_beos.cpp -</add> - -<os> -beos -</os> - -<libs> -beos -> root,be -</libs> |