llapr.h File Reference

Helper functions for using the apache portable runtime library. More...

#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"

Include dependency graph for llapr.h:

This graph shows which files directly or indirectly include this file:

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< U32LLAtomicU32
typedef LLAtomic32< S32LLAtomicS32

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_tgAPRPoolp


Detailed Description

Helper functions for using the apache portable runtime library.

Author:
Phoenix
Date:
2004-11-28
LicenseInfo
firstyear=2004&license=viewergpl

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 Documentation

#define LL_APR_R   (APR_READ)

#define LL_APR_RB   (APR_READ|APR_BINARY)

#define LL_APR_RPB   (APR_READ|APR_WRITE|APR_BINARY)

Definition at line 131 of file llapr.h.

Referenced by LLAudioBufferFMOD::loadWAV().

#define LL_APR_W   (APR_CREATE|APR_TRUNCATE|APR_WRITE)

#define LL_APR_WB   (APR_CREATE|APR_TRUNCATE|APR_WRITE|APR_BINARY)

#define LL_APR_WPB   (APR_CREATE|APR_TRUNCATE|APR_READ|APR_WRITE|APR_BINARY)

Definition at line 132 of file llapr.h.

Referenced by encode_vorbis_file().


Typedef Documentation

Definition at line 122 of file llapr.h.

Definition at line 121 of file llapr.h.


Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

apr_file_t* ll_apr_file_open ( const LLString filename,
apr_int32_t  flags,
S32 sizep 
)

Definition at line 163 of file llapr.cpp.

References ll_apr_file_open(), and NULL.

Here is the call graph for this function:

apr_file_t* ll_apr_file_open ( const LLString filename,
apr_int32_t  flags,
S32 sizep,
apr_pool_t pool 
)

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 
)

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 
)

S32 ll_apr_file_seek ( apr_file_t *  apr_file,
apr_seek_where_t  where,
S32  offset 
)

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().

Here is the caller graph for this function:

S32 ll_apr_file_size ( const LLString filename,
apr_pool_t pool = NULL 
)

S32 ll_apr_file_write ( apr_file_t *  apr_file,
const void *  buf,
S32  nbytes 
)

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().

Here is the caller graph for this function:

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  ) 

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:


Variable Documentation

Definition at line 161 of file llapr.h.

apr_thread_mutex_t* gLogMutexp

Definition at line 38 of file llapr.cpp.

Referenced by ll_cleanup_apr(), and ll_init_apr().


Generated on Fri May 16 08:34:36 2008 for SecondLife by  doxygen 1.5.5