version 1.12, 2005/02/05 22:59:23
|
version 1.16, 2006/05/09 17:41:41
|
|
|
//%2005//////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development | // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. | // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. | // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; | // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
// EMC Corporation; VERITAS Software Corporation; The Open Group. | // EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
#include <Pegasus/Common/MessageLoader.h> |
#include "CIMStatusCode.h" | #include "CIMStatusCode.h" |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
|
|
| |
| |
String cimStatusCodeToString(CIMStatusCode code, | String cimStatusCodeToString(CIMStatusCode code, |
const ContentLanguages& contentLanguages) |
const ContentLanguageList& contentLanguages) |
{ | { |
MessageLoaderParms parms; | MessageLoaderParms parms; |
| |
|
|
| |
if (contentLanguages.size() > 0) | if (contentLanguages.size() > 0) |
{ | { |
//build AcceptLanguages from contentLanguages, use in getMessage |
//build AcceptLanguageList from contentLanguages, use in getMessage |
parms.acceptlanguages = |
parms.acceptlanguages.clear(); |
AcceptLanguages(contentLanguages.getLanguageElement(0).getTag()); |
parms.acceptlanguages.insert(contentLanguages.getLanguageTag(0), 1.0); |
} | } |
| |
return MessageLoader::getMessage(parms); | return MessageLoader::getMessage(parms); |
} | } |
| |
// l10n | // l10n |
ContentLanguages cimStatusCodeToString_Thread(String & message, CIMStatusCode code) |
ContentLanguageList cimStatusCodeToString_Thread( |
|
String & message, |
|
CIMStatusCode code) |
{ | { |
MessageLoaderParms parms; | MessageLoaderParms parms; |
| |