<commit_before>//******************************************************************
//
// Copyright 2017 Intel Mobile Communications GmbH All Rights Reserved.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//

#include <mutex>
#include <stdlib.h>
#include <stdint.h>
#include <string>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <regex.h>
#include "oic_string.h"
#include "mpmErrorCode.h"
#include "hue_auth_spec.h"
#include "hue_file.h"
#include "hue_defs.h"
#include "curlClient.h"
#include "cJSON.h"
#include "logger.h"

#define TAG "HUE_AUTH"

using namespace OC::Bridging;

/**
 * This is the global context of the Hue specific authorization module.  There
 * can only be one instance of this in a process boundary and that is the
 * case for a decoupled plugin.  So a global context is the best solution. It
 * is the only global structure required for the implementation of the Hue
 * specific authorization module.
 */
typedef struct HueAuthCtxTag
{<commit_msg>bridging: Avoid to include unistd.h if unsupported<commit_after>//******************************************************************
//
// Copyright 2017 Intel Mobile Communications GmbH All Rights Reserved.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
#include "iotivity_config.h"

#include <mutex>
#include <stdlib.h>
#include <stdint.h>
#include <string>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <regex.h>
#include "oic_string.h"
#include "mpmErrorCode.h"
#include "hue_auth_spec.h"
#include "hue_file.h"
#include "hue_defs.h"
#include "curlClient.h"
#include "cJSON.h"
#include "logger.h"

#define TAG "HUE_AUTH"

using namespace OC::Bridging;

/**
 * This is the global context of the Hue specific authorization module.  There
 * can only be one instance of this in a process boundary and that is the
 * case for a decoupled plugin.  So a global context is the best solution. It
 * is the only global structure required for the implementation of the Hue
 * specific authorization module.
 */
typedef struct HueAuthCtxTag
{
{'fraction_non_alphanumeric': 0.20654044750430292, 'fraction_numerical': 0.004589787722317842, 'mean_word_length': 3.5761154855643045, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5991682', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1008, 'n_words': 389}