#include <boost/noncopyable.hpp>
#include "apr-1/apr_thread_proc.h"
#include "apr-1/apr_thread_mutex.h"
#include "apr-1/apr_getopt.h"
#include "apr-1/apr_signal.h"
#include "apr-1/apr_atomic.h"
#include "llstring.h"
Go to the source code of this file.
Classes | |
class | LLScopedLock |
Small class to help lock and unlock mutexes. More... | |
class | LLAtomic32< Type > |
Defines | |
#define | LL_APR_R (APR_READ) |
#define | LL_APR_W (APR_CREATE|APR_TRUNCATE|APR_WRITE) |
#define | LL_APR_RB (APR_READ|APR_BINARY) |
#define | LL_APR_WB (APR_CREATE|APR_TRUNCATE|APR_WRITE|APR_BINARY) |
#define | LL_APR_RPB (APR_READ|APR_WRITE|APR_BINARY) |
#define | LL_APR_WPB (APR_CREATE|APR_TRUNCATE|APR_READ|APR_WRITE|APR_BINARY) |
Typedefs | |
typedef LLAtomic32< U32 > | LLAtomicU32 |
typedef LLAtomic32< S32 > | LLAtomicS32 |
Functions | |
void | ll_init_apr () |
initialize the common apr constructs -- apr itself, the global pool, and a mutex. | |
void | ll_cleanup_apr () |
Cleanup those common apr constructs. | |
apr_file_t * | ll_apr_file_open (const LLString &filename, apr_int32_t flags, S32 *sizep, apr_pool_t *pool) |
apr_file_t * | ll_apr_file_open (const LLString &filename, apr_int32_t flags, S32 *sizep) |
apr_file_t * | ll_apr_file_open (const LLString &filename, apr_int32_t flags, apr_pool_t *pool) |
apr_file_t * | ll_apr_file_open (const LLString &filename, apr_int32_t flags) |
S32 | ll_apr_file_seek (apr_file_t *apr_file, apr_seek_where_t where, S32 offset) |
S32 | ll_apr_file_read (apr_file_t *apr_file, void *buf, S32 nbytes) |
S32 | ll_apr_file_read_ex (const LLString &filename, apr_pool_t *pool, void *buf, S32 offset, S32 nbytes) |
S32 | ll_apr_file_write (apr_file_t *apr_file, const void *buf, S32 nbytes) |
S32 | ll_apr_file_write_ex (const LLString &filename, apr_pool_t *pool, void *buf, S32 offset, S32 nbytes) |
bool | ll_apr_file_remove (const LLString &filename, apr_pool_t *pool=NULL) |
bool | ll_apr_file_rename (const LLString &filename, const LLString &newname, apr_pool_t *pool=NULL) |
bool | ll_apr_file_exists (const LLString &filename, apr_pool_t *pool=NULL) |
S32 | ll_apr_file_size (const LLString &filename, apr_pool_t *pool=NULL) |
bool | ll_apr_dir_make (const LLString &dirname, apr_pool_t *pool=NULL) |
bool | ll_apr_dir_remove (const LLString &dirname, apr_pool_t *pool=NULL) |
bool | ll_apr_warn_status (apr_status_t status) |
Function which approprately logs error or remains quiet on APR_SUCCESS. | |
void | ll_apr_assert_status (apr_status_t status) |
Variables | |
apr_thread_mutex_t * | gLogMutexp |
apr_pool_t * | gAPRPoolp |
Copyright (c) 2004-2008, Linden Research, Inc.
Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.
ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$
Definition in file llapr.h.
#define LL_APR_R (APR_READ) |
Definition at line 127 of file llapr.h.
Referenced by LLKeyframeMotionParam::loadMotions(), and LLBVHLoader::loadTranslationTable().
#define LL_APR_RB (APR_READ|APR_BINARY) |
Definition at line 129 of file llapr.h.
Referenced by LLAppViewer::anotherInstanceRunning(), check_for_invalid_wav_formats(), encode_vorbis_file(), LLAppViewer::initMarkerFile(), LLImageFormatted::load(), LLImageJ2C::loadAndValidate(), LLFloaterAnimPreview::postBuild(), LLLFSThread::Request::processRequest(), and upload_new_resource().
#define LL_APR_RPB (APR_READ|APR_WRITE|APR_BINARY) |
#define LL_APR_W (APR_CREATE|APR_TRUNCATE|APR_WRITE) |
Definition at line 128 of file llapr.h.
Referenced by LLAppViewer::handleViewerCrash(), LLAppViewer::initMarkerFile(), LLStateDiagram::saveDotFile(), and LLAppViewer::sendLogoutRequest().
#define LL_APR_WB (APR_CREATE|APR_TRUNCATE|APR_WRITE|APR_BINARY) |
Definition at line 130 of file llapr.h.
Referenced by LLAppViewer::anotherInstanceRunning(), LLVOAvatar::dumpArchetypeXML(), LLVFS::dumpFiles(), and LLImageFormatted::save().
#define LL_APR_WPB (APR_CREATE|APR_TRUNCATE|APR_READ|APR_WRITE|APR_BINARY) |
typedef LLAtomic32<S32> LLAtomicS32 |
typedef LLAtomic32<U32> LLAtomicU32 |
void ll_apr_assert_status | ( | apr_status_t | status | ) |
Definition at line 126 of file llapr.cpp.
References ll_apr_warn_status(), and llassert.
Referenced by LLAres::process().
bool ll_apr_dir_make | ( | const LLString & | dirname, | |
apr_pool_t * | pool = NULL | |||
) |
bool ll_apr_dir_remove | ( | const LLString & | dirname, | |
apr_pool_t * | pool = NULL | |||
) |
bool ll_apr_file_exists | ( | const LLString & | filename, | |
apr_pool_t * | pool = NULL | |||
) |
apr_file_t* ll_apr_file_open | ( | const LLString & | filename, | |
apr_int32_t | flags | |||
) |
apr_file_t* ll_apr_file_open | ( | const LLString & | filename, | |
apr_int32_t | flags, | |||
apr_pool_t * | pool | |||
) |
Definition at line 163 of file llapr.cpp.
References ll_apr_file_open(), and NULL.
apr_file_t* ll_apr_file_open | ( | const LLString & | filename, | |
apr_int32_t | flags, | |||
S32 * | sizep, | |||
apr_pool_t * | pool | |||
) |
Definition at line 176 of file llapr.cpp.
References llassert_always, and S32.
Referenced by check_for_invalid_wav_formats(), encode_vorbis_file(), ll_apr_file_read_ex(), LLFloaterAnimPreview::postBuild(), LLLFSThread::Request::processRequest(), and upload_new_resource().
S32 ll_apr_file_read_ex | ( | const LLString & | filename, | |
apr_pool_t * | pool, | |||
void * | buf, | |||
S32 | offset, | |||
S32 | nbytes | |||
) |
bool ll_apr_file_remove | ( | const LLString & | filename, | |
apr_pool_t * | pool = NULL | |||
) |
bool ll_apr_file_rename | ( | const LLString & | filename, | |
const LLString & | newname, | |||
apr_pool_t * | pool = NULL | |||
) |
Definition at line 265 of file llapr.cpp.
References llassert_always, and S32.
Referenced by check_for_invalid_wav_formats(), encode_vorbis_file(), ll_apr_file_read_ex(), ll_apr_file_write_ex(), and LLLFSThread::Request::processRequest().
S32 ll_apr_file_size | ( | const LLString & | filename, | |
apr_pool_t * | pool = NULL | |||
) |
Definition at line 218 of file llapr.cpp.
References llassert_always, and S32.
Referenced by LLVFS::dumpFiles(), encode_vorbis_file(), ll_apr_file_write_ex(), LLLFSThread::Request::processRequest(), and LLImageFormatted::save().
S32 ll_apr_file_write_ex | ( | const LLString & | filename, | |
apr_pool_t * | pool, | |||
void * | buf, | |||
S32 | offset, | |||
S32 | nbytes | |||
) |
bool ll_apr_warn_status | ( | apr_status_t | status | ) |
Function which approprately logs error or remains quiet on APR_SUCCESS.
true
if status is an error condition. Definition at line 116 of file llapr.cpp.
References LL_ENDL, LL_WARNS_ONCE, and MAX_STRING.
Referenced by LLSocket::blockingConnect(), connect_smtp(), LLSocket::create(), disconnect_smtp(), LLMail::init(), ll_apr_assert_status(), ll_apr_dir_make(), ll_apr_dir_remove(), ll_apr_file_remove(), ll_apr_file_rename(), LLScopedLock::LLScopedLock(), LLMessageSystem::poll(), LLAres::process(), LLIOSocketWriter::process_impl(), LLIOSocketReader::process_impl(), LLPumpIO::rebuildPollset(), LLMail::send(), LLSocket::setOptions(), and LLScopedLock::unlock().
void ll_cleanup_apr | ( | ) |
Cleanup those common apr constructs.
Definition at line 55 of file llapr.cpp.
References gAPRPoolp, gLogMutexp, LL_ENDL, LL_INFOS, and NULL.
Referenced by LLCommon::cleanupClass().
void ll_init_apr | ( | ) |
initialize the common apr constructs -- apr itself, the global pool, and a mutex.
Definition at line 41 of file llapr.cpp.
References gAPRPoolp, gLogMutexp, and NULL.
Referenced by tut::LLTemplateMessageBuilderTestData::defaultTemplate(), LLCommon::initClass(), LLMessageSystem::LLMessageSystem(), tut::LLMessageSystemTestData::LLMessageSystemTestData(), and LLAres::process().
apr_thread_mutex_t* gLogMutexp |