<commit_before>/*
 *  Copyright (c) 2004-present, Facebook, Inc.
 *  All rights reserved.
 *
 *  This source code is licensed under the BSD-style license found in the
 *  LICENSE file in the root directory of this source tree. An additional grant
 *  of patent rights can be found in the PATENTS file in the same directory.
 *
 */
#pragma once

#include <memory>
#include "fboss/agent/FbossError.h"

extern "C" {
#include <opennsl/switch.h>
}

namespace facebook { namespace fboss {

class BcmSwitch;
class BcmSwitchEvent;
class BcmSwitchEventCallback;

/**
 * This class manages the bcm callbacks for critical switch events and
 * invokes the callback on the switch event handler objects.
 */

class BcmSwitchEventManager {
 public:
  explicit BcmSwitchEventManager(BcmSwitch* hw);
  ~BcmSwitchEventManager();

  // callback registration.
  // registers a new event callback, returning the old callback object if<commit_msg>Move thrift protocol includes to impl files<commit_after>/*
 *  Copyright (c) 2004-present, Facebook, Inc.
 *  All rights reserved.
 *
 *  This source code is licensed under the BSD-style license found in the
 *  LICENSE file in the root directory of this source tree. An additional grant
 *  of patent rights can be found in the PATENTS file in the same directory.
 *
 */
#pragma once

#include <memory>
#include <mutex>
#include "fboss/agent/FbossError.h"

extern "C" {
#include <opennsl/switch.h>
}

namespace facebook { namespace fboss {

class BcmSwitch;
class BcmSwitchEvent;
class BcmSwitchEventCallback;

/**
 * This class manages the bcm callbacks for critical switch events and
 * invokes the callback on the switch event handler objects.
 */

class BcmSwitchEventManager {
 public:
  explicit BcmSwitchEventManager(BcmSwitch* hw);
  ~BcmSwitchEventManager();

  // callback registration.
  // registers a new event callback, returning the old callback object if
{'fraction_non_alphanumeric': 0.07749077490774908, 'fraction_numerical': 0.004217185028993147, 'mean_word_length': 4.1716621253406, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2482171', 'n_tokens_mistral': 554, 'n_tokens_neox': 533, 'n_words': 223}