text stringlengths 4 6.14k |
|---|
/*
* Copyright (c) 2001-2004 Jakub Jermar
* All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef _SCHEDULER_H_
#define _SCHEDULER_H_
#include <io/interrupts.h>
#include <lib/list.h>
#define RQ_COUNT 16
/** Scheduler run queue structure. */
typedef struct {
IRQ_SPINLOCK_DECLARE(lock);
list_t rq; /**< List of ready threads. */
size_t n; /**< Number of threads in rq_ready. */
} runq_t;
#endif // _SCHEDULER_H_
|
/* $Header: /cvsup/minix/src/lib/libp/wdw.c,v 1.1.1.1 2005/04/21 14:56:24 beng Exp $ */
/*
* (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
*
* This product is part of the Amsterdam Compiler Kit.
*
* Permission to use, sell, duplicate or disclose this software must be
* obtained in writing. Requests for such permissions may be sent to
*
* Dr. Andrew S. Tanenbaum
* Wiskundig Seminarium
* Vrije Universiteit
* Postbox 7161
* 1007 MC Amsterdam
* The Netherlands
*
*/
#include <pc_file.h>
extern struct file *_curfil;
extern _incpt();
char *_wdw(f) struct file *f; {
_curfil = f;
if ((f->flags & (WINDOW|WRBIT|0377)) == MAGIC)
_incpt(f);
return(f->ptr);
}
|
/***********************************************************************************************************************
**
** Copyright (c) 2011, 2014 ETH Zurich
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
** following conditions are met:
**
** * Redistributions of source code must retain the above copyright notice, this list of conditions and the
** following disclaimer.
** * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
** following disclaimer in the documentation and/or other materials provided with the distribution.
** * Neither the name of the ETH Zurich nor the names of its contributors may be used to endorse or promote products
** derived from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
** INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
**********************************************************************************************************************/
#pragma once
#include "../contractslibrary_api.h"
namespace Model {
class Model;
class Node;
}
namespace OOModel {
class Expression;
}
namespace ContractsLibrary {
class CONTRACTSLIBRARY_API ChangeMonitor : public QObject {
Q_OBJECT
private:
// This is needed in order to make the Signals and Slots mechanism work. Otherwise we are not able to connect to
// the signal provided from Model. This is because the signatures of the two methods, must match exactly
// (stringwise).
typedef Model::Node Node;
public:
ChangeMonitor();
virtual ~ChangeMonitor();
void listenToModel(Model::Model* model);
static void expressionModified(OOModel::Expression*& exp, int& cursorIndex);
public slots:
void nodesModified(QSet<Node*> nodes);
};
} /* namespace ContractsLibrary */
|
/********************************************************************
* Copyright © 2018 Computational Molecular Biology Group, *
* Freie Universität Berlin (GER) *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the *
* following conditions are met: *
* 1. Redistributions of source code must retain the above *
* copyright notice, this list of conditions and the *
* following disclaimer. *
* 2. Redistributions in binary form must reproduce the above *
* copyright notice, this list of conditions and the following *
* disclaimer in the documentation and/or other materials *
* provided with the distribution. *
* 3. Neither the name of the copyright holder nor the names of *
* its contributors may be used to endorse or promote products *
* derived from this software without specific *
* prior written permission. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR *
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, *
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, *
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) *
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
********************************************************************/
/**
* This file contains the declaration for conversion reactions, i.e., A->B. They are assigned to two types and happen
* with a certain rate.
*
* @file Conversion.h
* @brief Declaration of Conversion reactions, i.e., A->B.
* @author clonker
* @date 20.06.16
*/
#pragma once
#include "Reaction.h"
namespace readdy::model::reactions {
class Conversion : public Reaction {
public:
Conversion(const std::string &name, ParticleTypeId typeFrom, ParticleTypeId typeTo, const scalar rate) :
Reaction(name, rate, 0, 0, 1, 1) {
_educts = {typeFrom};
_products = {typeTo};
}
const ParticleTypeId getTypeFrom() const { return _educts[0]; }
const ParticleTypeId getTypeTo() const { return _products[0]; }
const ReactionType type() const override { return ReactionType::Conversion; }
};
}
|
/*
* FlagCalls.h
*
* Author: Guido Reina and others
* Copyright (C) 2016-2021 by Universitaet Stuttgart (VISUS).
* All rights reserved.
*/
#pragma once
#include "mmcore/CallGeneric.h"
#include "mmcore/FlagStorage.h"
#include "mmcore/factories/CallAutoDescription.h"
namespace megamol {
namespace core {
class FlagCallRead_CPU : public core::GenericVersionedCall<std::shared_ptr<FlagCollection_CPU>, core::EmptyMetaData> {
public:
inline FlagCallRead_CPU() = default;
~FlagCallRead_CPU() = default;
static const char* ClassName(void) {
return "FlagCallRead_CPU";
}
static const char* Description(void) {
return "Call that transports a buffer object representing a FlagStorage in a shader storage buffer for "
"reading";
}
};
class FlagCallWrite_CPU : public core::GenericVersionedCall<std::shared_ptr<FlagCollection_CPU>, core::EmptyMetaData> {
public:
inline FlagCallWrite_CPU() = default;
~FlagCallWrite_CPU() = default;
static const char* ClassName(void) {
return "FlagCallWrite_CPU";
}
static const char* Description(void) {
return "Call that transports a buffer object representing a FlagStorage in a shader storage buffer for "
"writing";
}
};
/** Description class typedef */
typedef megamol::core::factories::CallAutoDescription<FlagCallRead_CPU> FlagCallRead_CPUDescription;
typedef megamol::core::factories::CallAutoDescription<FlagCallWrite_CPU> FlagCallWrite_CPUDescription;
} // namespace core
} /* end namespace megamol */
|
// Filename: configVariableFilename.h
// Created by: drose (22Nov04)
//
////////////////////////////////////////////////////////////////////
//
// PANDA 3D SOFTWARE
// Copyright (c) Carnegie Mellon University. All rights reserved.
//
// All use of this software is subject to the terms of the revised BSD
// license. You should have received a copy of this license along
// with this source code in a file named "LICENSE."
//
////////////////////////////////////////////////////////////////////
#ifndef CONFIGVARIABLEFILENAME_H
#define CONFIGVARIABLEFILENAME_H
#include "dtoolbase.h"
#include "configVariable.h"
#include "filename.h"
////////////////////////////////////////////////////////////////////
// Class : ConfigVariableFilename
// Description : This is a convenience class to specialize
// ConfigVariable as a Filename type. It is almost the
// same thing as ConfigVariableString, except it handles
// an implicit Filename::expand_from() operation so that
// the user may put OS-specific filenames, or filenames
// based on environment variables, in the prc file.
////////////////////////////////////////////////////////////////////
class EXPCL_DTOOLCONFIG ConfigVariableFilename : public ConfigVariable {
PUBLISHED:
INLINE ConfigVariableFilename(const string &name);
INLINE ConfigVariableFilename(const string &name, const Filename &default_value,
const string &description = string(), int flags = 0);
INLINE void operator = (const Filename &value);
INLINE operator const Filename &() const;
// These methods help the ConfigVariableFilename act like a Filename
// object.
INLINE const char *c_str() const;
INLINE bool empty() const;
INLINE size_t length() const;
INLINE char operator [] (size_t n) const;
INLINE string get_fullpath() const;
INLINE string get_dirname() const;
INLINE string get_basename() const;
INLINE string get_fullpath_wo_extension() const;
INLINE string get_basename_wo_extension() const;
INLINE string get_extension() const;
// Comparison operators are handy.
INLINE bool operator == (const Filename &other) const;
INLINE bool operator != (const Filename &other) const;
INLINE bool operator < (const Filename &other) const;
INLINE void set_value(const Filename &value);
INLINE Filename get_value() const;
INLINE Filename get_default_value() const;
INLINE Filename get_word(size_t n) const;
INLINE void set_word(size_t n, const Filename &value);
private:
void reload_cache();
INLINE const Filename &get_ref_value() const;
private:
AtomicAdjust::Integer _local_modified;
Filename _cache;
};
#include "configVariableFilename.I"
#endif
|
/*
Copyright (c) 2011, The Mineserver Project
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the The Mineserver Project nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef MINESERVER_NETWORK_PACKET_PLAYERLISTITEM_H
#define MINESERVER_NETWORK_PACKET_PLAYERLISTITEM_H
#include <string>
#include <mineserver/byteorder.h>
#include <mineserver/network/message.h>
namespace Mineserver
{
struct Network_Message_PlayerListItem : public Mineserver::Network_Message
{
std::string name;
bool online;
int16_t ping;
};
}
#endif
|
/**
Copyright (c)
Audi Autonomous Driving Cup. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the Audi AG and its contributors for Audi Autonomous Driving Cup.
4. Neither the name of Audi nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY AUDI AG AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AUDI AG OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************
* $Author:: spiesra $ $Date:: 2015-05-20 16:21:28#$ $Rev:: 35283 $
**********************************************************************/
#ifndef __STD_INCLUDES_HEADER
#define __STD_INCLUDES_HEADER
#include <adtf_platform_inc.h>
#include <adtf_plugin_sdk.h>
using namespace adtf;
#include <adtf_graphics.h>
using namespace adtf_graphics;
#include "aadc_enums.h"
#include <QtGui/QtGui>
#include <QtCore/QtCore>
#ifdef WIN32
#ifdef _DEBUG
#pragma comment(lib, "qtmaind.lib")
#pragma comment(lib, "qtcored4.lib")
#pragma comment(lib, "qtguid4.lib")
#else // _DEBUG
#pragma comment(lib, "qtmain.lib")
#pragma comment(lib, "qtcore4.lib")
#pragma comment(lib, "qtgui4.lib")
#endif
#endif
#endif // __STD_INCLUDES_HEADER
|
#include <math.h>
#include <time.h>
#include "quiet.h"
FILE *profiles_f;
int compare_chunk(const uint8_t *l, const uint8_t *r, size_t len) {
for (size_t i = 0; i < len; i++) {
if (l[i] != r[i]) {
return -1;
}
}
return 0;
}
int read_and_check(const uint8_t *payload, size_t payload_len,
size_t *accum, quiet_decoder *d, uint8_t *payload_decoded,
size_t payload_blocklen) {
*accum = 0;
for (;;) {
ssize_t read = quiet_decoder_recv(d, payload_decoded, payload_blocklen);
if (read < 0) {
break;
}
if (read > payload_len) {
printf("failed, decoded more payload than encoded, read=%zd, remaining payload=%zu\n", read, payload_len);
return 1;
}
if (compare_chunk(payload, payload_decoded, read)) {
printf("failed, decoded chunk differs from encoded payload, %zu payload remains\n", payload_len);
return 1;
}
payload += read;
payload_len -= read;
*accum += read;
}
return 0;
}
int test_payload(const char *profile_name,
const uint8_t *payload, size_t payload_len,
unsigned int encode_rate, unsigned int decode_rate,
bool do_clamp) {
fseek(profiles_f, 0, SEEK_SET);
quiet_encoder_options *encodeopt =
quiet_encoder_profile_file(profiles_f, profile_name);
quiet_encoder *e = quiet_encoder_create(encodeopt, encode_rate);
fseek(profiles_f, 0, SEEK_SET);
quiet_decoder_options *decodeopt =
quiet_decoder_profile_file(profiles_f, profile_name);
quiet_decoder *d = quiet_decoder_create(decodeopt, decode_rate);
size_t samplebuf_len = 16384;
quiet_sample_t *samplebuf = malloc(samplebuf_len * sizeof(quiet_sample_t));
quiet_sample_t *silence = calloc(samplebuf_len, sizeof(quiet_sample_t));
if (do_clamp) {
quiet_encoder_clamp_frame_len(e, samplebuf_len);
}
size_t frame_len = quiet_encoder_get_frame_len(e);
for (size_t sent = 0; sent < payload_len; sent += frame_len) {
frame_len = (frame_len > (payload_len - sent)) ? (payload_len - sent) : frame_len;
quiet_encoder_send(e, payload + sent, frame_len);
}
size_t payload_blocklen = 1 << 14;
uint8_t *payload_decoded = malloc(payload_blocklen * sizeof(uint8_t));
size_t written = samplebuf_len;
size_t accum;
while (written == samplebuf_len) {
written = quiet_encoder_emit(e, samplebuf, samplebuf_len);
if (written <= 0) {
break;
}
quiet_decoder_consume(d, samplebuf, written);
if (do_clamp) {
quiet_decoder_consume(d, silence, samplebuf_len);
}
if (read_and_check(payload, payload_len, &accum, d, payload_decoded, payload_blocklen)) {
return 1;
}
payload += accum;
payload_len -= accum;
}
quiet_decoder_flush(d);
if (read_and_check(payload, payload_len, &accum, d, payload_decoded, payload_blocklen)) {
return 1;
}
payload += accum;
payload_len -= accum;
if (payload_len) {
printf("failed, decoded less payload than encoded, remaining payload=%zu\n", payload_len);
return 1;
}
free(payload_decoded);
free(samplebuf);
free(silence);
free(encodeopt);
free(decodeopt);
quiet_encoder_destroy(e);
quiet_decoder_destroy(d);
return 0;
}
int test_profile(unsigned int encode_rate, unsigned int decode_rate, const char *profile) {
size_t payload_lens[] = { 1, 2, 4, 12, 320, 399, 400, 797, 798, 799, 800, 1023 };
size_t payload_lens_len = sizeof(payload_lens)/sizeof(size_t);
bool do_close_frame[] = { false, true };
size_t do_close_frame_len = sizeof(do_close_frame)/sizeof(bool);
for (size_t i = 0; i < payload_lens_len; i++) {
size_t payload_len = payload_lens[i];
uint8_t *payload = malloc(payload_len*sizeof(uint8_t));
for (size_t j = 0; j < payload_len; j++) {
payload[j] = rand() & 0xff;
}
for (size_t j = 0; j < do_close_frame_len; j++) {
printf(" payload_len=%6zu, close_frame=%s... ",
payload_len, (do_close_frame[j] ? " true":"false"));
if (test_payload(profile, payload, payload_len,
encode_rate, decode_rate, do_close_frame[j])) {
printf("FAILED\n");
return -1;
}
printf("PASSED\n");
}
free(payload);
}
return 0;
}
int test_sample_rate_pair(unsigned int encode_rate, unsigned int decode_rate) {
size_t num_profiles;
fseek(profiles_f, 0, SEEK_SET);
char **profiles = quiet_profile_keys_file(profiles_f, &num_profiles);
for (size_t i = 0; i < num_profiles; i++) {
const char *profile = profiles[i];
printf(" profile=%s\n", profile);
if (test_profile(encode_rate, decode_rate, profile)) {
return -1;
}
free(profiles[i]);
}
free(profiles);
return 0;
}
int main(int argc, char **argv) {
profiles_f = fopen("test-profiles.json", "rb");
srand(time(NULL));
unsigned int rates[][2]={ {44100, 44100}, {48000, 48000} };
size_t rates_len = sizeof(rates)/(2 * sizeof(unsigned int));
for (size_t i = 0; i < rates_len; i++) {
unsigned int encode_rate = rates[i][0];
unsigned int decode_rate = rates[i][1];
printf("running tests on encode_rate=%u, decode_rate=%u\n", encode_rate, decode_rate);
if (test_sample_rate_pair(encode_rate, decode_rate)) {
return 1;
}
}
fclose(profiles_f);
return 0;
}
|
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_APP_APP_STARTUP_PARAMETERS_H_
#define IOS_CHROME_APP_APP_STARTUP_PARAMETERS_H_
#import <Foundation/Foundation.h>
#include <map>
enum NTPTabOpeningPostOpeningAction {
// No action should be done
NO_ACTION = 0,
START_VOICE_SEARCH,
START_QR_CODE_SCANNER,
FOCUS_OMNIBOX,
NTP_TAB_OPENING_POST_OPENING_ACTION_COUNT,
};
class GURL;
// This class stores all the parameters relevant to the app startup in case
// of launch from another app.
@interface AppStartupParameters : NSObject
// The URL that should be opened. This may not always be the same URL as the one
// that was received. The reason for this is in the case of Universal Link
// navigation where we may want to open up a fallback URL e.g., the New Tab Page
// instead of the actual universal link.
@property(nonatomic, readonly, assign) const GURL& externalURL;
// Original URL that should be opened. May or may not be the same as
// |externalURL|.
@property(nonatomic, readonly, assign) const GURL& completeURL;
// The URL query string parameters in the case that the app was launched as a
// result of Universal Link navigation. The map associates query string
// parameters with their corresponding value.
@property(nonatomic, assign) std::map<std::string, std::string>
externalURLParams;
// Boolean to track if the app should launch in incognito mode.
@property(nonatomic, readwrite, assign) BOOL launchInIncognito;
// Action to be taken after opening the initial NTP.
@property(nonatomic, readwrite, assign)
NTPTabOpeningPostOpeningAction postOpeningAction;
// Boolean to track if a Payment Request response is requested at startup.
@property(nonatomic, readwrite, assign) BOOL completePaymentRequest;
// Text query that should be executed on startup.
@property(nonatomic, readwrite, copy) NSString* textQuery;
// Data for UIImage for image query that should be executed on startup.
@property(nonatomic, readwrite, strong) NSData* imageSearchData;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithExternalURL:(const GURL&)externalURL
completeURL:(const GURL&)completeURL
NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithUniversalLink:(const GURL&)universalLink;
@end
#endif // IOS_CHROME_APP_APP_STARTUP_PARAMETERS_H_
|
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_SYSTEM_NETWORK_VPN_FEATURE_POD_CONTROLLER_H_
#define ASH_SYSTEM_NETWORK_VPN_FEATURE_POD_CONTROLLER_H_
#include "ash/system/network/tray_network_state_observer.h"
#include "ash/system/unified/feature_pod_controller_base.h"
#include "base/macros.h"
#include "base/strings/string16.h"
namespace ash {
class UnifiedSystemTrayController;
// Controller of vpn feature pod button.
class VPNFeaturePodController : public FeaturePodControllerBase,
public TrayNetworkStateObserver {
public:
VPNFeaturePodController(UnifiedSystemTrayController* tray_controller);
~VPNFeaturePodController() override;
// FeaturePodControllerBase:
FeaturePodButton* CreateButton() override;
void OnIconPressed() override;
SystemTrayItemUmaType GetUmaType() const override;
// TrayNetworkStateObserver:
void ActiveNetworkStateChanged() override;
private:
void Update();
// Unowned.
UnifiedSystemTrayController* const tray_controller_;
FeaturePodButton* button_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(VPNFeaturePodController);
};
} // namespace ash
#endif // ASH_SYSTEM_NETWORK_VPN_FEATURE_POD_CONTROLLER_H_
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_VIEWS_CRYPTO_MODULE_PASSWORD_DIALOG_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_CRYPTO_MODULE_PASSWORD_DIALOG_VIEW_H_
#include <string>
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "chrome/browser/ui/crypto_module_password_dialog.h"
#include "ui/views/controls/textfield/textfield_controller.h"
#include "ui/views/window/dialog_delegate.h"
namespace views {
class Label;
class Textfield;
}
class CryptoModulePasswordDialogView : public views::DialogDelegateView,
public views::TextfieldController {
public:
CryptoModulePasswordDialogView(const std::string& slot_name,
CryptoModulePasswordReason reason,
const std::string& server,
const CryptoModulePasswordCallback& callback);
~CryptoModulePasswordDialogView() override;
private:
FRIEND_TEST_ALL_PREFIXES(CryptoModulePasswordDialogViewTest,
AcceptUsesPassword);
FRIEND_TEST_ALL_PREFIXES(CryptoModulePasswordDialogViewTest,
CancelDoesntUsePassword);
// views::WidgetDelegate:
views::View* GetInitiallyFocusedView() override;
ui::ModalType GetModalType() const override;
base::string16 GetWindowTitle() const override;
// views::TextfieldController:
void ContentsChanged(views::Textfield* sender,
const base::string16& new_contents) override;
bool HandleKeyEvent(views::Textfield* sender,
const ui::KeyEvent& keystroke) override;
// Initialize views and layout.
void Init(const std::string& server,
const std::string& slot_name,
CryptoModulePasswordReason reason);
views::Label* reason_label_;
views::Label* password_label_;
views::Textfield* password_entry_;
const CryptoModulePasswordCallback callback_;
DISALLOW_COPY_AND_ASSIGN(CryptoModulePasswordDialogView);
};
#endif // CHROME_BROWSER_UI_VIEWS_CRYPTO_MODULE_PASSWORD_DIALOG_VIEW_H_
|
// SDLDisplayMode.h
//
#import "SDLEnum.h"
/**
* Identifies the various display types used by SDL.
*
* @since SDL 1.0
*/
typedef SDLEnum SDLDisplayMode NS_TYPED_ENUM;
/**
* @abstract Display Mode : DAY
*/
extern SDLDisplayMode const SDLDisplayModeDay;
/**
* @abstract Display Mode : NIGHT.
*/
extern SDLDisplayMode const SDLDisplayModeNight;
/**
* @abstract Display Mode : AUTO.
*/
extern SDLDisplayMode const SDLDisplayModeAuto;
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_SUBRESOURCE_INTEGRITY_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_LOADER_SUBRESOURCE_INTEGRITY_H_
#include "base/gtest_prod_util.h"
#include "third_party/blink/renderer/platform/loader/fetch/integrity_metadata.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
namespace blink {
class KURL;
class Resource;
class PLATFORM_EXPORT SubresourceIntegrity final {
STATIC_ONLY(SubresourceIntegrity);
public:
class PLATFORM_EXPORT ReportInfo final {
DISALLOW_NEW();
public:
enum class UseCounterFeature {
kSRIElementWithMatchingIntegrityAttribute,
kSRIElementWithNonMatchingIntegrityAttribute,
kSRIElementIntegrityAttributeButIneligible,
kSRIElementWithUnparsableIntegrityAttribute,
kSRISignatureCheck,
kSRISignatureSuccess,
};
void AddUseCount(UseCounterFeature);
void AddConsoleErrorMessage(const String&);
void Clear();
const Vector<UseCounterFeature>& UseCounts() const { return use_counts_; }
const Vector<String>& ConsoleErrorMessages() const {
return console_error_messages_;
}
private:
Vector<UseCounterFeature> use_counts_;
Vector<String> console_error_messages_;
};
enum IntegrityParseResult {
kIntegrityParseValidResult,
kIntegrityParseNoValidResult
};
// Determine which SRI features to support when parsing integrity attributes.
enum class IntegrityFeatures {
kDefault, // Default: All sha* hash codes.
kSignatures // Also support the ed25519 signature scheme.
};
// The version with the IntegrityMetadataSet passed as the first argument
// assumes that the integrity attribute has already been parsed, and the
// IntegrityMetadataSet represents the result of that parsing.
static bool CheckSubresourceIntegrity(const IntegrityMetadataSet&,
const char* content,
size_t content_size,
const KURL& resource_url,
const Resource&,
ReportInfo&);
static bool CheckSubresourceIntegrity(const String&,
IntegrityFeatures,
const char* content,
size_t content_size,
const KURL& resource_url,
ReportInfo&);
// The IntegrityMetadataSet arguments are out parameters which contain the
// set of all valid, parsed metadata from |attribute|.
static IntegrityParseResult ParseIntegrityAttribute(
const WTF::String& attribute,
IntegrityFeatures,
IntegrityMetadataSet&);
static IntegrityParseResult ParseIntegrityAttribute(
const WTF::String& attribute,
IntegrityFeatures,
IntegrityMetadataSet&,
ReportInfo*);
private:
friend class SubresourceIntegrityTest;
FRIEND_TEST_ALL_PREFIXES(SubresourceIntegrityTest, Parsing);
FRIEND_TEST_ALL_PREFIXES(SubresourceIntegrityTest, ParseAlgorithm);
FRIEND_TEST_ALL_PREFIXES(SubresourceIntegrityTest, ParseHeader);
FRIEND_TEST_ALL_PREFIXES(SubresourceIntegrityTest, Prioritization);
FRIEND_TEST_ALL_PREFIXES(SubresourceIntegrityTest, FindBestAlgorithm);
FRIEND_TEST_ALL_PREFIXES(SubresourceIntegrityTest,
GetCheckFunctionForAlgorithm);
// The core implementation for all CheckSubresoureIntegrity functions.
static bool CheckSubresourceIntegrityImpl(const IntegrityMetadataSet&,
const char*,
size_t,
const KURL& resource_url,
const String integrity_header,
ReportInfo&);
enum AlgorithmParseResult {
kAlgorithmValid,
kAlgorithmUnparsable,
kAlgorithmUnknown
};
static IntegrityAlgorithm FindBestAlgorithm(const IntegrityMetadataSet&);
typedef bool (*CheckFunction)(const IntegrityMetadata&,
const char*,
size_t,
const String&);
static CheckFunction GetCheckFunctionForAlgorithm(IntegrityAlgorithm);
static bool CheckSubresourceIntegrityDigest(const IntegrityMetadata&,
const char*,
size_t,
const String& integrity_header);
static bool CheckSubresourceIntegritySignature(
const IntegrityMetadata&,
const char*,
size_t,
const String& integrity_header);
static AlgorithmParseResult ParseAttributeAlgorithm(const UChar*& begin,
const UChar* end,
IntegrityFeatures,
IntegrityAlgorithm&);
static AlgorithmParseResult ParseIntegrityHeaderAlgorithm(
const UChar*& begin,
const UChar* end,
IntegrityAlgorithm&);
typedef std::pair<const char*, IntegrityAlgorithm> AlgorithmPrefixPair;
static AlgorithmParseResult ParseAlgorithmPrefix(
const UChar*& string_position,
const UChar* string_end,
const AlgorithmPrefixPair* prefix_table,
size_t prefix_table_size,
IntegrityAlgorithm&);
static bool ParseDigest(const UChar*& begin,
const UChar* end,
String& digest);
};
} // namespace blink
#endif
|
/*
* Copyright (c) 2018 Paul B Mahol
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avcodec.h"
#include "bsf.h"
#include "get_bits.h"
#include "mlp_parse.h"
#include "mlp.h"
typedef struct AccessUnit {
uint8_t bits[4];
uint16_t offset;
uint16_t optional;
} AccessUnit;
typedef struct TrueHDCoreContext {
MLPHeaderInfo hdr;
} TrueHDCoreContext;
static int truehd_core_filter(AVBSFContext *ctx, AVPacket *pkt)
{
TrueHDCoreContext *s = ctx->priv_data;
GetBitContext gbc;
AccessUnit units[MAX_SUBSTREAMS];
int ret, i, last_offset = 0;
int in_size, out_size;
int have_header = 0;
int substream_bytes = 0;
int end;
ret = ff_bsf_get_packet_ref(ctx, pkt);
if (ret < 0)
return ret;
if (pkt->size < 4) {
ret = AVERROR_INVALIDDATA;
goto fail;
}
in_size = (AV_RB16(pkt->data) & 0xFFF) * 2;
if (in_size < 4 || in_size > pkt->size) {
ret = AVERROR_INVALIDDATA;
goto fail;
}
ret = init_get_bits8(&gbc, pkt->data + 4, pkt->size - 4);
if (ret < 0)
goto fail;
if (show_bits_long(&gbc, 32) == 0xf8726fba) {
if ((ret = ff_mlp_read_major_sync(ctx, &s->hdr, &gbc)) < 0)
goto fail;
have_header = 1;
}
if (s->hdr.num_substreams > MAX_SUBSTREAMS) {
ret = AVERROR_INVALIDDATA;
goto fail;
}
for (i = 0; i < s->hdr.num_substreams; i++) {
for (int j = 0; j < 4; j++)
units[i].bits[j] = get_bits1(&gbc);
units[i].offset = get_bits(&gbc, 12);
if (i < 3) {
last_offset = units[i].offset * 2;
substream_bytes += 2;
}
if (units[i].bits[0]) {
units[i].optional = get_bits(&gbc, 16);
if (i < 3)
substream_bytes += 2;
}
}
end = get_bits_count(&gbc) >> 3;
out_size = end + 4 + last_offset;
if (out_size < in_size) {
int bpos = 0, reduce = end - have_header * 28 - substream_bytes;
uint16_t parity_nibble, dts = AV_RB16(pkt->data + 2);
uint16_t auheader;
uint8_t header[28];
av_assert1(reduce >= 0 && reduce % 2 == 0);
if (have_header) {
memcpy(header, pkt->data + 4, 28);
header[16] = (header[16] & 0x0c) | (FFMIN(s->hdr.num_substreams, 3) << 4);
header[17] &= 0x7f;
header[25] &= 0xfe;
AV_WL16(header + 26, ff_mlp_checksum16(header, 26));
}
pkt->data += reduce;
out_size -= reduce;
pkt->size = out_size;
ret = av_packet_make_writable(pkt);
if (ret < 0)
goto fail;
AV_WB16(pkt->data + 2, dts);
parity_nibble = dts;
parity_nibble ^= out_size / 2;
for (i = 0; i < FFMIN(s->hdr.num_substreams, 3); i++) {
uint16_t substr_hdr = 0;
substr_hdr |= (units[i].bits[0] << 15);
substr_hdr |= (units[i].bits[1] << 14);
substr_hdr |= (units[i].bits[2] << 13);
substr_hdr |= (units[i].bits[3] << 12);
substr_hdr |= units[i].offset;
AV_WB16(pkt->data + have_header * 28 + 4 + bpos, substr_hdr);
parity_nibble ^= substr_hdr;
bpos += 2;
if (units[i].bits[0]) {
AV_WB16(pkt->data + have_header * 28 + 4 + bpos, units[i].optional);
parity_nibble ^= units[i].optional;
bpos += 2;
}
}
parity_nibble ^= parity_nibble >> 8;
parity_nibble ^= parity_nibble >> 4;
parity_nibble &= 0xF;
auheader = (parity_nibble ^ 0xF) << 12;
auheader |= (out_size / 2) & 0x0fff;
AV_WB16(pkt->data, auheader);
if (have_header)
memcpy(pkt->data + 4, header, 28);
}
fail:
if (ret < 0)
av_packet_unref(pkt);
return ret;
}
static void truehd_core_flush(AVBSFContext *ctx)
{
TrueHDCoreContext *s = ctx->priv_data;
memset(&s->hdr, 0, sizeof(s->hdr));
}
static const enum AVCodecID codec_ids[] = {
AV_CODEC_ID_TRUEHD, AV_CODEC_ID_NONE,
};
const AVBitStreamFilter ff_truehd_core_bsf = {
.name = "truehd_core",
.priv_data_size = sizeof(TrueHDCoreContext),
.filter = truehd_core_filter,
.flush = truehd_core_flush,
.codec_ids = codec_ids,
};
|
// Filename: LNodeIndexSetDataIterator.h
// Created on 12 May 2011 by Boyce Griffith
//
// Copyright (c) 2002-2013, Boyce Griffith
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of New York University nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#ifndef included_LNodeIndexSetDataIterator
#define included_LNodeIndexSetDataIterator
/////////////////////////////// INCLUDES /////////////////////////////////////
#include "ibtk/LNodeIndex.h"
#include "ibtk/LSetDataIterator.h"
/////////////////////////////// TYPEDEFS /////////////////////////////////////
namespace IBTK
{
typedef LSetDataIterator<LNodeIndex> LNodeIndexSetDataIterator;
}// namespace IBTK
//////////////////////////////////////////////////////////////////////////////
#endif //#ifndef included_LNodeIndexSetDataIterator
|
//===- TargetAndABI.h - SPIR-V target and ABI utilities --------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file declares utilities for SPIR-V target and shader interface ABI.
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_DIALECT_SPIRV_TARGETANDABI_H
#define MLIR_DIALECT_SPIRV_TARGETANDABI_H
#include "mlir/Dialect/SPIRV/SPIRVAttributes.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/SmallSet.h"
namespace mlir {
class Operation;
namespace spirv {
enum class StorageClass : uint32_t;
/// A wrapper class around a spirv::TargetEnvAttr to provide query methods for
/// allowed version/capabilities/extensions.
class TargetEnv {
public:
explicit TargetEnv(TargetEnvAttr targetAttr);
Version getVersion();
/// Returns true if the given capability is allowed.
bool allows(Capability) const;
/// Returns the first allowed one if any of the given capabilities is allowed.
/// Returns llvm::None otherwise.
Optional<Capability> allows(ArrayRef<Capability>) const;
/// Returns true if the given extension is allowed.
bool allows(Extension) const;
/// Returns the first allowed one if any of the given extensions is allowed.
/// Returns llvm::None otherwise.
Optional<Extension> allows(ArrayRef<Extension>) const;
/// Returns the MLIRContext.
MLIRContext *getContext() const;
/// Allows implicity converting to the underlying spirv::TargetEnvAttr.
operator TargetEnvAttr() const { return targetAttr; }
private:
TargetEnvAttr targetAttr;
llvm::SmallSet<Extension, 4> givenExtensions; /// Allowed extensions
llvm::SmallSet<Capability, 8> givenCapabilities; /// Allowed capabilities
};
/// Returns the attribute name for specifying argument ABI information.
StringRef getInterfaceVarABIAttrName();
/// Gets the InterfaceVarABIAttr given its fields.
InterfaceVarABIAttr getInterfaceVarABIAttr(unsigned descriptorSet,
unsigned binding,
Optional<StorageClass> storageClass,
MLIRContext *context);
/// Returns the attribute name for specifying entry point information.
StringRef getEntryPointABIAttrName();
/// Gets the EntryPointABIAttr given its fields.
EntryPointABIAttr getEntryPointABIAttr(ArrayRef<int32_t> localSize,
MLIRContext *context);
/// Queries the entry point ABI on the nearest function-like op containing the
/// given `op`. Returns null attribute if not found.
EntryPointABIAttr lookupEntryPointABI(Operation *op);
/// Queries the local workgroup size from entry point ABI on the nearest
/// function-like op containing the given `op`. Returns null attribute if not
/// found.
DenseIntElementsAttr lookupLocalWorkGroupSize(Operation *op);
/// Returns a default resource limits attribute that uses numbers from
/// "Table 46. Required Limits" of the Vulkan spec.
ResourceLimitsAttr getDefaultResourceLimits(MLIRContext *context);
/// Returns the attribute name for specifying SPIR-V target environment.
StringRef getTargetEnvAttrName();
/// Returns the default target environment: SPIR-V 1.0 with Shader capability
/// and no extra extensions.
TargetEnvAttr getDefaultTargetEnv(MLIRContext *context);
/// Queries the target environment recursively from enclosing symbol table ops
/// containing the given `op`.
TargetEnvAttr lookupTargetEnv(Operation *op);
/// Queries the target environment recursively from enclosing symbol table ops
/// containing the given `op` or returns the default target environment as
/// returned by getDefaultTargetEnv() if not provided.
TargetEnvAttr lookupTargetEnvOrDefault(Operation *op);
} // namespace spirv
} // namespace mlir
#endif // MLIR_DIALECT_SPIRV_TARGETANDABI_H
|
/*
* Copyright (c) 1982, 1986, 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)reboot.h 8.1 (Berkeley) 6/2/93
* $Id: reboot.h,v 1.5 1997/02/22 09:31:02 peter Exp $
*/
#ifndef _SYS_REBOOT_H_
#define _SYS_REBOOT_H_
/*
* Arguments to reboot system call.
* These are passed to boot program in r11,
* and on to init.
*/
#define RB_AUTOBOOT 0 /* flags for system auto-booting itself */
#define RB_ASKNAME 0x01 /* ask for file name to reboot from */
#define RB_SINGLE 0x02 /* reboot to single user only */
#define RB_NOSYNC 0x04 /* dont sync before reboot */
#define RB_HALT 0x08 /* don't reboot, just halt */
#define RB_INITNAME 0x10 /* name given for /etc/init (unused) */
#define RB_DFLTROOT 0x20 /* use compiled-in rootdev */
#define RB_KDB 0x40 /* give control to kernel debugger */
#define RB_RDONLY 0x80 /* mount root fs read-only */
#define RB_DUMP 0x100 /* dump kernel memory before reboot */
#define RB_MINIROOT 0x200 /* mini-root present in memory at boot time */
#define RB_CONFIG 0x400 /* invoke user configuration routing */
#define RB_VERBOSE 0x800 /* print all potentially useful info */
#define RB_SERIAL 0x1000 /* user serial port as console */
#define RB_CDROM 0x2000 /* use cdrom as root */
#define RB_POWEROFF 0x4000 /* if you can, turn the power off */
#define RB_GDB 0x8000 /* use GDB remote debugger instead of DDB */
#define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */
/*
* Constants for converting boot-style device number to type,
* adaptor (uba, mba, etc), unit number and partition number.
* Type (== major device number) is in the low byte
* for backward compatibility. Except for that of the "magic
* number", each mask applies to the shifted value.
* Format:
* (4) (4) (4) (4) (8) (8)
* --------------------------------
* |MA | AD| CT| UN| PART | TYPE |
* --------------------------------
*/
#define B_ADAPTORSHIFT 24
#define B_ADAPTORMASK 0x0f
#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
#define B_CONTROLLERSHIFT 20
#define B_CONTROLLERMASK 0xf
#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
#define B_UNITSHIFT 16
#define B_UNITMASK 0xf
#define B_UNIT(val) (((val) >> B_UNITSHIFT) & B_UNITMASK)
#define B_PARTITIONSHIFT 8
#define B_PARTITIONMASK 0xff
#define B_PARTITION(val) (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
#define B_TYPESHIFT 0
#define B_TYPEMASK 0xff
#define B_TYPE(val) (((val) >> B_TYPESHIFT) & B_TYPEMASK)
#define B_MAGICMASK ((u_long)0xf0000000)
#define B_DEVMAGIC ((u_long)0xa0000000)
#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \
(((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \
((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \
((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC)
#endif
|
#pragma once
#ifndef _DMAH_
#define _DMAH_
#include<stdlib.h>
int * RandomArray(size_t size); //size_t is a type for sizes.
#endif |
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
// AtomicPointer provides storage for a lock-free pointer.
// Platform-dependent implementation of AtomicPointer:
// - If the platform provides a cheap barrier, we use it with raw pointers
// - If <atomic> is present (on newer versions of gcc, it is), we use
// a <atomic>-based AtomicPointer. However we prefer the memory
// barrier based version, because at least on a gcc 4.4 32-bit build
// on linux, we have encountered a buggy <atomic> implementation.
// Also, some <atomic> implementations are much slower than a memory-barrier
// based implementation (~16ns for <atomic> based acquire-load vs. ~1ns for
// a barrier based acquire-load).
// This code is based on atomicops-internals-* in Google's perftools:
// http://code.google.com/p/google-perftools/source/browse/#svn%2Ftrunk%2Fsrc%2Fbase
#ifndef DB_ATOMIC_POINTER_H
#define DB_ATOMIC_POINTER_H
#include <stdint.h>
#include <util/barrier.h>
namespace db {
class AtomicPointer {
public:
AtomicPointer() { }
explicit AtomicPointer(void* p) : rep_(p) { }
inline void* Acquire_Load() const
{
void* result = rep_;
smp_rmb();
return result;
}
inline void Release_Store(void* v)
{
smp_wmb();
rep_ = v;
}
inline void* NoBarrier_Load() const { return rep_; }
inline void NoBarrier_Store(void* v) { rep_ = v; }
private:
void* rep_;
};
} // namespace db
#endif /* DB_ATOMIC_POINTER_H */
|
/*
* Copyright (c) 2010, Anima Games, Benjamin Karaban, Laurent Schneider,
* Jérémie Comarmond, Didier Colin.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef SELECTION_MANAGER_H_
#define SELECTION_MANAGER_H_
#include <EPI/Gui/Viewport/ISelectionManager.moc.h>
#include <EPI/Document/PropertySelection.moc.h>
namespace EPI
{
class GuiDocument;
//-----------------------------------------------------------------------------
LM_ENUM_1 (ESelectionMode,
NODE_ROOT);
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
class LM_API_EPI PtyNodeSelectionManager : public ISelectionManager
{
public:
PtyNodeSelectionManager(const Ptr<PropertySelection>& pPtySelection);
virtual ~PtyNodeSelectionManager();
virtual void select(const Ptr<Property>& pPty);
virtual void addToSelection(const Ptr<Property>& pPty);
virtual void removeFromSelection(const Ptr<Property>& pPty);
virtual void deselectAll();
virtual void selectAll();
virtual void invertSelection();
virtual void configureAddToSelection(bool flag);
virtual const Ptr<PropertySelection>& getPtySelection() const {return _pPtySelection;}
private:
Ptr<PropertySelection> _pPtySelection;
bool _useAddToSelection;
};
//-----------------------------------------------------------------------------
class LM_API_EPI DocumentSelectionManager : public ISelectionManager
{
public:
DocumentSelectionManager(const Ptr<PropertySelection>& pPtySelection);
virtual ~DocumentSelectionManager();
virtual void select(const Ptr<Property>& pPty);
virtual void addToSelection(const Ptr<Property>& pPty);
virtual void removeFromSelection(const Ptr<Property>& pPty);
virtual void deselectAll();
virtual void selectAll();
virtual void invertSelection();
virtual void configureAddToSelection(bool flag);
virtual const Ptr<PropertySelection>& getPtySelection() const {return _pPtySelection;}
private:
Ptr<PropertySelection> _pPtySelection;
bool _useAddToSelection;
};
//-----------------------------------------------------------------------------
} // namespace EPI
#endif // SELECTION_STATE_H_ |
/**ARGS: defs --once-only --inactive -DFOO */
/**SYSCODE: = 2 */
#ifdef FOO
#define /* comment */ B /* comment */ " Definition 1 " // Comment
#else
#define /* comment */ B /* comment */ " Definition 2 " // Comment
#endif
|
//
// STPCameraPreviewGridViewCell.h
// STPCamera
//
// Created by 1amageek on 2015/11/01.
// Copyright © 2015年 Stamp inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface STPCameraPreviewGridViewCell : UICollectionViewCell
@property (nonatomic) UIImage *thumbnailImage;
@property (nonatomic) UIImage *livePhotoBadgeImage;
@property (nonatomic, copy) NSString *representedAssetIdentifier;
@end
|
/*
* Copyright (c) 2010, Anima Games, Benjamin Karaban, Laurent Schneider,
* Jérémie Comarmond, Didier Colin.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CORE_FILES_H_
#define CORE_FILES_H_
#include <Core/List.h>
#include <Core/DateAndTime.h>
#include <Core/System/System.h>
namespace Core
{
namespace System
{
LM_API_COR String getExecutableName();
LM_API_COR String getNormalizedPath(const String & path);
LM_API_COR String getPath(const String & fullName);
LM_API_COR String getFileName(const String & fullName);
LM_API_COR String getFileExt(const String & fullName);
/** Retourne le nom du fichier sans l'extension */
LM_API_COR String getFileBaseName(const String & fullName);
LM_API_COR bool moveFile(const String & from, const String & to);
LM_API_COR bool moveDir(const String & from, const String & to);
LM_API_COR void copyFile(const String & source, const String & target);
LM_API_COR bool fileExists(const String & file);
LM_API_COR bool dirExists(const String & dir);
LM_API_COR void deleteFile(const String & file);
LM_API_COR void deleteDirectory(const String & dir);
LM_API_COR void deleteDirContent(const String & dir);
LM_API_COR String getParent(const String & dir);
LM_API_COR void createDirectory(const String & dir, bool errorIfExists = false);
LM_API_COR void getDirContent(const String & dir, List<String> & files, List<String> & subDirs);
LM_API_COR void getRecursiveDirContent(const String & dir, List<String> & files);
LM_API_COR String getEnvVar(const String & vars);
LM_API_COR void getEnv(List<String> & vars, List<String> & values);
LM_API_COR String getCurrentDir();
LM_API_COR void setCurrentDir(const String & dir);
// Répertoire dédié aux applications pour cet utilisateur, pour cette machine uniquement (pas de config "roaming")
LM_API_COR String getUserLocalAppDir();
LM_API_COR String getTempDir();
LM_API_COR TimeValue getLastModificationDate(const String & fileName);
} // System
} // Core
#endif /*CORE_FILES_H_*/
|
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Tony Nardo of the Johns Hopkins University/Applied Physics Lab.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#if 0
#ifndef lint
static char sccsid[] = "@(#)sprint.c 8.3 (Berkeley) 4/28/95";
#endif
#endif
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <db.h>
#include <err.h>
#include <langinfo.h>
#include <pwd.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <utmpx.h>
#include "finger.h"
static void stimeprint(WHERE *);
void
sflag_print(void)
{
PERSON *pn;
WHERE *w;
int sflag, r, namelen;
char p[80];
PERSON *tmp;
DBT data, key;
struct tm *lc;
if (d_first < 0)
d_first = (*nl_langinfo(D_MD_ORDER) == 'd');
/*
* short format --
* login name
* real name
* terminal name (the XX of ttyXX)
* if terminal writeable (add an '*' to the terminal name
* if not)
* if logged in show idle time and day logged in, else
* show last login date and time.
* If > 6 months, show year instead of time.
* if (-o)
* office location
* office phone
* else
* remote host
*/
#define MAXREALNAME 16
#define MAXHOSTNAME 17 /* in reality, hosts are never longer than 16 */
(void)printf("%-*s %-*s%s %s\n", MAXLOGNAME, "Login", MAXREALNAME,
"Name", " TTY Idle Login Time ", (gflag) ? "" :
oflag ? "Office Phone" : "Where");
for (sflag = R_FIRST;; sflag = R_NEXT) {
r = (*db->seq)(db, &key, &data, sflag);
if (r == -1)
err(1, "db seq");
if (r == 1)
break;
memmove(&tmp, data.data, sizeof tmp);
pn = tmp;
for (w = pn->whead; w != NULL; w = w->next) {
namelen = MAXREALNAME;
if (w->info == LOGGEDIN && !w->writable)
--namelen; /* leave space before `*' */
(void)printf("%-*.*s %-*.*s", MAXLOGNAME, MAXLOGNAME,
pn->name, MAXREALNAME, namelen,
pn->realname ? pn->realname : "");
if (!w->loginat) {
(void)printf(" * * No logins ");
goto office;
}
(void)putchar(w->info == LOGGEDIN && !w->writable ?
'*' : ' ');
if (*w->tty)
(void)printf("%-7.7s ",
(strncmp(w->tty, "tty", 3)
&& strncmp(w->tty, "cua", 3))
? w->tty : w->tty + 3);
else
(void)printf(" ");
if (w->info == LOGGEDIN) {
stimeprint(w);
(void)printf(" ");
} else
(void)printf(" * ");
lc = localtime(&w->loginat);
#define SECSPERDAY 86400
#define DAYSPERWEEK 7
#define DAYSPERNYEAR 365
if (now - w->loginat < SECSPERDAY * (DAYSPERWEEK - 1)) {
(void)strftime(p, sizeof(p), "%a", lc);
} else {
(void)strftime(p, sizeof(p),
d_first ? "%e %b" : "%b %e", lc);
}
(void)printf("%-6.6s", p);
if (now - w->loginat >= SECSPERDAY * DAYSPERNYEAR / 2) {
(void)strftime(p, sizeof(p), "%Y", lc);
} else {
(void)strftime(p, sizeof(p), "%R", lc);
}
(void)printf(" %-5.5s", p);
office:
if (gflag)
goto no_gecos;
if (oflag) {
if (pn->office)
(void)printf(" %-7.7s", pn->office);
else if (pn->officephone)
(void)printf(" %-7.7s", " ");
if (pn->officephone)
(void)printf(" %-.15s",
prphone(pn->officephone));
} else
(void)printf(" %.*s", MAXHOSTNAME, w->host);
no_gecos:
putchar('\n');
}
}
}
static void
stimeprint(WHERE *w)
{
struct tm *delta;
if (w->idletime == -1) {
(void)printf(" ");
return;
}
delta = gmtime(&w->idletime);
if (!delta->tm_yday)
if (!delta->tm_hour)
if (!delta->tm_min)
(void)printf(" ");
else
(void)printf("%5d", delta->tm_min);
else
(void)printf("%2d:%02d",
delta->tm_hour, delta->tm_min);
else
(void)printf("%4dd", delta->tm_yday);
}
|
//
// XRootViewController.h
// Basement
//
// Created by Dylan on 15/1/4.
// Copyright (c) 2015年 Dylan. All rights reserved.
//
#import "XBViewController.h"
@interface XRootViewController : XBViewController
@end
|
#include <stdio.h>
#define BUFSIZE 100
char buf[BUFSIZE];
int bufp=0;
int getch(void)
{
return (bufp > 0) ? buf[--bufp] : getchar();
}
void ungetch(int c)
{
if(bufp >= BUFSIZE)
printf("ungetch: too many characters\n");
else
buf[bufp++]=c;
}
|
#if defined(PEGASUS_OS_HPUX)
# include "UNIX_ClassifierFilterSetPrivate_HPUX.h"
#elif defined(PEGASUS_OS_LINUX)
# include "UNIX_ClassifierFilterSetPrivate_LINUX.h"
#elif defined(PEGASUS_OS_DARWIN)
# include "UNIX_ClassifierFilterSetPrivate_DARWIN.h"
#elif defined(PEGASUS_OS_AIX)
# include "UNIX_ClassifierFilterSetPrivate_AIX.h"
#elif defined(PEGASUS_OS_FREEBSD)
# include "UNIX_ClassifierFilterSetPrivate_FREEBSD.h"
#elif defined(PEGASUS_OS_SOLARIS)
# include "UNIX_ClassifierFilterSetPrivate_SOLARIS.h"
#elif defined(PEGASUS_OS_ZOS)
# include "UNIX_ClassifierFilterSetPrivate_ZOS.h"
#elif defined(PEGASUS_OS_VMS)
# include "UNIX_ClassifierFilterSetPrivate_VMS.h"
#elif defined(PEGASUS_OS_TRU64)
# include "UNIX_ClassifierFilterSetPrivate_TRU64.h"
#else
# include "UNIX_ClassifierFilterSetPrivate_STUB.h"
#endif
|
/*
* Generated by class-dump 3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard.
*/
#import "NSObject.h"
@interface IDEAppStatistics : NSObject
{
}
+ (id)_diskTypeFor:(struct __DADisk *)arg1 withDiskManager:(id)arg2;
+ (id)_diskTypes;
+ (unsigned long long)_totalRam;
+ (unsigned long long)memInUse;
+ (void)performAppReportWithStartupDuration:(double)arg1;
+ (void)recordAppAboutToShutdown;
+ (void)recordAppDidShutdown:(id)arg1;
+ (void)recordAppUsedGPUDebugger;
+ (void)recordDocDownloadInteraction:(id)arg1;
+ (void)scheduleAppReportWithStartTime:(double)arg1;
@end
|
/* Generated by CIL v. 1.7.0 */
/* print_CIL_Input is false */
struct _IO_FILE;
struct timeval;
extern float strtof(char const *str , char const *endptr ) ;
extern void signal(int sig , void *func ) ;
typedef struct _IO_FILE FILE;
extern int atoi(char const *s ) ;
extern double strtod(char const *str , char const *endptr ) ;
extern int fclose(void *stream ) ;
extern void *fopen(char const *filename , char const *mode ) ;
extern void abort() ;
extern void exit(int status ) ;
extern int raise(int sig ) ;
extern int fprintf(struct _IO_FILE *stream , char const *format , ...) ;
extern int strcmp(char const *a , char const *b ) ;
extern int rand() ;
extern unsigned long strtoul(char const *str , char const *endptr , int base ) ;
void RandomFunc(unsigned char input[1] , unsigned char output[1] ) ;
extern int strncmp(char const *s1 , char const *s2 , unsigned long maxlen ) ;
extern int gettimeofday(struct timeval *tv , void *tz , ...) ;
extern int printf(char const *format , ...) ;
int main(int argc , char *argv[] ) ;
void megaInit(void) ;
extern unsigned long strlen(char const *s ) ;
extern long strtol(char const *str , char const *endptr , int base ) ;
extern unsigned long strnlen(char const *s , unsigned long maxlen ) ;
extern void *memcpy(void *s1 , void const *s2 , unsigned long size ) ;
struct timeval {
long tv_sec ;
long tv_usec ;
};
extern void *malloc(unsigned long size ) ;
extern int scanf(char const *format , ...) ;
void megaInit(void)
{
{
}
}
int main(int argc , char *argv[] )
{
unsigned char input[1] ;
unsigned char output[1] ;
int randomFuns_i5 ;
unsigned char randomFuns_value6 ;
int randomFuns_main_i7 ;
{
megaInit();
if (argc != 2) {
printf("Call this program with %i arguments\n", 1);
exit(-1);
} else {
}
randomFuns_i5 = 0;
while (randomFuns_i5 < 1) {
randomFuns_value6 = (unsigned char )strtoul(argv[randomFuns_i5 + 1], 0, 10);
input[randomFuns_i5] = randomFuns_value6;
randomFuns_i5 ++;
}
RandomFunc(input, output);
if (output[0] == (unsigned char)42) {
printf("You win!\n");
} else {
}
randomFuns_main_i7 = 0;
while (randomFuns_main_i7 < 1) {
printf("%u\n", output[randomFuns_main_i7]);
randomFuns_main_i7 ++;
}
}
}
void RandomFunc(unsigned char input[1] , unsigned char output[1] )
{
unsigned char state[1] ;
unsigned char local1 ;
{
state[0UL] = (input[0UL] + 51238316UL) + (unsigned char)234;
local1 = 0UL;
while (local1 < 1UL) {
if (state[0UL] < local1) {
if (state[0UL] == local1) {
state[local1] = state[0UL] + state[local1];
state[local1] += state[local1];
} else {
state[0UL] *= state[local1];
state[local1] = state[0UL] + state[0UL];
}
} else
if (state[0UL] <= local1) {
state[0UL] += state[0UL];
state[local1] += state[local1];
} else {
state[0UL] = state[local1] - state[0UL];
state[local1] = state[0UL] + state[0UL];
}
local1 += 2UL;
}
output[0UL] = (state[0UL] + 309316150UL) + (unsigned char)186;
}
}
|
/*
* Copyright (C) 2008 The Android Open Source Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/resource.h>
#include <sys/sysconf.h>
int getdtablesize()
{
struct rlimit r;
if (getrlimit(RLIMIT_NOFILE, &r) < 0) {
return sysconf(_SC_OPEN_MAX);
}
return r.rlim_cur;
} |
//
// AFMSlidingCell.h
// AFMSlidingCell
//
// Created by Artjoms Haleckis on 15/05/14.
// Copyright (c) 2014 Ask.fm Europe, Ltd. All rights reserved.
//
#import <UIKit/UIKit.h>
@class AFMSlidingCell;
@protocol AFMSlidingCellDelegate <NSObject>
@optional
- (void)buttonsDidShowForCell:(AFMSlidingCell *)cell;
- (void)buttonsDidHideForCell:(AFMSlidingCell *)cell;
- (BOOL)shouldAllowShowingButtonsForCell:(AFMSlidingCell *)cell;
@end
@interface AFMSlidingCell : UITableViewCell
@property (nonatomic, weak) id<AFMSlidingCellDelegate> delegate;
- (void)addFirstButton:(UIButton *)button
withWidth:(CGFloat)width
withTappedBlock:(void (^)(AFMSlidingCell *))tappedBlock;
- (void)addSecondButton:(UIButton *)button
withWidth:(CGFloat)width
withTappedBlock:(void (^)(AFMSlidingCell *))tappedBlock;
- (void)showButtonViewAnimated:(BOOL)animated;
- (void)hideButtonViewAnimated:(BOOL)animated;
- (void)hideButtonsOrDoAction:(void (^)())actionToDo;
@end
|
// Copyright (c) 2011-2013 The EmpireCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef WALLETVIEW_H
#define WALLETVIEW_H
#include <QStackedWidget>
class EmpireCoinGUI;
class ClientModel;
class WalletModel;
class TransactionView;
class OverviewPage;
class AddressBookPage;
class VotingPage;
class EasyvotePage;
class SendCoinsDialog;
class SignVerifyMessageDialog;
class RPCConsole;
QT_BEGIN_NAMESPACE
class QLabel;
class QModelIndex;
QT_END_NAMESPACE
/*
WalletView class. This class represents the view to a single wallet.
It was added to support multiple wallet functionality. Each wallet gets its own WalletView instance.
It communicates with both the client and the wallet models to give the user an up-to-date view of the
current core state.
*/
class WalletView : public QStackedWidget
{
Q_OBJECT
public:
explicit WalletView(QWidget *parent, EmpireCoinGUI *_gui);
~WalletView();
void setEmpireCoinGUI(EmpireCoinGUI *gui);
/** Set the client model.
The client model represents the part of the core that communicates with the P2P network, and is wallet-agnostic.
*/
void setClientModel(ClientModel *clientModel);
/** Set the wallet model.
The wallet model represents a EmpireCoin wallet, and offers access to the list of transactions, address book and sending
functionality.
*/
void setWalletModel(WalletModel *walletModel);
bool handleURI(const QString &uri);
void showOutOfSyncWarning(bool fShow);
private:
EmpireCoinGUI *gui;
ClientModel *clientModel;
WalletModel *walletModel;
OverviewPage *overviewPage;
QWidget *transactionsPage;
AddressBookPage *addressBookPage;
AddressBookPage *receiveCoinsPage;
VotingPage *votingPage;
EasyvotePage *easyvotePage;
SendCoinsDialog *sendCoinsPage;
SignVerifyMessageDialog *signVerifyMessageDialog;
TransactionView *transactionView;
public slots:
/** Switch to overview (home) page */
void gotoOverviewPage();
/** Switch to history (transactions) page */
void gotoHistoryPage();
/** Switch to address book page */
void gotoAddressBookPage();
/** Switch to empirecoin voting address page */
void gotoVotingPage();
/** Switch to voting page */
void gotoEasyvotePage();
/** Switch to receive coins page */
void gotoReceiveCoinsPage();
/** Switch to send coins page */
void gotoSendCoinsPage(QString addr = "");
/** Show Sign/Verify Message dialog and switch to sign message tab */
void gotoSignMessageTab(QString addr = "");
/** Show Sign/Verify Message dialog and switch to verify message tab */
void gotoVerifyMessageTab(QString addr = "");
/** Show incoming transaction notification for new transactions.
The new items are those between start and end inclusive, under the given parent item.
*/
void incomingTransaction(const QModelIndex& parent, int start, int /*end*/);
/** Encrypt the wallet */
void encryptWallet(bool status);
/** Backup the wallet */
void backupWallet();
/** Change encrypted wallet passphrase */
void changePassphrase();
/** Ask for passphrase to unlock wallet temporarily */
void unlockWallet();
void setEncryptionStatus();
signals:
/** Signal that we want to show the main window */
void showNormalIfMinimized();
};
#endif // WALLETVIEW_H
|
/* Copyright (C) 2010-2020 The RetroArch team
*
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (intrinsics.h).
* ---------------------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge,
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __LIBRETRO_SDK_COMPAT_INTRINSICS_H
#define __LIBRETRO_SDK_COMPAT_INTRINSICS_H
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <retro_common_api.h>
#include <retro_inline.h>
#if defined(_MSC_VER) && !defined(_XBOX)
#if (_MSC_VER > 1310)
#include <intrin.h>
#endif
#endif
RETRO_BEGIN_DECLS
/* Count Leading Zero, unsigned 16bit input value */
static INLINE unsigned compat_clz_u16(uint16_t val)
{
#if defined(__GNUC__) && !defined(PS2)
return __builtin_clz(val << 16 | 0x8000);
#else
unsigned ret = 0;
while(!(val & 0x8000) && ret < 16)
{
val <<= 1;
ret++;
}
return ret;
#endif
}
/* Count Trailing Zero */
static INLINE int compat_ctz(unsigned x)
{
#if defined(__GNUC__) && !defined(RARCH_CONSOLE)
return __builtin_ctz(x);
#elif _MSC_VER >= 1400 && !defined(_XBOX) && !defined(__WINRT__)
unsigned long r = 0;
_BitScanReverse((unsigned long*)&r, x);
return (int)r;
#else
/* Only checks at nibble granularity,
* because that's what we need. */
if (x & 0x000f)
return 0;
if (x & 0x00f0)
return 4;
if (x & 0x0f00)
return 8;
if (x & 0xf000)
return 12;
return 16;
#endif
}
RETRO_END_DECLS
#endif
|
#include <commands/Command.h>
#include <clingo.hh>
#include <QJsonObject>
#include <memory>
namespace kbcr
{
class KnowledgebaseCreator;
/**
* Class inheriting from Command interface used to call the solvers solve method
*/
class SolveCommand : public Command, public std::enable_shared_from_this<SolveCommand>
{
Q_OBJECT
public:
SolveCommand(KnowledgebaseCreator* gui);
virtual ~SolveCommand();
void execute();
void undo();
QJsonObject toJSON();
/**
* Get models returned by solve call
*/
std::vector<Clingo::SymbolVector> getCurrentModels();
/**
* Return solver result
*/
bool isSatisfiable();
KnowledgebaseCreator* gui;
private:
bool satisfiable;
std::vector<Clingo::SymbolVector> currentModels;
/**
* Print models unsorted
*/
void printModels();
/**
* Print models sorted
*/
void printSortedModels();
};
} /* namespace kbcr */
|
#include <stdlib.h>
#include "glist.h"
/* Crear una lista */
GList glist_crear(void) {
return NULL;
}
/* Destruir una lista */
void glist_destruir(GList lista) {
GNodo *nodoAEliminar;
while (lista) {
nodoAEliminar = lista;
lista = lista->sig;
free(nodoAEliminar);
}
}
/* Obtener la longitud de una lista */
size_t glist_longitud(GList lista) {
size_t contadorNodos;
if (lista) {
for (GNodo *nodo = lista; nodo != NULL; nodo = nodo->sig)
contadorNodos++;
return contadorNodos;
} else return 0;
}
/* Agregar elementos */
GList glist_agregar_inicio(GList lista, void *dato) {
GNodo *nuevoNodo = malloc(sizeof(GNodo));
nuevoNodo->dato = dato;
nuevoNodo->sig = lista; /* Agregamos al inicio */
return nuevoNodo;
}
GList glist_agregar_final(GList lista, void *dato) {
GNodo *nuevoNodo = malloc(sizeof(GNodo));
GNodo *nodo;
nuevoNodo->dato = malloc(sizeof(dato));
nuevoNodo->dato = dato;
nuevoNodo->sig = NULL;
if (!lista) return nuevoNodo;
for (nodo = lista; nodo->sig != NULL; nodo = nodo->sig);
nodo->sig = nuevoNodo;
return lista;
}
GList glist_insertar(GList lista, void *dato, size_t pos) {
GNodo *nodo, *nuevoNodo;
if (pos == 0) {
GNodo *nuevoNodo = malloc(sizeof(GNodo));
nuevoNodo->dato = malloc(sizeof(dato));
nuevoNodo->dato = dato;
nuevoNodo->sig = lista; /* Agregamos al inicio */
return nuevoNodo;
}
if (pos > glist_longitud(lista)) return lista;
nodo = lista;
for (int i = 0; i < pos - 1; i++)
nodo = nodo->sig;
nuevoNodo = malloc(sizeof(GNodo));
nuevoNodo->dato = dato;
nuevoNodo->sig = nodo->sig;
nodo->sig = nuevoNodo;
return lista;
}
/* Recorrer aplicando funcion a cada elemento */
void glist_recorrer(GList lista, FuncionVisitante visitar) {
for (GNodo *nodo = lista; nodo != NULL; nodo = nodo->sig)
visitar(nodo); // Black magic inbound
}
/* Concatenar dos listas */
GList glist_concat(GList lista1, GList lista2) {
GNodo *nodo = lista1;
if (!lista1) return lista2;
if (!lista2) return lista1;
for (; nodo->sig != NULL; nodo = nodo->sig);
nodo->sig = lista2;
return lista1;
}
/* Eliminar en posicion arbitraria */
GList glist_eliminar(GList lista, size_t pos) {
GNodo *nodoAEliminar, *aux, *lib;
int i;
if (pos > glist_longitud(lista) || !lista) return lista;
if (pos == 0) {
nodoAEliminar = lista;
lista = lista->sig;
free(nodoAEliminar);
return lista;
}
aux = lista;
for (i = 0; i < pos - 1; i++)
aux = aux->sig;
if (!aux->sig->sig) {
lib = aux->sig;
aux->sig = NULL;
free(lib);
} else {
lib = aux->sig;
aux->sig = lib->sig;
free(lib);
}
return lista;
}
/* Verificar si hay al menos 1 elemento */
size_t glist_contiene(GList lista, void *dato) {
for (GNodo *nodo = lista; nodo != NULL; nodo = nodo->sig) {
if (nodo->dato == dato) return 1;
}
return 0;
}
|
/*
* Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#include <stdio.h>
#include <stdlib.h>
#include BOSS_OPENSSL_U_internal__cryptlib_h //original-code:"internal/cryptlib.h"
#include BOSS_OPENSSL_V_openssl__x509_h //original-code:<openssl/x509.h>
#include BOSS_OPENSSL_V_openssl__evp_h //original-code:<openssl/evp.h>
/*
* Doesn't do anything now: Builtin PBE algorithms in static table.
*/
void PKCS5_PBE_add(void)
{
}
int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen,
ASN1_TYPE *param, const EVP_CIPHER *cipher,
const EVP_MD *md, int en_de)
{
EVP_MD_CTX *ctx;
unsigned char md_tmp[EVP_MAX_MD_SIZE];
unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH];
int i;
PBEPARAM *pbe;
int saltlen, iter;
unsigned char *salt;
int mdsize;
int rv = 0;
/* Extract useful info from parameter */
if (param == NULL || param->type != V_ASN1_SEQUENCE ||
param->value.sequence == NULL) {
EVPerr(EVP_F_PKCS5_PBE_KEYIVGEN, EVP_R_DECODE_ERROR);
return 0;
}
pbe = ASN1_TYPE_unpack_sequence(ASN1_ITEM_rptr(PBEPARAM), param);
if (pbe == NULL) {
EVPerr(EVP_F_PKCS5_PBE_KEYIVGEN, EVP_R_DECODE_ERROR);
return 0;
}
if (!pbe->iter)
iter = 1;
else
iter = ASN1_INTEGER_get(pbe->iter);
salt = pbe->salt->data;
saltlen = pbe->salt->length;
if (!pass)
passlen = 0;
else if (passlen == -1)
passlen = strlen(pass);
ctx = EVP_MD_CTX_new();
if (ctx == NULL) {
EVPerr(EVP_F_PKCS5_PBE_KEYIVGEN, ERR_R_MALLOC_FAILURE);
goto err;
}
if (!EVP_DigestInit_ex(ctx, md, NULL))
goto err;
if (!EVP_DigestUpdate(ctx, pass, passlen))
goto err;
if (!EVP_DigestUpdate(ctx, salt, saltlen))
goto err;
PBEPARAM_free(pbe);
if (!EVP_DigestFinal_ex(ctx, md_tmp, NULL))
goto err;
mdsize = EVP_MD_size(md);
if (mdsize < 0)
return 0;
for (i = 1; i < iter; i++) {
if (!EVP_DigestInit_ex(ctx, md, NULL))
goto err;
if (!EVP_DigestUpdate(ctx, md_tmp, mdsize))
goto err;
if (!EVP_DigestFinal_ex(ctx, md_tmp, NULL))
goto err;
}
OPENSSL_assert(EVP_CIPHER_key_length(cipher) <= (int)sizeof(md_tmp));
memcpy(key, md_tmp, EVP_CIPHER_key_length(cipher));
OPENSSL_assert(EVP_CIPHER_iv_length(cipher) <= 16);
memcpy(iv, md_tmp + (16 - EVP_CIPHER_iv_length(cipher)),
EVP_CIPHER_iv_length(cipher));
if (!EVP_CipherInit_ex(cctx, cipher, NULL, key, iv, en_de))
goto err;
OPENSSL_cleanse(md_tmp, EVP_MAX_MD_SIZE);
OPENSSL_cleanse(key, EVP_MAX_KEY_LENGTH);
OPENSSL_cleanse(iv, EVP_MAX_IV_LENGTH);
rv = 1;
err:
EVP_MD_CTX_free(ctx);
return rv;
}
|
//
// VTDAddViewController.h
//
// Copyright (c) 2014 Mutual Mobile (http://www.mutualmobile.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#import <UIKit/UIKit.h>
#import "VTDAddModuleInterface.h"
#import "VTDAddViewInterface.h"
@interface VTDAddViewController : UIViewController <VTDAddViewInterface>
@property (nonatomic, strong) id<VTDAddModuleInterface> eventHandler;
@property (nonatomic, strong) UIView *transitioningBackgroundView;
@end
|
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "soundpipe.h"
typedef struct {
sp_expon *line;
sp_osc *osc;
sp_ftbl *ft;
sp_dmetro *dm;
} UserData;
void process(sp_data *sp, void *udata) {
UserData *ud = udata;
SPFLOAT osc = 0, line = 0, dm = 0;
sp_dmetro_compute(sp, ud->dm, NULL, &dm);
sp_expon_compute(sp, ud->line, &dm, &line);
ud->osc->freq = line;
sp_osc_compute(sp, ud->osc, NULL, &osc);
sp->out[0] = osc;
}
int main() {
srand(1234567);
UserData ud;
sp_data *sp;
sp_create(&sp);
sp_expon_create(&ud.line);
sp_osc_create(&ud.osc);
sp_ftbl_create(sp, &ud.ft, 2048);
sp_dmetro_create(&ud.dm);
sp_expon_init(sp, ud.line);
ud.line->a = 100;
ud.line->b = 400;
ud.line->dur = 1;
sp_gen_sine(sp, ud.ft);
sp_osc_init(sp, ud.osc, ud.ft, 0);
sp_dmetro_init(sp, ud.dm);
ud.dm->time = 2;
sp->len = 44100 * 5;
sp_process(sp, &ud, process);
sp_expon_destroy(&ud.line);
sp_ftbl_destroy(&ud.ft);
sp_osc_destroy(&ud.osc);
sp_dmetro_destroy(&ud.dm);
sp_destroy(&sp);
return 0;
}
|
/*
* Generated by class-dump 3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard.
*/
#import <IDEKit/IDEViewController.h>
#import "IDEEditorContextDelegate.h"
#import "IDESourceControlMergeControllerContainer.h"
@class DVTBorderedView, DVTObservingToken, DVTSplitView, IDEComparisonEditor, IDEEditorVersionsMode, IDEReviewFilesNavigator, IDESourceControlConflictResolutionController, IDESourceControlInteractiveCommitController, NSString;
@interface IDEReviewFilesViewController : IDEViewController <IDEEditorContextDelegate, IDESourceControlMergeControllerContainer>
{
DVTSplitView *_splitView;
DVTBorderedView *_structureBorderedView;
DVTBorderedView *_comparisonBorderedView;
IDEReviewFilesNavigator *_navigator;
IDEEditorVersionsMode *_versionsMode;
DVTObservingToken *_navigatorSelectedViewIndexesObservingToken;
DVTObservingToken *_navigatorSelectedObjectsObservingToken;
id <IDEReviewFilesViewControllerDelegate> _delegate;
IDESourceControlConflictResolutionController *_conflictResolutionController;
IDESourceControlInteractiveCommitController *_interactiveCommitController;
}
+ (id)keyPathsForValuesAffectingComparisonEditor;
+ (id)keyPathsForValuesAffectingVersionsEditor;
+ (struct CGRect)minimumSheetFrame;
+ (id)reviewFilesLogAspect;
+ (struct CGSize)sheetSizeForHostWindow:(id)arg1;
- (void).cxx_destruct;
@property(readonly) IDEComparisonEditor *comparisonEditor;
@property(readonly) IDESourceControlConflictResolutionController *conflictResolutionController; // @dynamic conflictResolutionController;
@property(retain) id <IDEReviewFilesViewControllerDelegate> delegate; // @synthesize delegate=_delegate;
- (id)editorContext:(id)arg1 shouldEditNavigableItem:(id)arg2;
- (id)initWithNibName:(id)arg1 bundle:(id)arg2;
@property(readonly) IDESourceControlInteractiveCommitController *interactiveCommitController; // @dynamic interactiveCommitController;
- (void)loadView;
@property(readonly) IDEReviewFilesNavigator *navigator; // @synthesize navigator=_navigator;
- (void)primitiveInvalidate;
- (void)setupConflictResolutionController;
- (void)setupInteractiveCommitController;
- (BOOL)splitView:(id)arg1 canCollapseSubview:(id)arg2;
- (double)splitView:(id)arg1 constrainMaxCoordinate:(double)arg2 ofSubviewAt:(long long)arg3;
- (double)splitView:(id)arg1 constrainMinCoordinate:(double)arg2 ofSubviewAt:(long long)arg3;
- (BOOL)splitView:(id)arg1 shouldAdjustSizeOfSubview:(id)arg2;
@property(readonly) IDEEditorVersionsMode *versionsEditor;
@property(readonly) IDEEditorVersionsMode *versionsMode; // @synthesize versionsMode=_versionsMode;
- (void)viewDidInstall;
- (id)workspaceForEditorContext:(id)arg1;
// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;
@end
|
//
// Protocol.h
// ofxLibwebsockets
//
// Created by Brett Renfer on 4/11/12.
//
#pragma once
#include <string>
#include <map>
#include "ofMain.h"
#include "ofxLibwebsockets/Events.h"
#define OFX_LWS_MAX_BUFFER 2048
namespace ofxLibwebsockets {
class Reactor;
class Protocol
{
friend class Reactor;
friend class Server;
friend class Client;
friend class Connection;
public:
Protocol();
~Protocol();
virtual bool allowClient(const std::string name,
const std::string ip) const;
unsigned int idx;
unsigned int rx_buffer_size;
protected:
// override these methods if/when creating
// a custom protocol
virtual void execute() {}
virtual void onconnect (Event& args);
virtual void onopen (Event& args);
virtual void onclose (Event& args);
virtual void onerror (Event& args);
virtual void onidle (Event& args);
virtual void onmessage (Event& args);
// internal events: called by Reactor
ofEvent<Event> onconnectEvent;
ofEvent<Event> onopenEvent;
ofEvent<Event> oncloseEvent;
ofEvent<Event> onerrorEvent;
ofEvent<Event> onidleEvent;
ofEvent<Event> onmessageEvent;
bool defaultAllowPolicy;
std::map<std::string, bool> allowRules;
Reactor* reactor;
bool idle;
private:
void _onconnect (Event& args);
void _onopen (Event& args);
void _onclose (Event& args);
void _onerror (Event& args);
void _onidle (Event& args);
void _onmessage (Event& args);
bool _allowClient(const std::string name,
const std::string ip) const;
};
};
|
//
// TMValidatorRuleURL.h
// TMValidatorDemo
//
// Created by Kazuya Ueoka on 2015/11/18.
// Copyright © 2015年 Timers Inc. All rights reserved.
//
#import "TMValidatorRule.h"
@interface TMValidatorRuleURL : TMValidatorRule
@end
|
//
// FrontViewController.h
// [Exp2]RadioVN
//
// Created by tuan.suke on 12/17/15.
//
//
#import <UIKit/UIKit.h>
@interface FrontViewController : UIViewController
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (nonatomic,strong) NSString *linkFrontView;
@end
|
#pragma once
//#ifdef ESP8266
#include "BaseClass.h"
#include "MethodDescriptor.h"
namespace nanpy {
class EspClass : public BaseClass {
public:
void elaborate( nanpy::MethodDescriptor* m );
const char* get_firmware_id();
};
};
//#endif
|
//
// CRViewController.h
// CurrencyRequest
//
// Created by Sam Kaufman on 09/07/2015.
// Copyright (c) 2015 Sam Kaufman. All rights reserved.
//
@import UIKit;
@interface CRViewController : UIViewController
@end
|
//
// DekoTutorialHelper.h
// deko
//
// Created by Johan Halin on 9.12.2012.
// Copyright (c) 2012 Aero Deko. All rights reserved.
//
#import <Foundation/Foundation.h>
@class HarmonyCanvasSettings;
@interface DekoTutorialHelper : NSObject
@property (nonatomic, readonly) BOOL shouldShowTutorial;
- (void)showLeftArrowInView:(UIView *)view;
- (void)dismissLeftArrow;
- (void)showRightArrowInView:(UIView *)view;
- (void)dismissRightArrow;
- (void)showTapCirclesInView:(UIView *)view;
- (void)dismissTapCircles;
- (HarmonyCanvasSettings *)defaultSettings1;
- (HarmonyCanvasSettings *)defaultSettings2;
@end
|
// RUN: %check -e %s
g(int j(){return 3;}); // CHECK: /error: /
|
//
// Copyright 2011-2014 Twilio. All rights reserved.
//
// Use of this software is subject to the terms and conditions of the
// Twilio Terms of Service located at http://www.twilio.com/legal/tos
//
@class TCDevice;
@class TCConnection;
@class TCPresenceEvent;
/** TCDeviceDelegate is the delegate protocol for a TCDevice.
*/
@protocol TCDeviceDelegate<NSObject>
@required
/** TCDevice is no longer listening for incoming connections.
@param device The TCDevice object that stopped listening.
@param error An NSError indicating the reason the TCDevice went offline. If the error is nil, this means that the incoming listener was successfully disconnected (for example, -[TCDevice unlisten] was called). For a list of error codes associated with a non-nil error and their meanings, see <a href="http://www.twilio.com/docs/client/errors" target="_blank">http://www.twilio.com/docs/client/errors</a>.
@returns None
*/
-(void)device:(TCDevice*)device didStopListeningForIncomingConnections:(NSError*)error;
@optional
/** TCDevice is now listening for incoming connections.
@param device The TCDevice object that is now listening for connections.
@returns None
*/
-(void)deviceDidStartListeningForIncomingConnections:(TCDevice*)device;
/** Called when an incoming connection request has been received. At this point you choose to accept, ignore, or reject the new connection.
When this occurs, you should assign an appropriate TCConnectionDelegate on the TCConnection to properly respond to events.
Pending incoming connections may be received at any time, including while another connection is active. This method will be invoked once for each connection, and your code should handle this situation appropriately. A single pending connection can be accepted as long as no other connections are active; all other currently pending incoming connections will be automatically rejected by the library until the active connection is terminated.
@param device The TCDevice that is receiving the incoming connection request.
@param connection The TCConnection associated with the incoming connection. The incoming connection will be in the TCConnectionStatusPending state until it is either accepted or disconnected.
@returns None
*/
-(void)device:(TCDevice*)device didReceiveIncomingConnection:(TCConnection*)connection;
/** Called when a presence update notification has been received.
When the device is ready, this selector (if implemented) is invoked once for each available client. Thereafter it is invoked as clients become available or unavailable.
A client is considered available even if another call is in progress.
Remember, when your client disconnects the [TCDeviceDelegate device:didStopListeningForIncomingConnections:] selector will be invoked, and when the device reconnects this presence selector will be called again for every available online client.
@param device The TCDevice that is receiving the presence update.
@param presenceEvent A TCPresenceEvent object describing the notification.
@returns None
*/
-(void)device:(TCDevice *)device didReceivePresenceUpdate:(TCPresenceEvent *)presenceEvent;
@end
|
//
// BaseNavigationViewController.h
// PovertyAlleviation
//
// Created by 四川三君科技有限公司 on 2017/2/20.
// Copyright © 2017年 四川三君科技有限公司. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface BaseNavigationViewController : UINavigationController
@end
|
/*
**==============================================================================
**
** Copyright (c) 2003, 2004, 2005, 2006, Michael Brasher, Karl Schopmeyer
** Copyright (c) 2008, Michael E. Brasher
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and associated documentation files (the "Software"),
** to deal in the Software without restriction, including without limitation
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
** and/or sell copies of the Software, and to permit persons to whom the
** Software is furnished to do so, subject to the following conditions:
**
** The above copyright notice and this permission notice shall be included in
** all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
** SOFTWARE.
**
**==============================================================================
*/
#ifndef _MOF_Indent_h
#define _MOF_Indent_h
#include "MOF_Config.h"
MOF_LINKAGE extern void MOF_Indent(size_t nesting);
#endif /* _MOF_Indent_h */
|
#ifndef BITCOINGUI_H
#define BITCOINGUI_H
#include <QMainWindow>
#include <QSystemTrayIcon>
class TransactionTableModel;
class ClientModel;
class WalletModel;
class TransactionView;
class OverviewPage;
class AddressBookPage;
class SendCoinsDialog;
class SignVerifyMessageDialog;
class Notificator;
class RPCConsole;
QT_BEGIN_NAMESPACE
class QLabel;
class QLineEdit;
class QTableView;
class QAbstractItemModel;
class QModelIndex;
class QProgressBar;
class QStackedWidget;
class QUrl;
QT_END_NAMESPACE
/**
Bitcoin GUI main class. This class represents the main window of the Bitcoin UI. It communicates with both the client and
wallet models to give the user an up-to-date view of the current core state.
*/
class BitcoinGUI : public QMainWindow
{
Q_OBJECT
public:
explicit BitcoinGUI(QWidget *parent = 0);
~BitcoinGUI();
/** Set the client model.
The client model represents the part of the core that communicates with the P2P network, and is wallet-agnostic.
*/
void setClientModel(ClientModel *clientModel);
/** Set the wallet model.
The wallet model represents a bitcoin wallet, and offers access to the list of transactions, address book and sending
functionality.
*/
void setWalletModel(WalletModel *walletModel);
protected:
void changeEvent(QEvent *e);
void closeEvent(QCloseEvent *event);
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
private:
ClientModel *clientModel;
WalletModel *walletModel;
QStackedWidget *centralWidget;
OverviewPage *overviewPage;
QWidget *transactionsPage;
AddressBookPage *addressBookPage;
AddressBookPage *receiveCoinsPage;
SendCoinsDialog *sendCoinsPage;
SignVerifyMessageDialog *signVerifyMessageDialog;
QLabel *labelEncryptionIcon;
QLabel *labelStakingIcon;
QLabel *labelConnectionsIcon;
QLabel *labelBlocksIcon;
QLabel *progressBarLabel;
QProgressBar *progressBar;
QMenuBar *appMenuBar;
QAction *overviewAction;
QAction *historyAction;
QAction *quitAction;
QAction *sendCoinsAction;
QAction *addressBookAction;
QAction *signMessageAction;
QAction *verifyMessageAction;
QAction *aboutAction;
QAction *receiveCoinsAction;
QAction *optionsAction;
QAction *toggleHideAction;
QAction *exportAction;
QAction *encryptWalletAction;
QAction *backupWalletAction;
QAction *changePassphraseAction;
QAction *unlockWalletAction;
QAction *lockWalletAction;
QAction *aboutQtAction;
QAction *openRPCConsoleAction;
QSystemTrayIcon *trayIcon;
Notificator *notificator;
TransactionView *transactionView;
RPCConsole *rpcConsole;
QMovie *syncIconMovie;
/** Create the main UI actions. */
void createActions();
/** Create the menu bar and sub-menus. */
void createMenuBar();
/** Create the toolbars */
void createToolBars();
/** Create system tray (notification) icon */
void createTrayIcon();
public slots:
/** Set number of connections shown in the UI */
void setNumConnections(int count);
/** Set number of blocks shown in the UI */
void setNumBlocks(int count, int nTotalBlocks);
/** Set the encryption status as shown in the UI.
@param[in] status current encryption status
@see WalletModel::EncryptionStatus
*/
void setEncryptionStatus(int status);
/** Notify the user of an error in the network or transaction handling code. */
void error(const QString &title, const QString &message, bool modal);
/** Asks the user whether to pay the transaction fee or to cancel the transaction.
It is currently not possible to pass a return value to another thread through
BlockingQueuedConnection, so an indirected pointer is used.
https://bugreports.qt-project.org/browse/QTBUG-10440
@param[in] nFeeRequired the required fee
@param[out] payFee true to pay the fee, false to not pay the fee
*/
void askFee(qint64 nFeeRequired, bool *payFee);
void handleURI(QString strURI);
private slots:
/** Switch to overview (home) page */
void gotoOverviewPage();
/** Switch to history (transactions) page */
void gotoHistoryPage();
/** Switch to address book page */
void gotoAddressBookPage();
/** Switch to receive coins page */
void gotoReceiveCoinsPage();
/** Switch to send coins page */
void gotoSendCoinsPage();
/** Show Sign/Verify Message dialog and switch to sign message tab */
void gotoSignMessageTab(QString addr = "");
/** Show Sign/Verify Message dialog and switch to verify message tab */
void gotoVerifyMessageTab(QString addr = "");
/** Show configuration dialog */
void optionsClicked();
/** Show about dialog */
void aboutClicked();
#ifndef Q_OS_MAC
/** Handle tray icon clicked */
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
#endif
/** Show incoming transaction notification for new transactions.
The new items are those between start and end inclusive, under the given parent item.
*/
void incomingTransaction(const QModelIndex & parent, int start, int end);
/** Encrypt the wallet */
void encryptWallet(bool status);
/** Backup the wallet */
void backupWallet();
/** Change encrypted wallet passphrase */
void changePassphrase();
/** Ask for passphrase to unlock wallet temporarily */
void unlockWallet();
void lockWallet();
/** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */
void showNormalIfMinimized(bool fToggleHidden = false);
/** simply calls showNormalIfMinimized(true) for use in SLOT() macro */
void toggleHidden();
void updateStakingIcon();
};
#endif
|
/****************************************************************************************
Copyright (C) 2015 Autodesk, Inc.
All rights reserved.
Use of this software is subject to the terms of the Autodesk license agreement
provided at the time of installation or download, or which otherwise accompanies
this software in either electronic or hard copy form.
****************************************************************************************/
//! \file fbxgeometryweightedmap.h
#ifndef _FBXSDK_SCENE_GEOMETRY_WEIGHTED_MAP_H_
#define _FBXSDK_SCENE_GEOMETRY_WEIGHTED_MAP_H_
#include <fbxsdk/fbxsdk_def.h>
#include <fbxsdk/core/fbxobject.h>
#include <fbxsdk/scene/geometry/fbxweightedmapping.h>
#include <fbxsdk/fbxsdk_nsbegin.h>
class FbxGeometry;
/** \brief This class provides the structure to build a correspondence between 2 geometries.
*
* This correspondence is done at the vertex level. Which means that for each vertex in the
* source geometry, you can have from 0 to N corresponding vertices in the destination
* geometry. Each corresponding vertex is weighted.
*
* For example, if the source geometry is a NURB and the destination geometry is a mesh,
* the correspondence object will express the correspondence between the NURB's control vertices
* and the mesh's vertices.
*
* If the mesh corresponds to a tesselation of the NURB, the correspondence object can be used
* to transfer any deformation that affect the NURB's control vertices to the mesh's vertices.
*
* See FbxWeightedMapping for more details.
*/
class FBXSDK_DLL FbxGeometryWeightedMap : public FbxObject
{
FBXSDK_OBJECT_DECLARE(FbxGeometryWeightedMap, FbxObject);
public:
/** Set correspondence values.
* \param pWeightedMappingTable Pointer to the table containing values
* \remark \e pWeightedMappingTable becomes owned by this object and will be destroyed by it
* when the object goes out of scope or on the next call to SetValues(). The deletion
* uses FbxDelete() so the content of the pointer must have been allocated with FbxNew<>()
*/
void SetValues(const FbxWeightedMapping* pWeightedMappingTable);
/** Return correspondence values.
* \return Pointer to the correspondence values table.
*/
FbxWeightedMapping* GetValues() const;
/** Return source geometry.
* \return Pointer to the source geometry, or \c NULL if there is no connected source geometry
*/
FbxGeometry* GetSourceGeometry();
/** Return destination geometry.
* \return Pointer to the destination geometry, or \c NULL if there is no connected destination geometry
*/
FbxGeometry* GetDestinationGeometry();
/*****************************************************************************************************************************
** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
*****************************************************************************************************************************/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
FbxObject& Copy(const FbxObject& pObject) override;
protected:
void Construct(const FbxObject* pFrom) override;
void Destruct(bool pRecursive) override;
// Real weigths table
FbxWeightedMapping* mWeightedMapping;
#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
};
#include <fbxsdk/fbxsdk_nsend.h>
#endif /* _FBXSDK_SCENE_GEOMETRY_WEIGHTED_MAP_H_ */
|
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_libc_unconst_h__
#define __dj_include_libc_unconst_h__
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
#ifndef __STRICT_ANSI__
#ifndef _POSIX_SOURCE
#define unconst(__v, __t) __extension__ ({union { const __t __cp; __t __p; } __q; __q.__cp = __v; __q.__p;})
#endif /* !_POSIX_SOURCE */
#endif /* !__STRICT_ANSI__ */
#endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
#ifdef __cplusplus
}
#endif
#endif /* __dj_include_libc_unconst_h__ */
|
// Copyright 2009 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef V8_VERSION_H_
#define V8_VERSION_H_
namespace v8 {
namespace internal {
class Version {
public:
// Return the various version components.
static int GetMajor() { return major_; }
static int GetMinor() { return minor_; }
static int GetBuild() { return build_; }
static int GetPatch() { return patch_; }
static bool IsCandidate() { return candidate_; }
// Calculate the V8 version string.
static void GetString(Vector<char> str);
// Calculate the SONAME for the V8 shared library.
static void GetSONAME(Vector<char> str);
private:
static int major_;
static int minor_;
static int build_;
static int patch_;
static bool candidate_;
static const char* soname_;
// In test-version.cc.
friend void SetVersion(int major, int minor, int build, int patch,
bool candidate, const char* soname);
};
} } // namespace v8::internal
#endif // V8_VERSION_H_
|
//
// VZHTTPRequestGenerator.h
// ETLibSDK
//
// Created by moxin.xt on 12-12-18.
// Copyright (c) 2013年 VizLab. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef NSString* (^VZHTTPRequestStringGeneratorBlcok)(NSURLRequest* request,NSDictionary* params,NSError *__autoreleasing *error);
@interface VZHTTPRequestGenerator : NSObject
@property(nonatomic,assign) NSStringEncoding stringEncoding;
@property(nonatomic,copy) VZHTTPRequestStringGeneratorBlcok queryStringGenerator;
- (NSURLRequest *)generateRequestWithURLString:(NSString *)aURLString
Params:(NSDictionary *)aParams
HTTPMethod:(NSString* )httpMethod
TimeoutInterval:(NSTimeInterval)timeoutInterval;
@end
|
///
/// Copyright (c) 2016 Dropbox, Inc. All rights reserved.
///
#import <Foundation/Foundation.h>
#import "DBSerializableProtocol.h"
#import "DBTransportBaseClient.h"
@class DBRequestError;
@class DBRoute;
NS_ASSUME_NONNULL_BEGIN
/// Used by internal classes of `DBTransportBaseClient`
@interface DBTransportBaseClient (Internal)
- (NSDictionary *)headersWithRouteInfo:(NSDictionary<NSString *, NSString *> *)routeAttributes
serializedArg:(nullable NSString *)serializedArg;
- (NSDictionary *)headersWithRouteInfo:(NSDictionary<NSString *, NSString *> *)routeAttributes
serializedArg:(nullable NSString *)serializedArg
byteOffsetStart:(nullable NSNumber *)byteOffsetStart
byteOffsetEnd:(nullable NSNumber *)byteOffsetEnd;
+ (NSMutableURLRequest *)requestWithHeaders:(NSDictionary *)httpHeaders
url:(NSURL *)url
content:(nullable NSData *)content
stream:(nullable NSInputStream *)stream;
- (NSURL *)urlWithRoute:(DBRoute *)route;
+ (nullable NSData *)serializeDataWithRoute:(DBRoute *)route routeArg:(nullable id<DBSerializable>)arg;
+ (nullable NSString *)serializeStringWithRoute:(DBRoute *)route routeArg:(nullable id<DBSerializable>)arg;
+ (NSString *)asciiEscapeWithString:(NSString *)string;
+ (nullable DBRequestError *)dBRequestErrorWithErrorData:(nullable NSData *)errorData
clientError:(nullable NSError *)clientError
statusCode:(int)statusCode
httpHeaders:(nullable NSDictionary *)httpHeaders;
+ (nullable id)routeErrorWithRoute:(nullable DBRoute *)route data:(nullable NSData *)data statusCode:(int)statusCode;
+ (nullable id)routeResultWithRoute:(nullable DBRoute *)route
data:(nullable NSData *)data
serializationError:(NSError *_Nullable *_Nullable)serializationError;
+ (BOOL)statusCodeIsRouteError:(int)statusCode;
/**
* This method performs a lookup for the passed in @p lookupKey on the given @p headerFieldsDictionary. However, since
* HTTP header field keys are case insensitive, it compares the keys in the dictionary to @p lookupKey in a case
* insensitive way.
*
* @param lookupKey The key that we want to fetch from the header dictionary. Irrespective of case
* @param headerFieldsDictionary HTTP headers fiels dictionary (e.g. the result of calling allHeaderFields in an
* NSHTTPURLResponse instance)
*
* @return The value corresponding to the passed in @p lookupKey or nil if none is found.
*/
+ (nullable id)caseInsensitiveLookupWithKey:(nullable NSString *)lookupKey
headerFieldsDictionary:(nullable NSDictionary<id, id> *)headerFieldsDictionary;
@end
NS_ASSUME_NONNULL_END
|
//
// Shader.hpp
// opengl-series
//
// Created by Tim Zuercher on 11/21/15.
//
//
#include "Logger.h"
#include <stdio.h>
#include <string>
#include <unistd.h>
#include <cassert>
#include <iostream>
#include <stdexcept>
#include <GL/glew.h>
using namespace std;
class Shader{
public:
Shader(string file,GLenum type);
GLuint getID(){return shaderID;};
string getShaderType(){return shaderType;};
private:
GLuint shaderID;
string shaderType;
GLchar * readShaderFile(const char *fileName);
bool checkErrors(string fileName);
static string getShaderType(GLenum type);
};
|
/**
* \file
* \brief RAM allocator code (client-side) definitions
*/
/*
* Copyright (c) 2007, 2008, 2009, 2011, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group.
*/
#ifndef BARRELFISH_RAM_ALLOC_H
#define BARRELFISH_RAM_ALLOC_H
#include <stdint.h>
#include <errors/errno.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
struct capref;
typedef errval_t (* ram_alloc_func_t)(struct capref *ret, uint8_t size_bits,
uint64_t minbase, uint64_t maxlimit);
errval_t ram_alloc_fixed(struct capref *ret, uint8_t size_bits,
uint64_t minbase, uint64_t maxlimit);
errval_t ram_alloc(struct capref *retcap, uint8_t size_bits);
errval_t ram_available(genpaddr_t *available, genpaddr_t *total);
errval_t ram_alloc_set(ram_alloc_func_t local_allocator);
void ram_set_affinity(uint64_t minbase, uint64_t maxlimit);
void ram_get_affinity(uint64_t *minbase, uint64_t *maxlimit);
void ram_alloc_init(void);
__END_DECLS
#endif // BARRELFISH_RAM_ALLOC_H
|
//
// JSNewsImgsTableViewCell.h
// SYJNeteaseNews
//
// Created by ShenYj on 2017/1/5.
// Copyright © 2017年 ShenYj. All rights reserved.
//
#import <UIKit/UIKit.h>
@class JSNewsModel;
@interface JSNewsImgsTableViewCell : UITableViewCell
/** 新闻模型数据 */
@property (nonatomic) JSNewsModel *newsModel;
@end
|
/////////////////////////////////////////////////////////////////////////////////////////
///
/// \file helper.h
///
/// __Description__: Defines helper functions like print().
///
/// __Last modified__: <>\n
/// __Version__: 1.0\n
/// __Author__: Alex Chen, fizban007@gmail.com\n
/// __Organization__: Columbia University
///
/////////////////////////////////////////////////////////////////////////////////////////
#ifndef _HELPER_H_
#define _HELPER_H_
#include <iostream>
#include "cudaControl.h"
namespace CudaLE {
namespace helper {
HD_INLINE void print(const char* str) {
#ifdef WITH_CUDA_ENABLED
printf("%s", str);
#else
std::cout << str;
#endif
}
HD_INLINE void print(double d) {
#ifdef WITH_CUDA_ENABLED
printf("%f", d);
#else
std::cout << d;
#endif
}
template <typename T>
HD_INLINE void println(const T& t) {
t.print();
print("\n");
}
}
}
#endif // _HELPER_H_
|
//
// DPAppDelegate.h
// DianpingSDKDemo
//
// Created by Johnny on 11/10/13.
// Copyright (c) 2013 Johnny. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface DPAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
/**
* Copyright (c) 2013-2019 Damien Tardy-Panis
*
* This file is subject to the terms and conditions defined in
* file 'LICENSE', which is part of this source code package.
**/
#ifndef CHANNEL_H
#define CHANNEL_H
#include <QObject>
#include <QHash>
#include <QByteArray>
#include <QVariant>
#include <QString>
#include <QUrl>
#include <QStringList>
#include "../XmlItem/XmlItem.h"
class Channel : public XmlItem
{
Q_OBJECT
public:
enum Roles {
IdRole = XmlItem::LastRole + 1,
NameRole,
DescriptionRole,
ImageUrlRole,
DjRole,
DjMailRole,
GenresRole,
ListenersRole,
SortGenreRole,
MaximumListenersRole
};
enum StreamQuality {
TopQuality,
GoodQuality,
LowQuality,
FirstQuality = TopQuality,
LastQuality = LowQuality
};
enum StreamFormat {
AacPlusFormat,
AacFormat,
Mp3Format,
FirstFormat = AacPlusFormat,
LastFormat = Mp3Format
};
public:
explicit Channel(QObject *parent = 0);
virtual QVariant data(int role) const;
virtual bool setData (const QVariant &value, int role);
virtual QHash<int, QByteArray> roleNames();
virtual QHash<int, QByteArray> bookmarkRoleNames();
virtual QHash<int, QByteArray> idRoleNames();
virtual XmlItem* create(QObject* parent);
virtual XmlItem* clone();
void addPls(QUrl pls, StreamFormat format, StreamQuality quality);
QMap<StreamQuality, QMap<StreamFormat, QUrl> > getAllPlsQuality();
static QString streamQualityText(StreamQuality quality);
static QString streamFormatText(StreamFormat format);
static QString defaultStreamQualityText();
static QString defaultStreamFormatText();
static StreamQuality streamQuality(QString quality);
static StreamFormat streamFormat(QString format);
static StreamQuality defaultStreamQuality();
static StreamFormat defaultStreamFormat();
static QList<QString> streamQualityTextList();
static QList<QString> streamFormatTextList();
virtual QString xmlTag() { return "channel"; }
inline QString id() const { return m_id; }
inline QString name() const { return m_name; }
inline QString description() const { return m_description; }
inline QUrl imageUrl() const { return m_imageUrl; }
inline QString dj() const { return m_dj; }
inline QString djMail() const { return m_djMail; }
inline QStringList genres() const { return m_genres; }
inline int listeners() const { return m_listeners; }
inline QString sortGenre() const { return m_sortGenre; }
inline int maximumListeners() const { return m_maximumListeners; }
inline void setId(QString id) { m_id = id; }
inline void setName(QString name) { m_name = name; }
inline void setDescription(QString description) { m_description = description; }
inline void setImageUrl(QUrl imageUrl) { m_imageUrl = imageUrl; }
inline void setDj(QString dj) { m_dj = dj; }
inline void setDjMail(QString djMail) { m_djMail = djMail; }
inline void setGenres(QStringList genres) { m_genres = genres; }
inline void setListeners(int listeners) { m_listeners = listeners; }
inline void setSortGenre(QString sortGenre) { m_sortGenre = sortGenre; }
inline void setMaximumListeners(int maximumListeners) { m_maximumListeners = maximumListeners; }
private:
QMap<StreamQuality, QUrl> plsContainer(StreamFormat format);
private:
QString m_id;
QString m_name;
QString m_description;
QUrl m_imageUrl;
QString m_dj;
QString m_djMail;
QStringList m_genres;
int m_listeners;
QString m_sortGenre;
int m_maximumListeners;
QMap<StreamQuality, QUrl> m_mp3Pls;
QMap<StreamQuality, QUrl> m_aacPls;
QMap<StreamQuality, QUrl> m_aacpPls;
};
#endif // CHANNEL_H
|
//
// OrderedDictionary.h
// OrderedDictionary
//
// Created by Matt Gallagher on 19/12/08.
// Copyright 2008 Matt Gallagher. All rights reserved.
//
// Permission is given to use this source code file without charge in any
// project, commercial or otherwise, entirely at your risk, with the condition
// that any redistribution (in part or whole) of source code must retain
// this copyright and permission notice. Attribution in compiled projects is
// appreciated but not required.
//
#import <Foundation/Foundation.h>
@interface OrderedDictionary : NSMutableDictionary {
NSMutableDictionary *dictionary;
NSMutableArray *array;
}
- (void)insertObject:(id)anObject forKey:(id)aKey atIndex:(NSUInteger)anIndex;
- (id)keyAtIndex:(NSUInteger)anIndex;
- (NSEnumerator *)reverseKeyEnumerator;
@end
|
/*
-------------------------------------------------------------------------------
This file is part of OgreKit.
http://gamekit.googlecode.com/
Copyright (c) 2006-2010 Charlie C.
Contributor(s): none yet.
-------------------------------------------------------------------------------
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
-------------------------------------------------------------------------------
*/
#ifndef _nsNodeTree_h_
#define _nsNodeTree_h_
#include "nsCommon.h"
#include "nsNodeTypeInfo.h"
#include "nsNode.h"
class nsNodeTree
{
protected:
nsNodes m_nodes;
nsString m_name;
nsString m_groupName;
bool m_isGroup, m_open;
NSrect m_projection;
NSvec2 m_size;
// attached canvas
nsNodeCanvas* m_client;
// Root object for nodes within this tree
nsString m_attachedObject;
public:
nsNodeTree(const nsString& name);
~nsNodeTree();
UT_INLINE void setName(const nsString& name) {m_name = name;}
UT_INLINE void setGroup(bool val) {m_isGroup = val;}
UT_INLINE void setGroupName(const nsString& name) {m_groupName = name;}
UT_INLINE void setAttachedName(const nsString& name) {m_attachedObject = name;}
UT_INLINE const nsString& getName(void) {return m_name;}
UT_INLINE const nsString& getGroupName(void) {return m_groupName;}
UT_INLINE bool isGroup(void) {return m_isGroup;}
UT_INLINE const nsString& getAttachedName(void) {return m_attachedObject;}
// save / load data
UT_INLINE void setOpen(bool v) {m_open = v;}
UT_INLINE void setSize(const NSvec2& size) {m_size = size;}
UT_INLINE void setProjection(const NSrect& proj) {m_projection = proj;}
UT_INLINE bool isOpen(void) {return m_open;}
UT_INLINE NSvec2& getSize(void) {return m_size;}
UT_INLINE NSrect& getProjection(void) {return m_projection;}
// Temporary canvas data (only valid as long as the editor is open)
UT_INLINE void attachCanvas(nsNodeCanvas* cnvs) {m_client = cnvs;}
UT_INLINE nsNodeCanvas* getAttachedCanvas(void) {return m_client;}
// node access
UT_INLINE nsNodeIterator getNodeIterator(void) {return nsNodeIterator(m_nodes);}
UT_INLINE UTsize getNodeCount(void) {return m_nodes.size();}
nsNode* createNode(nsNodeDef* nt);
nsNode* createCloneNode(nsNode* nd);
void deleteNode(nsNode* node);
void clear(void);
// render list sorting
void bringToFront(nsNode* node);
void bringToFront(nsNodes& list, nsNode* node);
};
#endif//_nsNodeTree_h_
|
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
** of its contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QPixmap>
#include <QMainWindow>
class PuzzleWidget;
class PiecesModel;
QT_BEGIN_NAMESPACE
class QListView;
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
public slots:
void openImage(const QString &path = QString());
void setupPuzzle();
private slots:
void setCompleted();
private:
void setupMenus();
void setupWidgets();
QPixmap puzzleImage;
QListView *piecesList;
PuzzleWidget *puzzleWidget;
PiecesModel *model;
};
#endif
|
//
// Texture.h
// libpngMem
//
// Created by Fakhir Shaheen on 02/12/2014.
// Copyright (c) 2014 Fakhir Shaheen. All rights reserved.
//
#ifndef __libpngMem__Texture__
#define __libpngMem__Texture__
#include <GLES2/gl2.h>
#include <png.h>
#include <string>
#include <istream>
#include <fstream>
#include <sstream>
GLuint LoadFromStream(std::istream & pngDataStream);
#endif /* defined(__libpngMem__Texture__) */
|
//
// BridgingHeader.h
// HockeyApp-iOSDemo-Swift
//
// Created by Kevin Li on 16/10/24.
//
#ifndef BridgingHeader_h
#define BridgingHeader_h
#import "HockeySDK.h"
#import "HockeySDKPrivate.h"
#endif /* BridgingHeader_h */
|
//
// storage.c
// crypto777
//
// Created by James on 4/9/15.
// Copyright (c) 2015 jl777. All rights reserved.
//
#ifdef DEFINES_ONLY
#ifndef crypto777_storage_h
#define crypto777_storage_h
#include <stdio.h>
#include <ctype.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "uthash.h"
#include "cJSON.h"
#include "bits777.c"
#include "system777.c"
#include "db777.c"
#include "msig.c"
struct nodestats *get_nodestats(uint64_t nxt64bits);
int32_t get_NXT_coininfo(uint64_t srvbits,uint64_t nxt64bits,char *coinstr,char *acctcoinaddr,char *pubkey);
int32_t add_NXT_coininfo(uint64_t srvbits,uint64_t nxt64bits,char *coinstr,char *acctcoinaddr,char *pubkey);
cJSON *http_search(char *destip,char *type,char *file);
struct NXT_acct *get_NXTacct(int32_t *createdp,char *NXTaddr);
void update_nodestats_data(struct nodestats *stats);
void set_NXTpubkey(char *NXTpubkey,char *NXTacct);
struct multisig_addr *find_NXT_msig(char *NXTaddr,char *coinstr,uint64_t *srv64bits,int32_t n);
int32_t update_msig_info(struct multisig_addr *msig,int32_t syncflag,char *sender);
struct NXT_acct *get_nxt64bits(int32_t *createdp,uint64_t nxt64bits);
#endif
#else
#ifndef crypto777_storage_c
#define crypto777_storage_c
#ifndef crypto777_storage_h
#define DEFINES_ONLY
#include "storage.c"
//#undef DEFINES_ONLY
#endif
struct NXT_acct *get_nxt64bits(int32_t *createdp,uint64_t nxt64bits)
{
static struct NXT_acct N,*np;
int32_t len = sizeof(N);
if ( (np= db777_get(&N,&len,0,DB_NXTaccts,&nxt64bits,sizeof(nxt64bits))) == 0 )
{
np = calloc(1,sizeof(*np));
np->nxt64bits = nxt64bits, expand_nxt64bits(np->NXTaddr,nxt64bits);
db777_add(1,0,DB_NXTaccts,&nxt64bits,sizeof(nxt64bits),np,sizeof(*np));
*createdp = 1;
} else *createdp = 0;
return(np);
}
struct NXT_acct *get_NXTacct(int32_t *createdp,char *NXTaddr)
{
return(get_nxt64bits(createdp,calc_nxt64bits(NXTaddr)));
}
struct nodestats *get_nodestats(uint64_t nxt64bits)
{
struct nodestats *stats = 0;
int32_t createdflag;
struct NXT_acct *np;
if ( nxt64bits != 0 )
{
np = get_nxt64bits(&createdflag,nxt64bits);
stats = &np->stats;
if ( stats->nxt64bits == 0 )
np->nxt64bits = nxt64bits, expand_nxt64bits(np->NXTaddr,nxt64bits);
}
return(stats);
}
void update_nodestats_data(struct nodestats *stats)
{
char ipaddr[64];
int32_t createdflag;
struct NXT_acct *np;
expand_ipbits(ipaddr,stats->ipbits);
np = get_nxt64bits(&createdflag,stats->nxt64bits);
np->stats = *stats;
if ( Debuglevel > 2 )
printf("Update nodestats.%llu (%s) lastcontact %u\n",(long long)stats->nxt64bits,ipaddr,stats->lastcontact);
db777_add(1,0,DB_NXTaccts,&stats->nxt64bits,sizeof(stats->nxt64bits),np,sizeof(*np));
}
/*struct acct_coin2 *find_NXT_coininfo(struct NXT_acct **npp,uint64_t nxt64bits,char *coinstr)
{
char NXTaddr[64];
struct NXT_acct *np;
int32_t i,createdflag;
expand_nxt64bits(NXTaddr,nxt64bits);
np = get_NXTacct(&createdflag,NXTaddr);
if ( npp != 0 )
(*npp) = np;
if ( np->numcoins > 0 )
{
for (i=0; i<np->numcoins; i++)
if ( strcmp(np->coins[i].name,coinstr) == 0 ) //np->coins[i] != 0 &&
return(&np->coins[i]);
}
return(0);
}*/
#endif
#endif
|
#ifndef __TRANSIT_SCENE_H__
#define __TRANSIT_SCENE_H__
#include "cocos2d.h"
#include "ui/CocosGUI.h"
#include "HelloWorldScene.h"
class Transit : public cocos2d::Layer
{
public:
// there's no 'id' in cpp, so we recommend returning the class instance pointer
static cocos2d::Scene* createScene();
// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
virtual bool init();
// a selector callback
void menuCloseCallback(cocos2d::Ref* pSender);
void update(float dt);
// implement the "static create()" method manually
CREATE_FUNC(Transit);
private:
int ini;
bool stopFrame;
int scene;
};
#endif // __HELLOWORLD_SCENE_H__
|
#pragma once
#include "lpg_std_string.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
static size_t integer_equals(uint64_t const left, uint64_t const right)
{
return (left == right);
}
static size_t integer_less(uint64_t const left, uint64_t const right)
{
return (left < right);
}
static string integer_to_string(uint64_t const value)
{
char buffer[40];
int const formatted_length =
#ifdef _MSC_VER
sprintf_s
#else
sprintf
#endif
(buffer,
#ifdef _MSC_VER
sizeof(buffer),
#endif
"%llu", (unsigned long long)value);
return string_concat(string_literal("", 0), string_literal(buffer, (size_t)formatted_length));
}
|
//
// STDemoServiceOrderManager+OrderList.h
// CJStandardProjectDemo
//
// Created by ciyouzen on 2018/9/7.
// Copyright © 2018年 devlproad. All rights reserved.
//
#import "STDemoServiceOrderManager.h"
@interface STDemoServiceOrderManager (OrderList)
///获取"待取餐的订单"
- (void)getToTakemealOrdersWithLongitude:(CGFloat)longitude
latitude:(CGFloat)latitude
dateString:(NSString *)dateString
success:(void (^)(STDemoOrderModel *toTakemealOrderListModel))success
failure:(void (^)(NSString *failureMessage))failure;
///获取"待配送的订单"
- (void)getToDeliverOrdersWithLongitude:(CGFloat)longitude
latitude:(CGFloat)latitude
dateString:(NSString *)dateString
success:(void (^)(STDemoOrderModel *toDeliverOrderListModel))success
failure:(void (^)(NSString *failureMessage))failure;
///获取"配送中的订单"
- (void)getDeliveringOrdersWithLongitude:(CGFloat)longitude
latitude:(CGFloat)latitude
dateString:(NSString *)dateString
success:(void (^)(STDemoOrderModel *deliveringOrderListModel))success
failure:(void (^)(NSString *failureMessage))failure;
///获取"已完成配送的订单"
- (void)getDeliveredOrdersWithLongitude:(CGFloat)longitude
latitude:(CGFloat)latitude
dateString:(NSString *)dateString
success:(void (^)(STDemoOrderModel *deliveredOrderListModel))success
failure:(void (^)(NSString *failureMessage))failure;
///获取"已完成的订单"
- (void)getDoneOrdersWithLongitude:(CGFloat)longitude
latitude:(CGFloat)latitude
dateString:(NSString *)dateString
success:(void (^)(STDemoOrderModel *doneOrderListModel))success
failure:(void (^)(NSString *failureMessage))failure;
@end
|
/**
* \file
*
* \brief Board configuration
*
* Copyright (c) 2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel microcontroller product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* \asf_license_stop
*
*/
/**
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
*/
#ifndef CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
/** UART hardware ID used by the console. */
#define CONSOLE_UART_ID ID_UART
/** Baud rate of console UART */
#define CONSOLE_BAUD_RATE 115200
#endif /* CONF_BOARD_H_INCLUDED */
|
//
// AppDelegate.h
// SparkRGB
//
// Created by Mohit Bhoite on 8/3/14.
// Copyright (c) 2014 ___FULLUSERNAME___. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
|
/**
* The MIT License (MIT)
* Copyright (C) 2016 ZongXian Shen <andy.zsshen@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifndef _JNI_EXCEPT_H_
#define _JNI_EXCEPT_H_
#include <jni.h>
void LogException(JNIEnv*, jthrowable);
void ThrowException(JNIEnv*, const char*);
static const char* kRecursiveExcept = "Exception occurs during exception message processing.";
#define CHK_EXCP(env, ...) \
do { \
jthrowable except; \
if ((except = env->ExceptionOccurred())) { \
env->ExceptionClear(); \
LogException(env, except); \
__VA_ARGS__; \
} \
} while (0);
#define CHK_EXCP_AND_RET(env, ...) \
do { \
jthrowable except; \
if ((except = env->ExceptionOccurred())) { \
env->ExceptionClear(); \
LogException(env, except); \
__VA_ARGS__; \
return; \
} \
} while (0);
#define CHK_EXCP_AND_RET_FAIL(env, ...) \
do { \
jthrowable except; \
if ((except = env->ExceptionOccurred())) { \
env->ExceptionClear(); \
LogException(env, except); \
__VA_ARGS__; \
return PROC_FAIL; \
} \
} while (0);
#define DETACH(jvm) \
do { \
jvm->DetachCurrentThread(); \
} while (0);
#define RETHROW(type) \
do { \
ThrowException(env, except, type); \
} while (0);
#endif |
/*
* connect2.c - connect to MySQL server, using connection parameters
* specified in an option file or on the command line
*/
#include <my_global.h>
#include <my_sys.h>
#include <m_string.h> /* for strdup() */
#include <mysql.h>
#include <my_getopt.h>
static char *opt_host_name = NULL; /* server host (default=localhost) */
static char *opt_user_name = NULL; /* username (default=login name) */
static char *opt_password = NULL; /* password (default=none) */
static unsigned int opt_port_num = 0; /* port number (use built-in value) */
static char *opt_socket_name = NULL; /* socket name (use built-in value) */
static char *opt_db_name = NULL; /* database name (default=none) */
static unsigned int opt_flags = 0; /* connection flags (none) */
static int ask_password = 0; /* whether to solicit password */
static MYSQL *conn; /* pointer to connection handler */
static const char *client_groups[] = { "client", NULL };
static struct my_option my_opts[] = /* option information structures */
{
{"help", '?', "Display this help and exit",
NULL, NULL, NULL,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Host to connect to",
(uchar **) &opt_host_name, NULL, NULL,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"password", 'p', "Password",
(uchar **) &opt_password, NULL, NULL,
GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Port number",
(uchar **) &opt_port_num, NULL, NULL,
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"socket", 'S', "Socket path",
(uchar **) &opt_socket_name, NULL, NULL,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"user", 'u', "User name",
(uchar **) &opt_user_name, NULL, NULL,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ NULL, 0, NULL, NULL, NULL, NULL, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }
};
/* #@ _PRINT_ERROR_ */
static void
print_error (MYSQL *conn, char *message)
{
fprintf (stderr, "%s\n", message);
if (conn != NULL)
{
fprintf (stderr, "Error %u (%s): %s\n",
mysql_errno (conn), mysql_sqlstate (conn), mysql_error (conn));
}
}
/* #@ _PRINT_ERROR_ */
static my_bool
get_one_option (int optid, const struct my_option *opt, char *argument)
{
switch (optid)
{
case '?':
my_print_help (my_opts); /* print help message */
exit (0);
case 'p': /* password */
if (!argument) /* no value given; solicit it later */
ask_password = 1;
else /* copy password, overwrite original */
{
opt_password = strdup (argument);
if (opt_password == NULL)
{
print_error (NULL, "could not allocate password buffer");
exit (1);
}
while (*argument)
*argument++ = 'x';
ask_password = 0;
}
break;
}
return (0);
}
int
main (int argc, char *argv[])
{
int opt_err;
MY_INIT (argv[0]);
load_defaults ("my", client_groups, &argc, &argv);
if ((opt_err = handle_options (&argc, &argv, my_opts, get_one_option)))
exit (opt_err);
/* solicit password if necessary */
if (ask_password)
opt_password = get_tty_password (NULL);
/* get database name if present on command line */
if (argc > 0)
{
opt_db_name = argv[0];
--argc; ++argv;
}
/* initialize client library */
if (mysql_library_init (0, NULL, NULL))
{
print_error (NULL, "mysql_library_init() failed");
exit (1);
}
/* #@ _INIT_CONNECT_ */
/* initialize connection handler */
conn = mysql_init (NULL);
if (conn == NULL)
{
print_error (NULL, "mysql_init() failed (probably out of memory)");
exit (1);
}
/* connect to server */
if (mysql_real_connect (conn, opt_host_name, opt_user_name, opt_password,
opt_db_name, opt_port_num, opt_socket_name, opt_flags) == NULL)
{
print_error (conn, "mysql_real_connect() failed");
mysql_close (conn);
exit (1);
}
/* #@ _INIT_CONNECT_ */
/* ... issue statements and process results here ... */
/* disconnect from server, terminate client library */
mysql_close (conn);
mysql_library_end ();
exit (0);
}
|
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
@brief API call builder pattern support class.
@discussion Class basing on required API protocol collect user-provided arguments and pass them on \c send to
corresponding API end-point.
@author Sergey Mamontov
@since 4.5.4
@copyright © 2009-2016 PubNub, Inc.
*/
@interface PNAPICallBuilder : NSObject
#pragma mark -
@end
NS_ASSUME_NONNULL_END
|
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
//
// This file contains the specification, but not the implementations,
// of the types/operations/etc. that should be defined by a platform
// specific port_<platform>.h file. Use this file as a reference for
// how to port this package to a new platform.
#ifndef STORAGE_LEVELDB_PORT_PORT_EXAMPLE_H_
#define STORAGE_LEVELDB_PORT_PORT_EXAMPLE_H_
namespace leveldb {
namespace port {
// TODO(jorlow): Many of these belong more in the environment class rather than
// here. We should try moving them and see if it affects perf.
// The following boolean constant must be true on a little-endian machine
// and false otherwise.
static const bool kLittleEndian = true /* or some other expression */;
// ------------------ Threading -------------------
// A Mutex represents an exclusive lock.
class Mutex {
public:
Mutex();
~Mutex();
// Lock the mutex. Waits until other lockers have exited.
// Will deadlock if the mutex is already locked by this thread.
void Lock();
// Unlock the mutex.
// REQUIRES: This mutex was locked by this thread.
void Unlock();
// Optionally crash if this thread does not hold this mutex.
// The implementation must be fast, especially if NDEBUG is
// defined. The implementation is allowed to skip all checks.
void AssertHeld();
};
class CondVar {
public:
explicit CondVar(Mutex* mu);
~CondVar();
// Atomically release *mu and block on this condition variable until
// either a call to SignalAll(), or a call to Signal() that picks
// this thread to wakeup.
// REQUIRES: this thread holds *mu
void Wait();
// If there are some threads waiting, wake up at least one of them.
void Signal();
// Wake up all waiting threads.
void SignallAll();
};
// Thread-safe initialization.
// Used as follows:
// static port::OnceType init_control = LEVELDB_ONCE_INIT;
// static void Initializer() { ... do something ...; }
// ...
// port::InitOnce(&init_control, &Initializer);
typedef intptr_t OnceType;
#define LEVELDB_ONCE_INIT 0
extern void InitOnce(port::OnceType*, void (*initializer)());
// A type that holds a pointer that can be read or written atomically
// (i.e., without word-tearing.)
class AtomicPointer {
private:
intptr_t rep_;
public:
// Initialize to arbitrary value
AtomicPointer();
// Initialize to hold v
explicit AtomicPointer(void* v) : rep_(v) { }
// Read and return the stored pointer with the guarantee that no
// later memory access (read or write) by this thread can be
// reordered ahead of this read.
void* Acquire_Load() const;
// Set v as the stored pointer with the guarantee that no earlier
// memory access (read or write) by this thread can be reordered
// after this store.
void Release_Store(void* v);
// Read the stored pointer with no ordering guarantees.
void* NoBarrier_Load() const;
// Set va as the stored pointer with no ordering guarantees.
void NoBarrier_Store(void* v);
};
// ------------------ Compression -------------------
// Store the snappy compression of "input[0,input_length-1]" in *output.
// Returns false if snappy is not supported by this port.
extern bool Snappy_Compress(const char* input, size_t input_length,
std::string* output);
// If input[0,input_length-1] looks like a valid snappy compressed
// buffer, store the size of the uncompressed data in *result and
// return true. Else return false.
extern bool Snappy_GetUncompressedLength(const char* input, size_t length,
size_t* result);
// Attempt to snappy uncompress input[0,input_length-1] into *output.
// Returns true if successful, false if the input is invalid lightweight
// compressed data.
//
// REQUIRES: at least the first "n" bytes of output[] must be writable
// where "n" is the result of a successful call to
// Snappy_GetUncompressedLength.
extern bool Snappy_Uncompress(const char* input_data, size_t input_length,
char* output);
// ------------------ Miscellaneous -------------------
// If heap profiling is not supported, returns false.
// Else repeatedly calls (*func)(arg, data, n) and then returns true.
// The concatenation of all "data[0,n-1]" fragments is the heap profile.
extern bool GetHeapProfile(void (*func)(void*, const char*, int), void* arg);
} // namespace port
} // namespace leveldb
#endif // STORAGE_LEVELDB_PORT_PORT_EXAMPLE_H_
|
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard.
*/
#import "NSSet.h"
@interface NSSet (XCRefactoringFilePathUtils)
- (id)arrayOfFilePathsSortedByLastComponent;
@end
|
/*
* Copyright (c) 2009 Cyrille Berger <cberger@cberger.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* either version 2, or (at your option) any later version of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef BRAINDUMPABOUTDATA_H
#define BRAINDUMPABOUTDATA_H
#include <kaboutdata.h>
#include <klocale.h>
#include <calligraversion.h>
static const char BRAINDUMP_DESCRIPTION[] = I18N_NOOP("Braindump: directly from your brain to the computer.");
static const char BRAINDUMP_VERSION[] = "0.10.9";
inline KAboutData* newBrainDumpAboutData()
{
KAboutData* aboutData = new KAboutData("braindump", 0, ki18n("Braindump"),
BRAINDUMP_VERSION, ki18n(BRAINDUMP_DESCRIPTION), KAboutData::License_LGPL,
ki18n("(c) 2009, 2010, 2011, 2012, 2013 Cyrille Berger"), KLocalizedString(),
"");
aboutData->addAuthor(ki18n("Cyrille Berger"), ki18n("Maintainer"), "cberger@cberger.net");
return aboutData;
}
#endif
|
/*
* Copyright (C) 2012 Texas Instruments, Inc
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/sysfs.h>
#include "sgxfreq.h"
static int onoff_start(struct sgxfreq_sgx_data *data);
static void onoff_stop(void);
static void onoff_sgx_clk_on(void);
static void onoff_sgx_clk_off(void);
static struct onoff_data {
unsigned long freq_off;
unsigned long freq_on;
struct mutex mutex;
bool sgx_clk_on;
} ood;
static struct sgxfreq_governor onoff_gov = {
.name = "onoff",
.gov_start = onoff_start,
.gov_stop = onoff_stop,
.sgx_clk_on = onoff_sgx_clk_on,
.sgx_clk_off = onoff_sgx_clk_off,
};
/*********************** begin sysfs interface ***********************/
extern struct kobject *sgxfreq_kobj;
static ssize_t show_freq_on(struct device *dev, struct device_attribute *attr,
char *buf)
{
return sprintf(buf, "%lu\n", ood.freq_on);
}
static ssize_t store_freq_on(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
int ret;
unsigned long freq;
ret = sscanf(buf, "%lu", &freq);
if (ret != 1)
return -EINVAL;
freq = sgxfreq_get_freq_ceil(freq);
mutex_lock(&ood.mutex);
ood.freq_on = freq;
if (ood.sgx_clk_on)
sgxfreq_set_freq_request(ood.freq_on);
mutex_unlock(&ood.mutex);
return count;
}
static ssize_t show_freq_off(struct device *dev, struct device_attribute *attr,
char *buf)
{
return sprintf(buf, "%lu\n", ood.freq_off);
}
static ssize_t store_freq_off(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
int ret;
unsigned long freq;
ret = sscanf(buf, "%lu", &freq);
if (ret != 1)
return -EINVAL;
freq = sgxfreq_get_freq_floor(freq);
mutex_lock(&ood.mutex);
ood.freq_off = freq;
if (!ood.sgx_clk_on)
sgxfreq_set_freq_request(ood.freq_off);
mutex_unlock(&ood.mutex);
return count;
}
static DEVICE_ATTR(freq_on, 0644, show_freq_on, store_freq_on);
static DEVICE_ATTR(freq_off, 0644, show_freq_off, store_freq_off);
static struct attribute *onoff_attributes[] = {
&dev_attr_freq_on.attr,
&dev_attr_freq_off.attr,
NULL
};
static struct attribute_group onoff_attr_group = {
.attrs = onoff_attributes,
.name = "onoff",
};
/************************ end sysfs interface ************************/
int onoff_init(void)
{
int ret;
mutex_init(&ood.mutex);
ret = sgxfreq_register_governor(&onoff_gov);
if (ret)
return ret;
ood.freq_off = sgxfreq_get_freq_min();
ood.freq_on = sgxfreq_get_freq_max();
return 0;
}
int onoff_deinit(void)
{
return 0;
}
static int onoff_start(struct sgxfreq_sgx_data *data)
{
int ret;
ood.sgx_clk_on = data->clk_on;
ret = sysfs_create_group(sgxfreq_kobj, &onoff_attr_group);
if (ret)
return ret;
if (ood.sgx_clk_on)
sgxfreq_set_freq_request(ood.freq_on);
else
sgxfreq_set_freq_request(ood.freq_off);
return 0;
}
static void onoff_stop(void)
{
sysfs_remove_group(sgxfreq_kobj, &onoff_attr_group);
}
static void onoff_sgx_clk_on(void)
{
mutex_lock(&ood.mutex);
ood.sgx_clk_on = true;
sgxfreq_set_freq_request(ood.freq_on);
sgxfreq_get_load();
mutex_unlock(&ood.mutex);
}
static void onoff_sgx_clk_off(void)
{
mutex_lock(&ood.mutex);
ood.sgx_clk_on = false;
sgxfreq_set_freq_request(ood.freq_off);
sgxfreq_get_load();
mutex_unlock(&ood.mutex);
}
|
// "filename.png", texOffsetX, texOffsetY, flags, texW, texH, trimmedX, trimmedY, originalW, originalH, HALOMAP_HOLY_HALOID
addMapEntry("holy/halo1.png", 83, 75, 0, 83, 74, 8, 7, 100, 100, HALOMAP_HOLY_HALO);
addMapEntry("holy/halo2.png", 166, 149, 0, 83, 66, 8, 7, 100, 100, HALOMAP_HOLY_HALO);
addMapEntry("holy/halo3.png", 0, 0, 0, 83, 75, 8, 7, 100, 100, HALOMAP_HOLY_HALO);
addMapEntry("holy/halo4.png", 83, 149, 0, 83, 68, 8, 5, 100, 100, HALOMAP_HOLY_HALO);
addMapEntry("holy/halo5.png", 0, 75, 0, 83, 75, 8, 7, 100, 100, HALOMAP_HOLY_HALO);
addMapEntry("holy/halo6.png", 166, 75, 0, 83, 66, 8, 7, 100, 100, HALOMAP_HOLY_HALO);
|
/*
* foo-tools, a collection of utilities for glftpd users.
* Copyright (C) 2003 Tanesha FTPD Project, www.tanesha.net
*
* This file is part of foo-tools.
*
* foo-tools is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* foo-tools is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with foo-tools; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* $Source: /home/cvs/footools/footools/src/lib/common.h,v $
* Author: Soren
*
* This module should be outphased!
*/
#include <stdio.h>
#include <stdlib.h>
#define HIDDENDIRFILE "/ftp-data/misc/f00-hiddendirs.txt"
#define MAX_BUFSIZE 4096
int get_dirs(char *d, char *p, char *r);
int ishiddendir(char *p);
char *lower(char *s);
char *fgetsnolfs(char *buf, int n, FILE *fh);
int fileexists(char *f);
int replace(char *b, char *n, char *r);
char *readfile(char *fn);
char *trim(char *s);
/*
* Makes a percent bar in out.
*/
int common_make_percent(int ok, int total, int width, char uncheck, char check, char *out);
/*
* Copies a file.
*/
int common_copy(char *src, char *dest);
|
/**
******************************************************************************
* @file CORTEXM/CORTEXM_SysTick/Inc/stm32f4xx_it.h
* @author MCD Application Team
* @version V1.0.1
* @date 26-February-2014
* @brief This file contains the headers of the interrupt handlers.
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F4xx_IT_H
#define __STM32F4xx_IT_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
void NMI_Handler(void);
void HardFault_Handler(void);
void MemManage_Handler(void);
void BusFault_Handler(void);
void UsageFault_Handler(void);
void SVC_Handler(void);
void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
#ifdef __cplusplus
}
#endif
#endif /* __STM32F4xx_IT_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
/* POSIX-specific extra functions.
Copyright (C) 2016-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/* These wrapper functions use POSIX types and therefore cannot be
declared in <support/support.h>. */
#ifndef SUPPORT_XUNISTD_H
#define SUPPORT_XUNISTD_H
#include <unistd.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
pid_t xfork (void);
pid_t xwaitpid (pid_t, int *status, int flags);
/* Close the file descriptor. Ignore EINTR errors, but terminate the
process on other errors. */
void xclose (int);
/* Write the buffer. Retry on short writes. */
void xwrite (int, const void *, size_t);
/* Invoke mmap with a zero file offset. */
void *xmmap (void *addr, size_t length, int prot, int flags, int fd);
void xmunmap (void *addr, size_t length);
__END_DECLS
#endif /* SUPPORT_XUNISTD_H */
|
#ifndef __RTL8821AU_FW_H__
#define __RTL8821AU_FW_H__
#include <rtl8812a_hal.h>
#include "../wifi.h"
//_RSVDPAGE_LOC_CMD0
#define SET_8812_H2CCMD_RSVDPAGE_LOC_PROBE_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
#define SET_8812_H2CCMD_RSVDPAGE_LOC_PSPOLL(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 8, __Value)
#define SET_8812_H2CCMD_RSVDPAGE_LOC_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 8, __Value)
#define SET_8812_H2CCMD_RSVDPAGE_LOC_QOS_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 0, 8, __Value)
#define SET_8812_H2CCMD_RSVDPAGE_LOC_BT_QOS_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+4, 0, 8, __Value)
//_MEDIA_STATUS_RPT_PARM_CMD1
#define SET_8812_H2CCMD_MSRRPT_PARM_OPMODE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
#define SET_8812_H2CCMD_MSRRPT_PARM_MACID_IND(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
#define SET_8812_H2CCMD_MSRRPT_PARM_MACID(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+1, 0, 8, __Value)
#define SET_8812_H2CCMD_MSRRPT_PARM_MACID_END(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd+2, 0, 8, __Value)
//_SETPWRMODE_PARM
#define SET_8812_H2CCMD_PWRMODE_PARM_MODE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 8, __Value)
#define SET_8812_H2CCMD_PWRMODE_PARM_RLBM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 4, __Value)
#define SET_8812_H2CCMD_PWRMODE_PARM_SMART_PS(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 4, 4, __Value)
#define SET_8812_H2CCMD_PWRMODE_PARM_BCN_PASS_TIME(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 8, __Value)
#define SET_8812_H2CCMD_PWRMODE_PARM_ALL_QUEUE_UAPSD(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 0, 8, __Value)
#define SET_8812_H2CCMD_PWRMODE_PARM_PWR_STATE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+4, 0, 8, __Value)
#define GET_8812_H2CCMD_PWRMODE_PARM_MODE(__pH2CCmd) LE_BITS_TO_1BYTE(__pH2CCmd, 0, 8)
//_P2P_PS_OFFLOAD
#define SET_8812_H2CCMD_P2P_PS_OFFLOAD_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
#define SET_8812_H2CCMD_P2P_PS_OFFLOAD_ROLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
#define SET_8812_H2CCMD_P2P_PS_OFFLOAD_CTWINDOW_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
#define SET_8812_H2CCMD_P2P_PS_OFFLOAD_NOA0_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 3, 1, __Value)
#define SET_8812_H2CCMD_P2P_PS_OFFLOAD_NOA1_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
#define SET_8812_H2CCMD_P2P_PS_OFFLOAD_ALLSTASLEEP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 5, 1, __Value)
#define SET_8812_H2CCMD_P2P_PS_OFFLOAD_DISCOVERY(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 6, 1, __Value)
void rtl8812au_set_fw_pwrmode_cmd(struct rtl_priv *rtlpriv, uint8_t PSMode);
int32_t rtl8821au_download_fw(struct rtl_priv *rtlpriv, bool bUsedWoWLANFw);
void rtl8821au_firmware_selfreset(struct rtl_priv *rtlpriv);
void rtl8821au_fill_h2c_cmd(struct rtl_priv *rtlpriv, u8 element_id,
u32 cmd_len, u8 *cmdbuffer);
uint8_t rtl8812_set_rssi_cmd(struct rtl_priv *rtlpriv, uint8_t *param);
void rtl8821au_set_fw_joinbss_report_cmd(struct rtl_priv *rtlpriv, uint8_t mstatus);
#define FW_8821AU_START_ADDRESS 0x1000
#define FW_8821AU_END_ADDRESS 0x5FFF
#define FW_SIZE_8812 0x8000 // Compatible with RTL8723 Maximal RAM code size 24K. modified to 32k, TO compatible with 92d maximal fw size 32k
//
// This structure must be cared byte-ordering
//
// Added by tynli. 2009.12.04.
#define IS_FW_HEADER_EXIST_8812(_pFwHdr) ((GET_FIRMWARE_HDR_SIGNATURE_8812(_pFwHdr) &0xFFF0) == 0x9500)
#define IS_FW_HEADER_EXIST_8821(_pFwHdr) ((GET_FIRMWARE_HDR_SIGNATURE_8812(_pFwHdr) &0xFFF0) == 0x2100)
//=====================================================
// Firmware Header(8-byte alinment required)
//=====================================================
//--- LONG WORD 0 ----
#define GET_FIRMWARE_HDR_SIGNATURE_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr, 0, 16) // 92C0: test chip; 92C, 88C0: test chip; 88C1: MP A-cut; 92C1: MP A-cut
#define GET_FIRMWARE_HDR_CATEGORY_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr, 16, 8) // AP/NIC and USB/PCI
#define GET_FIRMWARE_HDR_FUNCTION_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr, 24, 8) // Reserved for different FW function indcation, for further use when driver needs to download different FW in different conditions
#define GET_FIRMWARE_HDR_VERSION_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+4, 0, 16)// FW Version
#define GET_FIRMWARE_HDR_SUB_VER_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+4, 16, 8) // FW Subversion, default 0x00
#define GET_FIRMWARE_HDR_RSVD1_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+4, 24, 8)
//--- LONG WORD 1 ----
#define GET_FIRMWARE_HDR_MONTH_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+8, 0, 8) // Release time Month field
#define GET_FIRMWARE_HDR_DATE_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+8, 8, 8) // Release time Date field
#define GET_FIRMWARE_HDR_HOUR_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+8, 16, 8)// Release time Hour field
#define GET_FIRMWARE_HDR_MINUTE_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+8, 24, 8)// Release time Minute field
#define GET_FIRMWARE_HDR_ROMCODE_SIZE_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+12, 0, 16)// The size of RAM code
#define GET_FIRMWARE_HDR_RSVD2_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+12, 16, 16)
//--- LONG WORD 2 ----
#define GET_FIRMWARE_HDR_SVN_IDX_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+16, 0, 32)// The SVN entry index
#define GET_FIRMWARE_HDR_RSVD3_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+20, 0, 32)
//--- LONG WORD 3 ----
#define GET_FIRMWARE_HDR_RSVD4_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+24, 0, 32)
#define GET_FIRMWARE_HDR_RSVD5_8812(__FwHdr) LE_BITS_TO_4BYTE(__FwHdr+28, 0, 32)
#endif
|
#ifndef S390_DEVICE_H
#define S390_DEVICE_H
#include <asm/ccwdev.h>
#include <linux/atomic.h>
#include <linux/wait.h>
#include <linux/notifier.h>
#include <linux/kernel_stat.h>
#include "io_sch.h"
/*
* states of the device statemachine
*/
enum dev_state {
DEV_STATE_NOT_OPER,
DEV_STATE_SENSE_PGID,
DEV_STATE_SENSE_ID,
DEV_STATE_OFFLINE,
DEV_STATE_VERIFY,
DEV_STATE_ONLINE,
DEV_STATE_W4SENSE,
DEV_STATE_DISBAND_PGID,
DEV_STATE_BOXED,
/* states to wait for i/o completion before doing something */
DEV_STATE_TIMEOUT_KILL,
DEV_STATE_QUIESCE,
/* special states for devices gone not operational */
DEV_STATE_DISCONNECTED,
DEV_STATE_DISCONNECTED_SENSE_ID,
DEV_STATE_CMFCHANGE,
DEV_STATE_CMFUPDATE,
DEV_STATE_STEAL_LOCK,
/* last element! */
NR_DEV_STATES
};
/*
* asynchronous events of the device statemachine
*/
enum dev_event {
DEV_EVENT_NOTOPER,
DEV_EVENT_INTERRUPT,
DEV_EVENT_TIMEOUT,
DEV_EVENT_VERIFY,
/* last element! */
NR_DEV_EVENTS
};
struct ccw_device;
/*
* action called through jumptable
*/
typedef void (fsm_func_t)(struct ccw_device *, enum dev_event);
extern fsm_func_t *dev_jumptable[NR_DEV_STATES][NR_DEV_EVENTS];
static inline void
dev_fsm_event(struct ccw_device *cdev, enum dev_event dev_event)
{
int state = cdev->private->state;
if (dev_event == DEV_EVENT_INTERRUPT) {
if (state == DEV_STATE_ONLINE)
inc_irq_stat(cdev->private->int_class);
else if (state != DEV_STATE_CMFCHANGE &&
state != DEV_STATE_CMFUPDATE)
inc_irq_stat(IRQIO_CIO);
}
dev_jumptable[state][dev_event](cdev, dev_event);
}
/*
* Delivers 1 if the device state is final.
*/
static inline int
dev_fsm_final_state(struct ccw_device *cdev)
{
return (cdev->private->state == DEV_STATE_NOT_OPER ||
cdev->private->state == DEV_STATE_OFFLINE ||
cdev->private->state == DEV_STATE_ONLINE ||
cdev->private->state == DEV_STATE_BOXED);
}
int __init io_subchannel_init(void);
void io_subchannel_recog_done(struct ccw_device *cdev);
void io_subchannel_init_config(struct subchannel *sch);
int ccw_device_cancel_halt_clear(struct ccw_device *);
int ccw_device_is_orphan(struct ccw_device *);
void ccw_device_recognition(struct ccw_device *);
int ccw_device_online(struct ccw_device *);
int ccw_device_offline(struct ccw_device *);
void ccw_device_update_sense_data(struct ccw_device *);
int ccw_device_test_sense_data(struct ccw_device *);
void ccw_device_schedule_sch_unregister(struct ccw_device *);
int ccw_purge_blacklisted(void);
void ccw_device_sched_todo(struct ccw_device *cdev, enum cdev_todo todo);
struct ccw_device *get_ccwdev_by_dev_id(struct ccw_dev_id *dev_id);
/* Function prototypes for device status and basic sense stuff. */
void ccw_device_accumulate_irb(struct ccw_device *, struct irb *);
void ccw_device_accumulate_basic_sense(struct ccw_device *, struct irb *);
int ccw_device_accumulate_and_sense(struct ccw_device *, struct irb *);
int ccw_device_do_sense(struct ccw_device *, struct irb *);
/* Function prototype for internal request handling. */
int lpm_adjust(int lpm, int mask);
void ccw_request_start(struct ccw_device *);
int ccw_request_cancel(struct ccw_device *cdev);
void ccw_request_handler(struct ccw_device *cdev);
void ccw_request_timeout(struct ccw_device *cdev);
void ccw_request_notoper(struct ccw_device *cdev);
/* Function prototypes for sense id stuff. */
void ccw_device_sense_id_start(struct ccw_device *);
void ccw_device_sense_id_done(struct ccw_device *, int);
/* Function prototypes for path grouping stuff. */
void ccw_device_verify_start(struct ccw_device *);
void ccw_device_verify_done(struct ccw_device *, int);
void ccw_device_disband_start(struct ccw_device *);
void ccw_device_disband_done(struct ccw_device *, int);
void ccw_device_stlck_start(struct ccw_device *, void *, void *, void *);
void ccw_device_stlck_done(struct ccw_device *, void *, int);
int ccw_device_call_handler(struct ccw_device *);
int ccw_device_stlck(struct ccw_device *);
/* Helper function for machine check handling. */
void ccw_device_trigger_reprobe(struct ccw_device *);
void ccw_device_kill_io(struct ccw_device *);
int ccw_device_notify(struct ccw_device *, int);
void ccw_device_set_disconnected(struct ccw_device *cdev);
void ccw_device_set_notoper(struct ccw_device *cdev);
void ccw_device_set_timeout(struct ccw_device *, int);
/* Channel measurement facility related */
void retry_set_schib(struct ccw_device *cdev);
void cmf_retry_copy_block(struct ccw_device *);
int cmf_reenable(struct ccw_device *);
void cmf_reactivate(void);
int ccw_set_cmf(struct ccw_device *cdev, int enable);
extern struct device_attribute dev_attr_cmb_enable;
#endif
|
#ifndef __LINUX_FT5X0X_TS_H__
#define __LINUX_FT5X0X_TS_H__
#define SCREEN_MAX_X 800
#define SCREEN_MAX_Y 480
#define PRESS_MAX 255
#define FT5X0X_NAME "ft5x0x_ts"
struct ft5x0x_ts_platform_data{
u16 x_res;
u16 y_res;
u16 pressure_min;
u16 pressure_max;
u16 reset; /* cy8c reset pin */
u16 intr; /* irq number */
u16 wake; /* wake gpio */
};
enum ft5x0x_ts_regs {
FT5X0X_REG_PMODE = 0xA5, /* Power Consume Mode */
};
//FT5X0X_REG_PMODE
#define PMODE_ACTIVE 0x00
#define PMODE_MONITOR 0x01
#define PMODE_STANDBY 0x02
#define PMODE_HIBERNATE 0x03
#endif
|
/************************************************************
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Hewlett-Packard not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
/***********************************************************************
*
* Request to open an extension input device.
*
*/
#define NEED_EVENTS
#define NEED_REPLIES
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <X11/X.h> /* for inputstr.h */
#include <X11/Xproto.h> /* Request macro */
#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "XIstubs.h"
#include "windowstr.h" /* window structure */
#include "extnsionst.h"
#include "extinit.h" /* LookupDeviceIntRec */
#include "exglobals.h"
#include "opendev.h"
extern CARD8 event_base[];
/***********************************************************************
*
* This procedure swaps the request if the server and client have different
* byte orderings.
*
*/
int
SProcXOpenDevice(ClientPtr client)
{
char n;
REQUEST(xOpenDeviceReq);
swaps(&stuff->length, n);
return (ProcXOpenDevice(client));
}
/***********************************************************************
*
* This procedure causes the server to open an input device.
*
*/
int
ProcXOpenDevice(ClientPtr client)
{
xInputClassInfo evbase[numInputClasses];
int j = 0;
int status = Success;
xOpenDeviceReply rep;
DeviceIntPtr dev;
REQUEST(xOpenDeviceReq);
REQUEST_SIZE_MATCH(xOpenDeviceReq);
if (stuff->deviceid == inputInfo.pointer->id ||
stuff->deviceid == inputInfo.keyboard->id) {
SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice);
return Success;
}
if ((dev = LookupDeviceIntRec(stuff->deviceid)) == NULL) { /* not open */
for (dev = inputInfo.off_devices; dev; dev = dev->next)
if (dev->id == stuff->deviceid)
break;
if (dev == NULL) {
SendErrorToClient(client, IReqCode, X_OpenDevice, 0, BadDevice);
return Success;
}
}
OpenInputDevice(dev, client, &status);
if (status != Success) {
SendErrorToClient(client, IReqCode, X_OpenDevice, 0, status);
return Success;
}
rep.repType = X_Reply;
rep.RepType = X_OpenDevice;
rep.sequenceNumber = client->sequence;
if (dev->key != NULL) {
evbase[j].class = KeyClass;
evbase[j++].event_type_base = event_base[KeyClass];
}
if (dev->button != NULL) {
evbase[j].class = ButtonClass;
evbase[j++].event_type_base = event_base[ButtonClass];
}
if (dev->valuator != NULL) {
evbase[j].class = ValuatorClass;
evbase[j++].event_type_base = event_base[ValuatorClass];
}
if (dev->kbdfeed != NULL || dev->ptrfeed != NULL || dev->leds != NULL ||
dev->intfeed != NULL || dev->bell != NULL || dev->stringfeed != NULL) {
evbase[j].class = FeedbackClass;
evbase[j++].event_type_base = event_base[FeedbackClass];
}
if (dev->focus != NULL) {
evbase[j].class = FocusClass;
evbase[j++].event_type_base = event_base[FocusClass];
}
if (dev->proximity != NULL) {
evbase[j].class = ProximityClass;
evbase[j++].event_type_base = event_base[ProximityClass];
}
evbase[j].class = OtherClass;
evbase[j++].event_type_base = event_base[OtherClass];
rep.length = (j * sizeof(xInputClassInfo) + 3) >> 2;
rep.num_classes = j;
WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep);
WriteToClient(client, j * sizeof(xInputClassInfo), (char *)evbase);
return (Success);
}
/***********************************************************************
*
* This procedure writes the reply for the XOpenDevice function,
* if the client and server have a different byte ordering.
*
*/
void
SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep)
{
char n;
swaps(&rep->sequenceNumber, n);
swapl(&rep->length, n);
WriteToClient(client, size, (char *)rep);
}
|
/***************************************************************************
aswriter.h - description
-------------------
begin : Sat Feb 08 2003
copyright : (C) 2003 by Alexander Blum
email : blum@kewbee.de
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef ASWRITER_H
#define ASWRITER_H
#include "simplecodegenerator.h"
#include "../umloperationlist.h"
#include "../umlassociationlist.h"
/**
* class ASWriter is a ActionScript code generator for UMLClassifier objects
* Just call writeClass and feed it a UMLClassifier;
*/
class ASWriter : public SimpleCodeGenerator {
Q_OBJECT
public:
ASWriter();
virtual ~ASWriter();
/**
* call this method to generate Actionscript code for a UMLClassifier
* @param c the class you want to generate code for.
*/
virtual void writeClass(UMLClassifier *c);
/**
* returns "ActionScript"
*/
virtual Uml::Programming_Language getLanguage();
/**
* get list of reserved keywords
*/
virtual const QStringList reservedKeywords() const;
private:
/**
* we do not want to write the comment "Private methods" twice
*/
bool bPrivateSectionCommentIsWritten;
/**
* write a list of class operations
*
* @param classname the name of the class
* @param opList the list of operations
* @param as output stream for the AS file
*/
void writeOperations(QString classname, UMLOperationList *opList, QTextStream &as);
/**
* write a list of associations
*
* @param classname the name of the class
* @param assocList the list of associations
* @param as output stream for the AS file
*/
void writeAssociation(QString& classname, UMLAssociationList& assoclist , QTextStream &as);
};
#endif //ASWRITER
|
#pragma once
/*
* Copyright (C) 2017 Team Kodi
* http://kodi.tv
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This Program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Kodi; see the file COPYING. If not, see
* <http://www.gnu.org/licenses/>.
*
*/
namespace kodi {
namespace addon {
enum CODEC_PROFILE
{
CodecProfileUnknown = 0,
CodecProfileNotNeeded,
H264CodecProfileBaseline,
H264CodecProfileMain,
H264CodecProfileExtended,
H264CodecProfileHigh,
H264CodecProfileHigh10,
H264CodecProfileHigh422,
H264CodecProfileHigh444Predictive
};
}
} |
/* -*- mode: c; c-basic-offset: 2 -*- */
/*
* Copyright (C) 2007-2012 David Bird (Coova Technologies) <support@coova.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "chilli.h"
int
cmdsock_init() {
struct sockaddr_un local;
int cmdsock;
if ((cmdsock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) {
syslog(LOG_ERR, "%s: could not allocate UNIX Socket!", strerror(errno));
} else {
local.sun_family = AF_UNIX;
strlcpy(local.sun_path, _options.cmdsocket, sizeof(local.sun_path));
unlink(local.sun_path);
if (bind(cmdsock, (struct sockaddr *)&local,
sizeof(struct sockaddr_un)) == -1) {
syslog(LOG_ERR, "%s: could bind UNIX Socket!", strerror(errno));
close(cmdsock);
cmdsock = -1;
} else {
if (listen(cmdsock, 5) == -1) {
syslog(LOG_ERR, "%s: could listen to UNIX Socket!", strerror(errno));
close(cmdsock);
cmdsock = -1;
} else {
if (_options.uid) {
if (chown(_options.cmdsocket, _options.uid, _options.gid)) {
syslog(LOG_ERR, "%d could not chown() %s",
errno, _options.cmdsocket);
}
}
}
}
}
return cmdsock;
}
int
cmdsock_port_init() {
struct sockaddr_in local;
int cmdsock;
int rc;
if ((cmdsock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
syslog(LOG_ERR, "%s: could not allocate commands socket!", strerror(errno));
} else {
memset(&local, 0, sizeof(local));
local.sin_family = AF_INET;
local.sin_addr.s_addr = INADDR_ANY;
local.sin_port = htons(_options.cmdsocketport);
rc = 1;
setsockopt(cmdsock,
SOL_SOCKET,
SO_REUSEADDR,
(char *)&rc,
sizeof(rc));
if (bind(cmdsock, (struct sockaddr *)&local,
sizeof(struct sockaddr_in)) == -1) {
syslog(LOG_ERR, "%s: could not bind commands socket!", strerror(errno));
close(cmdsock);
cmdsock = -1;
} else {
if (listen(cmdsock, 5) == -1) {
syslog(LOG_ERR, "%s: could not listen from commands socket!", strerror(errno));
close(cmdsock);
cmdsock = -1;
}
}
}
return cmdsock;
}
void cmdsock_shutdown(int s) {
if (s < 0) {
return;
}
syslog(LOG_DEBUG, "%s(%d): Shutting down cmdsocket", __FUNCTION__, __LINE__);
shutdown(s, 2);
close(s);
}
|
//------------------------------------------------------------------------------
// <copyright file="ar6000_api.h" company="Atheros">
// Copyright (c) 2004-2008 Atheros Corporation. All rights reserved.
//
// The software source and binaries included in this development package are
// licensed, not sold. You, or your company, received the package under one
// or more license agreements. The rights granted to you are specifically
// listed in these license agreement(s). All other rights remain with Atheros
// Communications, Inc., its subsidiaries, or the respective owner including
// those listed on the included copyright notices. Distribution of any
// portion of this package must be in strict compliance with the license
// agreement(s) terms.
// </copyright>
//
// <summary>
// Wifi driver for AR6002
// </summary>
//
//------------------------------------------------------------------------------
//==============================================================================
// This file contains the API to access the OS dependent atheros host driver
// by the WMI or WLAN generic modules.
//
// Author(s): ="Atheros"
//==============================================================================
#ifndef _AR6000_API_H_
#define _AR6000_API_H_
#if defined(__linux__) && !defined(LINUX_EMULATION)
#include "ar6xapi_linux.h"
#endif
#ifdef UNDER_NWIFI
#include "../os/windows/common/include/ar6xapi_wince.h"
#endif
#ifdef ATHR_CE_LEGACY
#include "../os/wince/include/ar6xapi_wince.h"
#endif
#ifdef REXOS
#include "../os/rexos/include/common/ar6xapi_rexos.h"
#endif
#endif /* _AR6000_API_H */
|
/***********************************************************************************
* Copyright 2006 - 2050, Hisilicon Tech. Co., Ltd.
* ALL RIGHTS RESERVED
* FileName: jpg_driver.h
* Description:
*
* History:
* Version Date Author DefectNum Description
* main\1 2008-03-27 d37024 Create this file.
***********************************************************************************/
#ifndef _JPG_DRIVER_H_
#define _JPG_DRIVER_H_
#include "hi_type.h"
#include "jpg_type.h"
#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif /* __cplusplus */
#endif /* __cplusplus */
/*******************************************************************************
* Function: HI_JPG_Open
* Description:
* Input:
* Output:
* Return: HI_SUCCESS:
* HI_FAILURE
* Others:
*******************************************************************************/
HI_S32 HI_JPG_Open(HI_VOID);
/*******************************************************************************
* Function: HI_JPG_Close
* Description:
* Input:
* Output: HI_SUCCESS
* HI_FAILURE
*
* Return:
* Others:
*******************************************************************************/
HI_S32 HI_JPG_Close(HI_VOID);
/*******************************************************************************
* Function: JPGDRV_GetDevice
* Description:
* Data Accessed:
* Data Updated:
* Input:
* Output:
* Return: HI_SUCCESS
* HI_ERR_JPG_DEV_NOOPEN
* HI_ERR_JPG_DEC_BUSY
* HI_FAILURE
* Others:
*******************************************************************************/
HI_S32 JPGDRV_GetDevice(HI_VOID);
/*******************************************************************************
* Function: JPGDRV_ReleaseDevice
* Description:
* Data Accessed:
* Data Updated:
* Input:
* Output:
* Return: HI_SUCCESS
* HI_ERR_JPG_DEV_NOOPEN
* HI_FAILURE
* Others:
*******************************************************************************/
HI_S32 JPGDRV_ReleaseDevice(HI_VOID);
/*******************************************************************************
* Function: JPGDRV_GetRegisterAddr
* Description:
* Data Accessed:
* Data Updated:
* Input:
* Output: pRegPtr
* Return: HI_SUCCESS
* HI_ERR_JPG_DEV_NOOPEN
* HI_FAILURE
* Others:
*******************************************************************************/
HI_S32 JPGDRV_GetRegisterAddr(HI_VOID **pRegPtr, HI_VOID **pRstRegPtr, HI_VOID **pVhbRegPtr);
/*******************************************************************************
* Function: JPGDRV_ReleaseRegAddr
* Description:
* Data Accessed:
* Data Updated:
* Input:
* Output: pRegPtr
* Return: HI_SUCCESS
* HI_ERR_JPG_DEV_NOOPEN
* HI_FAILURE
* Others:
*******************************************************************************/
HI_S32 JPGDRV_ReleaseRegAddr(HI_VOID *pRegPtr, HI_VOID *pRstRegPtr, HI_VOID *pVhbRegPtr);
/*******************************************************************************
* Function: JPGDRV_GetIntStatus
* Description:
* Data Accessed:
* Data Updated:
* Input: TimeOut
* Output: pu32IntStatus
* Return: HI_SUCCESS
* HI_ERR_JPG_DEV_NOOPEN
* HI_ERR_JPG_TIME_OUT
* HI_FAILURE
* Others:
*******************************************************************************/
HI_S32 JPGDRV_GetIntStatus(JPG_INTTYPE_E *pIntType, HI_U32 TimeOut);
#ifdef __cplusplus
#if __cplusplus
}
#endif /* __cplusplus */
#endif /* __cplusplus */
#endif /* _JPG_DRIVER_H_*/
|
#ifndef CONTROL_H
#define CONTROL_H
#include "oosmos.h"
#include <stdint.h>
typedef struct
{
oosmos_sEvent Event;
uint32_t ErrorNumber;
} control_sErrorEvent;
extern void controlSetup(void);
extern void controlLoop(void);
#endif
|
/**
******************************************************************************
* @file HCSR04.c
* @author Brandon Piner
* @version V1.0
* @date 21-September-2015
* @brief This file provides firmware functions to use a HCSR04
* ultrasonic distance sensor
*/
#include "HCSR04.h"
#include "Debug.h"
uint32_t Distance=0;
void HCSR04_Init()
{
GPIO_InitTypeDef GPIO_InitStructure;
/* GPIOA clock enable */
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
/* TIM2_CH1 pin (PA.00) and TIM2_CH2 pin (PA.01) configuration */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_DOWN;//NOPULL;
GPIO_Init(GPIOA, &GPIO_InitStructure);
TIM_ICInitTypeDef TIM_ICInitStructure;
NVIC_InitTypeDef NVIC_InitStructure;
/* TIM2 clock enable */
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
/* TIM2 channel2 configuration : PA.01 */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP ;
GPIO_Init(GPIOA, &GPIO_InitStructure);
/* Connect TIM pin to AF2 */
GPIO_PinAFConfig(GPIOA, GPIO_PinSource1, GPIO_AF_2);
/* Enable the TIM2 global Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
/* ---------------------------------------------------------------------------
TIM2 configuration: PWM Input mode
The external signal is connected to TIM2 CH2 pin (PA.01)
TIM2 CCR2 is used to compute the frequency value
TIM2 CCR1 is used to compute the duty cycle value
In this example TIM2 input clock (TIM2CLK) is set to APB1 clock (PCLK1), since
APB1 prescaler is set to 1.
TIM2CLK = PCLK1 = HCLK = SystemCoreClock
External Signal Frequency = SystemCoreClock / TIM2_CCR2 in Hz.
External Signal DutyCycle = (TIM2_CCR1*100)/(TIM2_CCR2) in %.
Note:
SystemCoreClock variable holds HCLK frequency and is defined in system_stm32f0xx.c file.
Each time the core clock (HCLK) changes, user had to call SystemCoreClockUpdate()
function to update SystemCoreClock variable value. Otherwise, any configuration
based on this variable will be incorrect.
--------------------------------------------------------------------------- */
TIM_ICInitStructure.TIM_Channel = TIM_Channel_2;
TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Rising;
TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI;
TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1;
TIM_ICInitStructure.TIM_ICFilter = 0x0;
TIM_PWMIConfig(TIM2, &TIM_ICInitStructure);
/* Select the TIM2 Input Trigger: TI2FP2 */
TIM_SelectInputTrigger(TIM2, TIM_TS_TI2FP2);
/* Select the slave Mode: Reset Mode */
TIM_SelectSlaveMode(TIM2, TIM_SlaveMode_Reset);
TIM_SelectMasterSlaveMode(TIM2,TIM_MasterSlaveMode_Enable);
/* TIM enable counter */
TIM_Cmd(TIM2, ENABLE);
/* Enable the CC2 Interrupt Request */
TIM_ITConfig(TIM2, TIM_IT_CC1, ENABLE);
}
void HCSR04_DeInit()
{
TIM_Cmd(TIM2, DISABLE);
}
/** \brief Sends 10us pulse on trigger pin
*
* \param
* \param
* \return
*
*/
void HCSR04_Read(HCSR04_t * HCSR04)
{
uint32_t i;
GPIO_SetBits(GPIOA, GPIO_Pin_0);
for(i=0; i<40; i++);
GPIO_ResetBits(GPIOA, GPIO_Pin_0);
HCSR04->Distance = Distance;
while(HCSR04->Distance == Distance);
HCSR04->Distance = Distance;
}
void TIM2_IRQHandler(void)
{
if(TIM_GetITStatus(TIM2, TIM_IT_CC1)!=RESET)
{
Distance = TIM_GetCapture1(TIM2);
//_printfLngU("D:", Distance);
TIM_ClearITPendingBit(TIM2, TIM_IT_CC1);
}
}
|
#ifndef __SP_SWITCH_H__
#define __SP_SWITCH_H__
/*
* SVG <switch> implementation
*
* Authors:
* Andrius R. <knutux@gmail.com>
*
* Copyright (C) 2006 authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "sp-item-group.h"
#include <stddef.h>
#include <sigc++/connection.h>
#define SP_TYPE_SWITCH (CSwitch::getType())
#define SP_SWITCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SWITCH, SPSwitch))
#define SP_SWITCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_SWITCH, SPSwitchClass))
#define SP_IS_SWITCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SWITCH))
#define SP_IS_SWITCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SWITCH))
/*
* Virtual methods of SPSwitch
*/
class CSwitch : public CGroup {
public:
CSwitch(SPGroup *group);
virtual ~CSwitch();
friend class SPSwitch;
static GType getType();
virtual void onChildAdded(Inkscape::XML::Node *child);
virtual void onChildRemoved(Inkscape::XML::Node *child);
virtual void onOrderChanged(Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref);
virtual gchar *getDescription();
protected:
virtual GSList *_childList(bool add_ref, SPObject::Action action);
virtual void _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags);
SPObject *_evaluateFirst();
void _reevaluate(bool add_to_arena = false);
static void _releaseItem(SPObject *obj, CSwitch *selection);
void _releaseLastItem(SPObject *obj);
private:
SPObject *_cached_item;
sigc::connection _release_connection;
};
struct SPSwitch : public SPGroup {
void resetChildEvaluated() { (static_cast<CSwitch *>(group))->_reevaluate(); }
};
struct SPSwitchClass : public SPGroupClass {
};
#endif
|
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ObjCCallbackFunction_h
#define ObjCCallbackFunction_h
#include <JavaScriptCore/JSBase.h>
#if JSC_OBJC_API_ENABLED
#import <JavaScriptCore/JSCallbackFunction.h>
#if defined(__OBJC__)
JSObjectRef objCCallbackFunctionForMethod(JSContext *, Class, Protocol *, BOOL isInstanceMethod, SEL, const char* types);
JSObjectRef objCCallbackFunctionForBlock(JSContext *, id);
JSObjectRef objCCallbackFunctionForInit(JSContext *, Class, Protocol *, SEL, const char* types);
id tryUnwrapConstructor(JSObjectRef);
#endif
namespace JSC {
class ObjCCallbackFunctionImpl;
class ObjCCallbackFunction : public InternalFunction {
friend struct APICallbackFunction;
public:
typedef InternalFunction Base;
static ObjCCallbackFunction* create(VM&, JSGlobalObject*, const String& name, PassOwnPtr<ObjCCallbackFunctionImpl>);
static void destroy(JSCell*);
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
ASSERT(globalObject);
return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
}
DECLARE_EXPORT_INFO;
ObjCCallbackFunctionImpl* impl() const { return m_impl.get(); }
protected:
ObjCCallbackFunction(VM&, JSGlobalObject*, JSObjectCallAsFunctionCallback, JSObjectCallAsConstructorCallback, PassOwnPtr<ObjCCallbackFunctionImpl>);
private:
static CallType getCallData(JSCell*, CallData&);
static ConstructType getConstructData(JSCell*, ConstructData&);
JSObjectCallAsFunctionCallback functionCallback() { return m_functionCallback; }
JSObjectCallAsConstructorCallback constructCallback() { return m_constructCallback; }
JSObjectCallAsFunctionCallback m_functionCallback;
JSObjectCallAsConstructorCallback m_constructCallback;
OwnPtr<ObjCCallbackFunctionImpl> m_impl;
};
} // namespace JSC
#endif
#endif // ObjCCallbackFunction_h
|
//
// "$Id$"
//
// GLUT compatibility header for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-1999 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems to "fltk-bugs@easysw.com".
//
#include <FL/glut.H>
//
// End of "$Id$".
//
|
/***************************************************************************
Copyright (C) 2007-2009 Robby Stephenson <robby@periapsis.org>
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License or (at your option) version 3 or any later version *
* accepted by the membership of KDE e.V. (or its successor approved *
* by the membership of KDE e.V.), which shall act as a proxy *
* defined in Section 14 of version 3 of the license. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
***************************************************************************/
#ifndef TELLICO_GCSTARPLUGINFETCHER_H
#define TELLICO_GCSTARPLUGINFETCHER_H
#include "fetcher.h"
#include "configwidget.h"
#include <QShowEvent>
#include <QLabel>
#include <QList>
class QLabel;
namespace Tellico {
namespace GUI {
class ComboBox;
class CollectionTypeCombo;
}
namespace Fetch {
class GCstarThread;
/**
* @author Robby Stephenson
*/
class GCstarPluginFetcher : public Fetcher {
Q_OBJECT
public:
GCstarPluginFetcher(QObject* parent);
/**
*/
virtual ~GCstarPluginFetcher();
virtual QString source() const;
virtual bool isSearching() const { return m_started; }
virtual bool canSearch(FetchKey k) const { return k == Title; }
virtual void stop();
virtual Data::EntryPtr fetchEntryHook(uint uid);
virtual Type type() const { return GCstarPlugin; }
virtual bool canFetch(int type) const;
virtual void readConfigHook(const KConfigGroup& config);
virtual Fetch::ConfigWidget* configWidget(QWidget* parent) const;
class ConfigWidget;
friend class ConfigWidget;
static QString defaultName();
static QString defaultIcon();
static StringHash allOptionalFields() { return StringHash(); }
private slots:
void slotData(const QByteArray& data);
void slotError(const QByteArray& data);
void slotProcessExited();
private:
virtual void search();
virtual FetchRequest updateRequest(Data::EntryPtr entry);
// map Author, Name, Lang, etc...
typedef QHash<QString, QVariant> PluginInfo;
typedef QList<PluginInfo> PluginList;
// map collection type to all available plugins
typedef QHash<int, PluginList> CollectionPlugins;
static CollectionPlugins collectionPlugins;
static PluginList plugins(int collType);
// we need to keep track if we've searched for plugins yet and by what method
enum PluginParse { NotYet, Old, New };
static PluginParse pluginParse;
static void readPluginsNew(int collType, const QString& exe);
static void readPluginsOld(int collType, const QString& exe);
static QString gcstarType(int collType);
bool m_started;
int m_collType;
QString m_plugin;
GCstarThread* m_thread;
QByteArray m_data;
QHash<int, Data::EntryPtr> m_entries; // map from search result id to entry
QStringList m_errors;
};
class GCstarPluginFetcher::ConfigWidget : public Fetch::ConfigWidget {
Q_OBJECT
public:
explicit ConfigWidget(QWidget* parent, const GCstarPluginFetcher* fetcher = 0);
~ConfigWidget();
virtual void saveConfigHook(KConfigGroup& config);
virtual QString preferredName() const;
private slots:
void slotTypeChanged();
void slotPluginChanged();
private:
void showEvent(QShowEvent* event);
bool m_needPluginList;
QString m_originalPluginName;
GUI::CollectionTypeCombo* m_collCombo;
GUI::ComboBox* m_pluginCombo;
QLabel* m_authorLabel;
QLabel* m_langLabel;
};
} // end namespace
} // end namespace
#endif
|
/**
* @file rtems/posix/posixapi.h
*/
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id: posixapi.h,v 1.10 2008/12/15 19:21:01 joel Exp $
*/
#ifndef _RTEMS_POSIX_POSIXAPI_H
#define _RTEMS_POSIX_POSIXAPI_H
#include <rtems/config.h>
/**
* @brief Initialize POSIX API
*
* This method is responsible for initializing each of the POSIX
* API managers.
*/
void _POSIX_API_Initialize(void);
#endif
/* end of include file */
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.