version 1.194, 2005/12/19 21:51:42
|
version 1.195, 2006/01/10 19:41:19
|
|
|
#include <Pegasus/Common/Tracer.h> | #include <Pegasus/Common/Tracer.h> |
#include <Pegasus/Common/XmlWriter.h> | #include <Pegasus/Common/XmlWriter.h> |
#include <Pegasus/Common/PegasusVersion.h> | #include <Pegasus/Common/PegasusVersion.h> |
#include <Pegasus/Common/AcceptLanguages.h> // l10n |
#include <Pegasus/Common/AcceptLanguageList.h> |
#include <Pegasus/Common/ContentLanguages.h> // l10n |
#include <Pegasus/Common/ContentLanguageList.h> |
#include <Pegasus/Common/LanguageParser.h> | #include <Pegasus/Common/LanguageParser.h> |
#include <Pegasus/Common/OperationContextInternal.h> | #include <Pegasus/Common/OperationContextInternal.h> |
// l10n | // l10n |
|
|
{ | { |
if (msg->thread_changed()) | if (msg->thread_changed()) |
{ | { |
AcceptLanguages *langs = new AcceptLanguages |
AcceptLanguageList *langs = new AcceptLanguageList |
(((AcceptLanguageListContainer)msg->operationContext.get | (((AcceptLanguageListContainer)msg->operationContext.get |
(AcceptLanguageListContainer::NAME)).getLanguages()); | (AcceptLanguageListContainer::NAME)).getLanguages()); |
Thread::setLanguages(langs); | Thread::setLanguages(langs); |
|
|
| |
//l10n start | //l10n start |
// Get the language tags that were saved with the subscription instance | // Get the language tags that were saved with the subscription instance |
AcceptLanguages acceptLangs; |
AcceptLanguageList acceptLangs; |
Uint32 propIndex = instance.findProperty | Uint32 propIndex = instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
acceptLangsString); | acceptLangsString); |
} | } |
} | } |
ContentLanguages contentLangs; |
ContentLanguageList contentLangs; |
propIndex = instance.findProperty | propIndex = instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
(IdentityContainer :: NAME)).getUserName(); | (IdentityContainer :: NAME)).getUserName(); |
_checkNonprivilegedAuthorization(userName); | _checkNonprivilegedAuthorization(userName); |
| |
AcceptLanguages acceptLangs = |
AcceptLanguageList acceptLangs = |
((AcceptLanguageListContainer)request->operationContext.get | ((AcceptLanguageListContainer)request->operationContext.get |
(AcceptLanguageListContainer::NAME)).getLanguages(); | (AcceptLanguageListContainer::NAME)).getLanguages(); |
ContentLanguages contentLangs = |
ContentLanguageList contentLangs = |
((ContentLanguageListContainer)request->operationContext.get | ((ContentLanguageListContainer)request->operationContext.get |
(ContentLanguageListContainer::NAME)).getLanguages(); | (ContentLanguageListContainer::NAME)).getLanguages(); |
| |
|
|
// Add the language properties to the modified instance. | // Add the language properties to the modified instance. |
// Note: These came from the Accept-Language and Content-Language | // Note: These came from the Accept-Language and Content-Language |
// headers in the HTTP messages, and may be empty. | // headers in the HTTP messages, and may be empty. |
AcceptLanguages acceptLangs = |
AcceptLanguageList acceptLangs = |
((AcceptLanguageListContainer)request->operationContext.get | ((AcceptLanguageListContainer)request->operationContext.get |
(AcceptLanguageListContainer::NAME)).getLanguages(); | (AcceptLanguageListContainer::NAME)).getLanguages(); |
modifiedInstance.addProperty (CIMProperty | modifiedInstance.addProperty (CIMProperty |
(PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS, | (PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS, |
LanguageParser::buildAcceptLanguageHeader(acceptLangs))); | LanguageParser::buildAcceptLanguageHeader(acceptLangs))); |
| |
ContentLanguages contentLangs = |
ContentLanguageList contentLangs = |
((ContentLanguageListContainer)request->operationContext.get | ((ContentLanguageListContainer)request->operationContext.get |
(ContentLanguageListContainer::NAME)).getLanguages(); | (ContentLanguageListContainer::NAME)).getLanguages(); |
modifiedInstance.addProperty (CIMProperty | modifiedInstance.addProperty (CIMProperty |
|
|
(PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue ().toString (); | (PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue ().toString (); |
| |
// l10n start | // l10n start |
AcceptLanguages acceptLangs; |
AcceptLanguageList acceptLangs; |
Uint32 propIndex = instance.findProperty | Uint32 propIndex = instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
acceptLangsString); | acceptLangsString); |
} | } |
} | } |
ContentLanguages contentLangs; |
ContentLanguageList contentLangs; |
propIndex = instance.findProperty | propIndex = instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
String creator = instance.getProperty (instance.findProperty | String creator = instance.getProperty (instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue ().toString (); | (PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue ().toString (); |
// l10n start | // l10n start |
AcceptLanguages acceptLangs; |
AcceptLanguageList acceptLangs; |
Uint32 propIndex = instance.findProperty | Uint32 propIndex = instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
acceptLangsString); | acceptLangsString); |
} | } |
} | } |
ContentLanguages contentLangs; |
ContentLanguageList contentLangs; |
propIndex = instance.findProperty | propIndex = instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
(PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue | (PEGASUS_PROPERTYNAME_INDSUB_CREATOR)).getValue |
().toString (); | ().toString (); |
| |
AcceptLanguages acceptLangs; |
AcceptLanguageList acceptLangs; |
Uint32 propIndex = instance.findProperty | Uint32 propIndex = instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
acceptLangsString); | acceptLangsString); |
} | } |
} | } |
ContentLanguages contentLangs; |
ContentLanguageList contentLangs; |
propIndex = instance.findProperty | propIndex = instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
_getCreator (instance, creator); | _getCreator (instance, creator); |
| |
// l10n start | // l10n start |
AcceptLanguages acceptLangs; |
AcceptLanguageList acceptLangs; |
Uint32 propIndex = instance.findProperty | Uint32 propIndex = instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
acceptLangsString); | acceptLangsString); |
} | } |
} | } |
ContentLanguages contentLangs; |
ContentLanguageList contentLangs; |
propIndex = instance.findProperty | propIndex = instance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
// Get the language tags that were saved with the subscription | // Get the language tags that were saved with the subscription |
// instance | // instance |
// | // |
AcceptLanguages acceptLangs; |
AcceptLanguageList acceptLangs; |
Uint32 propIndex = subscriptionInstance.findProperty | Uint32 propIndex = subscriptionInstance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_ACCEPTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
acceptLangsString); | acceptLangsString); |
} | } |
} | } |
ContentLanguages contentLangs; |
ContentLanguageList contentLangs; |
propIndex = subscriptionInstance.findProperty | propIndex = subscriptionInstance.findProperty |
(PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); | (PEGASUS_PROPERTYNAME_INDSUB_CONTENTLANGS); |
if (propIndex != PEG_NOT_FOUND) | if (propIndex != PEG_NOT_FOUND) |
|
|
const String & query, | const String & query, |
const String & queryLanguage, | const String & queryLanguage, |
const CIMInstance & subscription, | const CIMInstance & subscription, |
const AcceptLanguages & acceptLangs, |
const AcceptLanguageList & acceptLangs, |
const ContentLanguages & contentLangs, |
const ContentLanguageList & contentLangs, |
const CIMRequestMessage * origRequest, | const CIMRequestMessage * origRequest, |
const Array <CIMName> & indicationSubclasses, | const Array <CIMName> & indicationSubclasses, |
const String & userName, | const String & userName, |
|
|
const String & query, | const String & query, |
const String & queryLanguage, | const String & queryLanguage, |
const CIMInstance & subscription, | const CIMInstance & subscription, |
const AcceptLanguages & acceptLangs, |
const AcceptLanguageList & acceptLangs, |
const ContentLanguages & contentLangs, |
const ContentLanguageList & contentLangs, |
const String & userName, | const String & userName, |
const String & authType) | const String & authType) |
{ | { |
|
|
const String & query, | const String & query, |
const String & queryLanguage, | const String & queryLanguage, |
const CIMInstance & subscription, | const CIMInstance & subscription, |
const AcceptLanguages & acceptLangs, |
const AcceptLanguageList & acceptLangs, |
const ContentLanguages & contentLangs, |
const ContentLanguageList & contentLangs, |
const String & userName, | const String & userName, |
const String & authType) | const String & authType) |
{ | { |
|
|
(const Array <ProviderClassList> & indicationProviders, | (const Array <ProviderClassList> & indicationProviders, |
const CIMNamespaceName & nameSpace, | const CIMNamespaceName & nameSpace, |
const CIMInstance & subscription, | const CIMInstance & subscription, |
const AcceptLanguages & acceptLangs, |
const AcceptLanguageList & acceptLangs, |
const ContentLanguages & contentLangs, |
const ContentLanguageList & contentLangs, |
const CIMRequestMessage * origRequest, | const CIMRequestMessage * origRequest, |
const Array <CIMName> & indicationSubclasses, | const Array <CIMName> & indicationSubclasses, |
const String & userName, | const String & userName, |
|
|
(const Array <ProviderClassList> & indicationProviders, | (const Array <ProviderClassList> & indicationProviders, |
const CIMNamespaceName & nameSpace, | const CIMNamespaceName & nameSpace, |
const CIMInstance & subscription, | const CIMInstance & subscription, |
const AcceptLanguages & acceptLangs, |
const AcceptLanguageList & acceptLangs, |
const ContentLanguages & contentLangs, |
const ContentLanguageList & contentLangs, |
const String & userName, | const String & userName, |
const String & authType) | const String & authType) |
{ | { |