24 #ifndef INCLUDED_OSL_PROFILE_HXX 25 #define INCLUDED_OSL_PROFILE_HXX 58 throw std::exception();
94 sal_uInt32 nFirstId,
const std::list< rtl::OString >& rStrings,
97 size_t nItems = rStrings.size();
98 const char** pStrings =
new const char*[ nItems+1 ];
99 std::list< rtl::OString >::const_iterator it = rStrings.begin();
101 while( it != rStrings.end() )
103 pStrings[ nItems++ ] = it->getStr();
106 pStrings[ nItems ] = NULL;
124 sal_uInt32 nFirstId,
const std::list< rtl::OString >& rStrings,
127 size_t nItems = rStrings.size();
128 const char** pStrings =
new const char*[ nItems+1 ];
129 std::list< rtl::OString >::const_iterator it = rStrings.begin();
131 while( it != rStrings.end() )
133 pStrings[ nItems++ ] = it->getStr();
136 pStrings[ nItems ] = NULL;
159 std::list< rtl::OString > aEntries;
165 char* pBuf =
new char[ n+1 ];
168 for( n = 0; ; n += nLen+1 )
170 nLen = strlen( pBuf+n );
186 std::list< rtl::OString > aSections;
192 char* pBuf =
new char[ n+1 ];
195 for( n = 0; ; n += nLen+1 )
197 nLen = strlen( pBuf+n );
210 #endif // INCLUDED_OSL_PROFILE_HXX SAL_DLLPUBLIC sal_uInt32 osl_readProfileIdent(oslProfile Profile, const char *pszSection, const char *pszEntry, sal_uInt32 FirstId, const char *Strings[], sal_uInt32 Default) SAL_COLD
Deprecated API.
std::list< rtl::OString > getSectionEntries(const rtl::OString &rSection)
Get all entries belonging to the specified section.
Definition: profile.hxx:157
const int Profile_DEFAULT
Definition: profile.hxx:38
#define osl_Profile_SYSTEM
Definition: profile.h:40
oslProfileOption ProfileOption
Definition: profile.hxx:36
Deprecated API.
Definition: profile.hxx:46
SAL_DLLPUBLIC sal_Bool osl_removeProfileEntry(oslProfile Profile, const char *pszSection, const char *pszEntry) SAL_COLD
Deprecated API.
Definition: condition.hxx:31
const char * getStr() const SAL_RETURNS_NONNULL
Returns a pointer to the characters of this string.
Definition: string.hxx:685
bool readBool(const rtl::OString &rSection, const rtl::OString &rEntry, bool bDefault)
Definition: profile.hxx:88
void * oslProfile
Definition: profile.h:46
SAL_DLLPUBLIC sal_Bool osl_flushProfile(oslProfile Profile) SAL_COLD
Deprecated API.
sal_uInt32 readIdent(const rtl::OString &rSection, const rtl::OString &rEntry, sal_uInt32 nFirstId, const std::list< rtl::OString > &rStrings, sal_uInt32 nDefault)
Definition: profile.hxx:93
rtl::OString readString(const rtl::OString &rSection, const rtl::OString &rEntry, const rtl::OString &rDefault)
Definition: profile.hxx:75
#define osl_Profile_DEFAULT
Definition: profile.h:39
bool flush()
Definition: profile.hxx:70
bool removeEntry(const rtl::OString &rSection, const rtl::OString &rEntry)
Remove an entry from a section.
Definition: profile.hxx:148
SAL_DLLPUBLIC sal_Bool osl_writeProfileString(oslProfile Profile, const char *pszSection, const char *pszEntry, const char *pszString) SAL_COLD
Deprecated API.
Profile(const rtl::OUString &strProfileName, oslProfileOption Options=Profile_DEFAULT)
Open or create a configuration profile.
Definition: profile.hxx:54
SAL_DLLPUBLIC sal_Bool osl_readProfileString(oslProfile Profile, const char *pszSection, const char *pszEntry, char *pszString, sal_uInt32 MaxLen, const char *pszDefault) SAL_COLD
Deprecated API.
bool writeString(const rtl::OString &rSection, const rtl::OString &rEntry, const rtl::OString &rString)
Definition: profile.hxx:112
sal_uInt32 oslProfileOption
Definition: profile.h:37
SAL_DLLPUBLIC sal_Bool osl_writeProfileBool(oslProfile Profile, const char *pszSection, const char *pszEntry, sal_Bool Value) SAL_COLD
Deprecated API.
std::list< rtl::OString > getSections()
Get all section entries.
Definition: profile.hxx:184
SAL_DLLPUBLIC sal_Bool osl_writeProfileIdent(oslProfile Profile, const char *pszSection, const char *pszEntry, sal_uInt32 FirstId, const char *Strings[], sal_uInt32 Value) SAL_COLD
Deprecated API.
const int Profile_WRITELOCK
Definition: profile.hxx:41
SAL_DLLPUBLIC sal_Bool osl_closeProfile(oslProfile Profile) SAL_COLD
Deprecated API.
#define osl_Profile_WRITELOCK
Definition: profile.h:42
SAL_DLLPUBLIC oslProfile osl_openProfile(rtl_uString *strProfileName, oslProfileOption Options) SAL_COLD
Deprecated API.
This String class provide base functionality for C++ like 8-Bit character array handling.
Definition: string.hxx:191
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:170
SAL_DLLPUBLIC sal_uInt32 osl_getProfileSectionEntries(oslProfile Profile, const char *pszSection, char *pszBuffer, sal_uInt32 MaxLen) SAL_COLD
Deprecated API.
#define osl_Profile_READLOCK
Definition: profile.h:41
const int Profile_SYSTEM
Definition: profile.hxx:39
bool writeIdent(const rtl::OString &rSection, const rtl::OString &rEntry, sal_uInt32 nFirstId, const std::list< rtl::OString > &rStrings, sal_uInt32 nValue)
Definition: profile.hxx:123
bool writeBool(const rtl::OString &rSection, const rtl::OString &rEntry, bool Value)
Definition: profile.hxx:118
SAL_DLLPUBLIC sal_uInt32 osl_getProfileSections(oslProfile Profile, char *pszBuffer, sal_uInt32 MaxLen) SAL_COLD
Deprecated API.
SAL_DLLPUBLIC sal_Bool osl_readProfileBool(oslProfile Profile, const char *pszSection, const char *pszEntry, sal_Bool Default) SAL_COLD
Deprecated API.
~Profile()
Close the opened profile an flush all data to the disk.
Definition: profile.hxx:64
const int Profile_READLOCK
Definition: profile.hxx:40