text
stringlengths
4
6.14k
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ #pragma once #include "createtablecommand.h" #include <QObject> namespace Internal { class TableWriteWorker : public QObject { Q_OBJECT public: explicit TableWriteWorker(QObject *parent = 0); ~TableWriteWorker(); void createTable(const CreateTableCommand &command); signals: void tableCreated(); }; } // namespace Internal
/****************************************************************************** QtAV: Multimedia framework based on Qt and FFmpeg Copyright (C) 2012-2016 Wang Bin <wbsecg1@gmail.com> * This file is part of QtAV (from 2013) 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.1 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ******************************************************************************/ #ifndef QTAV_AUDIORESAMPLER_H #define QTAV_AUDIORESAMPLER_H #include <QtAV/QtAV_Global.h> namespace QtAV { typedef int AudioResamplerId; class AudioFormat; class AudioResamplerPrivate; class Q_AV_EXPORT AudioResampler //export is required for users who want add their own subclass outside QtAV { DPTR_DECLARE_PRIVATE(AudioResampler) public: virtual ~AudioResampler(); // if QtAV is static linked (ios for example), components may be not automatically registered. Add registerAll() to workaround static void registerAll(); template<class C> static bool Register(AudioResamplerId id, const char* name) { return Register(id, create<C>, name);} static AudioResampler* create(AudioResamplerId id); /*! * \brief create * Create resampler from name * \param name can be "FFmpeg", "Libav" */ static AudioResampler* create(const char* name); /*! * \brief next * \param id NULL to get the first id address * \return address of id or NULL if not found/end */ static AudioResamplerId* next(AudioResamplerId* id = 0); static const char* name(AudioResamplerId id); static AudioResamplerId id(const char* name); QByteArray outData() const; /* check whether the parameters are supported. If not, you should use ff*/ /*! * \brief prepare * Check whether the parameters are supported and setup the resampler * setIn/OutXXX will call prepare() if format is changed */ virtual bool prepare(); virtual bool convert(const quint8** data); //speed: >0, default is 1 void setSpeed(qreal speed); //out_sample_rate = out_sample_rate/speed qreal speed() const; void setInAudioFormat(const AudioFormat& format); AudioFormat& inAudioFormat(); const AudioFormat& inAudioFormat() const; void setOutAudioFormat(const AudioFormat& format); AudioFormat& outAudioFormat(); const AudioFormat& outAudioFormat() const; //decoded frame's samples/channel void setInSampesPerChannel(int samples); // > 0 valid after resample done int outSamplesPerChannel() const; //channel count can be computed by av_get_channel_layout_nb_channels(chl) void setInSampleRate(int isr); void setOutSampleRate(int osr); //default is in //TODO: enum void setInSampleFormat(int isf); //FFmpeg sample format void setOutSampleFormat(int osf); //FFmpeg sample format. set by user. default is in //TODO: enum. layout will be set to the default layout of the channels if not defined void setInChannelLayout(qint64 icl); void setOutChannelLayout(qint64 ocl); //default is in void setInChannels(int channels); void setOutChannels(int channels); //Are getter functions required? private: AudioResampler(); template<class C> static AudioResampler* create() { return new C(); } typedef AudioResampler* (*AudioResamplerCreator)(); static bool Register(AudioResamplerId id, AudioResamplerCreator, const char *name); protected: AudioResampler(AudioResamplerPrivate& d); DPTR_DECLARE(AudioResampler) }; extern Q_AV_EXPORT AudioResamplerId AudioResamplerId_FF; extern Q_AV_EXPORT AudioResamplerId AudioResamplerId_Libav; } //namespace QtAV #endif // QTAV_AUDIORESAMPLER_H
// // DFTextImageUserLineCell.h // DFTimelineView // // Created by Allen Zhong on 15/10/15. // Copyright (c) 2015年 Datafans, Inc. All rights reserved. // #import "DFBaseUserLineCell.h" #import "DFTextImageUserLineItem.h" @interface DFTextImageUserLineCell : DFBaseUserLineCell @end
/* Copyright (©) 2003-2022 Teus Benschop. 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 3 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once #include <config/libraries.h> class Database_Privileges { public: static const char * database (); static void create (); static void upgrade (); static void optimize (); static bool healthy (); static string save (string username); static void load (string username, const string & data); static void setBibleBook (string username, string bible, int book, bool write); static void setBible (string username, string bible, bool write); static void getBibleBook (string username, string bible, int book, bool & read, bool & write); static tuple <bool, bool> getBible (string username, string bible); static int getBibleBookCount (); static bool getBibleBookExists (string username, string bible, int book); static void removeBibleBook (string username, string bible, int book); static void removeBible (string bible); static void setFeature (string username, int feature, bool enabled); static bool getFeature (string username, int feature); static void removeUser (string username); private: static const char * bibles_start (); static const char * bibles_end (); static const char * features_start (); static const char * features_end (); static const char * on (); static const char * off (); }; string database_privileges_directory (const string & user); string database_privileges_file (); string database_privileges_client_path (const string & user); void database_privileges_client_create (const string & user, bool force); void database_privileges_client_remove (const string & user);
/* count-trailing-zeros.h -- counts the number of trailing 0 bits in a word. Copyright 2013-2021 Free Software Foundation, Inc. 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 3 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 <https://www.gnu.org/licenses/>. */ /* Written by Paul Eggert. */ #ifndef COUNT_TRAILING_ZEROS_H #define COUNT_TRAILING_ZEROS_H 1 #include <limits.h> #include <stdlib.h> #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif _GL_INLINE_HEADER_BEGIN #ifndef COUNT_TRAILING_ZEROS_INLINE # define COUNT_TRAILING_ZEROS_INLINE _GL_INLINE #endif /* Assuming the GCC builtin is BUILTIN and the MSC builtin is MSC_BUILTIN, expand to code that computes the number of trailing zeros of the local variable 'x' of type TYPE (an unsigned integer type) and return it from the current function. */ #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) # define COUNT_TRAILING_ZEROS(BUILTIN, MSC_BUILTIN, TYPE) \ return x ? BUILTIN (x) : CHAR_BIT * sizeof x; #elif _MSC_VER # pragma intrinsic _BitScanForward # pragma intrinsic _BitScanForward64 # define COUNT_TRAILING_ZEROS(BUILTIN, MSC_BUILTIN, TYPE) \ do \ { \ unsigned long result; \ return MSC_BUILTIN (&result, x) ? result : CHAR_BIT * sizeof x; \ } \ while (0) #else # define COUNT_TRAILING_ZEROS(BUILTIN, MSC_BUILTIN, TYPE) \ do \ { \ int count = 0; \ if (! x) \ return CHAR_BIT * sizeof x; \ for (count = 0; \ (count < CHAR_BIT * sizeof x - 32 \ && ! (x & 0xffffffffU)); \ count += 32) \ x = x >> 31 >> 1; \ return count + count_trailing_zeros_32 (x); \ } \ while (0) /* Compute and return the number of trailing zeros in the least significant 32 bits of X. One of these bits must be nonzero. */ COUNT_TRAILING_ZEROS_INLINE int count_trailing_zeros_32 (unsigned int x) { /* <https://github.com/gibsjose/BitHacks> <https://www.fit.vutbr.cz/~ibarina/pub/bithacks.pdf> */ static const char de_Bruijn_lookup[32] = { 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 }; return de_Bruijn_lookup[(((x & -x) * 0x077cb531U) & 0xffffffffU) >> 27]; } #endif /* Compute and return the number of trailing zeros in X. */ COUNT_TRAILING_ZEROS_INLINE int count_trailing_zeros (unsigned int x) { COUNT_TRAILING_ZEROS (__builtin_ctz, _BitScanForward, unsigned int); } /* Compute and return the number of trailing zeros in X. */ COUNT_TRAILING_ZEROS_INLINE int count_trailing_zeros_l (unsigned long int x) { COUNT_TRAILING_ZEROS (__builtin_ctzl, _BitScanForward, unsigned long int); } #if HAVE_UNSIGNED_LONG_LONG_INT /* Compute and return the number of trailing zeros in X. */ COUNT_TRAILING_ZEROS_INLINE int count_trailing_zeros_ll (unsigned long long int x) { COUNT_TRAILING_ZEROS (__builtin_ctzll, _BitScanForward64, unsigned long long int); } #endif _GL_INLINE_HEADER_END #endif
/** * \file * * \brief User board configuration template * */ /* * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> */ #ifndef CONF_BOARD_H #define CONF_BOARD_H #define BOARD_XOSC_HZ 16000000UL #define BOARD_XOSC_TYPE XOSC_TYPE_XTAL #define BOARD_XOSC_STARTUP_US 1000 #endif // CONF_BOARD_H
/* * Generated by asn1c-0.9.24 (http://lionet.info/asn1c) * From ASN.1 module "InformationElements" * found in "../asn/InformationElements.asn" * `asn1c -fcompound-names -fnative-types` */ #ifndef _UE_Positioning_OTDOA_ReferenceCellInfo_UEB_H_ #define _UE_Positioning_OTDOA_ReferenceCellInfo_UEB_H_ #include <asn_application.h> /* Including external dependencies */ #include <NativeInteger.h> #include "PrimaryCPICH-Info.h" #include <constr_SEQUENCE.h> #include "CellAndChannelIdentity.h" #include <constr_CHOICE.h> #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum UE_Positioning_OTDOA_ReferenceCellInfo_UEB__modeSpecificInfo_PR { UE_Positioning_OTDOA_ReferenceCellInfo_UEB__modeSpecificInfo_PR_NOTHING, /* No components present */ UE_Positioning_OTDOA_ReferenceCellInfo_UEB__modeSpecificInfo_PR_fdd, UE_Positioning_OTDOA_ReferenceCellInfo_UEB__modeSpecificInfo_PR_tdd } UE_Positioning_OTDOA_ReferenceCellInfo_UEB__modeSpecificInfo_PR; /* Forward declarations */ struct FrequencyInfo; struct ReferenceCellPosition; struct UE_Positioning_IPDL_Parameters; /* UE-Positioning-OTDOA-ReferenceCellInfo-UEB */ typedef struct UE_Positioning_OTDOA_ReferenceCellInfo_UEB { long *sfn /* OPTIONAL */; struct UE_Positioning_OTDOA_ReferenceCellInfo_UEB__modeSpecificInfo { UE_Positioning_OTDOA_ReferenceCellInfo_UEB__modeSpecificInfo_PR present; union UE_Positioning_OTDOA_ReferenceCellInfo_UEB__modeSpecificInfo_u { struct UE_Positioning_OTDOA_ReferenceCellInfo_UEB__modeSpecificInfo__fdd { PrimaryCPICH_Info_t primaryCPICH_Info; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } fdd; struct UE_Positioning_OTDOA_ReferenceCellInfo_UEB__modeSpecificInfo__tdd { CellAndChannelIdentity_t cellAndChannelIdentity; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } tdd; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } modeSpecificInfo; struct FrequencyInfo *frequencyInfo /* OPTIONAL */; struct ReferenceCellPosition *cellPosition /* OPTIONAL */; long *roundTripTime /* OPTIONAL */; struct UE_Positioning_IPDL_Parameters *ue_positioning_IPDL_Paremeters /* OPTIONAL */; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } UE_Positioning_OTDOA_ReferenceCellInfo_UEB_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_UE_Positioning_OTDOA_ReferenceCellInfo_UEB; #ifdef __cplusplus } #endif /* Referred external types */ #include "FrequencyInfo.h" #include "ReferenceCellPosition.h" #include "UE-Positioning-IPDL-Parameters.h" #endif /* _UE_Positioning_OTDOA_ReferenceCellInfo_UEB_H_ */ #include <asn_internal.h>
#ifndef _GLUTILS_H_ #define _GLUTILS_H_ #include <GL/glew.h> GLuint compile_shader(const char * shader_source, GLenum shader_type); GLuint load_shaders(const char * vertex_shader_source,const char * fragment_shader_source); #endif // _GLUTILS_H_
/* * Copyright (c) 2016, ARM Limited and Contributors. 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 ARM 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 __GENERIC_DELAY_TIMER_H__ #define __GENERIC_DELAY_TIMER_H__ #include <stdint.h> void generic_delay_timer_init_args(uint32_t mult, uint32_t div); void generic_delay_timer_init(void); #endif /* __GENERIC_DELAY_TIMER_H__ */
/* * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ #include <stdio.h> int __attribute__((weak)) myfunc() { return 0; } int __attribute__((weak)) foo() { return myfunc(); } int (*myfuncproc)() = &myfunc; int bar() { return (*myfuncproc)(); }
#ifndef UI_H_ #define UI_H_ #include "engine.h" void UI_buildui(IBusHandwriteEngine * engine); void UI_show_ui(IBusHandwriteEngine * engine); void UI_hide_ui(IBusHandwriteEngine * engine); void UI_cancelui(IBusHandwriteEngine* engine); //Cancel #endif /* UI_H_ */
/* * SVQ1 decoder * ported to MPlayer by Arpi <arpi@thot.banki.hu> * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru> * * Copyright (C) 2002 the xine project * Copyright (C) 2002 the ffmpeg project * * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net> * * 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 */ /** * @file svq1.h * Sorenson Vector Quantizer #1 (SVQ1) video codec. * For more information of the SVQ1 algorithm, visit: * http://www.pcisys.net/~melanson/codecs/ */ #ifndef AVCODEC_SVQ1_H #define AVCODEC_SVQ1_H #include <stdint.h> #define SVQ1_BLOCK_SKIP 0 #define SVQ1_BLOCK_INTER 1 #define SVQ1_BLOCK_INTER_4V 2 #define SVQ1_BLOCK_INTRA 3 typedef struct { int width; int height; } svq1_frame_size_t; uint16_t ff_svq1_packet_checksum (const uint8_t *data, const int length, int value); extern const int8_t* const ff_svq1_inter_codebooks[6]; extern const int8_t* const ff_svq1_intra_codebooks[6]; extern const uint8_t ff_svq1_block_type_vlc[4][2]; extern const uint8_t ff_svq1_intra_multistage_vlc[6][8][2]; extern const uint8_t ff_svq1_inter_multistage_vlc[6][8][2]; extern const uint16_t ff_svq1_intra_mean_vlc[256][2]; extern const uint16_t ff_svq1_inter_mean_vlc[512][2]; extern const svq1_frame_size_t ff_svq1_frame_size_table[8]; #endif /* AVCODEC_SVQ1_H */
/* Copyright 2011 Matt Bennett This file is part of uavcamera. uavcamera 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 3 of the License, or (at your option) any later version. uavcamera 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 uavcamera. If not, see <http://www.gnu.org/licenses/>. */ // Base definitions and types #ifndef __BASE_H #define __BASE_H // Definitions #define P0 1013.25f // standard pressure (in mb) at sea level #define T0 288.15f // standard temperature (in K) [15 deg C] #define L0 0.0065f // standard temperature lapse rate (in K/m) #define R_AIR 287.053f // specific gas constant for dry air (in J/(kg.K)) #define GRAVITY 9.81f // in ms^-2 #define TRUE 1u #define FALSE 0u #ifndef NULL #define NULL 0u #endif #define DEG_TO_RAD 0.0174532925199433f #define HALF_PI 1.5707963267948966f #define THREE_QUARTERS_PI 2.3561944901923449f #define ONE_POINT_FIVE_PI 4.7123889803846899f #define TWO_PI 6.2831853071795862f #define PI 3.1415926535897931f typedef unsigned char uint8_t; typedef signed char int8_t; typedef unsigned int uint16_t; typedef signed int int16_t; typedef unsigned long int uint32_t; typedef signed long int int32_t; typedef float float32_t; typedef double float64_t; typedef unsigned char boolean_t; // Public globals // Function prototypes #endif // __BASE_H
/************************************************************************** * (c) Copyright 2012 Microsemi SoC Products Group. All rights reserved. * * Smartfusion2 system configuration. * - Automatically created by Microsemi Libero SoC Sun May 05 13:12:03 2013 * * Warning: Do not modify this file, it may lead to unexpected * functional failures in your Microcontroller Subsystem. */ #ifndef SYS_CONFIG_MSS_CLOCKS #define SYS_CONFIG_MSS_CLOCKS #define MSS_SYS_M3_CLK_FREQ 50000000u #define MSS_SYS_MDDR_CLK_FREQ 200000000u #define MSS_SYS_APB_0_CLK_FREQ 50000000u #define MSS_SYS_APB_1_CLK_FREQ 50000000u #define MSS_SYS_APB_2_CLK_FREQ 12500000u #define MSS_SYS_FIC_0_CLK_FREQ 50000000u #define MSS_SYS_FIC_1_CLK_FREQ 50000000u #define MSS_SYS_FIC64_CLK_FREQ 50000000u #endif /* SYS_CONFIG_MSS_CLOCKS */
/* --------------------------------------------------------------------------------------- This source file is part of SWG:ANH (Star Wars Galaxies - A New Hope - Server Emulator) For more information, visit http://www.swganh.com Copyright (c) 2006 - 2010 The SWG:ANH Team --------------------------------------------------------------------------------------- Use of this source code is governed by the GPL v3 license that can be found in the COPYING file or at http://www.gnu.org/licenses/gpl-3.0.html 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.1 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --------------------------------------------------------------------------------------- */ #ifndef ANH_NETWORKMANAGER_NETWORKCALLBACK_H #define ANH_NETWORKMANAGER_NETWORKCALLBACK_H //====================================================================================================================== class Session; class Service; class NetworkClient; class Message; //====================================================================================================================== class NetworkCallback { public: virtual NetworkClient* handleSessionConnect(Session* session, Service* service) { return (NetworkClient*)-1; }; virtual void handleSessionDisconnect(NetworkClient* client) {}; virtual void handleSessionMessage(NetworkClient* client, Message* message) {}; private: }; //====================================================================================================================== #endif //ANH_NETWORKMANAGER_NETWORKCALLBACK_H
/* * Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved. * * The information contained herein is confidential property of Nordic Semiconductor. The use, * copying, transfer or disclosure of such information is prohibited except by express written * agreement with Nordic Semiconductor. * */ /** @file * @brief Utilities for verifying program logic */ #ifndef NRF_ASSERT_H_ #define NRF_ASSERT_H_ #include <stdint.h> //#include "compiler_abstraction.h" #if defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) /** @brief Function for handling assertions. * * * @note * This function is called when an assertion has triggered. * * * @post * All hardware is put into an idle non-emitting state (in particular the radio is highly * important to switch off since the radio might be in a state that makes it send * packets continiously while a typical final infinit ASSERT loop is executing). * * * @param line_num The line number where the assertion is called * @param file_name Pointer to the file name */ void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name); /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \ /** @brief Function for checking intended for production code. * * Check passes if "expr" evaluates to true. */ #define ASSERT(expr) \ if (expr) \ { \ } \ else \ { \ assert_nrf_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \ } #else #define ASSERT(expr) //!< Assert empty when disabled void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name); #endif /* defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) */ #endif /* NRF_ASSERT_H_ */
/************************************************************************** ** ** Copyright (C) 2014 Openismus GmbH. ** Authors: Peter Penz (ppenz@openismus.com) ** Patricia Santana Cruz (patriciasantanacruz@gmail.com) ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef AUTOTOOLSPROJECTFILE_H #define AUTOTOOLSPROJECTFILE_H #include <coreplugin/idocument.h> namespace AutotoolsProjectManager { namespace Internal { class AutotoolsProject; /** * @brief Implementation of the Core::IDocument interface. * * Is used in AutotoolsProject and describes the root * of a project. In the context of autotools the implementation * is mostly empty, as the modification of a project is * done by several Makefile.am files and the configure.ac file. * * @see AutotoolsProject */ class AutotoolsProjectFile : public Core::IDocument { Q_OBJECT public: AutotoolsProjectFile(AutotoolsProject *project, const QString &fileName); bool save(QString *errorString, const QString &fileName, bool autoSave); QString defaultPath() const; QString suggestedFileName() const; QString mimeType() const; bool isModified() const; bool isSaveAsAllowed() const; bool reload(QString *errorString, ReloadFlag flag, ChangeType type); private: AutotoolsProject *m_project; }; } // namespace Internal } // namespace AutotoolsProjectManager #endif // AUTOTOOLSPROJECTFILE_H
/* Work around platform bugs in stat. Copyright (C) 2009-2015 Free Software Foundation, Inc. This program 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. 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* written by Eric Blake */ /* If the user's config.h happens to include <sys/stat.h>, let it include only the system's <sys/stat.h> here, so that orig_stat doesn't recurse to rpl_stat. */ #define __need_system_sys_stat_h #include <config.h> /* Get the original definition of stat. It might be defined as a macro. */ #include <sys/types.h> #include <sys/stat.h> #undef __need_system_sys_stat_h #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # if _GL_WINDOWS_64_BIT_ST_SIZE # undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ # define stat _stati64 # define REPLACE_FUNC_STAT_DIR 1 # undef REPLACE_FUNC_STAT_FILE # elif REPLACE_FUNC_STAT_FILE /* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a. Bypass it. */ # define stat _stat # define REPLACE_FUNC_STAT_DIR 1 # undef REPLACE_FUNC_STAT_FILE # endif #endif static int orig_stat (const char *filename, struct stat *buf) { return stat (filename, buf); } /* Specification. */ /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include <sys/stat.h> above. */ #include "sys/stat.h" #include <errno.h> #include <limits.h> #include <stdbool.h> #include <string.h> #include "dosname.h" #include "verify.h" #if REPLACE_FUNC_STAT_DIR # include "pathmax.h" /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also have a constant PATH_MAX. */ # ifndef PATH_MAX # error "Please port this replacement to your platform" # endif #endif /* Store information about NAME into ST. Work around bugs with trailing slashes. Mingw has other bugs (such as st_ino always being 0 on success) which this wrapper does not work around. But at least this implementation provides the ability to emulate fchdir correctly. */ int rpl_stat (char const *name, struct stat *st) { int result = orig_stat (name, st); #if REPLACE_FUNC_STAT_FILE /* Solaris 9 mistakenly succeeds when given a non-directory with a trailing slash. */ if (result == 0 && !S_ISDIR (st->st_mode)) { size_t len = strlen (name); if (ISSLASH (name[len - 1])) { errno = ENOTDIR; return -1; } } #endif /* REPLACE_FUNC_STAT_FILE */ #if REPLACE_FUNC_STAT_DIR if (result == -1 && errno == ENOENT) { /* Due to mingw's oddities, there are some directories (like c:\) where stat() only succeeds with a trailing slash, and other directories (like c:\windows) where stat() only succeeds without a trailing slash. But we want the two to be synonymous, since chdir() manages either style. Likewise, Mingw also reports ENOENT for names longer than PATH_MAX, when we want ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR. Fortunately, mingw PATH_MAX is small enough for stack allocation. */ char fixed_name[PATH_MAX + 1] = {0}; size_t len = strlen (name); bool check_dir = false; verify (PATH_MAX <= 4096); if (PATH_MAX <= len) errno = ENAMETOOLONG; else if (len) { strcpy (fixed_name, name); if (ISSLASH (fixed_name[len - 1])) { check_dir = true; while (len && ISSLASH (fixed_name[len - 1])) fixed_name[--len] = '\0'; if (!len) fixed_name[0] = '/'; } else fixed_name[len++] = '/'; result = orig_stat (fixed_name, st); if (result == 0 && check_dir && !S_ISDIR (st->st_mode)) { result = -1; errno = ENOTDIR; } } } #endif /* REPLACE_FUNC_STAT_DIR */ return result; }
/*************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (testabilitydriver@nokia.com) ** ** This file is part of Testability Driver Qt Agent ** ** If you have questions regarding the use of this file, please contact ** Nokia at testabilitydriver@nokia.com . ** ** This library is free software; you can redistribute it and/or ** modify it under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation ** and appearing in the file LICENSE.LGPL included in the packaging ** of this file. ** ****************************************************************************/ #ifndef SDFIXTUREPLUGIN_H #define SDFIXTUREPLUGIN_H #include <QObject> #include <tasqtfixtureplugininterface.h> class SdFixture : public QObject, public TasFixturePluginInterface { Q_OBJECT Q_INTERFACES(TasFixturePluginInterface) public: SdFixture(QObject* parent=0); ~SdFixture(); bool execute(void* objectInstance, QString actionName, QHash<QString, QString> parameters, QString & stdOut); void debug(QString line); }; #endif
/* * This file is part of Cockpit. * * Copyright (C) 2016 Red Hat, Inc. * * Cockpit 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. * * Cockpit 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 Cockpit; If not, see <http://www.gnu.org/licenses/>. */ #include "config.h" #include "cockpitdbusinternal.h" #include "common/cockpitsystem.h" #include <systemd/sd-login.h> #include <errno.h> #include <stdlib.h> static GVariant * build_environment (void) { GVariantBuilder builder; GVariant *variant; gchar **environ = g_listenv (); gint i; g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{ss}")); for (i = 0; environ[i] != NULL; i++) { const gchar *value = g_getenv (environ[i]); if (value) g_variant_builder_add (&builder, "{ss}", environ[i], value); } g_strfreev (environ); variant = g_variant_builder_end (&builder); return variant; } static GVariant * lookup_session_id (void) { GVariant *variant; char *session_id; pid_t pid; int res; pid = getppid (); res = sd_pid_get_session (pid, &session_id); if (res == 0) { variant = g_variant_new_string (session_id); free (session_id); return variant; } else { if (res != -ENODATA && res != -ENXIO) g_message ("could not look up session id for bridge process: %u: %s", pid, g_strerror (-res)); return g_variant_new_string (""); } } static GVariant * process_get_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GError **error, gpointer user_data) { g_return_val_if_fail (property_name != NULL, NULL); if (g_str_equal (property_name, "Pid")) return g_variant_new_uint32 (getpid ()); else if (g_str_equal (property_name, "Uid")) return g_variant_new_int32 (getuid ()); else if (g_str_equal (property_name, "SessionId")) return lookup_session_id (); else if (g_str_equal (property_name, "StartTime")) return g_variant_new_uint64 (cockpit_system_process_start_time ()); else if (g_str_equal (property_name, "Environment") || g_str_equal (property_name, "Variables")) return build_environment (); else g_return_val_if_reached (NULL); } static GDBusInterfaceVTable process_vtable = { .get_property = process_get_property, }; static GDBusPropertyInfo pid_property = { -1, "Pid", "u", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL }; static GDBusPropertyInfo uid_property = { -1, "Uid", "i", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL }; static GDBusPropertyInfo start_time_property = { -1, "StartTime", "t", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL }; static GDBusPropertyInfo session_id_property = { -1, "SessionId", "s", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL, }; static GDBusPropertyInfo environment_property = { -1, "Environment", "a{ss}", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL }; static GDBusPropertyInfo *process_properties[] = { &pid_property, &uid_property, &start_time_property, &session_id_property, &environment_property, NULL }; static GDBusInterfaceInfo process_interface = { -1, "cockpit.Process", NULL, NULL, process_properties, NULL }; static GDBusPropertyInfo variables_property = { -1, "Variables", "a{ss}", G_DBUS_PROPERTY_INFO_FLAGS_READABLE, NULL }; static GDBusPropertyInfo *environment_properties[] = { &variables_property, NULL }; static GDBusInterfaceInfo environment_interface = { -1, "cockpit.Environment", NULL, NULL, environment_properties, NULL }; void cockpit_dbus_process_startup (void) { GDBusConnection *connection; GError *error = NULL; connection = cockpit_dbus_internal_server (); g_return_if_fail (connection != NULL); g_dbus_connection_register_object (connection, "/environment", &environment_interface, &process_vtable, NULL, NULL, &error); if (error != NULL) { g_critical ("couldn't register DBus cockpit.Environment object: %s", error->message); g_error_free (error); } g_dbus_connection_register_object (connection, "/bridge", &process_interface, &process_vtable, NULL, NULL, &error); if (error != NULL) { g_critical ("couldn't register DBus cockpit.Process object: %s", error->message); g_error_free (error); } g_object_unref (connection); }
/* base class for all resample operations * * properties: * - one in, one out * - not point-to-point * - size can change in any way * - bands, type, format etc. all fixed */ /* Copyright (C) 1991-2005 The National Gallery 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.1 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ /* #define DEBUG */ #ifdef HAVE_CONFIG_H #include <config.h> #endif /*HAVE_CONFIG_H*/ #include <vips/intl.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <vips/vips.h> #include <vips/internal.h> #include "presample.h" G_DEFINE_ABSTRACT_TYPE( VipsResample, vips_resample, VIPS_TYPE_OPERATION ); static int vips_resample_build( VipsObject *object ) { VipsResample *resample = VIPS_RESAMPLE( object ); #ifdef DEBUG printf( "vips_resample_build: " ); vips_object_print_name( object ); printf( "\n" ); #endif /*DEBUG*/ g_object_set( resample, "out", vips_image_new(), NULL ); if( VIPS_OBJECT_CLASS( vips_resample_parent_class )->build( object ) ) return( -1 ); return( 0 ); } static void vips_resample_class_init( VipsResampleClass *class ) { GObjectClass *gobject_class = G_OBJECT_CLASS( class ); VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); gobject_class->set_property = vips_object_set_property; gobject_class->get_property = vips_object_get_property; vobject_class->nickname = "resample"; vobject_class->description = _( "resample operations" ); vobject_class->build = vips_resample_build; VIPS_ARG_IMAGE( class, "in", 1, _( "Input" ), _( "Input image argument" ), VIPS_ARGUMENT_REQUIRED_INPUT, G_STRUCT_OFFSET( VipsResample, in ) ); VIPS_ARG_IMAGE( class, "out", 2, _( "Output" ), _( "Output image" ), VIPS_ARGUMENT_REQUIRED_OUTPUT, G_STRUCT_OFFSET( VipsResample, out ) ); } static void vips_resample_init( VipsResample *resample ) { } /* Called from iofuncs to init all operations in this dir. Use a plugin system * instead? */ void vips_resample_operation_init( void ) { extern GType vips_shrink_get_type( void ); extern GType vips_quadratic_get_type( void ); extern GType vips_affine_get_type( void ); extern GType vips_similarity_get_type( void ); extern GType vips_resize_get_type( void ); vips_shrink_get_type(); vips_quadratic_get_type(); vips_affine_get_type(); vips_similarity_get_type(); vips_resize_get_type(); }
// // This file is part of the Marble Virtual Globe. // // This program is free software licensed under the GNU LGPL. You can // find a copy of this license in LICENSE.txt in the top directory of // the source code. // // Copyright 2010 Dennis Nienhüser <earthwings@gentoo.org> // #ifndef MARBLE_DECLARATIVE_PLUGIN_H #define MARBLE_DECLARATIVE_PLUGIN_H #include <QtDeclarative/QDeclarativeExtensionPlugin> /** * Registers MarbleWidget, MarbleRunnerManager and MarbleThemeManager * as QDeclarative extensions for use in QML. */ class MarbleDeclarativePlugin : public QDeclarativeExtensionPlugin { Q_OBJECT public: /** Overriding QDeclarativeExtensionPlugin to register types */ virtual void registerTypes( const char *uri ); /** Overriding QDeclarativeExtensionPlugin to register image provider */ void initializeEngine( QDeclarativeEngine *engine, const char *); }; #endif
/* * Motif * * Copyright (c) 1987-2012, The Open Group. All rights reserved. * * These libraries and programs are free software; you can * redistribute them and/or modify them under the terms of the GNU * Lesser General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) * any later version. * * These libraries and programs are distributed in the hope that * they 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 these librararies and programs; if not, write * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ /* * HISTORY */ /* $XConsortium: Uil.h /main/11 1995/07/14 09:32:19 drk $ */ /* * (c) Copyright 1989, 1990, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */ /* **++ ** FACILITY: ** ** User Interface Language Compiler (UIL) ** ** ABSTRACT: ** ** This include file defines the set of definitions for use with ** UIL compiler callable interface. ** **-- **/ #ifndef Uil_h #define Uil_h /* ** ** INCLUDE FILES ** **/ /* ** ** Definition of Compiler Severity Statuses ** */ typedef unsigned int Uil_status_type; #define Uil_k_min_status 0 #define Uil_k_success_status 0 #define Uil_k_info_status 1 #define Uil_k_warning_status 2 #define Uil_k_error_status 3 #define Uil_k_severe_status 4 #define Uil_k_max_status 4 /* ** */ typedef char (*string_array)[]; #define CEIL(a,b) ((a) < (b) ? (a) : (b)) /* ** Uil_command_type -- Input which describes how/what to compile. */ typedef struct _Uil_command_type { char *source_file; /* single source to compile */ char *resource_file; /* name of output file */ char *listing_file; /* name of listing file */ unsigned int include_dir_count; /* number of directories in */ /* include_dir array */ char **include_dir; /* directory to search for */ /* includes files */ unsigned listing_file_flag: 1; /* produce a listing */ unsigned resource_file_flag: 1; /* generate UID output */ unsigned machine_code_flag : 1; /* generate machine code */ unsigned report_info_msg_flag: 1;/* report info messages */ unsigned report_warn_msg_flag: 1;/* report warnings */ unsigned parse_tree_flag: 1; /* generate parse tree */ unsigned issue_summary: 1; /* issue diagnostics summary */ unsigned int status_update_delay; /* Number of times a status */ /* point is passed before */ /* calling statusCB routine */ /* 0 means called every time */ char *database; /* name of database file */ unsigned database_flag: 1; /* read a new database file */ unsigned use_setlocale_flag: 1; /* Enable calls to setlocale */ } Uil_command_type; /* ** Uil_compile_desc_type -- Output information about the compilation including ** the compiler_version, data_structure_version, parse tree, and error counts. */ typedef struct _Uil_comp_desc { unsigned int compiler_version; /* version number of Compiler */ unsigned int data_version; /* version number of structures */ char *parse_tree_root; /* parse tree output */ unsigned int message_count[Uil_k_max_status+1]; /* array of severity counts */ } Uil_compile_desc_type; /* ** Uil_continue_type -- A value returned from a Uil callback routine which ** allows the application to specify whether to terminate or continue the ** compilation. */ typedef unsigned int Uil_continue_type; #define Uil_k_terminate 0 #define Uil_k_continue 1 /* ** ** Entry Points ** */ #ifndef _ARGUMENTS #define _ARGUMENTS(arglist) arglist #endif #if defined(__cplusplus) || defined(c_plusplus) extern "C" { #endif extern Uil_status_type Uil _ARGUMENTS(( Uil_command_type *command_desc , Uil_compile_desc_type *compile_desc , Uil_continue_type (*message_cb )(), char *message_data , Uil_continue_type (*status_cb )(), char *status_data )); #if defined(__cplusplus) || defined(c_plusplus) } #endif #undef _ARGUMENTS #endif /* Uil_h */ /* DON'T ADD STUFF AFTER THIS #endif */
// Copyright (c)2008-2011, Preferred Infrastructure 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: // // * 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 Preferred Infrastructure nor the names of other // 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 JUBATUS_UTIL_LANG_WEAK_PTR_H_ #define JUBATUS_UTIL_LANG_WEAK_PTR_H_ #include <memory> #ifdef __GLIBCXX__ #include <tr1/memory> #endif namespace jubatus { namespace util { namespace lang { namespace detail { #ifdef __GLIBCXX__ namespace weak_ptr_ns = ::std::tr1; #else namespace weak_ptr_ns = ::std; #endif } template <class T, class TM> class shared_ptr; template <class T> class weak_ptr : public detail::weak_ptr_ns::weak_ptr<T> { typedef detail::weak_ptr_ns::weak_ptr<T> base; public: weak_ptr() {} template <class U, class UM> weak_ptr(const shared_ptr<U, UM>& p) : base(p) {} template <class U> weak_ptr(const weak_ptr<U>& p) : base(p) {} template <class U> weak_ptr& operator=(const weak_ptr<U>& p) { base::operator=(p); return *this; } template <class U, class UM> weak_ptr& operator=(const shared_ptr<U, UM>& p) { base::operator=(p); return *this; } shared_ptr<T> lock() const { return shared_ptr<T>(base::lock()); } }; } // lang } // util } // jubatus #endif // #ifndef JUBATUS_UTIL_LANG_WEAK_PTR_H_
/**************************************************************************** ** ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the tools applications of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. #ifndef QApplicationArgument_H #define QApplicationArgument_H #include <QtCore/QVariant> QT_BEGIN_HEADER QT_BEGIN_NAMESPACE class QString; class QApplicationArgumentPrivate; class QApplicationArgument { public: QApplicationArgument(); QApplicationArgument(const QApplicationArgument &other); QApplicationArgument(const QString &name, const QString &description, int aType = QVariant::Invalid); ~QApplicationArgument(); QApplicationArgument &operator=(const QApplicationArgument &other); bool operator==(const QApplicationArgument &other) const; void setName(const QString &newName); QString name() const; void setDescription(const QString &newDescription); QString description() const; int type() const; void setType(int newType); void setDefaultValue(const QVariant &value); QVariant defaultValue() const; void setMinimumOccurrence(int minimum); int minimumOccurrence() const; void setMaximumOccurrence(int maximum); int maximumOccurrence() const; void setNameless(bool value); bool isNameless() const; private: QApplicationArgumentPrivate *d_ptr; }; uint qHash(const QApplicationArgument &argument); QT_END_NAMESPACE QT_END_HEADER #endif
#include <jni.h> #include <errno.h> #include <string.h> #include <unistd.h> #include <sys/resource.h> #include <android/log.h>
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/waf-regional/WAFRegional_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace WAFRegional { namespace Model { class AWS_WAFREGIONAL_API GetChangeTokenResult { public: GetChangeTokenResult(); GetChangeTokenResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); GetChangeTokenResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); /** * <p>The <code>ChangeToken</code> that you used in the request. Use this value in * a <code>GetChangeTokenStatus</code> request to get the current status of the * request. </p> */ inline const Aws::String& GetChangeToken() const{ return m_changeToken; } /** * <p>The <code>ChangeToken</code> that you used in the request. Use this value in * a <code>GetChangeTokenStatus</code> request to get the current status of the * request. </p> */ inline void SetChangeToken(const Aws::String& value) { m_changeToken = value; } /** * <p>The <code>ChangeToken</code> that you used in the request. Use this value in * a <code>GetChangeTokenStatus</code> request to get the current status of the * request. </p> */ inline void SetChangeToken(Aws::String&& value) { m_changeToken = std::move(value); } /** * <p>The <code>ChangeToken</code> that you used in the request. Use this value in * a <code>GetChangeTokenStatus</code> request to get the current status of the * request. </p> */ inline void SetChangeToken(const char* value) { m_changeToken.assign(value); } /** * <p>The <code>ChangeToken</code> that you used in the request. Use this value in * a <code>GetChangeTokenStatus</code> request to get the current status of the * request. </p> */ inline GetChangeTokenResult& WithChangeToken(const Aws::String& value) { SetChangeToken(value); return *this;} /** * <p>The <code>ChangeToken</code> that you used in the request. Use this value in * a <code>GetChangeTokenStatus</code> request to get the current status of the * request. </p> */ inline GetChangeTokenResult& WithChangeToken(Aws::String&& value) { SetChangeToken(std::move(value)); return *this;} /** * <p>The <code>ChangeToken</code> that you used in the request. Use this value in * a <code>GetChangeTokenStatus</code> request to get the current status of the * request. </p> */ inline GetChangeTokenResult& WithChangeToken(const char* value) { SetChangeToken(value); return *this;} private: Aws::String m_changeToken; }; } // namespace Model } // namespace WAFRegional } // namespace Aws
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/mediaconvert/MediaConvert_EXPORTS.h> #include <aws/mediaconvert/model/JobTemplate.h> #include <utility> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace MediaConvert { namespace Model { class AWS_MEDIACONVERT_API GetJobTemplateResult { public: GetJobTemplateResult(); GetJobTemplateResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); GetJobTemplateResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); /** * A job template is a pre-made set of encoding instructions that you can use to * quickly create a job. */ inline const JobTemplate& GetJobTemplate() const{ return m_jobTemplate; } /** * A job template is a pre-made set of encoding instructions that you can use to * quickly create a job. */ inline void SetJobTemplate(const JobTemplate& value) { m_jobTemplate = value; } /** * A job template is a pre-made set of encoding instructions that you can use to * quickly create a job. */ inline void SetJobTemplate(JobTemplate&& value) { m_jobTemplate = std::move(value); } /** * A job template is a pre-made set of encoding instructions that you can use to * quickly create a job. */ inline GetJobTemplateResult& WithJobTemplate(const JobTemplate& value) { SetJobTemplate(value); return *this;} /** * A job template is a pre-made set of encoding instructions that you can use to * quickly create a job. */ inline GetJobTemplateResult& WithJobTemplate(JobTemplate&& value) { SetJobTemplate(std::move(value)); return *this;} private: JobTemplate m_jobTemplate; }; } // namespace Model } // namespace MediaConvert } // namespace Aws
/* * M_APM - mapm_gcd.c * * Copyright (C) 2001 - 2007 Michael C. Ring * * Permission to use, copy, and distribute this software and its * documentation for any purpose with or 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. * * Permission to modify the software is granted. Permission to distribute * the modified code is granted. Modifications are to be distributed by * using the file 'license.txt' as a template to modify the file header. * 'license.txt' is available in the official MAPM distribution. * * This software is provided "as is" without express or implied warranty. */ /* * $Id: mapm_gcd.c,v 1.8 2007/12/03 01:41:05 mike Exp $ * * This file contains the GCD and LCM functions * * $Log: mapm_gcd.c,v $ * Revision 1.8 2007/12/03 01:41:05 mike * Update license * * Revision 1.7 2003/07/21 20:16:43 mike * Modify error messages to be in a consistent format. * * Revision 1.6 2003/03/31 22:12:33 mike * call generic error handling function * * Revision 1.5 2002/11/03 22:44:21 mike * Updated function parameters to use the modern style * * Revision 1.4 2002/05/17 22:17:47 mike * fix comment * * Revision 1.3 2002/05/17 22:16:36 mike * move even/odd util functions to mapmutl2 * * Revision 1.2 2001/07/15 20:55:20 mike * add comments * * Revision 1.1 2001/07/15 20:48:27 mike * Initial revision */ #include "m_apm_lc.h" /****************************************************************************/ /* * From Knuth, The Art of Computer Programming: * * This is the binary GCD algorithm as described * in the book (Algorithm B) */ void m_apm_gcd(M_APM r, M_APM u, M_APM v) { M_APM tmpM, tmpN, tmpT, tmpU, tmpV; int kk, kr, mm; long pow_2; /* 'is_integer' will return 0 || 1 */ if ((m_apm_is_integer(u) + m_apm_is_integer(v)) != 2) { M_apm_log_error_msg(M_APM_RETURN, "\'m_apm_gcd\', Non-integer input"); M_set_to_zero(r); return; } if (u->m_apm_sign == 0) { m_apm_absolute_value(r, v); return; } if (v->m_apm_sign == 0) { m_apm_absolute_value(r, u); return; } tmpM = M_get_stack_var(); tmpN = M_get_stack_var(); tmpT = M_get_stack_var(); tmpU = M_get_stack_var(); tmpV = M_get_stack_var(); m_apm_absolute_value(tmpU, u); m_apm_absolute_value(tmpV, v); /* Step B1 */ kk = 0; while (TRUE) { mm = 1; if (m_apm_is_odd(tmpU)) break; mm = 0; if (m_apm_is_odd(tmpV)) break; m_apm_multiply(tmpN, MM_0_5, tmpU); m_apm_copy(tmpU, tmpN); m_apm_multiply(tmpN, MM_0_5, tmpV); m_apm_copy(tmpV, tmpN); kk++; } /* Step B2 */ if (mm) { m_apm_negate(tmpT, tmpV); goto B4; } m_apm_copy(tmpT, tmpU); /* Step: */ B3: m_apm_multiply(tmpN, MM_0_5, tmpT); m_apm_copy(tmpT, tmpN); /* Step: */ B4: if (m_apm_is_even(tmpT)) goto B3; /* Step B5 */ if (tmpT->m_apm_sign == 1) m_apm_copy(tmpU, tmpT); else m_apm_negate(tmpV, tmpT); /* Step B6 */ m_apm_subtract(tmpT, tmpU, tmpV); if (tmpT->m_apm_sign != 0) goto B3; /* * result = U * 2 ^ kk */ if (kk == 0) m_apm_copy(r, tmpU); else { if (kk == 1) m_apm_multiply(r, tmpU, MM_Two); if (kk == 2) m_apm_multiply(r, tmpU, MM_Four); if (kk >= 3) { mm = kk / 28; kr = kk % 28; pow_2 = 1L << kr; if (mm == 0) { m_apm_set_long(tmpN, pow_2); m_apm_multiply(r, tmpU, tmpN); } else { m_apm_copy(tmpN, MM_One); m_apm_set_long(tmpM, 0x10000000L); /* 2 ^ 28 */ while (TRUE) { m_apm_multiply(tmpT, tmpN, tmpM); m_apm_copy(tmpN, tmpT); if (--mm == 0) break; } if (kr == 0) { m_apm_multiply(r, tmpU, tmpN); } else { m_apm_set_long(tmpM, pow_2); m_apm_multiply(tmpT, tmpN, tmpM); m_apm_multiply(r, tmpU, tmpT); } } } } M_restore_stack(5); } /****************************************************************************/ /* * u * v * LCM(u,v) = ------------ * GCD(u,v) */ void m_apm_lcm(M_APM r, M_APM u, M_APM v) { M_APM tmpN, tmpG; tmpN = M_get_stack_var(); tmpG = M_get_stack_var(); m_apm_multiply(tmpN, u, v); m_apm_gcd(tmpG, u, v); m_apm_integer_divide(r, tmpN, tmpG); M_restore_stack(2); } /****************************************************************************/ #ifdef BIG_COMMENT_BLOCK /* * traditional GCD included for reference * (also useful for testing ...) */ /* * From Knuth, The Art of Computer Programming: * * To compute GCD(u,v) * * A1: * if (v == 0) return (u) * A2: * t = u mod v * u = v * v = t * goto A1 */ void m_apm_gcd_traditional(M_APM r, M_APM u, M_APM v) { M_APM tmpD, tmpN, tmpU, tmpV; tmpD = M_get_stack_var(); tmpN = M_get_stack_var(); tmpU = M_get_stack_var(); tmpV = M_get_stack_var(); m_apm_absolute_value(tmpU, u); m_apm_absolute_value(tmpV, v); while (TRUE) { if (tmpV->m_apm_sign == 0) break; m_apm_integer_div_rem(tmpD, tmpN, tmpU, tmpV); m_apm_copy(tmpU, tmpV); m_apm_copy(tmpV, tmpN); } m_apm_copy(r, tmpU); M_restore_stack(4); } /****************************************************************************/ #endif
#pragma once #include "ItemHandler.h" #include "../World.h" #include "../Entities/Player.h" class cItemShearsHandler final: public cItemHandler { using Super = cItemHandler; public: using Super::Super; virtual bool OnDiggingBlock( cWorld * a_World, cPlayer * a_Player, const cItem & a_HeldItem, const Vector3i a_ClickedBlockPos, eBlockFace a_ClickedBlockFace ) const override { BLOCKTYPE Block; NIBBLETYPE BlockMeta; a_World->GetBlockTypeMeta(a_ClickedBlockPos, Block, BlockMeta); if ((Block == E_BLOCK_LEAVES) || (Block == E_BLOCK_NEW_LEAVES)) { a_World->DropBlockAsPickups(a_ClickedBlockPos, a_Player, &a_HeldItem); return true; } return false; } virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) const override { switch (a_BlockType) { case E_BLOCK_COBWEB: case E_BLOCK_DEAD_BUSH: case E_BLOCK_VINES: { return true; } } return Super::CanHarvestBlock(a_BlockType); } virtual short GetDurabilityLossByAction(eDurabilityLostAction a_Action) const override { switch (a_Action) { case dlaAttackEntity: return 0; case dlaBreakBlock: return 0; case dlaBreakBlockInstant: return 1; } UNREACHABLE("Unsupported durability loss action"); } virtual float GetBlockBreakingStrength(BLOCKTYPE a_Block) const override { if ((a_Block == E_BLOCK_COBWEB) || IsBlockMaterialLeaves(a_Block)) { return 15.0f; } else if (a_Block == E_BLOCK_WOOL) { return 5.0f; } else { return Super::GetBlockBreakingStrength(a_Block); } } } ;
/* -------------------------------------------------------------------------- */ /* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); you may */ /* not use this file except in compliance with the License. You may obtain */ /* a copy of the License at */ /* */ /* http://www.apache.org/licenses/LICENSE-2.0 */ /* */ /* Unless required by applicable law or agreed to in writing, software */ /* distributed under the License is distributed on an "AS IS" BASIS, */ /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ /* See the License for the specific language governing permissions and */ /* limitations under the License. */ /* -------------------------------------------------------------------------- */ #ifndef QUOTA_IMAGE_H_ #define QUOTA_IMAGE_H_ #include "Quota.h" /** * Image Quotas, defined as: * IMAGE = [ * ID = <ID of the image> * RVMS = <Max. number times the image can be instantiated> * RVMS _USED = Current number of VMs using the image * ] * * 0 = unlimited, default if missing */ class QuotaImage : public Quota { public: QuotaImage(bool is_default): Quota("IMAGE_QUOTA", "IMAGE", IMAGE_METRICS, NUM_IMAGE_METRICS, is_default) {}; ~QuotaImage(){}; /** * Check if the resource allocation will exceed the quota limits. If not * the usage counters are updated * @param tmpl template for the resource * @param default_quotas Quotas that contain the default limits * @param error string * @return true if the operation can be performed */ bool check(Template* tmpl, Quotas& default_quotas, string& error); /** * Decrement usage counters when deallocating image * @param tmpl template for the resource */ void del(Template* tmpl); protected: /** * Gets the default quota identified by its ID. * * @param id of the quota * @param default_quotas Quotas that contain the default limits * @param va The quota, if it is found * * @return 0 on success, -1 if not found */ int get_default_quota(const string& id, Quotas& default_quotas, VectorAttribute **va); static const char * IMAGE_METRICS[]; static const int NUM_IMAGE_METRICS; }; #endif /*QUOTA_IMAGE_H_*/
// Copyright 2015 the V8 project 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 V8_LOCKED_QUEUE_INL_H_ #define V8_LOCKED_QUEUE_INL_H_ #include "src/base/atomic-utils.h" #include "src/locked-queue.h" namespace v8 { namespace internal { template <typename Record> struct LockedQueue<Record>::Node : Malloced { Node() : next(nullptr) {} Record value; base::AtomicValue<Node*> next; }; template <typename Record> inline LockedQueue<Record>::LockedQueue() { head_ = new Node(); CHECK_NOT_NULL(head_); tail_ = head_; } template <typename Record> inline LockedQueue<Record>::~LockedQueue() { // Destroy all remaining nodes. Note that we do not destroy the actual values. Node* old_node = nullptr; Node* cur_node = head_; while (cur_node != nullptr) { old_node = cur_node; cur_node = cur_node->next.Value(); delete old_node; } } template <typename Record> inline void LockedQueue<Record>::Enqueue(const Record& record) { Node* n = new Node(); CHECK_NOT_NULL(n); n->value = record; { base::MutexGuard guard(&tail_mutex_); tail_->next.SetValue(n); tail_ = n; } } template <typename Record> inline bool LockedQueue<Record>::Dequeue(Record* record) { Node* old_head = nullptr; { base::MutexGuard guard(&head_mutex_); old_head = head_; Node* const next_node = head_->next.Value(); if (next_node == nullptr) return false; *record = next_node->value; head_ = next_node; } delete old_head; return true; } template <typename Record> inline bool LockedQueue<Record>::IsEmpty() const { base::MutexGuard guard(&head_mutex_); return head_->next.Value() == nullptr; } template <typename Record> inline bool LockedQueue<Record>::Peek(Record* record) const { base::MutexGuard guard(&head_mutex_); Node* const next_node = head_->next.Value(); if (next_node == nullptr) return false; *record = next_node->value; return true; } } // namespace internal } // namespace v8 #endif // V8_LOCKED_QUEUE_INL_H_
/** * @file DistributedNodeConfig.h * @brief configuration of distributed node deployment * @author Jun Jiang * @date 2012-03-13 */ #ifndef DISTRIBUTED_NODE_CONFIG_H #define DISTRIBUTED_NODE_CONFIG_H namespace sf1r { struct DistributedNodeConfig { DistributedNodeConfig() : isSingleNode_(false) , isMasterNode_(false) , isWorkerNode_(false) {} /** * check whether is a service node. * @return true if only it meets all of the conditions below: * 1. the bundle is activated * 2. it's a single or master node */ bool isServiceNode() const { return isSingleNode_ || isMasterNode_; } /** * if the bundle is not activated, * all below members should be false. */ bool isSingleNode_; /// not distributed bool isMasterNode_; bool isWorkerNode_; }; } // namespace sf1r #endif // DISTRIBUTED_NODE_CONFIG_H
#pragma once #include "BlockHandler.h" #include "ChunkInterface.h" class cBlockTallGrassHandler : public cBlockHandler { typedef cBlockHandler super; public: cBlockTallGrassHandler(BLOCKTYPE a_BlockType) : cBlockHandler(a_BlockType) { } virtual bool DoesIgnoreBuildCollision(cChunkInterface & a_ChunkInterface, Vector3i a_Pos, cPlayer & a_Player, NIBBLETYPE a_Meta) override { return true; } virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { // Drop seeds, sometimes if (GetRandomProvider().RandBool(0.125)) { a_Pickups.push_back(cItem(E_ITEM_SEEDS, 1, 0)); } } virtual void DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, bool a_CanDrop) override { if (a_CanDrop && (a_Digger != nullptr) && (a_Digger->GetEquippedWeapon().m_ItemType == E_ITEM_SHEARS)) { NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta({a_BlockX, a_BlockY, a_BlockZ}); cItems Drops; Drops.Add(m_BlockType, 1, Meta); // Allow plugins to modify the pickups: a_BlockPluginInterface.CallHookBlockToPickups(a_Digger, a_BlockX, a_BlockY, a_BlockZ, m_BlockType, Meta, Drops); // Spawn the pickups: if (!Drops.empty()) { auto & r1 = GetRandomProvider(); // Mid-block position first double MicroX, MicroY, MicroZ; MicroX = a_BlockX + 0.5; MicroY = a_BlockY + 0.5; MicroZ = a_BlockZ + 0.5; // Add random offset second MicroX += r1.RandReal<double>(-0.5, 0.5); MicroZ += r1.RandReal<double>(-0.5, 0.5); a_WorldInterface.SpawnItemPickups(Drops, MicroX, MicroY, MicroZ); } return; } super::DropBlock(a_ChunkInterface, a_WorldInterface, a_BlockPluginInterface, a_Digger, a_BlockX, a_BlockY, a_BlockZ, a_CanDrop); } virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override { if (a_RelY <= 0) { return false; } BLOCKTYPE BelowBlock = a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ); return IsBlockTypeOfDirt(BelowBlock); } virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override { UNUSED(a_Meta); return 7; } } ;
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/cognito-idp/CognitoIdentityProvider_EXPORTS.h> #include <aws/cognito-idp/CognitoIdentityProviderRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace CognitoIdentityProvider { namespace Model { /** */ class AWS_COGNITOIDENTITYPROVIDER_API DeleteIdentityProviderRequest : public CognitoIdentityProviderRequest { public: DeleteIdentityProviderRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "DeleteIdentityProvider"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The user pool ID.</p> */ inline const Aws::String& GetUserPoolId() const{ return m_userPoolId; } /** * <p>The user pool ID.</p> */ inline bool UserPoolIdHasBeenSet() const { return m_userPoolIdHasBeenSet; } /** * <p>The user pool ID.</p> */ inline void SetUserPoolId(const Aws::String& value) { m_userPoolIdHasBeenSet = true; m_userPoolId = value; } /** * <p>The user pool ID.</p> */ inline void SetUserPoolId(Aws::String&& value) { m_userPoolIdHasBeenSet = true; m_userPoolId = std::move(value); } /** * <p>The user pool ID.</p> */ inline void SetUserPoolId(const char* value) { m_userPoolIdHasBeenSet = true; m_userPoolId.assign(value); } /** * <p>The user pool ID.</p> */ inline DeleteIdentityProviderRequest& WithUserPoolId(const Aws::String& value) { SetUserPoolId(value); return *this;} /** * <p>The user pool ID.</p> */ inline DeleteIdentityProviderRequest& WithUserPoolId(Aws::String&& value) { SetUserPoolId(std::move(value)); return *this;} /** * <p>The user pool ID.</p> */ inline DeleteIdentityProviderRequest& WithUserPoolId(const char* value) { SetUserPoolId(value); return *this;} /** * <p>The identity provider name.</p> */ inline const Aws::String& GetProviderName() const{ return m_providerName; } /** * <p>The identity provider name.</p> */ inline bool ProviderNameHasBeenSet() const { return m_providerNameHasBeenSet; } /** * <p>The identity provider name.</p> */ inline void SetProviderName(const Aws::String& value) { m_providerNameHasBeenSet = true; m_providerName = value; } /** * <p>The identity provider name.</p> */ inline void SetProviderName(Aws::String&& value) { m_providerNameHasBeenSet = true; m_providerName = std::move(value); } /** * <p>The identity provider name.</p> */ inline void SetProviderName(const char* value) { m_providerNameHasBeenSet = true; m_providerName.assign(value); } /** * <p>The identity provider name.</p> */ inline DeleteIdentityProviderRequest& WithProviderName(const Aws::String& value) { SetProviderName(value); return *this;} /** * <p>The identity provider name.</p> */ inline DeleteIdentityProviderRequest& WithProviderName(Aws::String&& value) { SetProviderName(std::move(value)); return *this;} /** * <p>The identity provider name.</p> */ inline DeleteIdentityProviderRequest& WithProviderName(const char* value) { SetProviderName(value); return *this;} private: Aws::String m_userPoolId; bool m_userPoolIdHasBeenSet; Aws::String m_providerName; bool m_providerNameHasBeenSet; }; } // namespace Model } // namespace CognitoIdentityProvider } // namespace Aws
#include "thread.h" Thread::Thread() :m_thread_t( 0 ) { } Thread::~Thread() { } bool Thread::create( threadFunc func, void *arg ) { return 0 == pthread_create( &m_thread_t, NULL, func, arg ); } void Thread::detach() { pthread_detach( m_thread_t ); }
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/codecommit/CodeCommit_EXPORTS.h> #include <aws/codecommit/CodeCommitRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace CodeCommit { namespace Model { /** */ class AWS_CODECOMMIT_API EvaluatePullRequestApprovalRulesRequest : public CodeCommitRequest { public: EvaluatePullRequestApprovalRulesRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "EvaluatePullRequestApprovalRules"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The system-generated ID of the pull request you want to evaluate.</p> */ inline const Aws::String& GetPullRequestId() const{ return m_pullRequestId; } /** * <p>The system-generated ID of the pull request you want to evaluate.</p> */ inline bool PullRequestIdHasBeenSet() const { return m_pullRequestIdHasBeenSet; } /** * <p>The system-generated ID of the pull request you want to evaluate.</p> */ inline void SetPullRequestId(const Aws::String& value) { m_pullRequestIdHasBeenSet = true; m_pullRequestId = value; } /** * <p>The system-generated ID of the pull request you want to evaluate.</p> */ inline void SetPullRequestId(Aws::String&& value) { m_pullRequestIdHasBeenSet = true; m_pullRequestId = std::move(value); } /** * <p>The system-generated ID of the pull request you want to evaluate.</p> */ inline void SetPullRequestId(const char* value) { m_pullRequestIdHasBeenSet = true; m_pullRequestId.assign(value); } /** * <p>The system-generated ID of the pull request you want to evaluate.</p> */ inline EvaluatePullRequestApprovalRulesRequest& WithPullRequestId(const Aws::String& value) { SetPullRequestId(value); return *this;} /** * <p>The system-generated ID of the pull request you want to evaluate.</p> */ inline EvaluatePullRequestApprovalRulesRequest& WithPullRequestId(Aws::String&& value) { SetPullRequestId(std::move(value)); return *this;} /** * <p>The system-generated ID of the pull request you want to evaluate.</p> */ inline EvaluatePullRequestApprovalRulesRequest& WithPullRequestId(const char* value) { SetPullRequestId(value); return *this;} /** * <p>The system-generated ID for the pull request revision. To retrieve the most * recent revision ID for a pull request, use <a>GetPullRequest</a>.</p> */ inline const Aws::String& GetRevisionId() const{ return m_revisionId; } /** * <p>The system-generated ID for the pull request revision. To retrieve the most * recent revision ID for a pull request, use <a>GetPullRequest</a>.</p> */ inline bool RevisionIdHasBeenSet() const { return m_revisionIdHasBeenSet; } /** * <p>The system-generated ID for the pull request revision. To retrieve the most * recent revision ID for a pull request, use <a>GetPullRequest</a>.</p> */ inline void SetRevisionId(const Aws::String& value) { m_revisionIdHasBeenSet = true; m_revisionId = value; } /** * <p>The system-generated ID for the pull request revision. To retrieve the most * recent revision ID for a pull request, use <a>GetPullRequest</a>.</p> */ inline void SetRevisionId(Aws::String&& value) { m_revisionIdHasBeenSet = true; m_revisionId = std::move(value); } /** * <p>The system-generated ID for the pull request revision. To retrieve the most * recent revision ID for a pull request, use <a>GetPullRequest</a>.</p> */ inline void SetRevisionId(const char* value) { m_revisionIdHasBeenSet = true; m_revisionId.assign(value); } /** * <p>The system-generated ID for the pull request revision. To retrieve the most * recent revision ID for a pull request, use <a>GetPullRequest</a>.</p> */ inline EvaluatePullRequestApprovalRulesRequest& WithRevisionId(const Aws::String& value) { SetRevisionId(value); return *this;} /** * <p>The system-generated ID for the pull request revision. To retrieve the most * recent revision ID for a pull request, use <a>GetPullRequest</a>.</p> */ inline EvaluatePullRequestApprovalRulesRequest& WithRevisionId(Aws::String&& value) { SetRevisionId(std::move(value)); return *this;} /** * <p>The system-generated ID for the pull request revision. To retrieve the most * recent revision ID for a pull request, use <a>GetPullRequest</a>.</p> */ inline EvaluatePullRequestApprovalRulesRequest& WithRevisionId(const char* value) { SetRevisionId(value); return *this;} private: Aws::String m_pullRequestId; bool m_pullRequestIdHasBeenSet; Aws::String m_revisionId; bool m_revisionIdHasBeenSet; }; } // namespace Model } // namespace CodeCommit } // namespace Aws
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/servicecatalog/ServiceCatalog_EXPORTS.h> #include <aws/servicecatalog/model/ProvisionedProductDetail.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/servicecatalog/model/CloudWatchDashboard.h> #include <utility> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace ServiceCatalog { namespace Model { class AWS_SERVICECATALOG_API DescribeProvisionedProductResult { public: DescribeProvisionedProductResult(); DescribeProvisionedProductResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); DescribeProvisionedProductResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); /** * <p>Information about the provisioned product.</p> */ inline const ProvisionedProductDetail& GetProvisionedProductDetail() const{ return m_provisionedProductDetail; } /** * <p>Information about the provisioned product.</p> */ inline void SetProvisionedProductDetail(const ProvisionedProductDetail& value) { m_provisionedProductDetail = value; } /** * <p>Information about the provisioned product.</p> */ inline void SetProvisionedProductDetail(ProvisionedProductDetail&& value) { m_provisionedProductDetail = std::move(value); } /** * <p>Information about the provisioned product.</p> */ inline DescribeProvisionedProductResult& WithProvisionedProductDetail(const ProvisionedProductDetail& value) { SetProvisionedProductDetail(value); return *this;} /** * <p>Information about the provisioned product.</p> */ inline DescribeProvisionedProductResult& WithProvisionedProductDetail(ProvisionedProductDetail&& value) { SetProvisionedProductDetail(std::move(value)); return *this;} /** * <p>Any CloudWatch dashboards that were created when provisioning the * product.</p> */ inline const Aws::Vector<CloudWatchDashboard>& GetCloudWatchDashboards() const{ return m_cloudWatchDashboards; } /** * <p>Any CloudWatch dashboards that were created when provisioning the * product.</p> */ inline void SetCloudWatchDashboards(const Aws::Vector<CloudWatchDashboard>& value) { m_cloudWatchDashboards = value; } /** * <p>Any CloudWatch dashboards that were created when provisioning the * product.</p> */ inline void SetCloudWatchDashboards(Aws::Vector<CloudWatchDashboard>&& value) { m_cloudWatchDashboards = std::move(value); } /** * <p>Any CloudWatch dashboards that were created when provisioning the * product.</p> */ inline DescribeProvisionedProductResult& WithCloudWatchDashboards(const Aws::Vector<CloudWatchDashboard>& value) { SetCloudWatchDashboards(value); return *this;} /** * <p>Any CloudWatch dashboards that were created when provisioning the * product.</p> */ inline DescribeProvisionedProductResult& WithCloudWatchDashboards(Aws::Vector<CloudWatchDashboard>&& value) { SetCloudWatchDashboards(std::move(value)); return *this;} /** * <p>Any CloudWatch dashboards that were created when provisioning the * product.</p> */ inline DescribeProvisionedProductResult& AddCloudWatchDashboards(const CloudWatchDashboard& value) { m_cloudWatchDashboards.push_back(value); return *this; } /** * <p>Any CloudWatch dashboards that were created when provisioning the * product.</p> */ inline DescribeProvisionedProductResult& AddCloudWatchDashboards(CloudWatchDashboard&& value) { m_cloudWatchDashboards.push_back(std::move(value)); return *this; } private: ProvisionedProductDetail m_provisionedProductDetail; Aws::Vector<CloudWatchDashboard> m_cloudWatchDashboards; }; } // namespace Model } // namespace ServiceCatalog } // namespace Aws
// // PopoverView.h // Popover // // Created by lifution on 16/1/5. // Copyright © 2016年 lifution. All rights reserved. // #import <UIKit/UIKit.h> typedef void(^PopoverBlock)(NSInteger index); @interface PopoverView : UIView // 菜单列表集合 @property (nonatomic, copy) NSArray *menuTitles; /*! * @author lifution * * @brief 显示弹窗 * * @param aView 箭头指向的控件 * @param selected 选择完成回调 */ - (void)showFromView:(UIView *)aView selected:(PopoverBlock)selected; @end @interface PopoverArrow : UIView @end
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/lex/LexRuntimeService_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> namespace Aws { namespace LexRuntimeService { namespace Model { enum class ContentType { NOT_SET, application_vnd_amazonaws_card_generic }; namespace ContentTypeMapper { AWS_LEXRUNTIMESERVICE_API ContentType GetContentTypeForName(const Aws::String& name); AWS_LEXRUNTIMESERVICE_API Aws::String GetNameForContentType(ContentType value); } // namespace ContentTypeMapper } // namespace Model } // namespace LexRuntimeService } // namespace Aws
/*------------------------------------------------------------------------- * * pathnode.h * prototypes for pathnode.c, relnode.c. * * * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/optimizer/pathnode.h * *------------------------------------------------------------------------- */ #ifndef PATHNODE_H #define PATHNODE_H #include "nodes/relation.h" /* * prototypes for pathnode.c */ extern int compare_path_costs(Path *path1, Path *path2, CostSelector criterion); extern int compare_fractional_path_costs(Path *path1, Path *path2, double fraction); extern void set_cheapest(RelOptInfo *parent_rel); extern void add_path(RelOptInfo *parent_rel, Path *new_path); extern bool add_path_precheck(RelOptInfo *parent_rel, Cost startup_cost, Cost total_cost, List *pathkeys, Relids required_outer); extern Path *create_seqscan_path(PlannerInfo *root, RelOptInfo *rel, Relids required_outer); extern IndexPath *create_index_path(PlannerInfo *root, IndexOptInfo *index, List *indexclauses, List *indexclausecols, List *indexorderbys, List *indexorderbycols, List *pathkeys, ScanDirection indexscandir, bool indexonly, Relids required_outer, double loop_count); extern BitmapHeapPath *create_bitmap_heap_path(PlannerInfo *root, RelOptInfo *rel, Path *bitmapqual, Relids required_outer, double loop_count); extern BitmapAndPath *create_bitmap_and_path(PlannerInfo *root, RelOptInfo *rel, List *bitmapquals); extern BitmapOrPath *create_bitmap_or_path(PlannerInfo *root, RelOptInfo *rel, List *bitmapquals); extern TidPath *create_tidscan_path(PlannerInfo *root, RelOptInfo *rel, List *tidquals, Relids required_outer); extern AppendPath *create_append_path(RelOptInfo *rel, List *subpaths, Relids required_outer); extern MergeAppendPath *create_merge_append_path(PlannerInfo *root, RelOptInfo *rel, List *subpaths, List *pathkeys, Relids required_outer); extern ResultPath *create_result_path(List *quals); extern MaterialPath *create_material_path(RelOptInfo *rel, Path *subpath); extern UniquePath *create_unique_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath, SpecialJoinInfo *sjinfo); extern Path *create_subqueryscan_path(PlannerInfo *root, RelOptInfo *rel, List *pathkeys, Relids required_outer); extern Path *create_functionscan_path(PlannerInfo *root, RelOptInfo *rel, List *pathkeys, Relids required_outer); extern Path *create_valuesscan_path(PlannerInfo *root, RelOptInfo *rel, Relids required_outer); extern Path *create_ctescan_path(PlannerInfo *root, RelOptInfo *rel, Relids required_outer); extern Path *create_worktablescan_path(PlannerInfo *root, RelOptInfo *rel, Relids required_outer); extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel, double rows, Cost startup_cost, Cost total_cost, List *pathkeys, Relids required_outer, List *fdw_private); extern Relids calc_nestloop_required_outer(Path *outer_path, Path *inner_path); extern Relids calc_non_nestloop_required_outer(Path *outer_path, Path *inner_path); extern NestPath *create_nestloop_path(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype, JoinCostWorkspace *workspace, SpecialJoinInfo *sjinfo, SemiAntiJoinFactors *semifactors, Path *outer_path, Path *inner_path, List *restrict_clauses, List *pathkeys, Relids required_outer); extern MergePath *create_mergejoin_path(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype, JoinCostWorkspace *workspace, SpecialJoinInfo *sjinfo, Path *outer_path, Path *inner_path, List *restrict_clauses, List *pathkeys, Relids required_outer, List *mergeclauses, List *outersortkeys, List *innersortkeys); extern HashPath *create_hashjoin_path(PlannerInfo *root, RelOptInfo *joinrel, JoinType jointype, JoinCostWorkspace *workspace, SpecialJoinInfo *sjinfo, SemiAntiJoinFactors *semifactors, Path *outer_path, Path *inner_path, List *restrict_clauses, Relids required_outer, List *hashclauses); extern Path *reparameterize_path(PlannerInfo *root, Path *path, Relids required_outer, double loop_count); /* * prototypes for relnode.c */ extern void setup_simple_rel_arrays(PlannerInfo *root); extern RelOptInfo *build_simple_rel(PlannerInfo *root, int relid, RelOptKind reloptkind); extern RelOptInfo *find_base_rel(PlannerInfo *root, int relid); extern RelOptInfo *find_join_rel(PlannerInfo *root, Relids relids); extern RelOptInfo *build_join_rel(PlannerInfo *root, Relids joinrelids, RelOptInfo *outer_rel, RelOptInfo *inner_rel, SpecialJoinInfo *sjinfo, List **restrictlist_ptr); extern RelOptInfo *build_empty_join_rel(PlannerInfo *root); extern AppendRelInfo *find_childrel_appendrelinfo(PlannerInfo *root, RelOptInfo *rel); extern RelOptInfo *find_childrel_top_parent(PlannerInfo *root, RelOptInfo *rel); extern Relids find_childrel_parents(PlannerInfo *root, RelOptInfo *rel); extern ParamPathInfo *get_baserel_parampathinfo(PlannerInfo *root, RelOptInfo *baserel, Relids required_outer); extern ParamPathInfo *get_joinrel_parampathinfo(PlannerInfo *root, RelOptInfo *joinrel, Path *outer_path, Path *inner_path, SpecialJoinInfo *sjinfo, Relids required_outer, List **restrict_clauses); extern ParamPathInfo *get_appendrel_parampathinfo(RelOptInfo *appendrel, Relids required_outer); #endif /* PATHNODE_H */
#pragma once #include <ostream> #include "StringView.h" // This function is in a separate header file because we include StringView into generated code // and we definitely don't want to include ostream into generated code template <typename StreamCharType, typename CharType, typename Traits> inline std::basic_ostream<StreamCharType, Traits>& operator<<(std::basic_ostream<StreamCharType, Traits>& ostream, const il2cpp::utils::StringView<CharType>& stringView) { StringViewAsNullTerminatedStringOf(CharType, stringView, str); ostream << str; return ostream; }
#ifndef APP_STAGE_SERVICE_SETTINGS_H #define APP_STAGE_SERVICE_SETTINGS_H //-- includes ----- #include "AppStage.h" //-- definitions ----- class AppStage_ServiceSettings : public AppStage { public: AppStage_ServiceSettings(class App *app); virtual void enter() override; virtual void exit() override; virtual void update() override; virtual void renderUI() override; static const char *APP_STAGE_NAME; }; #endif // APP_STAGE_SERVICE_SETTINGS_H
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/mobileanalytics/MobileAnalytics_EXPORTS.h> #include <aws/mobileanalytics/MobileAnalyticsErrors.h> #include <aws/core/client/AWSError.h> #include <aws/core/client/ClientConfiguration.h> #include <aws/core/client/AWSClient.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/NoResult.h> #include <aws/core/client/AsyncCallerContext.h> #include <aws/core/http/HttpTypes.h> #include <future> #include <functional> namespace Aws { namespace Http { class HttpClient; class HttpClientFactory; } // namespace Http namespace Utils { template< typename R, typename E> class Outcome; namespace Threading { class Executor; } // namespace Threading } // namespace Utils namespace Auth { class AWSCredentials; class AWSCredentialsProvider; } // namespace Auth namespace Client { class RetryStrategy; } // namespace Client namespace MobileAnalytics { namespace Model { class PutEventsRequest; typedef Aws::Utils::Outcome<Aws::NoResult, MobileAnalyticsError> PutEventsOutcome; typedef std::future<PutEventsOutcome> PutEventsOutcomeCallable; } // namespace Model class MobileAnalyticsClient; typedef std::function<void(const MobileAnalyticsClient*, const Model::PutEventsRequest&, const Model::PutEventsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutEventsResponseReceivedHandler; /** * <p>Amazon Mobile Analytics is a service for collecting, visualizing, and * understanding app usage data at scale.</p> */ class AWS_MOBILEANALYTICS_API MobileAnalyticsClient : public Aws::Client::AWSJsonClient { public: typedef Aws::Client::AWSJsonClient BASECLASS; /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ MobileAnalyticsClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ MobileAnalyticsClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ MobileAnalyticsClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); virtual ~MobileAnalyticsClient(); /** * <p>The PutEvents operation records one or more events. You can have up to 1,500 * unique custom events per app, any combination of up to 40 attributes and metrics * per custom event, and any number of attribute or metric values.</p> */ virtual Model::PutEventsOutcome PutEvents(const Model::PutEventsRequest& request) const; /** * <p>The PutEvents operation records one or more events. You can have up to 1,500 * unique custom events per app, any combination of up to 40 attributes and metrics * per custom event, and any number of attribute or metric values.</p> * * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::PutEventsOutcomeCallable PutEventsCallable(const Model::PutEventsRequest& request) const; /** * <p>The PutEvents operation records one or more events. You can have up to 1,500 * unique custom events per app, any combination of up to 40 attributes and metrics * per custom event, and any number of attribute or metric values.</p> * * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void PutEventsAsync(const Model::PutEventsRequest& request, const PutEventsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const; void OverrideEndpoint(const Aws::String& endpoint); private: void init(const Aws::Client::ClientConfiguration& clientConfiguration); void PutEventsAsyncHelper(const Model::PutEventsRequest& request, const PutEventsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const; Aws::String m_uri; Aws::String m_configScheme; std::shared_ptr<Aws::Utils::Threading::Executor> m_executor; }; } // namespace MobileAnalytics } // namespace Aws
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/ds/DirectoryService_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace DirectoryService { namespace Model { /** * <p>The certificate could not be added because the certificate limit has been * reached.</p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CertificateLimitExceededException">AWS * API Reference</a></p> */ class AWS_DIRECTORYSERVICE_API CertificateLimitExceededException { public: CertificateLimitExceededException(); CertificateLimitExceededException(Aws::Utils::Json::JsonView jsonValue); CertificateLimitExceededException& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; inline const Aws::String& GetMessage() const{ return m_message; } inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } inline CertificateLimitExceededException& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} inline CertificateLimitExceededException& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} inline CertificateLimitExceededException& WithMessage(const char* value) { SetMessage(value); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline bool RequestIdHasBeenSet() const { return m_requestIdHasBeenSet; } inline void SetRequestId(const Aws::String& value) { m_requestIdHasBeenSet = true; m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestIdHasBeenSet = true; m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestIdHasBeenSet = true; m_requestId.assign(value); } inline CertificateLimitExceededException& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline CertificateLimitExceededException& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline CertificateLimitExceededException& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_message; bool m_messageHasBeenSet; Aws::String m_requestId; bool m_requestIdHasBeenSet; }; } // namespace Model } // namespace DirectoryService } // namespace Aws
#ifndef _UI95_DD_LAYER_ #define _UI95_DD_LAYER_ //XX void UI95_SetScreenColorInfo(WORD r_mask,WORD g_mask,WORD b_mask); //XX void UI95_GetScreenColorInfo(WORD &r_mask,WORD &r_shift,WORD &g_mask,WORD &g_shift,WORD &b_mask,WORD &b_shift); void UI95_SetScreenColorInfo(DWORD r_mask, DWORD g_mask, DWORD b_mask); void UI95_GetScreenColorInfo ( DWORD &r_mask, WORD &r_shift, DWORD &g_mask, WORD &g_shift, DWORD &b_mask, WORD &b_shift ); // not void UI95_GetScreenColorInfo(WORD *r_mask,WORD *r_shift,WORD *g_mask,WORD *g_shift,WORD *b_mask,WORD *b_shift); WORD UI95_RGB24Bit(unsigned long rgb); WORD UI95_RGB15Bit(WORD rgb); WORD UI95_ScreenToTga(WORD color); WORD UI95_ScreenToGrey(WORD color); //IDirectDrawSurface *UI95_CreateDDSurface(IDirectDraw *DD,DWORD width,DWORD height); //void UI95_GetScreenFormat(DDSURFACEDESC *desc) //BOOL UI95_DDErrorCheck( HRESULT result ); //void *UI95_Lock(IDirectDrawSurface *ddsurface); #endif
/* * Copyright (c) 2014, 2015 Zhang Xianyi * 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 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. */ #include <stdlib.h> #include <math.h> #include <openvml_reference.h> void OpenVML_FUNCNAME_REF(vsExp)(const VML_INT n, const float * a, float * y){ VML_INT i; if (n<=0) return; if (a==NULL || y==NULL) return; for(i=0; i<n; i++){ y[i]=expf(a[i]); } } void OpenVML_FUNCNAME_REF(vdExp)(const VML_INT n, const double * a, double * y){ VML_INT i; if (n<=0) return; if (a==NULL || y==NULL) return; for(i=0; i<n; i++){ y[i]=exp(a[i]); } }
// Copyright (c) 2013 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_CHROMEOS_POLICY_POLICY_OAUTH2_TOKEN_FETCHER_H_ #define CHROME_BROWSER_CHROMEOS_POLICY_POLICY_OAUTH2_TOKEN_FETCHER_H_ #include <string> #include "base/basictypes.h" #include "base/callback.h" #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "google_apis/gaia/gaia_auth_consumer.h" #include "google_apis/gaia/oauth2_access_token_consumer.h" class GaiaAuthFetcher; class OAuth2AccessTokenFetcher; namespace net { class URLRequestContextGetter; } namespace policy { // Fetches the OAuth2 token for the device management service. Since Profile // creation might be blocking on a user policy fetch, this fetcher must always // send a (possibly empty) token to the callback, which will then let the policy // subsystem proceed and resume Profile creation. Sending the token even when no // Profile is pending is also OK. class PolicyOAuth2TokenFetcher : public base::SupportsWeakPtr<PolicyOAuth2TokenFetcher>, public GaiaAuthConsumer, public OAuth2AccessTokenConsumer { public: typedef base::Callback<void(const std::string&, const GoogleServiceAuthError&)> TokenCallback; // Fetches the device management service's oauth2 token, after also retrieving // the OAuth2 refresh tokens. PolicyOAuth2TokenFetcher(net::URLRequestContextGetter* auth_context_getter, net::URLRequestContextGetter* system_context_getter, const TokenCallback& callback); ~PolicyOAuth2TokenFetcher() override; // Starts process of minting device management service OAuth2 access token. void Start(); // Returns true if we have previously attempted to fetch tokens with this // class and failed. bool failed() const { return failed_; } const std::string& oauth2_refresh_token() const { return oauth2_refresh_token_; } const std::string& oauth2_access_token() const { return oauth2_access_token_; } private: // GaiaAuthConsumer overrides. void OnClientOAuthSuccess( const GaiaAuthConsumer::ClientOAuthResult& oauth_tokens) override; void OnClientOAuthFailure(const GoogleServiceAuthError& error) override; // OAuth2AccessTokenConsumer overrides. void OnGetTokenSuccess(const std::string& access_token, const base::Time& expiration_time) override; void OnGetTokenFailure(const GoogleServiceAuthError& error) override; // Starts fetching OAuth2 refresh token. void StartFetchingRefreshToken(); // Starts fetching OAuth2 access token for the device management service. void StartFetchingAccessToken(); // Decides how to proceed on GAIA |error|. If the error looks temporary, // retries |task| until max retry count is reached. // If retry count runs out, or error condition is unrecoverable, it calls // Delegate::OnOAuth2TokenFetchFailed(). void RetryOnError(const GoogleServiceAuthError& error, const base::Closure& task); // Passes |token| and |error| to the |callback_|. void ForwardPolicyToken(const std::string& token, const GoogleServiceAuthError& error); scoped_refptr<net::URLRequestContextGetter> auth_context_getter_; scoped_refptr<net::URLRequestContextGetter> system_context_getter_; scoped_ptr<GaiaAuthFetcher> refresh_token_fetcher_; scoped_ptr<OAuth2AccessTokenFetcher> access_token_fetcher_; // OAuth2 refresh token. Could come either from the outside or through // refresh token fetching flow within this class. std::string oauth2_refresh_token_; // OAuth2 access token. std::string oauth2_access_token_; // The retry counter. Increment this only when failure happened. int retry_count_; // True if we have already failed to fetch the policy. bool failed_; // The callback to invoke when done. TokenCallback callback_; DISALLOW_COPY_AND_ASSIGN(PolicyOAuth2TokenFetcher); }; } // namespace policy #endif // CHROME_BROWSER_CHROMEOS_POLICY_POLICY_OAUTH2_TOKEN_FETCHER_H_
// 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 NET_SPDY_HPACK_DECODER_H_ #define NET_SPDY_HPACK_DECODER_H_ #include <stddef.h> #include <stdint.h> #include <map> #include <string> #include <vector> #include "base/macros.h" #include "base/strings/string_piece.h" #include "net/base/net_export.h" #include "net/spdy/hpack/hpack_header_table.h" #include "net/spdy/hpack/hpack_input_stream.h" #include "net/spdy/spdy_headers_handler_interface.h" #include "net/spdy/spdy_protocol.h" // An HpackDecoder decodes header sets as outlined in // http://tools.ietf.org/html/rfc7541. namespace net { namespace test { class HpackDecoderPeer; } // namespace test class NET_EXPORT_PRIVATE HpackDecoder { public: friend class test::HpackDecoderPeer; HpackDecoder(); ~HpackDecoder(); // Called upon acknowledgement of SETTINGS_HEADER_TABLE_SIZE. void ApplyHeaderTableSizeSetting(size_t size_setting) { header_table_.SetSettingsHeaderTableSize(size_setting); } // If a SpdyHeadersHandlerInterface is provided, HpackDecoder will emit // headers to it rather than accumulating them in a SpdyHeaderBlock. void HandleControlFrameHeadersStart(SpdyHeadersHandlerInterface* handler) { handler_ = handler; total_header_bytes_ = 0; } // Called as headers data arrives. Returns false if an error occurred. // TODO(jgraettinger): A future version of this method will incrementally // parse and deliver headers via SpdyHeadersHandlerInterface. For now, // header data is buffered until HandleControlFrameHeadersComplete(). bool HandleControlFrameHeadersData(const char* headers_data, size_t headers_data_length); // Called after a headers block has been completely delivered via // HandleControlFrameHeadersData(). Returns false if an error // occurred. |compressed_len| if non-null will be set to the size // of the encoded buffered block that was accumulated in // HandleControlFrameHeadersData(), to support subsequent // calculation of compression percentage. Clears |handler_|. // TODO(jgraettinger): A // future version of this method will simply deliver the Cookie // header (which has been incrementally reconstructed) and notify // the visitor that the block is finished. bool HandleControlFrameHeadersComplete(size_t* compressed_len); // Accessor for the most recently decoded headers block. Valid until the next // call to HandleControlFrameHeadersData(). // TODO(birenroy): Remove this method when all users of HpackDecoder specify // a SpdyHeadersHandlerInterface. const SpdyHeaderBlock& decoded_block() { return decoded_block_; } private: // Adds the header representation to |decoded_block_|, applying the // following rules: // - Multiple values of the Cookie header are joined, delmited by '; '. // This reconstruction is required to properly handle Cookie crumbling // (as per section 8.1.2.5 in RFC 7540). // - Multiple values of other headers are joined and delimited by '\0'. // Note that this may be too accomodating, as the sender's HTTP2 layer // should have already joined and delimited these values. // // Returns false if a pseudo-header field follows a regular header one, which // MUST be treated as malformed, as per sections 8.1.2.3. of the HTTP2 // specification (RFC 7540). // bool HandleHeaderRepresentation(base::StringPiece name, base::StringPiece value); const uint32_t max_string_literal_size_; HpackHeaderTable header_table_; // TODO(jgraettinger): Buffer for headers data, and storage for the last- // processed headers block. Both will be removed with the switch to // SpdyHeadersHandlerInterface. std::string headers_block_buffer_; SpdyHeaderBlock decoded_block_; // Scratch space for storing decoded literals. std::string key_buffer_, value_buffer_; // If non-NULL, handles decoded headers. SpdyHeadersHandlerInterface* handler_; size_t total_header_bytes_; // Flag to keep track of having seen a regular header field. bool regular_header_seen_; // Flag to keep track of having seen the header block start. bool header_block_started_; // Total bytes have been removed from headers_block_buffer_. // Its value is updated during incremental decoding. uint32_t total_parsed_bytes_; // Handlers for decoding HPACK opcodes and header representations // (or parts thereof). These methods return true on success and // false on error. bool DecodeNextOpcodeWrapper(HpackInputStream* input_stream); bool DecodeNextOpcode(HpackInputStream* input_stream); bool DecodeAtMostTwoHeaderTableSizeUpdates(HpackInputStream* input_stream); bool DecodeNextHeaderTableSizeUpdate(HpackInputStream* input_stream); bool DecodeNextIndexedHeader(HpackInputStream* input_stream); bool DecodeNextLiteralHeader(HpackInputStream* input_stream, bool should_index); bool DecodeNextName(HpackInputStream* input_stream, base::StringPiece* next_name); bool DecodeNextStringLiteral(HpackInputStream* input_stream, bool is_header_key, // As distinct from a value. base::StringPiece* output); DISALLOW_COPY_AND_ASSIGN(HpackDecoder); }; } // namespace net #endif // NET_SPDY_HPACK_DECODER_H_
/* FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. *************************************************************************** * * * FreeRTOS provides completely free yet professionally developed, * * robust, strictly quality controlled, supported, and cross * * platform software that has become a de facto standard. * * * * Help yourself get started quickly and support the FreeRTOS * * project by purchasing a FreeRTOS tutorial book, reference * * manual, or both from: http://www.FreeRTOS.org/Documentation * * * * Thank you! * * * *************************************************************************** This file is part of the FreeRTOS distribution. FreeRTOS 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 >>!AND MODIFIED BY!<< the FreeRTOS exception. >>! NOTE: The modification to the GPL is included to allow you to distribute >>! a combined work that includes FreeRTOS without being obliged to provide >>! the source code for proprietary components outside of the FreeRTOS >>! kernel. FreeRTOS 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. Full license text is available from the following link: http://www.freertos.org/a00114.html 1 tab == 4 spaces! *************************************************************************** * * * Having a problem? Start by reading the FAQ "My application does * * not run, what could be wrong?" * * * * http://www.FreeRTOS.org/FAQHelp.html * * * *************************************************************************** http://www.FreeRTOS.org - Documentation, books, training, latest versions, license and Real Time Engineers Ltd. contact details. http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, including FreeRTOS+Trace - an indispensable productivity tool, a DOS compatible FAT file system, and our tiny thread aware UDP/IP stack. http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS licenses offer ticketed support, indemnification and middleware. http://www.SafeRTOS.com - High Integrity Systems also provide a safety engineered and independently SIL3 certified version for use in safety and mission critical applications that require provable dependability. 1 tab == 4 spaces! */ /*----------------------------------------------------------- * Simple IO routines to control the LEDs. *-----------------------------------------------------------*/ /* Scheduler includes. */ #include "FreeRTOS.h" #include "task.h" /* Demo includes. */ #include "partest.h" #define partestNUM_LEDS ( 4 ) long lParTestGetLEDState( unsigned long ulLED ); /*-----------------------------------------------------------*/ void vParTestInitialise( void ) { /* Port pin configuration is done by the low level set up prior to this function being called. */ } /*-----------------------------------------------------------*/ void vParTestSetLED( unsigned long ulLED, signed long xValue ) { if( ulLED < partestNUM_LEDS ) { if( xValue != 0 ) { /* Turn the LED on. */ taskENTER_CRITICAL(); { switch( ulLED ) { case 0: LED0 = LED_ON; break; case 1: LED1 = LED_ON; break; case 2: LED2 = LED_ON; break; case 3: LED3 = LED_ON; break; } } taskEXIT_CRITICAL(); } else { /* Turn the LED off. */ taskENTER_CRITICAL(); { switch( ulLED ) { case 0: LED0 = LED_OFF; break; case 1: LED1 = LED_OFF; break; case 2: LED2 = LED_OFF; break; case 3: LED3 = LED_OFF; break; } } taskEXIT_CRITICAL(); } } } /*-----------------------------------------------------------*/ void vParTestToggleLED( unsigned long ulLED ) { if( ulLED < partestNUM_LEDS ) { taskENTER_CRITICAL(); { if( lParTestGetLEDState( ulLED ) != 0x00 ) { vParTestSetLED( ulLED, 0 ); } else { vParTestSetLED( ulLED, 1 ); } } taskEXIT_CRITICAL(); } } /*-----------------------------------------------------------*/ long lParTestGetLEDState( unsigned long ulLED ) { long lReturn = pdTRUE; if( ulLED < partestNUM_LEDS ) { switch( ulLED ) { case 0 : if( LED0 != 0 ) { lReturn = pdFALSE; } break; case 1 : if( LED1 != 0 ) { lReturn = pdFALSE; } break; case 2 : if( LED2 != 0 ) { lReturn = pdFALSE; } break; case 3 : if( LED3 != 0 ) { lReturn = pdFALSE; } break; } } return lReturn; } /*-----------------------------------------------------------*/
#ifndef __MORDOR_TEE_STREAM_H__ #define __MORDOR_TEE_STREAM_H__ // Copyright (c) 2013 - Cody Cutrer #include <vector> #include "stream.h" namespace Mordor { class TeeStream : public Stream { public: TeeStream(std::vector<Stream::ptr> outputs, int parallelism = -2, bool own = true); bool supportsWrite() { return true; } void close(CloseType type = BOTH); size_t write(const Buffer &buffer, size_t length); void flush(bool flushOutputs = true); bool ownsOutputs() const { return m_own; } private: static void doWrites(Stream::ptr output, const Buffer &buffer, size_t length); private: std::vector<Stream::ptr> m_outputs; int m_parallelism; bool m_own; }; } #endif
/* * Copyright (c) 2006, Ondrej Danek (www.ondrej-danek.net) * 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 Ondrej Danek 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 DUEL6_INFOMESSAGEQUEUE_H #define DUEL6_INFOMESSAGEQUEUE_H #include <string> #include <list> #include "InfoMessage.h" namespace Duel6 { class InfoMessageQueue { private: /** How long each message stays on the screen (in seconds). */ Float32 duration; std::list<InfoMessage> messages; public: InfoMessageQueue(Float32 duration) : duration(duration) {} InfoMessageQueue &add(const Player &player, const std::string &msg); InfoMessageQueue &update(float elapsedTime); void renderPlayerMessages(Renderer &renderer, const Player &player, const Font &font) const; void renderAllMessages(Renderer &renderer, const PlayerView &view, Int32 offsetY, const Font &font) const; void clear(); private: static void renderMessage(Renderer &renderer, Int32 x, Int32 y, const std::string &msg, const Font &font); }; } #endif
#import <SenTestingKit/SenTestingKit.h> @interface NTLNURLUtilsTest : SenTestCase { } @end
// Copyright (c) 2010 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 CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_ #define CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_ #include "base/basictypes.h" #include "base/file_path.h" #include "content/browser/browser_message_filter.h" #include "ipc/ipc_platform_file.h" namespace base { struct PlatformFileInfo; } namespace IPC { class Message; } class FileUtilitiesMessageFilter : public BrowserMessageFilter { public: explicit FileUtilitiesMessageFilter(int process_id); // BrowserMessageFilter implementation. virtual void OverrideThreadForMessage(const IPC::Message& message, BrowserThread::ID* thread); virtual bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok); private: ~FileUtilitiesMessageFilter(); typedef void (*FileInfoWriteFunc)(IPC::Message* reply_msg, const base::PlatformFileInfo& file_info); void OnGetFileSize(const FilePath& path, int64* result); void OnGetFileModificationTime(const FilePath& path, base::Time* result); void OnOpenFile(const FilePath& path, int mode, IPC::PlatformFileForTransit* result); // The ID of this process. int process_id_; DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilitiesMessageFilter); }; #endif // CONTENT_BROWSER_RENDERER_HOST_FILE_UTILITIES_MESSAGE_FILTER_H_
/* * Copyright (c) 2015, Yahoo Inc. All rights reserved. * Copyrights licensed under the New BSD License. * See the accompanying LICENSE file for terms. */ #ifndef COMMON_H #define COMMON_H #include <memory> #include <regex> #include <set> #include <string> typedef std::shared_ptr< const std::regex > Regex; typedef std::shared_ptr< const std::set< std::string > > Set; #endif //COMMON_H
/*------------------------------------------------------------------------- * * dest.h * support for communication destinations * * Whenever the backend executes a query that returns tuples, the results * have to go someplace. For example: * * - stdout is the destination only when we are running a * standalone backend (no postmaster) and are returning results * back to an interactive user. * * - a remote process is the destination when we are * running a backend with a frontend and the frontend executes * PQexec() or PQfn(). In this case, the results are sent * to the frontend via the functions in backend/libpq. * * - DestNone is the destination when the system executes * a query internally. The results are discarded. * * dest.c defines three functions that implement destination management: * * BeginCommand: initialize the destination at start of command. * CreateDestReceiver: return a pointer to a struct of destination-specific * receiver functions. * EndCommand: clean up the destination at end of command. * * BeginCommand/EndCommand are executed once per received SQL query. * * CreateDestReceiver returns a receiver object appropriate to the specified * destination. The executor, as well as utility statements that can return * tuples, are passed the resulting DestReceiver* pointer. Each executor run * or utility execution calls the receiver's rStartup method, then the * receiveSlot method (zero or more times), then the rShutdown method. * The same receiver object may be re-used multiple times; eventually it is * destroyed by calling its rDestroy method. * * In some cases, receiver objects require additional parameters that must * be passed to them after calling CreateDestReceiver. Since the set of * parameters varies for different receiver types, this is not handled by * this module, but by direct calls from the calling code to receiver type * specific functions. * * The DestReceiver object returned by CreateDestReceiver may be a statically * allocated object (for destination types that require no local state), * in which case rDestroy is a no-op. Alternatively it can be a palloc'd * object that has DestReceiver as its first field and contains additional * fields (see printtup.c for an example). These additional fields are then * accessible to the DestReceiver functions by casting the DestReceiver* * pointer passed to them. The palloc'd object is pfree'd by the rDestroy * method. Note that the caller of CreateDestReceiver should take care to * do so in a memory context that is long-lived enough for the receiver * object not to disappear while still needed. * * Special provision: None_Receiver is a permanently available receiver * object for the DestNone destination. This avoids useless creation/destroy * calls in portal and cursor manipulations. * * * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/tcop/dest.h * *------------------------------------------------------------------------- */ #ifndef DEST_H #define DEST_H #include "executor/tuptable.h" /* buffer size to use for command completion tags */ #define COMPLETION_TAG_BUFSIZE 64 /* ---------------- * CommandDest is a simplistic means of identifying the desired * destination. Someday this will probably need to be improved. * * Note: only the values DestNone, DestDebug, DestRemote are legal for the * global variable whereToSendOutput. The other values may be used * as the destination for individual commands. * ---------------- */ typedef enum { DestNone, /* results are discarded */ DestDebug, /* results go to debugging output */ DestRemote, /* results sent to frontend process */ DestRemoteExecute, /* sent to frontend, in Execute command */ DestRemoteSimple, /* sent to frontend, w/no catalog access */ DestSPI, /* results sent to SPI manager */ DestTuplestore, /* results sent to Tuplestore */ DestIntoRel, /* results sent to relation (SELECT INTO) */ DestCopyOut, /* results sent to COPY TO code */ DestSQLFunction, /* results sent to SQL-language func mgr */ DestTransientRel, /* results sent to transient relation */ DestTupleQueue /* results sent to tuple queue */ } CommandDest; /* ---------------- * DestReceiver is a base type for destination-specific local state. * In the simplest cases, there is no state info, just the function * pointers that the executor must call. * * Note: the receiveSlot routine must be passed a slot containing a TupleDesc * identical to the one given to the rStartup routine. It returns bool where * a "true" value means "continue processing" and a "false" value means * "stop early, just as if we'd reached the end of the scan". * ---------------- */ typedef struct _DestReceiver DestReceiver; struct _DestReceiver { /* Called for each tuple to be output: */ bool (*receiveSlot) (TupleTableSlot *slot, DestReceiver *self); /* Per-executor-run initialization and shutdown: */ void (*rStartup) (DestReceiver *self, int operation, TupleDesc typeinfo); void (*rShutdown) (DestReceiver *self); /* Destroy the receiver object itself (if dynamically allocated) */ void (*rDestroy) (DestReceiver *self); /* CommandDest code for this receiver */ CommandDest mydest; /* Private fields might appear beyond this point... */ }; extern PGDLLIMPORT DestReceiver *None_Receiver; /* permanent receiver for * DestNone */ /* The primary destination management functions */ extern void BeginCommand(const char *commandTag, CommandDest dest); extern DestReceiver *CreateDestReceiver(CommandDest dest); extern void EndCommand(const char *commandTag, CommandDest dest); /* Additional functions that go with destination management, more or less. */ extern void NullCommand(CommandDest dest); extern void ReadyForQuery(CommandDest dest); #endif /* DEST_H */
/* * (c) Thomas Pornin 1998, 1999, 2000 * * 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. The name of the authors may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT 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 AUTHORS 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 UCPP__HASH__ #define UCPP__HASH__ struct hash_item; struct HT { struct hash_item **lists; int nb_lists; int (*cmpdata)(void *, void *); int (*hash)(void *); void (*deldata)(void *); }; int hash_string(char *); struct HT *newHT(int, int (*)(void *, void *), int (*)(void *), void (*)(void *)); void *putHT(struct HT *, void *); void *forceputHT(struct HT *, void *); void *getHT(struct HT *, void *); int delHT(struct HT *, void *); void killHT(struct HT *); void saveHT(struct HT *, void **); void restoreHT(struct HT *, void **); void tweakHT(struct HT *, void **, void *); void scanHT(struct HT *, void (*)(void *)); int hash_struct(void *); int cmp_struct(void *, void *); #endif
/* ----------------------------------------------------------------------------- * * (c) The GHC Team 2000 * * RTS GTK Front Panel (callbacks) * * ---------------------------------------------------------------------------*/ #ifdef RTS_GTK_FRONTPANEL #include "Rts.h" #include <gtk/gtk.h> #include "VisCallbacks.h" #include "VisWindow.h" #include "VisSupport.h" #include "FrontPanel.h" void on_cont_radio_clicked (GtkButton *button, gpointer user_data) { update_mode = Continuous; } void on_stop_before_radio_clicked (GtkButton *button, gpointer user_data) { update_mode = BeforeGC; } void on_stop_after_radio_clicked (GtkButton *button, gpointer user_data) { update_mode = AfterGC; } void on_stop_both_radio_clicked (GtkButton *button, gpointer user_data) { update_mode = BeforeAfterGC; } void on_stop_but_clicked (GtkButton *button, gpointer user_data) { stop_now = TRUE; } void on_continue_but_clicked (GtkButton *button, gpointer user_data) { continue_now = TRUE; } void on_quit_but_clicked (GtkButton *button, gpointer user_data) { quit = TRUE; } #endif /* RTS_GTK_FRONTPANEL */
// Copyright 2015 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 RemoteBridgeFrameOwner_h #define RemoteBridgeFrameOwner_h #include "core/frame/FrameOwner.h" #include "platform/scroll/ScrollTypes.h" #include "public/web/WebFrameOwnerProperties.h" #include "web/WebLocalFrameImpl.h" namespace blink { // Helper class to bridge communication for a frame with a remote parent. // Currently, it serves two purposes: // 1. Allows the local frame's loader to retrieve sandbox flags associated with // its owner element in another process. // 2. Trigger a load event on its owner element once it finishes a load. class RemoteBridgeFrameOwner final : public NoBaseWillBeGarbageCollectedFinalized<RemoteBridgeFrameOwner>, public FrameOwner { WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RemoteBridgeFrameOwner); public: static PassOwnPtrWillBeRawPtr<RemoteBridgeFrameOwner> create(PassRefPtrWillBeRawPtr<WebLocalFrameImpl> frame, SandboxFlags flags, const WebFrameOwnerProperties& frameOwnerProperties) { return adoptPtrWillBeNoop(new RemoteBridgeFrameOwner(frame, flags, frameOwnerProperties)); } bool isLocal() const override { return false; } SandboxFlags getSandboxFlags() const override { return m_sandboxFlags; } void setSandboxFlags(SandboxFlags flags) { m_sandboxFlags = flags; } void setContentFrame(PassRefPtrWillBeRawPtr<WebLocalFrameImpl> frame) { m_frame = frame; } void dispatchLoad() override; void renderFallbackContent() override { // TODO(dcheng): Implement. } void setScrollingMode(WebFrameOwnerProperties::ScrollingMode); void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; } void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; } ScrollbarMode scrollingMode() const override { return m_scrolling; } int marginWidth() const override { return m_marginWidth; } int marginHeight() const override { return m_marginHeight; } DECLARE_VIRTUAL_TRACE(); private: RemoteBridgeFrameOwner(PassRefPtrWillBeRawPtr<WebLocalFrameImpl>, SandboxFlags, const WebFrameOwnerProperties&); RefPtrWillBeMember<WebLocalFrameImpl> m_frame; SandboxFlags m_sandboxFlags; ScrollbarMode m_scrolling; int m_marginWidth; int m_marginHeight; }; DEFINE_TYPE_CASTS(RemoteBridgeFrameOwner, FrameOwner, owner, !owner->isLocal(), !owner.isLocal()); } // namespace blink #endif // RemoteBridgeFrameOwner_h
// This file was generated based on 'C:\ProgramData\Uno\Packages\Uno.Collections\0.20.1\Extensions\$.uno'. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Uno.h> namespace g{namespace Uno{namespace Collections{struct IListExtensions;}}} namespace g{ namespace Uno{ namespace Collections{ // public static class IListExtensions :247 // { uClassType* IListExtensions_typeof(); void IListExtensions__AddRange_fn(uType* __type, uObject* self, uObject* collection); void IListExtensions__Last_fn(uType* __type, uObject* self, uTRef __retval); void IListExtensions__RemoveLast_fn(uType* __type, uObject* self, uTRef __retval); struct IListExtensions : uObject { static void AddRange(uType* __type, uObject* self, uObject* collection); template<class T> static T Last(uType* __type, uObject* self) { T __retval; return IListExtensions__Last_fn(__type, self, &__retval), __retval; } template<class T> static T RemoveLast(uType* __type, uObject* self) { T __retval; return IListExtensions__RemoveLast_fn(__type, self, &__retval), __retval; } }; // } }}} // ::g::Uno::Collections
#ifndef INCLUDED_RENDER_HEAD_COLOR_ACTION_RENDERER_H #define INCLUDED_RENDER_HEAD_COLOR_ACTION_RENDERER_H #include "platform/i_platform.h" #include "render/action_renderer.h" #include "core/actor.h" #include "renderable_sprite.h" #include "renderable_repo.h" namespace render { class HeadColorActionRenderer : public ActionRenderer { public: HeadColorActionRenderer( int32_t Id ); protected: virtual glm::vec4 GetRenderableColor( Actor const& actor ) const; }; } // namespace render #endif//INCLUDED_RENDER_HEAD_COLOR_ACTION_RENDERER_H //command: "classgenerator.exe" -g "action_renderer" -c "head_color_action_renderer"
/* * RELIC is an Efficient LIbrary for Cryptography * Copyright (c) 2009 RELIC Authors * * This file is part of RELIC. RELIC is legal property of its developers, * whose names are not listed here. Please refer to the COPYRIGHT file * for contact information. * * RELIC is free software; you can redistribute it and/or modify it under the * terms of the version 2.1 (or later) of the GNU Lesser General Public License * as published by the Free Software Foundation; or version 2.0 of the Apache * License as published by the Apache Software Foundation. See the LICENSE files * for more details. * * RELIC 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 LICENSE files for more details. * * You should have received a copy of the GNU Lesser General Public or the * Apache License along with RELIC. If not, see <https://www.gnu.org/licenses/> * or <https://www.apache.org/licenses/>. */ /** * @file * * Implementation of the low-level binary field bit shifting functions. * * @ingroup bn */ #include <gmp.h> #include "relic_fb.h" #include "relic_util.h" #include "relic_fb_low.h" /*============================================================================*/ /* Public definitions */ /*============================================================================*/ dig_t fb_lsh1_low(dig_t *c, const dig_t *a) { return mpn_lshift(c, a, RLC_FB_DIGS, 1); } dig_t fb_lshb_low(dig_t *c, const dig_t *a, int bits) { return mpn_lshift(c, a, RLC_FB_DIGS, bits); } dig_t fb_rsh1_low(dig_t *c, const dig_t *a) { return mpn_rshift(c, a, RLC_FB_DIGS, 1); } dig_t fb_rshb_low(dig_t *c, const dig_t *a, int bits) { return mpn_rshift(c, a, RLC_FB_DIGS, bits); } dig_t fb_lsha_low(dig_t *c, const dig_t *a, int bits, int size) { int i, j; dig_t b1, b2; j = RLC_DIG - bits; b1 = a[0]; c[0] ^= (b1 << bits); if (size == RLC_FB_DIGS) { for (i = 1; i < RLC_FB_DIGS; i++) { b2 = a[i]; c[i] ^= ((b2 << bits) | (b1 >> j)); b1 = b2; } } else { for (i = 1; i < size; i++) { b2 = a[i]; c[i] ^= ((b2 << bits) | (b1 >> j)); b1 = b2; } } return (b1 >> j); }
/* * Author: Jon Trulson <jtrulson@ics.com> * Copyright (c) 2015 Intel Corporation. * * 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. */ #pragma once #include <string> #include <iostream> #include <stdint.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <fcntl.h> #include <errno.h> #include <termios.h> #include <sys/time.h> #include <sys/select.h> #include <sys/types.h> #include <sys/stat.h> #include <mraa/uart.h> const int MHZ16_DEFAULT_UART = 0; // protocol start and end codes const uint8_t MHZ16_START = 0x7e; const uint8_t MHZ16_END = 0x7e; namespace upm { /** * @brief MHZ16 Serial CO2 Sensor library * @defgroup mhz16 libupm-mhz16 * @ingroup seeed uart gaseous */ /** * @library mhz16 * @sensor mhz16 * @comname Grove CO2 Sensor * @altname MHZ16 Serial CO2 Sensor * @type gaseous * @man seeed * @con uart * * @brief API support for the Grove CO2 sensor * * This class implements support for the Grove CO2 sensor. * * Its CO2 detection range is 0-2,000 ppm. It requires a * 2-3 minute warm-up time before reporting valid data. * * @image html mhz16.jpg * @snippet mhz16.cxx Interesting */ class MHZ16 { public: /** * MHZ16 constructor * * @param uart Default UART to use (0 or 1) */ MHZ16(int uart); /** * MHZ16 destructor */ ~MHZ16(); /** * Checks to see if there is data available for reading * * @param millis Number of milliseconds to wait; 0 means no waiting. * @return True if there is data available for reading */ bool dataAvailable(unsigned int millis); /** * Reads any available data in a user-supplied buffer. Note: the * call blocks until data is available to be read. Use * dataAvailable() to determine whether there is data available * beforehand, to avoid blocking. * * @param buffer Buffer to hold the data read * @param len Length of the buffer * @return Number of bytes read */ int readData(char *buffer, int len); /** * Writes the data in the buffer to the device * * @param buffer Buffer to hold the data read * @param len Length of the buffer * @return Number of bytes written */ int writeData(char *buffer, int len); /** * Sets up proper tty I/O modes and the baud rate. The default * baud rate is 9,600 (B9600). * * @param baud Desired baud rate. * @return True if successful */ bool setupTty(speed_t baud=B9600); /** * Verifies the packet header and indicates its validity * * @param pkt Packet to check * @return True if the checksum is valid, false otherwise */ bool verifyPacket(uint8_t *pkt, int len); /** * Queries the sensor and returns gas (CO2) concentration and * temperature data. * * @param gas Returned gas concentration * @param temp Returned temperature in Celsius * @return True if successful */ bool getData(int *gas, int *temp); /** * Sets the zero point of the sensor * */ void calibrateZeroPoint(); protected: int ttyFd() { return m_ttyFd; }; private: mraa_uart_context m_uart; int m_ttyFd; }; }
/**************************************************************************************** Copyright (C) 2014 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 fbxblendshape.h #ifndef _FBXSDK_SCENE_GEOMETRY_BLEND_SHAPE_H_ #define _FBXSDK_SCENE_GEOMETRY_BLEND_SHAPE_H_ #include <fbxsdk/fbxsdk_def.h> #include <fbxsdk/scene/geometry/fbxdeformer.h> #include <fbxsdk/fbxsdk_nsbegin.h> class FbxGeometry; class FbxBlendShapeChannel; /** Class for blend shape deformer. * A blend shape deformer takes a base shape (polygonal surface, curve, or surface) * and blends it with other target shapes based on weight values. * Blend shape deformer organize all target shapes via blend shape channel. * One blend shape deformer can contains multiple blend shape channels, then each * channel can organize multiple target shapes, \see FbxBlendShapeChannel, FbxShape. * \remarks The blend effect of each blend shape channel is additive, so the final blend * effect of a blend shape deformer is the sum of blend effect of all blend shape * channels it contains, the blend effect of each blend shape channel is controlled * by the property DeformPercent of blend shape channel. * \see FbxGeometry, FbxGeometryBase. * \nosubgrouping */ class FBXSDK_DLL FbxBlendShape : public FbxDeformer { FBXSDK_OBJECT_DECLARE(FbxBlendShape, FbxDeformer); public: /** Set the geometry affected by this blend shape deformer. * \param pGeometry Pointer to the geometry object to set. * \return \c true on success, \c false otherwise. * \remarks One blend shape deformer can only be used on one base geometry. * So when SetGeometry is called, the pGeometry will replace the * current base geometry connected to this blend shape deformer. */ bool SetGeometry(FbxGeometry* pGeometry); /** Get the geometry affected by this blend shape deformer. * \return A pointer to the geometry if it is set or \c NULL if not set yet. */ FbxGeometry* GetGeometry(); /** Add a blend shape channel. * \param pBlendShapeChannel Pointer to the blend shape channel object to add. * \return \c true on success, \c false otherwise. */ bool AddBlendShapeChannel(FbxBlendShapeChannel* pBlendShapeChannel); /** Remove the given blend shape. * \param pBlendShapeChannel Pointer to the blend shape channel to remove from this blend shape deformer. * \return Pointer to the blend shape channel or \c NULL if pBlendShapeChannel is not owned by this blend shape deformer. */ FbxBlendShapeChannel* RemoveBlendShapeChannel(FbxBlendShapeChannel* pBlendShapeChannel); /** Get the number of blend shape channels. * \return Number of blend shape channels that have been added to this object. */ int GetBlendShapeChannelCount() const; /** Get blend shape channel at given index. * \param pIndex Index of the blend shape channel. * \return Pointer to the blend shape channel or \c NULL if index is out of range. */ FbxBlendShapeChannel* GetBlendShapeChannel(int pIndex); /** Get the blend shape channel at given index. * \param pIndex Index of the blend shape channel. * \return Pointer to the blend shape channel or \c NULL if index is out of range. */ const FbxBlendShapeChannel* GetBlendShapeChannel(int pIndex) const; /** Get the type of the deformer. * \return The deformer type identifier of blend shape deformer. */ EDeformerType GetDeformerType() const {return eBlendShape; }; /** Restore the blend shape deformer to the initial state. * Calling this function will do the following: * \li Clear the pointer to base geometry. * \li Remove all the blend shape channels. */ void Reset(); /***************************************************************************************************************************** ** 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 virtual FbxObject& Copy(const FbxObject& pObject); virtual FbxObject* Clone(FbxObject::ECloneType pCloneType=eDeepClone, FbxObject* pContainer=NULL, void* pSet = NULL) const; protected: virtual FbxStringList GetTypeFlags() const; #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/ }; #include <fbxsdk/fbxsdk_nsend.h> #endif /* _FBXSDK_SCENE_GEOMETRY_BLEND_SHAPE_H_ */
#ifndef _MFnIntArrayData #define _MFnIntArrayData //- // ========================================================================== // Copyright (C) 1995 - 2006 Autodesk, Inc., and/or its licensors. All // rights reserved. // // The coded instructions, statements, computer programs, and/or related // material (collectively the "Data") in these files contain unpublished // information proprietary to Autodesk, Inc. ("Autodesk") and/or its // licensors, which is protected by U.S. and Canadian federal copyright law // and by international treaties. // // The Data may not be disclosed or distributed to third parties or be // copied or duplicated, in whole or in part, without the prior written // consent of Autodesk. // // The copyright notices in the Software and this entire statement, // including the above license grant, this restriction and the following // disclaimer, must be included in all copies of the Software, in whole // or in part, and all derivative works of the Software, unless such copies // or derivative works are solely in the form of machine-executable object // code generated by a source language processor. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. // AUTODESK DOES NOT MAKE AND HEREBY DISCLAIMS ANY EXPRESS OR IMPLIED // WARRANTIES INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES OF // NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, // OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE. IN NO // EVENT WILL AUTODESK AND/OR ITS LICENSORS BE LIABLE FOR ANY LOST // REVENUES, DATA, OR PROFITS, OR SPECIAL, DIRECT, INDIRECT, OR // CONSEQUENTIAL DAMAGES, EVEN IF AUTODESK AND/OR ITS LICENSORS HAS // BEEN ADVISED OF THE POSSIBILITY OR PROBABILITY OF SUCH DAMAGES. // ========================================================================== //+ // // CLASS: MFnIntArrayData // // **************************************************************************** #if defined __cplusplus // **************************************************************************** // INCLUDED HEADER FILES #include <maya/MFnData.h> // **************************************************************************** // DECLARATIONS class MIntArray; // **************************************************************************** // CLASS DECLARATION (MFnIntArrayData) //! \ingroup OpenMaya MFn //! \brief int array function set for dependency node data. /*! MFnIntArrayData allows the creation and manipulation of MIntArray data objects for use in the dependency graph. If a user written dependency node either accepts or produces MIntArrays, then this class is used to extract or create the data that comes from or goes to other dependency graph nodes. The MDataHandle::type method will return kIntArray when data of this type is present. To access it, the MDataHandle::data method is used to get an MObject for the data and this should then be used to initialize an instance of MFnIntArrayData. */ class OPENMAYA_EXPORT MFnIntArrayData : public MFnData { declareMFn(MFnIntArrayData, MFnData); public: unsigned int length( MStatus* ReturnStatus = NULL ) const; int operator[]( unsigned int index ) const; MStatus set( int element, unsigned int index ); MStatus copyTo( MIntArray& ) const; MStatus set( const MIntArray& newArray ); MIntArray array( MStatus*ReturnStatus=NULL ); MObject create( MStatus*ReturnStatus=NULL ); MObject create( const MIntArray& in, MStatus*ReturnStatus=NULL ); BEGIN_NO_SCRIPT_SUPPORT: declareMFnConstConstructor( MFnIntArrayData, MFnData ); //! NO SCRIPT SUPPORT int& operator[]( unsigned int index ); END_NO_SCRIPT_SUPPORT: protected: // No protected members private: // No private members }; #endif /* __cplusplus */ #endif /* _MFnIntArrayData */
/* * issue.h * * Created on: 2015年3月16日 * Author: Fifi Lyu */ #ifndef ISSUE_H_ #define ISSUE_H_ #include <linux/stddef.h> // 0 off // 1 on #define DEBUG 0 #define HTTP_PORT 80 #define WL_HOST "/etc/http_whitelist/host" #define WL_NETWORK "/etc/http_whitelist/network" #define MODOUBLE_NAME "http_whitelist" #define LICENSE "Dual MIT/GPL"; #define AUTHOR "Fifi Lyu"; #define DESCRIPTION "HTTP Whitelist"; #endif /* ISSUE_H_ */
// OCHamcrest by Jon Reid, http://qualitycoding.org/about/ // Copyright 2016 hamcrest.org. See LICENSE.txt #import <OCHamcrest/HCBaseMatcher.h> /*! * @abstract Base class for matchers that generate mismatch descriptions during the matching. * @discussion Some matching algorithms have several "no match" paths. It helps to make the mismatch * description as precise as possible, but we don't want to have to repeat the matching logic to do * so. For such matchers, subclass HCDiagnosingMatcher and implement @ref HCMatcher's * <code>-matches:describingMismatchTo:</code>. */ @interface HCDiagnosingMatcher : HCBaseMatcher @end
// // MTViewController.h // MTAnimation // // Created by Adam Kirk on 4/25/13. // Copyright (c) 2013 Mysterious Trousers. All rights reserved. // #import <UIKit/UIKit.h> @interface MTViewController : UIViewController @end
#ifndef WINDOWFROMPOINT_INCLUDED #define WINDOWFROMPOINT_INCLUDED #ifdef __cplusplus extern "C" { #endif HWND WindowFromPointEx(POINT pt, BOOL fShowHidden); #ifdef __cplusplus } #endif #endif
// // CBPWordPress.h // CBPWordPress // // Created by Karl Monaghan on 04/05/2014. // Copyright (c) 2014 Crayons and Brown Paper. All rights reserved. // #import "CBPWordPressAPIClient.h" #import "CBPWordPressAttachment.h" #import "CBPWordPressAuthor.h" #import "CBPWordPressCategory.h" #import "CBPWordPressComment.h" #import "CBPWordPressImage.h" #import "CBPWordPressPost.h" #import "CBPWordPressPostContainer.h" #import "CBPWordPressPostsContainer.h" #import "CBPWordPressSearchParamters.h" #import "CBPWordPressTag.h" #import "NSDateFormatter+CBPWordPress.h" #import "NSURLSessionDataTask+CBPWordPress.h"
// -*- C++ -*- compatibility header. // Copyright (C) 2002-2021 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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 3, 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 General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. /** @file stdio.h * This is a Standard C++ Library header. */ #include <cstdio> #ifndef _GLIBCXX_STDIO_H #define _GLIBCXX_STDIO_H 1 #ifdef _GLIBCXX_NAMESPACE_C using std::FILE; using std::fpos_t; using std::remove; using std::rename; using std::tmpfile; using std::tmpnam; using std::fclose; using std::fflush; using std::fopen; using std::freopen; using std::setbuf; using std::setvbuf; using std::fprintf; using std::fscanf; using std::printf; using std::scanf; using std::snprintf; using std::sprintf; using std::sscanf; using std::vfprintf; using std::vfscanf; using std::vprintf; using std::vscanf; using std::vsnprintf; using std::vsprintf; using std::vsscanf; using std::fgetc; using std::fgets; using std::fputc; using std::fputs; using std::getc; using std::getchar; using std::gets; using std::putc; using std::putchar; using std::puts; using std::ungetc; using std::fread; using std::fwrite; using std::fgetpos; using std::fseek; using std::fsetpos; using std::ftell; using std::rewind; using std::clearerr; using std::feof; using std::ferror; using std::perror; #endif #endif
/***************************************************************************** Copyright(c) 2012 FCI Inc. All Rights Reserved File name : fc8150_spib.c Description : fc8150 host interface *******************************************************************************/ #include "fci_types.h" #include "fc8150_regs.h" #include "fci_oal.h" #define SPI_BMODE 0x00 #define SPI_WMODE 0x10 #define SPI_LMODE 0x20 #define SPI_READ 0x40 #define SPI_WRITE 0x00 #define SPI_AINC 0x80 #define CHIPID (0 << 3) //static OAL_SEMAPHORE hBbmMutex; static int spi_bulkread(HANDLE hDevice, u16 addr, u8 command, u8 *data, u16 length) { /*unsigned char *cmd; cmd = g_SpiCmd; cmd[0] = addr & 0xff; cmd[1] = (addr >> 8) & 0xff; cmd[2] = (command & 0xf0) | CHIPID | ((length >> 16) & 0x07); cmd[3] = (length >> 8) & 0xff; cmd[4] = length & 0xff; spi_cmd.pCmd = cmd; spi_cmd.cmdSize = 5; spi_cmd.pData = g_SpiData; spi_cmd.dataSize = length; // Send Command and data through the SPI if(SPID_SendCommand_ByteRead(&spid, &spi_cmd)) return BBM_NOK; memcpy(data, g_SpiData, length);*/ return BBM_OK; } static int spi_bulkwrite(HANDLE hDevice, u16 addr, u8 command, u8* data, u16 length) { /*unsigned char *cmd; cmd = g_SpiCmd; cmd[0] = addr & 0xff; cmd[1] = (addr >> 8) & 0xff; cmd[2] = (command & 0xf0) | CHIPID | ((length >> 16) & 0x07); cmd[3] = (length >> 8) & 0xff; cmd[4] = length & 0xff; spi_cmd.pCmd = cmd; spi_cmd.cmdSize = 5; spi_cmd.pData = g_SpiData; memcpy(g_SpiData, data, length); spi_cmd.dataSize = length; // Send Command and data through the SPI if(SPID_SendCommand_ByteWrite(&spid, &spi_cmd)) return BBM_NOK;*/ return BBM_OK; } static int spi_dataread(HANDLE hDevice, u16 addr, u8 command, u8* data, u32 length) { /*unsigned char *cmd; cmd = g_SpiCmd; cmd[0] = addr & 0xff; cmd[1] = (addr >> 8) & 0xff; cmd[2] = (command & 0xf0) | CHIPID | ((length >> 16) & 0x07); cmd[3] = (length >> 8) & 0xff; cmd[4] = length & 0xff; spi_cmd.pCmd = cmd; spi_cmd.cmdSize = 5; spi_cmd.pData = data; spi_cmd.dataSize = length; // Send Command and data through the SPI if(SPID_SendCommand_ByteRead(&spid, &spi_cmd)) return BBM_NOK;*/ return BBM_OK; } int fc8150_spib_init(HANDLE hDevice, u16 param1, u16 param2) { //OAL_CREATE_SEMAPHORE(&hBbmMutex, "spi", 1, OAL_FIFO); return BBM_OK; } int fc8150_spib_byteread(HANDLE hDevice, u16 addr, u8 *data) { int res; u8 command = SPI_READ; //OAL_OBTAIN_SEMAPHORE(&hBbmMutex, OAL_SUSPEND); res = spi_bulkread(hDevice, addr, command, data, 1); //OAL_RELEASE_SEMAPHORE(&hBbmMutex); return res; } int fc8150_spib_wordread(HANDLE hDevice, u16 addr, u16 *data) { int res; u8 command = SPI_READ | SPI_AINC; //OAL_OBTAIN_SEMAPHORE(&hBbmMutex, OAL_SUSPEND); res = spi_bulkread(hDevice, addr, command, (u8*)data, 2); //OAL_RELEASE_SEMAPHORE(&hBbmMutex); return res; } int fc8150_spib_longread(HANDLE hDevice, u16 addr, u32 *data) { int res; u8 command = SPI_READ | SPI_AINC; //OAL_OBTAIN_SEMAPHORE(&hBbmMutex, OAL_SUSPEND); res = spi_bulkread(hDevice, addr, command, (u8*)data, 4); //OAL_RELEASE_SEMAPHORE(&hBbmMutex); return res; } int fc8150_spib_bulkread(HANDLE hDevice, u16 addr, u8 *data, u16 length) { int res; u8 command = SPI_READ | SPI_AINC; //OAL_OBTAIN_SEMAPHORE(&hBbmMutex, OAL_SUSPEND); res = spi_bulkread(hDevice, addr, command, data, length); //OAL_RELEASE_SEMAPHORE(&hBbmMutex); return res; } int fc8150_spib_bytewrite(HANDLE hDevice, u16 addr, u8 data) { int res; u8 command = SPI_WRITE; //OAL_OBTAIN_SEMAPHORE(&hBbmMutex, OAL_SUSPEND); res = spi_bulkwrite(hDevice, addr, command, (u8*)&data, 1); //OAL_RELEASE_SEMAPHORE(&hBbmMutex); return res; } int fc8150_spib_wordwrite(HANDLE hDevice, u16 addr, u32 data) { int res; u8 command = SPI_WRITE | SPI_AINC; //OAL_OBTAIN_SEMAPHORE(&hBbmMutex, OAL_SUSPEND); res = spi_bulkwrite(hDevice, addr, command, (u8*)&data, 2); //OAL_RELEASE_SEMAPHORE(&hBbmMutex); return res; } int fc8150_spib_longwrite(HANDLE hDevice, u16 addr, u32 data) { int res; u8 command = SPI_WRITE | SPI_AINC; //OAL_OBTAIN_SEMAPHORE(&hBbmMutex, OAL_SUSPEND); res = spi_bulkwrite(hDevice, addr, command, (u8*)&data, 4); //OAL_RELEASE_SEMAPHORE(&hBbmMutex); return res; } int fc8150_spib_bulkwrite(HANDLE hDevice, u16 addr, u8* data, u16 length) { int res; u8 command = SPI_WRITE | SPI_AINC; //OAL_OBTAIN_SEMAPHORE(&hBbmMutex, OAL_SUSPEND); res = spi_bulkwrite(hDevice, addr, command, data, length); //OAL_RELEASE_SEMAPHORE(&hBbmMutex); return res; } int fc8150_spib_dataread(HANDLE hDevice, u16 addr, u8* data, u32 length) { int res; u8 command = SPI_READ; //OAL_OBTAIN_SEMAPHORE(&hBbmMutex, OAL_SUSPEND); res = spi_dataread(hDevice, addr, command, data, length); //OAL_RELEASE_SEMAPHORE(&hBbmMutex); return res; } int fc8150_spib_deinit(HANDLE hDevice) { //OAL_DELETE_SEMAPHORE(&hBbmMutex); return BBM_OK; }
/* This testcase is part of GDB, the GNU debugger. Copyright 2008-2020 Free Software Foundation, Inc. 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 3 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/>. */ #define _GNU_SOURCE #include <unistd.h> void marker1 (void) { } void marker2 (void) { } uid_t ruid = -1, euid = -1, suid = -1; gid_t rgid = -1, egid = -1, sgid = -1; int main (void) { marker1 (); getresuid (&ruid, &euid, &suid); getresgid (&rgid, &egid, &sgid); marker2 (); return 0; }
/* * This file is part of USBProxy. */ #ifndef USBPROXY_FDINFO_H #define USBPROXY_FDINFO_H #ifdef __cplusplus extern "C" { #endif void showFDDetail( __s32 fd ); void showFDInfo(); #ifdef __cplusplus } #endif #endif /* USBPROXY_FDINFO_H */
/* Q Light Controller enttecdmxusb.h Copyright (C) Heikki Junnila 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. The license is in the file "COPYING". You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,$ */ #ifndef ENTTECDMXUSBOUT_H #define ENTTECDMXUSBOUT_H #include "qlcoutplugin.h" class EnttecDMXUSBWidget; class EnttecDMXUSBOut : public QLCOutPlugin { Q_OBJECT Q_INTERFACES(QLCOutPlugin) /************************************************************************ * Initialization ************************************************************************/ public: /** @reimp */ virtual ~EnttecDMXUSBOut(); /** @reimp */ void init(); #ifdef DBUS_ENABLED protected slots: /** Called when a USB device has been plugged in */ void slotDeviceAdded(const QString& name); /** Called when a USB device has been plugged out */ void slotDeviceRemoved(const QString& name); #endif /** @reimp */ QString name(); /************************************************************************ * Outputs ************************************************************************/ public: /** @reimp */ void open(quint32 output); /** @reimp */ void close(quint32 output); /** @reimp */ QStringList outputs(); /** @reimp */ QString infoText(quint32 output = KOutputInvalid); /** @reimp */ void outputDMX(quint32 output, const QByteArray& universe); /******************************************************************** * Configuration ********************************************************************/ public: /** @reimp */ void configure(); /** @reimp */ bool canConfigure(); /******************************************************************** * Devices (ENTTEC calls them "widgets" and so shall we) ********************************************************************/ public: /** Attempt to find all connected devices */ bool rescanWidgets(); protected: /** Currently available devices */ QList <EnttecDMXUSBWidget*> m_widgets; }; #endif
/* ScummVM - Graphic Adventure Engine * * ScummVM is the legal property of its developers, whose names * are too numerous to list here. Please refer to the COPYRIGHT * file distributed with this source distribution. * * 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef LASTEXPRESS_HADIJA_H #define LASTEXPRESS_HADIJA_H #include "lastexpress/entities/entity.h" #include "lastexpress/entities/entity_intern.h" namespace LastExpress { class LastExpressEngine; class Hadija : public Entity { public: Hadija(LastExpressEngine *engine); ~Hadija() {} /** * Resets the entity */ DECLARE_FUNCTION(reset) /** * Handles entering/exiting a compartment. * * @param sequence The sequence to draw * @param compartment The compartment */ DECLARE_FUNCTION_2(enterExitCompartment, const char *sequence, ObjectIndex compartment) /** * Plays sound * * @param filename The sound filename */ DECLARE_FUNCTION_1(playSound, const char *filename) /** * Updates parameter 2 using time value * * @param savepoint The savepoint * - Time to add */ DECLARE_FUNCTION_NOSETUP(updateFromTime) /** * Updates the entity * * @param car The car * @param entityPosition The entity position */ DECLARE_FUNCTION_2(updateEntity, CarIndex car, EntityPosition entityPosition) DECLARE_FUNCTION(compartment6) DECLARE_FUNCTION(compartment8) DECLARE_FUNCTION(compartment6to8) DECLARE_FUNCTION(compartment8to6) /** * Setup Chapter 1 */ DECLARE_FUNCTION(chapter1) /** * Handle Chapter 1 events */ DECLARE_FUNCTION(chapter1Handler) DECLARE_FUNCTION(function12) /** * Setup Chapter 2 */ DECLARE_FUNCTION(chapter2) /** * Handle Chapter 2 events */ DECLARE_FUNCTION(chapter2Handler) /** * Setup Chapter 3 */ DECLARE_FUNCTION(chapter3) /** * Handle Chapter 3 events */ DECLARE_FUNCTION(chapter3Handler) /** * Setup Chapter 4 */ DECLARE_FUNCTION(chapter4) /** * Handle Chapter 4 events */ DECLARE_FUNCTION(chapter4Handler) DECLARE_FUNCTION(function19) /** * Setup Chapter 5 */ DECLARE_FUNCTION(chapter5) /** * Handle Chapter 5 events */ DECLARE_FUNCTION(chapter5Handler) DECLARE_FUNCTION(function22) DECLARE_FUNCTION(function23) DECLARE_NULL_FUNCTION() }; } // End of namespace LastExpress #endif // LASTEXPRESS_HADIJA_H
/* Skeleton for a conversion module - S390 version. 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/>. */ #ifndef IGNORE_ICONV_SKELETON # include_next <iconv/skeleton.c> #endif
/* * This file is part of the DOM implementation for KDE. * * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * Copyright (C) 2004 Apple Computer, Inc. * * 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; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #ifndef HTMLImageElement_h #define HTMLImageElement_h #include "HTMLElement.h" #include "GraphicsTypes.h" #include "HTMLImageLoader.h" namespace WebCore { class HTMLFormElement; class HTMLImageElement : public HTMLElement { friend class HTMLFormElement; public: HTMLImageElement(Document*, HTMLFormElement* = 0); HTMLImageElement(const QualifiedName&, Document*); ~HTMLImageElement(); virtual HTMLTagStatus endTagRequirement() const { return TagStatusForbidden; } virtual int tagPriority() const { return 0; } virtual bool mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const; virtual void parseMappedAttribute(MappedAttribute*); virtual void attach(); virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); virtual void insertedIntoDocument(); virtual void removedFromDocument(); virtual bool canStartSelection() const { return false; } int width(bool ignorePendingStylesheets = false) const; int height(bool ignorePendingStylesheets = false) const; int naturalWidth() const; int naturalHeight() const; bool isServerMap() const { return ismap && usemap.isEmpty(); } String altText() const; String imageMap() const { return usemap; } virtual bool isURLAttribute(Attribute*) const; CompositeOperator compositeOperator() const { return m_compositeOperator; } CachedImage* cachedImage() const { return m_imageLoader.image(); } void setCachedImage(CachedImage* i) { m_imageLoader.setImage(i); }; void setLoadManually (bool loadManually) { m_imageLoader.setLoadManually(loadManually); } String name() const; void setName(const String&); String align() const; void setAlign(const String&); String alt() const; void setAlt(const String&); String border() const; void setBorder(const String&); void setHeight(int); int hspace() const; void setHspace(int); bool isMap() const; void setIsMap(bool); String longDesc() const; void setLongDesc(const String&); String lowsrc() const; void setLowsrc(const String&); String src() const; void setSrc(const String&); String useMap() const; void setUseMap(const String&); int vspace() const; void setVspace(int); void setWidth(int); int x() const; int y() const; bool complete() const; protected: HTMLImageLoader m_imageLoader; String usemap; bool ismap; HTMLFormElement* m_form; String oldNameAttr; String oldIdAttr; CompositeOperator m_compositeOperator; }; } //namespace #endif
/* * ibuf_driver: A test driver for the infinite string structure. * * Copyright (c) 2006, Mike Mueller & Bob Rossi * Subject to the terms of the GNU General Public Licence */ /* Standard Includes */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #if HAVE_STDIO_H #include <stdio.h> #endif /* HAVE_STDIO_H */ #if HAVE_STRING_H #include <string.h> #endif /* HAVE_STRING_H */ /* Local Includes */ #include "ibuf.h" /* * Macros */ #define DEBUG 1 #ifdef DEBUG #define debug(args...) fprintf(stderr, args) #else #define debug(args...) #endif typedef struct ibuf *ibuf; /* * Local function prototypes */ /* Tests */ static int test_add(ibuf s); static int test_addchar(ibuf s); static int test_delchar(ibuf s); static int test_dup(ibuf s); static int test_trim(ibuf s); /* main: * * Description of test procedure here. */ int main(int argc, char *argv[]) { ibuf s = NULL; int result = 0; /* Create a tree */ debug("Creating string... "); s = ibuf_init(); if (s == NULL) { printf("FAILED\n"); return 1; } debug("Succeeded.\n"); /* Run tests */ result |= test_add(s); result |= test_addchar(s); result |= test_delchar(s); result |= test_dup(s); result |= test_trim(s); debug("Destroying string...\n"); ibuf_free(s); if (result) { printf("FAILED\n"); return 2; } printf("PASSED\n"); return 0; } /* * Local function implementations */ static int test_add(ibuf s) { /* Add the strings "hello" and " world" to the ibuf */ ibuf_add(s, "hello"); ibuf_add(s, " world"); /* Make sure that's what got added */ if (strcmp(ibuf_get(s), "hello world") != 0) { debug("test_add: Mismatch, expected \"hello world\", got: %s\n", ibuf_get(s)); return 1; } debug("test_add: Succeeded.\n"); return 0; } static int test_addchar(ibuf s) { /* Add an exclamation to the hello world string. */ ibuf_addchar(s, '!'); /* Make sure it was added correctly. */ if (strcmp(ibuf_get(s), "hello world!") != 0) { debug("test_addchar: Mismatch, expected \"hello world!\", got: %s\n", ibuf_get(s)); return 1; } debug("test_addchar: Succeeded.\n"); return 0; } static int test_delchar(ibuf s) { /* Delete the last '!' from the string. */ ibuf_delchar(s); /* Make sure it was deleted correctly. */ if (strcmp(ibuf_get(s), "hello world") != 0) { debug("test_delchar: Mismatch, expected \"hello world\", got: %s\n", ibuf_get(s)); return 1; } /* Wipe the string via delchar, testing ibuf_length simultaneously */ while (ibuf_length(s) > 0) { ibuf_delchar(s); } /* Make sure s is now an empty string. */ if (strcmp(ibuf_get(s), "") != 0) { debug("test_delchar: Expected empty string, got: %s\n", ibuf_get(s)); return 2; } debug("test_delchar: Succeeded.\n"); return 0; } static int test_dup(ibuf s) { ibuf t; /* Test duplicating a string. */ ibuf_add(s, "test string 1"); t = ibuf_dup(s); if (t == NULL) { debug("test_dup: ibuf_dup (attempt #1) returned NULL\n"); return 1; } if (strcmp(ibuf_get(s), ibuf_get(t)) != 0) { debug("test_dup: Strings mismatched: \"%s\" != \"%s\"\n", ibuf_get(s), ibuf_get(t)); return 1; } ibuf_free(t); /* Corner case: duplicate an empty string */ ibuf_clear(s); t = ibuf_dup(s); if (t == NULL) { debug("test_dup: ibuf_dup (attempt #2) returned NULL\n"); return 1; } if (strcmp(ibuf_get(t), "") != 0) { debug("test_dup: Expected empty string, got: %s\n", ibuf_get(t)); return 1; } ibuf_free(t); debug("test_dup: Succeeded.\n"); return 0; } static int test_trim(ibuf s) { /* Test #1: Empty string. */ ibuf_clear(s); ibuf_trim(s); if (strcmp(ibuf_get(s), "") != 0) { debug("test_trim: 1: expected empty string, got: %s\n", ibuf_get(s)); return 1; } /* Test #2: Single space. */ ibuf_clear(s); ibuf_addchar(s, ' '); ibuf_trim(s); if (strcmp(ibuf_get(s), "") != 0) { debug("test_trim: 2: expected empty string, got: %s\n", ibuf_get(s)); return 2; } /* Test #3: "hello world" (no leading or trailing spaces) */ ibuf_clear(s); ibuf_add(s, "hello world"); ibuf_trim(s); if (strcmp(ibuf_get(s), "hello world") != 0) { debug("test_trim: 3: expected \"hello world\", got: %s\n", ibuf_get(s)); return 3; } /* Test #4: " hello world \t" (leading and trailing spaces) */ ibuf_clear(s); ibuf_add(s, " hello world \t"); ibuf_trim(s); if (strcmp(ibuf_get(s), "hello world") != 0) { debug("test_trim: 4: expected \"hello world\", got: %s\n", ibuf_get(s)); return 3; } debug("test_trim: Succeeded.\n"); return 0; }
/* * specstrings.h * * Standard Annotation Language (SAL) definitions * * This file is part of the ReactOS PSDK package. * * Contributors: * Timo Kreuzer (timo.kreuzer@reactos.org) * * THIS SOFTWARE IS NOT COPYRIGHTED * * This source code is offered for use in the public domain. You may * use, modify or distribute it freely. * * This code is distributed in the hope that it will be useful but * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY * DISCLAIMED. This includes but is not limited to warranties of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * */ #pragma once #define SPECSTRINGS_H #include <sal.h> #include <driverspecs.h> #define __field_bcount(size) __notnull __byte_writableTo(size) #define __field_ecount(size) __notnull __elem_writableTo(size) #define __post_invalid _Post_ __notvalid #define __deref_in #define __deref_in_ecount(size) #define __deref_in_bcount(size) #define __deref_in_opt #define __deref_in_ecount_opt(size) #define __deref_in_bcount_opt(size) #define __deref_opt_in #define __deref_opt_in_ecount(size) #define __deref_opt_in_bcount(size) #define __deref_opt_in_opt #define __deref_opt_in_ecount_opt(size) #define __deref_opt_in_bcount_opt(size) #define __out_awcount(expr,size) #define __in_awcount(expr,size) #define __nullnullterminated #define __in_data_source(src_sym) #define __kernel_entry #if (_MSC_VER >= 1000) && !defined(__midl) && defined(_PREFAST_) #define __inner_data_source(src_raw) _SA_annotes1(SAL_untrusted_data_source,src_raw) #define __out_data_source(src_sym) _Post_ __inner_data_source(#src_sym) #define __analysis_noreturn __declspec(noreturn) #else #define __out_data_source(src_sym) #define __analysis_noreturn #endif #if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN) #define _Check_return_opt_ _Check_return_ #else #define _Check_return_opt_ #endif #if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN_WAT) #define _Check_return_wat_ _Check_return_ #else #define _Check_return_wat_ #endif
//------------------------------------------------------------------------------ // Copyright (c) 2004-2015 Darby Johnston // 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 names of the copyright holders nor the names of any // 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 // SUBSTITUE 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. //------------------------------------------------------------------------------ //! \file djvViewPlaybackMenu.h #ifndef DJV_VIEW_PLAYBACK_MENU_H #define DJV_VIEW_PLAYBACK_MENU_H #include <djvViewAbstractMenu.h> struct djvViewPlaybackMenuPrivate; //! \addtogroup djvViewPlayback //@{ //------------------------------------------------------------------------------ //! \class djvViewPlaybackMenu //! //! This class provides the playback group menu. //------------------------------------------------------------------------------ class djvViewPlaybackMenu : public djvViewAbstractMenu { Q_OBJECT public: //! Constructor. explicit djvViewPlaybackMenu( djvViewAbstractActions * actions, QWidget * parent = 0); //! Destructor. virtual ~djvViewPlaybackMenu(); private: DJV_PRIVATE_COPY(djvViewPlaybackMenu); djvViewPlaybackMenuPrivate * _p; }; //@} // djvViewPlayback #endif // DJV_VIEW_PLAYBACK_MENU_H
/*************************************************************************** Node.h - description ------------------- copyright : (C) 2004 by Marco Hugentobler email : mhugent@geo.unizh.ch ***************************************************************************/ /*************************************************************************** * * * 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 NODE_H #define NODE_H #include "Point3D.h" /** \ingroup analysis * Node is a class used by Line3D. It represents a node in the single directed linked list. Associated Point3D objects are deleted when the node is deleted.*/ class ANALYSIS_EXPORT Node { protected: /** Pointer to the Point3D object associated with the node*/ Point3D* mPoint; /** Pointer to the next Node in the linked list*/ Node* mNext; public: Node(); Node( const Node& n ); ~Node(); Node& operator=( const Node& n ); /** Returns a pointer to the next element in the linked list*/ Node* getNext() const; /** Returns a pointer to the Point3D object associated with the node*/ Point3D* getPoint() const; /** Sets the pointer to the next node*/ void setNext( Node* n ); /** Sets a new pointer to an associated Point3D object*/ void setPoint( Point3D* p ); }; inline Node::Node() : mPoint( nullptr ) , mNext( nullptr ) { } inline Node::~Node() { delete mPoint; } inline Node* Node::getNext() const { return mNext; } inline Point3D* Node::getPoint() const { return mPoint; } inline void Node::setNext( Node* n ) { mNext = n; } inline void Node::setPoint( Point3D* p ) { mPoint = p; } #endif
/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef COMPUTE_CLASS // clang-format off ComputeStyle(plasticity/atom,ComputePlasticityAtom); // clang-format on #else #ifndef LMP_COMPUTE_PLASTICITY_ATOM_H #define LMP_COMPUTE_PLASTICITY_ATOM_H #include "compute.h" namespace LAMMPS_NS { class ComputePlasticityAtom : public Compute { public: ComputePlasticityAtom(class LAMMPS *, int, char **); ~ComputePlasticityAtom() override; void init() override; void compute_peratom() override; double memory_usage() override; private: int nmax; double *plasticity; class FixPeriNeigh *fix_peri_neigh; }; } // namespace LAMMPS_NS #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Compute plasticity/atom cannot be used with this pair style Self-explanatory. W: More than one compute plasticity/atom Self-explanatory. E: Compute plasticity/atom requires Peridynamic pair style Self-explanatory. */
/* * Asterisk -- An open source telephony toolkit. * * Copyright (C) 1999 - 2005, Digium, Inc. * * Mark Spencer <markster@digium.com> * * See http://www.asterisk.org for more information about * the Asterisk project. Please do not directly contact * any of the maintainers of this project for assistance; * the project provides a web site, mailing lists and IRC * channels for your use. * * This program is free software, distributed under the terms of * the GNU General Public License Version 2. See the LICENSE file * at the top of the source tree. */ /*! \file * * \brief Transfer a caller * * \author Mark Spencer <markster@digium.com> * * Requires transfer support from channel driver * * \ingroup applications */ /*** MODULEINFO <support_level>core</support_level> ***/ #include "asterisk.h" ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/pbx.h" #include "asterisk/module.h" #include "asterisk/app.h" #include "asterisk/channel.h" /*** DOCUMENTATION <application name="Transfer" language="en_US"> <synopsis> Transfer caller to remote extension. </synopsis> <syntax> <parameter name="dest" required="true" argsep=""> <argument name="Tech/" /> <argument name="destination" required="true" /> </parameter> </syntax> <description> <para>Requests the remote caller be transferred to a given destination. If TECH (SIP, IAX2, LOCAL etc) is used, only an incoming call with the same channel technology will be transfered. Note that for SIP, if you transfer before call is setup, a 302 redirect SIP message will be returned to the caller.</para> <para>The result of the application will be reported in the <variable>TRANSFERSTATUS</variable> channel variable:</para> <variablelist> <variable name="TRANSFERSTATUS"> <value name="SUCCESS"> Transfer succeeded. </value> <value name="FAILURE"> Transfer failed. </value> <value name="UNSUPPORTED"> Transfer unsupported by channel driver. </value> </variable> </variablelist> </description> </application> ***/ static const char * const app = "Transfer"; static int transfer_exec(struct ast_channel *chan, const char *data) { int res; int len; char *slash; char *tech = NULL; char *dest = NULL; char *status; char *parse; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(dest); ); if (ast_strlen_zero((char *)data)) { ast_log(LOG_WARNING, "Transfer requires an argument ([Tech/]destination)\n"); pbx_builtin_setvar_helper(chan, "TRANSFERSTATUS", "FAILURE"); return 0; } else parse = ast_strdupa(data); AST_STANDARD_APP_ARGS(args, parse); dest = args.dest; if ((slash = strchr(dest, '/')) && (len = (slash - dest))) { tech = dest; dest = slash + 1; /* Allow execution only if the Tech/destination agrees with the type of the channel */ if (strncasecmp(ast_channel_tech(chan)->type, tech, len)) { pbx_builtin_setvar_helper(chan, "TRANSFERSTATUS", "FAILURE"); return 0; } } /* Check if the channel supports transfer before we try it */ if (!ast_channel_tech(chan)->transfer) { pbx_builtin_setvar_helper(chan, "TRANSFERSTATUS", "UNSUPPORTED"); return 0; } res = ast_transfer(chan, dest); if (res < 0) { status = "FAILURE"; res = 0; } else { status = "SUCCESS"; res = 0; } pbx_builtin_setvar_helper(chan, "TRANSFERSTATUS", status); return res; } static int unload_module(void) { return ast_unregister_application(app); } static int load_module(void) { return ast_register_application_xml(app, transfer_exec); } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Transfers a caller to another extension");
// From Colloquy (http://colloquy.info/) #import <AppKit/NSTextField.h> @class NSFont; @interface JVFontPreviewField : NSTextField { NSFont *_actualFont; BOOL _showPointSize; BOOL _showFontFace; } - (void)selectFont:(id)sender; - (IBAction)chooseFontWithFontPanel:(id)sender; - (void)setShowPointSize:(BOOL)show; - (void)setShowFontFace:(BOOL)show; @end @interface NSObject (JVFontPreviewFieldDelegate) - (BOOL)fontPreviewField:(JVFontPreviewField *)field shouldChangeToFont:(NSFont *)font; - (void)fontPreviewField:(JVFontPreviewField *)field didChangeToFont:(NSFont *)font; @end
/* mkvpropedit -- utility for editing properties of existing Matroska files Distributed under the GPL v2 see the file COPYING for details or visit http://www.gnu.org/copyleft/gpl.html Written by Moritz Bunkus <moritz@bunkus.org>. */ #ifndef MTX_COMMON_CLI_PARSER_H #define MTX_COMMON_CLI_PARSER_H #include "common/common_pch.h" #include "common/translation.h" #define INDENT_DEFAULT -1 using cli_parser_cb_t = std::function<void(void)>; class cli_parser_c { protected: struct option_t { enum option_type_e { ot_option, ot_section_header, ot_information, ot_informational_option, }; option_type_e m_type; std::string m_spec, m_name; translatable_string_c m_description; cli_parser_cb_t m_callback; bool m_needs_arg; int m_indent; option_t(); option_t(option_type_e type, translatable_string_c const &description, int indent = INDENT_DEFAULT); option_t(std::string const &spec, translatable_string_c const &description, cli_parser_cb_t const &callback, bool needs_arg); option_t(std::string const &name, translatable_string_c const &description); std::string format_text(); }; enum hook_type_e { ht_common_options_parsed, ht_unknown_option, }; std::map<std::string, option_t> m_option_map; std::vector<option_t> m_options; std::vector<std::string> m_args; std::string m_current_arg, m_next_arg; std::map<hook_type_e, std::vector<cli_parser_cb_t>> m_hooks; bool m_no_common_cli_args; protected: cli_parser_c(std::vector<std::string> const &args); void add_option(std::string const &spec, cli_parser_cb_t const &callback, translatable_string_c const &description); void add_informational_option(std::string const &name, translatable_string_c const &description); void add_section_header(translatable_string_c const &title, int indent = INDENT_DEFAULT); void add_information(translatable_string_c const &information, int indent = INDENT_DEFAULT); void add_separator(); void add_common_options(); void parse_args(); void set_usage(); void dummy_callback(); void add_hook(hook_type_e hook_type, cli_parser_cb_t const &callback); bool run_hooks(hook_type_e hook_type); }; #endif // MTX_COMMON_CLI_PARSER_H
/* * H.263 parser * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> * * This file is part of Libav. * * Libav 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. * * Libav 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 Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /** * @file * H.263 parser */ #include "parser.h" #include "h263_parser.h" int ff_h263_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size){ int vop_found, i; uint32_t state; vop_found= pc->frame_start_found; state= pc->state; i=0; if(!vop_found){ for(i=0; i<buf_size; i++){ state= (state<<8) | buf[i]; if(state>>(32-22) == 0x20){ i++; vop_found=1; break; } } } if(vop_found){ for(; i<buf_size; i++){ state= (state<<8) | buf[i]; if(state>>(32-22) == 0x20){ pc->frame_start_found=0; pc->state=-1; return i-3; } } } pc->frame_start_found= vop_found; pc->state= state; return END_NOT_FOUND; } static int h263_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size) { ParseContext *pc = s->priv_data; int next; next= ff_h263_find_frame_end(pc, buf, buf_size); if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { *poutbuf = NULL; *poutbuf_size = 0; return buf_size; } *poutbuf = buf; *poutbuf_size = buf_size; return next; } AVCodecParser ff_h263_parser = { .codec_ids = { AV_CODEC_ID_H263 }, .priv_data_size = sizeof(ParseContext), .parser_parse = h263_parse, .parser_close = ff_parse_close, };
/* w_acoshl.c -- long double version of w_acosh.c. * Conversion to long double by Ulrich Drepper, * Cygnus Support, drepper@cygnus.com. * Optimizations bu Ulrich Drepper <drepper@gmail.com>, 2011. */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * * Developed at SunPro, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this * software is freely granted, provided that this notice * is preserved. * ==================================================== */ /* * wrapper coshl(x) */ #include <math.h> #include <math_private.h> long double __coshl (long double x) { long double z = __ieee754_coshl (x); if (__builtin_expect (!__finitel (z), 0) && __finitel (x) && _LIB_VERSION != _IEEE_) return __kernel_standard (x, x, 205); /* cosh overflow */ return z; } weak_alias (__coshl, coshl)
/* * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. * * Configuration settings for the MX6Q HDMI Dongle Freescale board. * * 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, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ #ifndef MX6Q_SABRESD_ANDROID_H #define MX6Q_SABRESD_ANDROID_H #include "mx6q_hdmidongle.h" #define CONFIG_USB_DEVICE #define CONFIG_IMX_UDC 1 #define CONFIG_FASTBOOT 1 #define CONFIG_FASTBOOT_STORAGE_EMMC_SATA #define CONFIG_FASTBOOT_VENDOR_ID 0x18d1 #define CONFIG_FASTBOOT_PRODUCT_ID 0x0d02 #define CONFIG_FASTBOOT_BCD_DEVICE 0x311 #define CONFIG_FASTBOOT_MANUFACTURER_STR "Freescale" #define CONFIG_FASTBOOT_PRODUCT_NAME_STR "i.mx6q HDMI Dongle" #define CONFIG_FASTBOOT_INTERFACE_STR "Android fastboot" #define CONFIG_FASTBOOT_CONFIGURATION_STR "Android fastboot" #define CONFIG_FASTBOOT_SERIAL_NUM "12345" #define CONFIG_FASTBOOT_SATA_NO 0 /* For system.img growing up more than 256MB, more buffer needs * to receive the system.img*/ #define CONFIG_FASTBOOT_TRANSFER_BUF 0x2c000000 #define CONFIG_FASTBOOT_TRANSFER_BUF_SIZE 0x20000000 /* 512M byte */ #define CONFIG_CMD_BOOTI #define CONFIG_ANDROID_RECOVERY /* which mmc bus is your main storage ? */ #define CONFIG_ANDROID_MAIN_MMC_BUS 3 #define CONFIG_ANDROID_BOOT_PARTITION_MMC 1 #define CONFIG_ANDROID_SYSTEM_PARTITION_MMC 5 #define CONFIG_ANDROID_RECOVERY_PARTITION_MMC 2 #define CONFIG_ANDROID_CACHE_PARTITION_MMC 6 #define CONFIG_ANDROID_RECOVERY_BOOTARGS_MMC NULL #define CONFIG_ANDROID_RECOVERY_BOOTCMD_MMC \ "booti mmc2 recovery" #define CONFIG_ANDROID_RECOVERY_CMD_FILE "/recovery/command" #define CONFIG_INITRD_TAG #undef CONFIG_LOADADDR #undef CONFIG_RD_LOADADDR #undef CONFIG_EXTRA_ENV_SETTINGS #define CONFIG_LOADADDR 0x10800000 /* loadaddr env var */ #define CONFIG_RD_LOADADDR 0x11000000 #define CONFIG_INITRD_TAG #define CONFIG_EXTRA_ENV_SETTINGS \ "netdev=eth0\0" \ "ethprime=FEC0\0" \ "fastboot_dev=mmc2\0" \ "bootcmd=booti mmc2\0" #endif
/* format_term.c - terminal output format module * Copyright (C) 2000-2009 Jason Jordan <shnutils@freeshell.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) 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <string.h> #include "format.h" CVSID("$Id: format_term.c,v 1.15 2009/03/11 17:18:01 jason Exp $") static FILE *open_for_output(char *,proc_info *); static void create_output_filename(char *); format_module format_term = { "term", "Sends output to the terminal", CVSIDSTR, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, open_for_output, NULL, create_output_filename, NULL }; static FILE *open_for_output(char *filename,proc_info *pinfo) { pinfo->pid = NO_CHILD_PID; return stdout; } static void create_output_filename(char *outfilename) { strcpy(outfilename,"terminal"); }
/* * snmp_client.h */ /*********************************************************** Copyright 1988, 1989 by Carnegie Mellon University 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 CMU not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL CMU 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. ******************************************************************/ #ifndef SNMP_CLIENT_H #define SNMP_CLIENT_H #include <net-snmp/types.h> #include <net-snmp/varbind_api.h> #include <net-snmp/pdu_api.h> #include <net-snmp/session_api.h> #ifdef __cplusplus extern "C" { #endif struct snmp_pdu; struct snmp_session; struct variable_list; struct synch_state { int waiting; int status; /* * status codes */ #define STAT_SUCCESS 0 #define STAT_ERROR 1 #define STAT_TIMEOUT 2 int reqid; netsnmp_pdu *pdu; }; void snmp_replace_var_types(netsnmp_variable_list * vbl, u_char old_type, u_char new_type); void snmp_reset_var_buffers(netsnmp_variable_list * var); void snmp_reset_var_types(netsnmp_variable_list * vbl, u_char new_type); int count_varbinds(netsnmp_variable_list * var_ptr); int count_varbinds_of_type(netsnmp_variable_list * var_ptr, u_char type); netsnmp_variable_list *find_varbind_of_type(netsnmp_variable_list * var_ptr, u_char type); netsnmp_variable_list *find_varbind_in_list(netsnmp_variable_list *vblist, oid *name, size_t len); netsnmp_pdu *snmp_split_pdu(netsnmp_pdu *, int skipCount, int copyCount); unsigned long snmp_varbind_len(netsnmp_pdu *pdu); int snmp_clone_var(netsnmp_variable_list *, netsnmp_variable_list *); const char *snmp_errstring(int); int snmp_synch_response_cb(netsnmp_session *, netsnmp_pdu *, netsnmp_pdu **, snmp_callback); int snmp_clone_mem(void **, const void *, unsigned); void netsnmp_query_set_default_session(netsnmp_session *); netsnmp_session * netsnmp_query_get_default_session( void ); int netsnmp_query_get( netsnmp_variable_list *, netsnmp_session *); int netsnmp_query_getnext( netsnmp_variable_list *, netsnmp_session *); int netsnmp_query_walk( netsnmp_variable_list *, netsnmp_session *); int netsnmp_query_set( netsnmp_variable_list *, netsnmp_session *); #ifdef __cplusplus } #endif #endif /* SNMP_CLIENT_H */
/* * Copyright (C) 2008 Search Solution Corporation. All rights reserved by Search Solution. * * 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ /* * broker_list.h - Linked-list Utility Interface Header File * This file contains exported stuffs from linked list module. */ #ifndef _BROKER_LIST_H_ #define _BROKER_LIST_H_ #ident "$Id$" #define LINK_LIST_DEFAULT_ASSIGN_FUNC link_list_default_assign_func #define LINK_LIST_DEFAULT_COMPARE_FUNC link_list_default_compare_func #define LINK_LIST_FIND_VALUE(VALUE, HEAD, KEY, KEY_CMP_FUNC) \ do { \ T_LIST *node; \ node = link_list_find(HEAD, KEY, NULL, KEY_CMP_FUNC, NULL); \ if (node == NULL) \ VALUE = NULL; \ else \ VALUE = node->value; \ } while (0) typedef struct list_tag T_LIST; struct list_tag { void *key; void *value; struct list_tag *next; }; extern int link_list_add (T_LIST **, void *, void *, int (*)(T_LIST *, void *, void *)); extern T_LIST *link_list_find (T_LIST *, void *, void *, int (*)(void *, void *), int (*)(void *, void *)); extern int link_list_node_delete2 (T_LIST **, void *, void *, int (*)(void *, void *), int (*)(void *, void *), void (*)(T_LIST *)); extern int link_list_delete (T_LIST **, void (*)(T_LIST *)); extern int link_list_node_delete (T_LIST **, void *, int (*)(void *, void *), void (*)(T_LIST *)); extern int link_list_default_assign_func (T_LIST * node, void *key, void *value); extern int link_list_default_compare_func (void *key, void *value); extern void *link_list_traverse (T_LIST * head, void *(*traverse_func) (T_LIST *, void *)); #endif /* _BROKER_LIST_H_ */
/* -*- buffer-read-only: t -*- vi: set ro: */ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2013 Free Software Foundation, Inc. This file is part of the GNU C Library. 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 3 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/>. */ #ifdef _LIBC # include <getopt.h> #else # include <config.h> # include "getopt.h" #endif #include "getopt_int.h" #include <stdio.h> /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include <stdlib.h> #endif #ifndef NULL #define NULL 0 #endif int getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 0, 0); } int _getopt_long_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 0, d, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (int argc, char *__getopt_argv_const *argv, const char *options, const struct option *long_options, int *opt_index) { return _getopt_internal (argc, (char **) argv, options, long_options, opt_index, 1, 0); } int _getopt_long_only_r (int argc, char **argv, const char *options, const struct option *long_options, int *opt_index, struct _getopt_data *d) { return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d, 0); } #ifdef TEST #include <stdio.h> int main (int argc, char **argv) { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static const struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value '%s'\n", optarg); break; case 'd': printf ("option d with value '%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2009 Torus Knot Software Ltd 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 __XSIMATERIALEXPORTER_H__ #define __XSIMATERIALEXPORTER_H__ #include "OgreXSIHelper.h" #include "OgreBlendMode.h" #include "OgreMaterialSerializer.h" namespace Ogre { class XsiMaterialExporter { public: XsiMaterialExporter(); virtual ~XsiMaterialExporter(); /** Export a set of XSI materials to a material script. @param materials List of materials to export @param filename Name of the script file to create @param copyTextures Whether to copy any textures used into the same folder as the material script. */ void exportMaterials(MaterialMap& materials, TextureProjectionMap& texProjMap, const String& filename, bool copyTextures); protected: MaterialSerializer mMatSerializer; typedef std::multimap<long,TextureUnitState*> TextureUnitTargetMap; /// Map of target id -> texture unit to match up tex transforms TextureUnitTargetMap mTextureUnitTargetMap; /// Pass queue, used to invert ordering PassQueue mPassQueue; /// Texture projection map TextureProjectionMap mTextureProjectionMap; // Export a single material void exportMaterial(MaterialEntry* matEntry, bool copyTextures, const String& texturePath); /// Fill in all the details of a pass void populatePass(Pass* pass, XSI::Shader& xsishader); /// Fill in the texture units - note this won't pick up transforms yet void populatePassTextures(Pass* pass, PassEntry* passEntry, bool copyTextures, const String& texturePath); /// Find any texture transforms and hook them up via 'target' void populatePassTextureTransforms(Pass* pass, XSI::Shader& xsishader); /// Populate basic rejection parameters for the pass void populatePassDepthCull(Pass* pass, XSI::Shader& xsishader); /// Populate lighting parameters for the pass void populatePassLighting(Pass* pass, XSI::Shader& xsishader); /// Populate scene blending parameters for the pass void populatePassSceneBlend(Pass* pass, XSI::Shader& xsishader); void populatePassCgPrograms(Pass* pass, XSI::Shader& xsishader); void populatePassHLSLPrograms(Pass* pass, XSI::Shader& xsishader); void populatePassD3DAssemblerPrograms(Pass* pass, XSI::Shader& xsishader); void populateOGLFiltering(TextureUnitState* tex, XSI::Shader& xsishader); void populateDXFiltering(TextureUnitState* tex, XSI::Shader& xsishader); // Utility method to get texture coord set from tspace_id name unsigned short getTextureCoordIndex(const String& tspace); /// Add a 2D texture from a shader TextureUnitState* add2DTexture(Pass* pass, XSI::Shader& shader, bool copyTextures, const String& targetFolder); /// Add a cubic texture from a shader TextureUnitState* addCubicTexture(Pass* pass, XSI::Shader& shader, bool copyTextures, const String& targetFolder); void clearPassQueue(void); SceneBlendFactor convertSceneBlend(short xsiVal); TextureUnitState::TextureAddressingMode convertAddressingMode(short xsiVal); void convertTexGenOGL(TextureUnitState* tex, long xsiVal, XSI::Shader& shader); void convertTexGenDX(TextureUnitState* tex, long xsiVal, XSI::Shader& shader); }; } #endif
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2013, Knut Reinert, FU Berlin // 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 Knut Reinert or the FU Berlin 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 KNUT REINERT OR THE FU BERLIN 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: Manuel Holtgrewe <manuel.holtgrewe@fu-berlin.de> // ========================================================================== #ifndef SEQAN_EXTRAS_INCLUDE_SEQAN_VCF_VCF_HEADER_H_ #define SEQAN_EXTRAS_INCLUDE_SEQAN_VCF_VCF_HEADER_H_ namespace seqan { // ============================================================================ // Forwards // ============================================================================ // ============================================================================ // Tags, Classes, Enums // ============================================================================ // ---------------------------------------------------------------------------- // Class VcfHeader // ---------------------------------------------------------------------------- /** .Class.VcfHeader ..cat:VCF I/O ..summary:Store VCF Header information. ..signature:class VcfHeader ..include:seqan/vcf_io.h .Memfunc.VcfHeader#VcfHeader ..class:Class.VcfHeader ..signature:VcfHeader::VcfHeader() ..summary:Only default constructor. .Memvar.VcfHeader#sequenceNames ..class:Class.VcfHeader ..summary:Names of the sequences (@Class.StringSet@<@Shortcut.CharString@>). .Memvar.VcfHeader#sampleNames ..class:Class.VcfHeader ..summary:Names of the samples (@Class.StringSet@<@Shortcut.CharString@>). .Memvar.VcfHeader#headerRecords ..class:Class.VcfHeader ..summary:The meta information records (@Class.String@ of @Class.VcfHeaderRecord@). */ class VcfHeader { public: typedef StringSet<CharString> TNameStore_; // The names of the sequences. TNameStore_ sequenceNames; // The names of the samples. TNameStore_ sampleNames; // Records for the meta information lines. String<VcfHeaderRecord> headerRecords; VcfHeader() {} }; // ============================================================================ // Metafunctions // ============================================================================ // ============================================================================ // Functions // ============================================================================ // ---------------------------------------------------------------------------- // Function clear() // ---------------------------------------------------------------------------- /** .Function.VcfHeader#clear ..class:Class.VcfHeader ..summary:Clear a @Class.VcfHeader@. ..signature:void clear(header) ..param.header:@Class.VcfHeader@ to clear. ...type:Class.VcfHeader ..include:seqan/vcf_io.h */ inline void clear(VcfHeader & header) { clear(header.sequenceNames); clear(header.sampleNames); clear(header.headerRecords); } } // namespace seqan #endif // #ifndef SEQAN_EXTRAS_INCLUDE_SEQAN_VCF_VCF_HEADER_H_
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Designer of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:GPL-EXCEPT$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists for the convenience // of Qt Designer. This header // file may change from version to version without notice, or even be removed. // // We mean it. // #ifndef QTRESOURCEVIEW_H #define QTRESOURCEVIEW_H #include "shared_global_p.h" #include <QtWidgets/QWidget> #include <QtWidgets/QDialog> QT_BEGIN_NAMESPACE class QtResourceModel; class QtResourceSet; class QDesignerFormEditorInterface; class QMimeData; class QDESIGNER_SHARED_EXPORT QtResourceView : public QWidget { Q_OBJECT public: explicit QtResourceView(QDesignerFormEditorInterface *core, QWidget *parent = 0); ~QtResourceView(); void setDragEnabled(bool dragEnabled); bool dragEnabled() const; QtResourceModel *model() const; void setResourceModel(QtResourceModel *model); QString selectedResource() const; void selectResource(const QString &resource); QString settingsKey() const; void setSettingsKey(const QString &key); bool isResourceEditingEnabled() const; void setResourceEditingEnabled(bool enable); // Helpers for handling the drag originating in QtResourceView (Xml/text) enum ResourceType { ResourceImage, ResourceStyleSheet, ResourceOther }; static QString encodeMimeData(ResourceType resourceType, const QString &path); static bool decodeMimeData(const QMimeData *md, ResourceType *t = 0, QString *file = 0); static bool decodeMimeData(const QString &text, ResourceType *t = 0, QString *file = 0); signals: void resourceSelected(const QString &resource); void resourceActivated(const QString &resource); protected: bool event(QEvent *event); private: QScopedPointer<class QtResourceViewPrivate> d_ptr; Q_DECLARE_PRIVATE(QtResourceView) Q_DISABLE_COPY(QtResourceView) Q_PRIVATE_SLOT(d_func(), void slotResourceSetActivated(QtResourceSet *)) Q_PRIVATE_SLOT(d_func(), void slotCurrentPathChanged(QTreeWidgetItem *)) Q_PRIVATE_SLOT(d_func(), void slotCurrentResourceChanged(QListWidgetItem *)) Q_PRIVATE_SLOT(d_func(), void slotResourceActivated(QListWidgetItem *)) Q_PRIVATE_SLOT(d_func(), void slotEditResources()) Q_PRIVATE_SLOT(d_func(), void slotReloadResources()) #ifndef QT_NO_CLIPBOARD Q_PRIVATE_SLOT(d_func(), void slotCopyResourcePath()) #endif Q_PRIVATE_SLOT(d_func(), void slotListWidgetContextMenuRequested(const QPoint &pos)) Q_PRIVATE_SLOT(d_func(), void slotFilterChanged(const QString &pattern)) }; class QDESIGNER_SHARED_EXPORT QtResourceViewDialog : public QDialog { Q_OBJECT public: explicit QtResourceViewDialog(QDesignerFormEditorInterface *core, QWidget *parent = 0); virtual ~QtResourceViewDialog(); QString selectedResource() const; void selectResource(const QString &path); bool isResourceEditingEnabled() const; void setResourceEditingEnabled(bool enable); private: QScopedPointer<class QtResourceViewDialogPrivate> d_ptr; Q_DECLARE_PRIVATE(QtResourceViewDialog) Q_DISABLE_COPY(QtResourceViewDialog) Q_PRIVATE_SLOT(d_func(), void slotResourceSelected(const QString &)) }; QT_END_NAMESPACE #endif
/* * This 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 3 of the License, or * (at your option) any later version. * * This software 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 software. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #define TARGET_BOARD_IDENTIFIER "PYRO" #define USBD_PRODUCT_STRING "PYRODRONEF4" #define LED0_PIN PB4 #define BEEPER PB5 #define BEEPER_INVERTED #define INVERTER_PIN_UART1 PC3 // PC3 used as sBUS inverter select GPIO #define CAMERA_CONTROL_PIN PB9 // define dedicated camera_osd_control pin #define USE_EXTI #define MPU_INT_EXTI PC4 #define USE_MPU_DATA_READY_SIGNAL // DEFINE SPI USAGE #define USE_SPI #define USE_SPI_DEVICE_1 // MPU 6000 #define MPU6000_CS_PIN PA4 #define MPU6000_SPI_INSTANCE SPI1 #define USE_ACC #define USE_ACC_SPI_MPU6000 #define USE_GYRO #define USE_GYRO_SPI_MPU6000 #define GYRO_MPU6000_ALIGN CW0_DEG #define ACC_MPU6000_ALIGN CW0_DEG // DEFINE OSD #define USE_SPI_DEVICE_2 #define SPI2_NSS_PIN PB12 #define SPI2_SCK_PIN PB13 #define SPI2_MISO_PIN PB14 #define SPI2_MOSI_PIN PB15 #define USE_MAX7456 #define MAX7456_SPI_INSTANCE SPI2 #define MAX7456_SPI_CS_PIN PB12 #define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz #define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST) // DEFINE UART AND VCP #define USE_VCP #define USE_UART1 #define UART1_RX_PIN PA10 #define UART1_TX_PIN PA9 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2 #define USE_UART2 #define UART2_RX_PIN PA3 #define UART2_TX_PIN PA2 #define USE_UART3 #define UART3_RX_PIN PB11 #define UART3_TX_PIN PB10 #define USE_UART4 #define UART4_RX_PIN PA1 #define UART4_TX_PIN PA0 #define USE_UART5 #define UART5_RX_PIN PD2 #define UART5_TX_PIN PC12 #define USE_UART6 #define UART6_RX_PIN PC7 #define UART6_TX_PIN PC6 #define SERIAL_PORT_COUNT 7 //VCP, USART1, USART2,USART3,USART4, USART5,USART6 #define USE_ESCSERIAL #define ESCSERIAL_TIMER_TX_PIN PB9 // (HARDARE=0,PPM) //DEFINE BATTERY METER #define USE_ADC #define CURRENT_METER_ADC_PIN PC1 #define VBAT_ADC_PIN PC2 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_NONE #define USE_TRANSPONDER // DEFINE DEFAULT FEATURE #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define DEFAULT_FEATURES FEATURE_OSD #define USE_SERIAL_4WAY_BLHELI_INTERFACE #define TARGET_IO_PORTA (0xffff & ~(BIT(14)|BIT(13))) #define TARGET_IO_PORTB (0xffff & ~(BIT(2))) #define TARGET_IO_PORTC (0xffff & ~(BIT(15)|BIT(14)|BIT(13))) #define TARGET_IO_PORTD BIT(2) // DEFINE TIMERS #define USABLE_TIMER_CHANNEL_COUNT 6 #define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(11))
/* * LCL (LossLess Codec Library) Codec * Copyright (c) 2002-2004 Roberto Togni * * 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 */ /** * @file lcl.c * LCL (LossLess Codec Library) Video Codec * Decoder for MSZH and ZLIB codecs * Experimental encoder for ZLIB RGB24 * * Fourcc: MSZH, ZLIB * * Original Win32 dll: * Ver2.23 By Kenji Oshima 2000.09.20 * avimszh.dll, avizlib.dll * * A description of the decoding algorithm can be found here: * http://www.pcisys.net/~melanson/codecs * * Supports: BGR24 (RGB 24bpp) * */ #include <stdio.h> #include <stdlib.h> #include "avcodec.h" #include "bitstream.h" #include "lcl.h" #ifdef CONFIG_ZLIB #include <zlib.h> #endif /* * Decoder context */ typedef struct LclEncContext { AVCodecContext *avctx; AVFrame pic; PutBitContext pb; // Image type int imgtype; // Compression type int compression; // Flags int flags; // Decompressed data size unsigned int decomp_size; // Maximum compressed data size unsigned int max_comp_size; // Compression buffer unsigned char* comp_buf; #ifdef CONFIG_ZLIB z_stream zstream; #endif } LclEncContext; /* * * Encode a frame * */ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ LclEncContext *c = avctx->priv_data; AVFrame *pict = data; AVFrame * const p = &c->pic; int i; int zret; // Zlib return code #ifndef CONFIG_ZLIB av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled in.\n"); return -1; #else init_put_bits(&c->pb, buf, buf_size); *p = *pict; p->pict_type= FF_I_TYPE; p->key_frame= 1; if(avctx->pix_fmt != PIX_FMT_BGR24){ av_log(avctx, AV_LOG_ERROR, "Format not supported!\n"); return -1; } zret = deflateReset(&(c->zstream)); if (zret != Z_OK) { av_log(avctx, AV_LOG_ERROR, "Deflate reset error: %d\n", zret); return -1; } c->zstream.next_out = c->comp_buf; c->zstream.avail_out = c->max_comp_size; for(i = avctx->height - 1; i >= 0; i--) { c->zstream.next_in = p->data[0]+p->linesize[0]*i; c->zstream.avail_in = avctx->width*3; zret = deflate(&(c->zstream), Z_NO_FLUSH); if (zret != Z_OK) { av_log(avctx, AV_LOG_ERROR, "Deflate error: %d\n", zret); return -1; } } zret = deflate(&(c->zstream), Z_FINISH); if (zret != Z_STREAM_END) { av_log(avctx, AV_LOG_ERROR, "Deflate error: %d\n", zret); return -1; } for (i = 0; i < c->zstream.total_out; i++) put_bits(&c->pb, 8, c->comp_buf[i]); flush_put_bits(&c->pb); return c->zstream.total_out; #endif } /* * * Init lcl encoder * */ static av_cold int encode_init(AVCodecContext *avctx) { LclEncContext *c = avctx->priv_data; int zret; // Zlib return code #ifndef CONFIG_ZLIB av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled.\n"); return 1; #else c->avctx= avctx; assert(avctx->width && avctx->height); avctx->extradata= av_mallocz(8); avctx->coded_frame= &c->pic; // Will be user settable someday c->compression = 6; c->flags = 0; switch(avctx->pix_fmt){ case PIX_FMT_BGR24: c->imgtype = IMGTYPE_RGB24; c->decomp_size = avctx->width * avctx->height * 3; avctx->bits_per_coded_sample= 24; break; default: av_log(avctx, AV_LOG_ERROR, "Input pixel format %s not supported\n", avcodec_get_pix_fmt_name(avctx->pix_fmt)); return -1; } ((uint8_t*)avctx->extradata)[0]= 4; ((uint8_t*)avctx->extradata)[1]= 0; ((uint8_t*)avctx->extradata)[2]= 0; ((uint8_t*)avctx->extradata)[3]= 0; ((uint8_t*)avctx->extradata)[4]= c->imgtype; ((uint8_t*)avctx->extradata)[5]= c->compression; ((uint8_t*)avctx->extradata)[6]= c->flags; ((uint8_t*)avctx->extradata)[7]= CODEC_ZLIB; c->avctx->extradata_size= 8; c->zstream.zalloc = Z_NULL; c->zstream.zfree = Z_NULL; c->zstream.opaque = Z_NULL; zret = deflateInit(&(c->zstream), c->compression); if (zret != Z_OK) { av_log(avctx, AV_LOG_ERROR, "Deflate init error: %d\n", zret); return 1; } /* Conservative upper bound taken from zlib v1.2.1 source */ c->max_comp_size = c->decomp_size + ((c->decomp_size + 7) >> 3) + ((c->decomp_size + 63) >> 6) + 11; if ((c->comp_buf = av_malloc(c->max_comp_size)) == NULL) { av_log(avctx, AV_LOG_ERROR, "Can't allocate compression buffer.\n"); return 1; } return 0; #endif } /* * * Uninit lcl encoder * */ static av_cold int encode_end(AVCodecContext *avctx) { LclEncContext *c = avctx->priv_data; av_freep(&avctx->extradata); av_freep(&c->comp_buf); #ifdef CONFIG_ZLIB deflateEnd(&(c->zstream)); #endif return 0; } AVCodec zlib_encoder = { "zlib", CODEC_TYPE_VIDEO, CODEC_ID_ZLIB, sizeof(LclEncContext), encode_init, encode_frame, encode_end, .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"), };
#ifndef maciContainerServicesTestClassImpl_h #define maciContainerServicesTestClassImpl_h /******************************************************************************* * E.S.O. - ACS project * * "@(#) $Id: maciContainerServicesTestClassImpl.h,v 1.16 2008/10/09 07:05:37 cparedes Exp $" * * who when what * -------- -------- ---------------------------------------------- * acaproni 2005-02-28 created */ /************************************************************************ * *---------------------------------------------------------------------- */ #ifndef __cplusplus #error This is a C++ include file and cannot be used from plain C #endif #include <acsutil.h> #include <acscomponentImpl.h> #include <acsContainerServices.h> #include <maciTestS.h> #include <string> // The IDL of the dynamic components #define IDLTYPE "IDL:alma/MACI_TEST/DynamicTestClass:1.0" // The name of 2 remote components to get # define COMPNAME "MACI_DYN_TEST1" # define COMPNAME2 "MACI_DYN_TEST2" class MaciContainerServicesTestClassImpl: public virtual acscomponent::ACSComponentImpl, public virtual POA_MACI_TEST::ContainerServicesTestClass { public: /// Constructors MaciContainerServicesTestClassImpl( const ACE_CString& name, maci::ContainerServices* containerServices); /** * Destructor */ virtual ~MaciContainerServicesTestClassImpl(); /** * LifeCycle * @throw acsErrTypeLifeCycle::LifeCycleExImpl */ virtual void initialize(); /** * LifeCycle * @throw acsErrTypeLifeCycle::LifeCycleExImpl */ virtual void execute(); /** * LifeCycle */ virtual void cleanUp(); /** * LifeCycle */ virtual void aboutToAbort(); /* ----------------------------------------------------------------*/ /* --------------------- [ CORBA interface ] ----------------------*/ /* ----------------------------------------------------------------*/ // Test the defaultComponent activation virtual void getComponentTest() ; // Test the getting a Component as Non Sticky virtual void getComponentNonStickyTest() ; // Test the dynamic component activation virtual void dynamicComponentTest(); // Test the collocated component activation virtual void collocatedComponentTest(); // Test the defaultComponent activation virtual void defaultComponentTest(); // Test the defaultComponentSmartPtr activation virtual void getComponentSmartPtrTest(); // Test the getting a Component smart pointer as Non Sticky virtual void getComponentNonStickySmartPtrTest(); // Test the dynamic component smart pointer activation virtual void dynamicComponentSmartPtrTest(); // Test the collocated component smart pointer activation virtual void collocatedComponentSmartPtrTest(); // Test the defaultComponent smart pointer activation virtual void defaultComponentSmartPtrTest(); // Test the request of a component descriptor virtual void componentDescriptorTest(); // Test the relase of all components virtual void releaseResourcesTest(); // Test the component listener virtual void componentListenerTest(); }; #endif /* maciContainerServicesTestClassImpl_h */
#ifndef _EXEC_COMPONENT_IMPL_H #define _EXEC_COMPONENT_IMPL_H /******************************************************************************* * ALMA - Atacama Large Millimiter Array * (c) European Southern Observatory, 2004 * *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.1 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 *Lesser General Public License for more details. * *You should have received a copy of the GNU Lesser 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 * * "@(#) $Id: execComponentTestImpl.h,v 1.14 2008/10/01 03:07:07 cparedes Exp $" * * who when what * -------- -------- ---------------------------------------------- * bjeram 2004-09-17 created */ /************************************************************************ * *---------------------------------------------------------------------- */ #ifndef __cplusplus #error This is a C++ include file and cannot be used from plain C #endif #include "taskComponent.h" class execComponentTestImpl: public virtual acscomponent::ACSComponentImpl, public virtual POA_ACS::TaskComponent { public: execComponentTestImpl( const ACE_CString& name, maci::ContainerServices *containerServices ); virtual ~execComponentTestImpl(); /** Implentation of TaskComponent's run method which print what it gets as the parameter to stdio. If parameter is 'throw' the run method throws an exception of type: TaskRunFailureEx @param parameters: parameters that is send to run method of the task. @throw taskErrType::TaskRunFailureEx */ virtual void run (const ACS::StringSequence & parameters, const char* fileName); }; #endif /*!_H*/