text
stringlengths
4
6.14k
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #ifndef nsScrollPortView_h___ #define nsScrollPortView_h___ #include "nsView.h" #include "nsIScrollableView.h" #include "nsCOMPtr.h" #include "nsITimer.h" class nsISupportsArray; class SmoothScroll; //this is a class that acts as a container for other views and provides //automatic management of scrolling of the views it contains. class nsScrollPortView : public nsView, public nsIScrollableView { public: nsScrollPortView(nsViewManager* aViewManager = nsnull); virtual nsIScrollableView* ToScrollableView() { return this; } NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr); //nsIScrollableView interface NS_IMETHOD CreateScrollControls(nsNativeWidget aNative = nsnull); NS_IMETHOD GetContainerSize(nscoord *aWidth, nscoord *aHeight) const; NS_IMETHOD SetScrolledView(nsIView *aScrolledView); NS_IMETHOD GetScrolledView(nsIView *&aScrolledView) const; NS_IMETHOD GetScrollPosition(nscoord &aX, nscoord &aY) const; NS_IMETHOD ScrollTo(nscoord aX, nscoord aY, PRUint32 aUpdateFlags); NS_IMETHOD SetScrollProperties(PRUint32 aProperties); NS_IMETHOD GetScrollProperties(PRUint32 *aProperties); NS_IMETHOD SetLineHeight(nscoord aHeight); NS_IMETHOD GetLineHeight(nscoord *aHeight); NS_IMETHOD ScrollByLines(PRInt32 aNumLinesX, PRInt32 aNumLinesY); NS_IMETHOD GetPageScrollDistances(nsSize *aDistances); NS_IMETHOD ScrollByPages(PRInt32 aNumPagesX, PRInt32 aNumPagesY); NS_IMETHOD ScrollByWhole(PRBool aTop); NS_IMETHOD ScrollByPixels(PRInt32 aNumPixelsX, PRInt32 aNumPixelsY); NS_IMETHOD CanScroll(PRBool aHorizontal, PRBool aForward, PRBool &aResult); NS_IMETHOD_(nsIView*) View(); NS_IMETHOD AddScrollPositionListener(nsIScrollPositionListener* aListener); NS_IMETHOD RemoveScrollPositionListener(nsIScrollPositionListener* aListener); // local to the view module nsView* GetScrolledView() const { return GetFirstChild(); } private: NS_IMETHOD ScrollToImpl(nscoord aX, nscoord aY, PRUint32 aUpdateFlags); // data members SmoothScroll* mSmoothScroll; // methods void IncrementalScroll(); PRBool IsSmoothScrollingEnabled(); static void SmoothScrollAnimationCallback(nsITimer *aTimer, void* aESM); protected: virtual ~nsScrollPortView(); //private void Scroll(nsView *aScrolledView, nsPoint aTwipsDelta, nsPoint aPixDelta, PRInt32 p2a); PRBool CannotBitBlt(nsView* aScrolledView); nscoord mOffsetX, mOffsetY; PRUint32 mScrollProperties; nscoord mLineHeight; nsISupportsArray *mListeners; }; #endif
/*===================================================================== QGroundControl Open Source Ground Control Station (c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> This file is part of the QGROUNDCONTROL project QGROUNDCONTROL 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. QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>. ======================================================================*/ #ifndef MissionController_H #define MissionController_H #include <QObject> #include "QmlObjectListModel.h" #include "Vehicle.h" #include "QGCLoggingCategory.h" Q_DECLARE_LOGGING_CATEGORY(MissionControllerLog) class MissionController : public QObject { Q_OBJECT public: MissionController(QObject* parent = NULL); ~MissionController(); Q_PROPERTY(QmlObjectListModel* missionItems READ missionItems NOTIFY missionItemsChanged) Q_PROPERTY(QmlObjectListModel* waypointLines READ waypointLines NOTIFY waypointLinesChanged) Q_PROPERTY(bool canEdit READ canEdit NOTIFY canEditChanged) Q_PROPERTY(bool liveHomePositionAvailable READ liveHomePositionAvailable NOTIFY liveHomePositionAvailableChanged) Q_PROPERTY(QGeoCoordinate liveHomePosition READ liveHomePosition NOTIFY liveHomePositionChanged) Q_PROPERTY(bool autoSync READ autoSync WRITE setAutoSync NOTIFY autoSyncChanged) Q_INVOKABLE void start(bool editMode) ; Q_INVOKABLE int addMissionItem(QGeoCoordinate coordinate); Q_INVOKABLE void getMissionItems(void); Q_INVOKABLE void sendMissionItems(void); Q_INVOKABLE void loadMissionFromFile(void); Q_INVOKABLE void saveMissionToFile(void); Q_INVOKABLE void removeMissionItem(int index); Q_INVOKABLE void deleteCurrentMissionItem(void); // Property accessors QmlObjectListModel* missionItems(void); QmlObjectListModel* waypointLines(void) { return &_waypointLines; } bool canEdit(void) { return _canEdit; } bool liveHomePositionAvailable(void) { return _liveHomePositionAvailable; } QGeoCoordinate liveHomePosition(void) { return _liveHomePosition; } bool autoSync(void) { return _autoSync; } void setAutoSync(bool autoSync); signals: void missionItemsChanged(void); void canEditChanged(bool canEdit); void waypointLinesChanged(void); void liveHomePositionAvailableChanged(bool homePositionAvailable); void liveHomePositionChanged(const QGeoCoordinate& homePosition); void autoSyncChanged(bool autoSync); private slots: void _newMissionItemsAvailableFromVehicle(); void _itemCoordinateChanged(const QGeoCoordinate& coordinate); void _itemCommandChanged(MavlinkQmlSingleton::Qml_MAV_CMD command); void _activeVehicleChanged(Vehicle* activeVehicle); void _activeVehicleHomePositionAvailableChanged(bool homePositionAvailable); void _activeVehicleHomePositionChanged(const QGeoCoordinate& homePosition); void _dirtyChanged(bool dirty); void _inProgressChanged(bool inProgress); private: void _recalcSequence(void); void _recalcWaypointLines(void); void _recalcChildItems(void); void _recalcAll(void); void _initAllMissionItems(void); void _deinitAllMissionItems(void); void _initMissionItem(MissionItem* item); void _deinitMissionItem(MissionItem* item); void _autoSyncSend(void); void _setupMissionItems(bool loadFromVehicle, bool forceLoad); void _setupActiveVehicle(Vehicle* activeVehicle, bool forceLoadFromVehicle); private: bool _editMode; QmlObjectListModel* _missionItems; QmlObjectListModel _waypointLines; bool _canEdit; ///< true: UI can edit these items, false: can't edit, can only send to vehicle or save Vehicle* _activeVehicle; bool _liveHomePositionAvailable; QGeoCoordinate _liveHomePosition; bool _autoSync; bool _firstItemsFromVehicle; bool _missionItemsRequested; bool _queuedSend; static const char* _settingsGroup; }; #endif
// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Author: kenton@google.com (Kenton Varda) #ifndef GOOGLE_PROTOBUF_STUBS_HASH_H__ #define GOOGLE_PROTOBUF_STUBS_HASH_H__ #include <cstring> #include <string> #include <unordered_map> #include <unordered_set> #define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_START \ namespace google { \ namespace protobuf { #define GOOGLE_PROTOBUF_HASH_NAMESPACE_DECLARATION_END }} namespace google { namespace protobuf { template <typename Key> struct hash : public std::hash<Key> {}; template <typename Key> struct hash<const Key*> { inline size_t operator()(const Key* key) const { return reinterpret_cast<size_t>(key); } }; // Unlike the old SGI version, the TR1 "hash" does not special-case char*. So, // we go ahead and provide our own implementation. template <> struct hash<const char*> { inline size_t operator()(const char* str) const { size_t result = 0; for (; *str != '\0'; str++) { result = 5 * result + static_cast<size_t>(*str); } return result; } }; template<> struct hash<bool> { size_t operator()(bool x) const { return static_cast<size_t>(x); } }; template <> struct hash<std::string> { inline size_t operator()(const std::string& key) const { return hash<const char*>()(key.c_str()); } static const size_t bucket_size = 4; static const size_t min_buckets = 8; inline bool operator()(const std::string& a, const std::string& b) const { return a < b; } }; template <typename First, typename Second> struct hash<std::pair<First, Second> > { inline size_t operator()(const std::pair<First, Second>& key) const { size_t first_hash = hash<First>()(key.first); size_t second_hash = hash<Second>()(key.second); // FIXME(kenton): What is the best way to compute this hash? I have // no idea! This seems a bit better than an XOR. return first_hash * ((1 << 16) - 1) + second_hash; } static const size_t bucket_size = 4; static const size_t min_buckets = 8; inline bool operator()(const std::pair<First, Second>& a, const std::pair<First, Second>& b) const { return a < b; } }; } // namespace protobuf } // namespace google #endif // GOOGLE_PROTOBUF_STUBS_HASH_H__
/*------------------------------------------------------------------ * sprintf_s.h -- Safe Sprintf Interfaces * * August 2014, D Wheeler * * Copyright (c) 2014 by Intel Corp * All rights reserved. * * 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 SPRINTF_S_H_ #define SPRINTF_S_H_ #include <safe_lib_errno.h> #define SNPRFNEGATE(x) (-1*(x)) int snprintf_s_i(char *dest, rsize_t dmax, const char *format, int a); int snprintf_s_si(char *dest, rsize_t dmax, const char *format, char *s, int a); int snprintf_s_l(char *dest, rsize_t dmax, const char *format, long a); int snprintf_s_sl(char *dest, rsize_t dmax, const char *format, char *s, long a); #endif /* SPRINTF_S_H_ */
5{x€vwx2qqVWTgYqZqq5vwx{€w2qqVWTgYqZqq5vwx{€w2VWTgY2C5vwx{€w2^[`gjq_aVW2C5vwx{€w2_UUq_aVWB5w€v{x
/** ****************************************************************************** * @file SPI/SPI_FullDuplex_AdvComIT/Slave/Src/stm32f4xx_hal_msp.c * @author MCD Application Team * @version V1.2.5 * @date 29-January-2016 * @brief HAL MSP module. ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2> * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /** @addtogroup STM32F4xx_HAL_Examples * @{ */ /** @defgroup SPI_FullDuplex_AdvCom * @{ */ /** @addtogroup Slave * @{ */ /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ /** @defgroup HAL_MSP_Private_Functions * @{ */ /** * @brief SPI MSP Initialization * This function configures the hardware resources used in this example: * - Peripheral's clock enable * - Peripheral's GPIO Configuration * - NVIC configuration for SPI interrupt request enable * @param hspi: SPI handle pointer * @retval None */ void HAL_SPI_MspInit(SPI_HandleTypeDef *hspi) { GPIO_InitTypeDef GPIO_InitStruct; /*##-1- Enable GPIO Clock ##################################################*/ /* Enable GPIO TX/RX clock */ SPIx_SCK_GPIO_CLK_ENABLE(); SPIx_MISO_GPIO_CLK_ENABLE(); SPIx_MOSI_GPIO_CLK_ENABLE(); /*##-2- Configure peripheral GPIO ##########################################*/ /* SPI SCK GPIO pin configuration */ GPIO_InitStruct.Pin = SPIx_SCK_PIN; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_PULLDOWN; GPIO_InitStruct.Speed = GPIO_SPEED_FAST; GPIO_InitStruct.Alternate = SPIx_SCK_AF; HAL_GPIO_Init(SPIx_SCK_GPIO_PORT, &GPIO_InitStruct); /* SPI MISO GPIO pin configuration */ GPIO_InitStruct.Pull = GPIO_PULLUP; GPIO_InitStruct.Pin = SPIx_MISO_PIN; HAL_GPIO_Init(SPIx_MISO_GPIO_PORT, &GPIO_InitStruct); /* SPI MOSI GPIO pin configuration */ GPIO_InitStruct.Pin = SPIx_MOSI_PIN; HAL_GPIO_Init(SPIx_MOSI_GPIO_PORT, &GPIO_InitStruct); /*##-3- Enable SPI peripheral Clock ########################################*/ /* Enable SPI clock */ SPIx_CLK_ENABLE(); /*##-4- Configure the NVIC for SPI #########################################*/ /* NVIC for SPI */ HAL_NVIC_SetPriority(SPIx_IRQn, 1, 0); HAL_NVIC_EnableIRQ(SPIx_IRQn); } /** * @brief SPI MSP De-Initialization * This function frees the hardware resources used in this example: * - Disable the Peripheral's clock * - Revert GPIO configuration to its default state * - Revert NVIC configuration to its default state * @param hspi: SPI handle pointer * @retval None */ void HAL_SPI_MspDeInit(SPI_HandleTypeDef *hspi) { /*##-1- Reset peripherals ##################################################*/ SPIx_FORCE_RESET(); SPIx_RELEASE_RESET(); /*##-2- Disable peripherals and GPIO Clocks ################################*/ /* Configure SPI SCK as alternate function */ HAL_GPIO_DeInit(SPIx_SCK_GPIO_PORT, SPIx_SCK_PIN); /* Configure SPI MISO as alternate function */ HAL_GPIO_DeInit(SPIx_MISO_GPIO_PORT, SPIx_MISO_PIN); /* Configure SPI MOSI as alternate function */ HAL_GPIO_DeInit(SPIx_MOSI_GPIO_PORT, SPIx_MOSI_PIN); /*##-3- Disable the NVIC for SPI ###########################################*/ HAL_NVIC_DisableIRQ(SPIx_IRQn); } /** * @} */ /** * @} */ /** * @} */ /** * @} */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
#ifndef MOBILEGROUPCOLORED_H #define MOBILEGROUPCOLORED_H #include "mobileGroup.h" #include "stateManager.h" class mobileGroupColoured : public mobileGroup{ private: Fl_Box resizeTop; Fl_Box resizeRight; Fl_Box resizeBottom; Fl_Box resizeLeft; Fl_Boxtype hideBox; Fl_Boxtype showBox; Fl_Color shadeNormal; Fl_Color shadeResize; Fl_Color shadeDrag; Fl_Color shadeAttach; unsigned int trackerNumber; MG_stateManager * trackerManager; void resizeXY(int mouse_x, int mouse_y); void resetResizeBox(int direction); void resizeBoxSetVisual(int direction); void changeColourByState(mobileGroup::objectStates state); public: mobileGroupColoured(int x, int y, int w, int h, const char * label); ~mobileGroupColoured(); virtual int handle(int event); void setManager(MG_stateManager * newManager); void incomingChange(int xv, int yv, int wv, int hv, std::string * vv); }; #endif
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "NGAP-IEs" * found in "../support/ngap-r16.4.0/38413-g40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-UPER` */ #include "NGAP_UEContextSuspendRequestTransfer.h" #include "NGAP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_NGAP_UEContextSuspendRequestTransfer_1[] = { { ATF_POINTER, 2, offsetof(struct NGAP_UEContextSuspendRequestTransfer, suspendIndicator), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NGAP_SuspendIndicator, 0, { #if !defined(ASN_DISABLE_OER_SUPPORT) 0, #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 0, #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 0 }, 0, 0, /* No default value */ "suspendIndicator" }, { ATF_POINTER, 1, offsetof(struct NGAP_UEContextSuspendRequestTransfer, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NGAP_ProtocolExtensionContainer_9571P267, 0, { #if !defined(ASN_DISABLE_OER_SUPPORT) 0, #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 0, #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_NGAP_UEContextSuspendRequestTransfer_oms_1[] = { 0, 1 }; static const ber_tlv_tag_t asn_DEF_NGAP_UEContextSuspendRequestTransfer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_NGAP_UEContextSuspendRequestTransfer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* suspendIndicator */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_NGAP_UEContextSuspendRequestTransfer_specs_1 = { sizeof(struct NGAP_UEContextSuspendRequestTransfer), offsetof(struct NGAP_UEContextSuspendRequestTransfer, _asn_ctx), asn_MAP_NGAP_UEContextSuspendRequestTransfer_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_NGAP_UEContextSuspendRequestTransfer_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_NGAP_UEContextSuspendRequestTransfer = { "UEContextSuspendRequestTransfer", "UEContextSuspendRequestTransfer", &asn_OP_SEQUENCE, asn_DEF_NGAP_UEContextSuspendRequestTransfer_tags_1, sizeof(asn_DEF_NGAP_UEContextSuspendRequestTransfer_tags_1) /sizeof(asn_DEF_NGAP_UEContextSuspendRequestTransfer_tags_1[0]), /* 1 */ asn_DEF_NGAP_UEContextSuspendRequestTransfer_tags_1, /* Same as above */ sizeof(asn_DEF_NGAP_UEContextSuspendRequestTransfer_tags_1) /sizeof(asn_DEF_NGAP_UEContextSuspendRequestTransfer_tags_1[0]), /* 1 */ { #if !defined(ASN_DISABLE_OER_SUPPORT) 0, #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) 0, #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ SEQUENCE_constraint }, asn_MBR_NGAP_UEContextSuspendRequestTransfer_1, 2, /* Elements count */ &asn_SPC_NGAP_UEContextSuspendRequestTransfer_specs_1 /* Additional specs */ };
/* * Generated by asn1c-0.9.28 (http://lionet.info/asn1c) * From ASN.1 module "EUTRA-RRC-Definitions" * found in "36331-ac0.asn" * `asn1c -S /home/nyee/srsLTE/srslte/examples/src/asn1c/skeletons -fcompound-names -fskeletons-copy -gen-PER -pdu=auto` */ #ifndef _MeasGapConfig_H_ #define _MeasGapConfig_H_ #include <asn_application.h> /* Including external dependencies */ #include <NULL.h> #include <NativeInteger.h> #include <constr_CHOICE.h> #include <constr_SEQUENCE.h> #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum MeasGapConfig_PR { MeasGapConfig_PR_NOTHING, /* No components present */ MeasGapConfig_PR_release, MeasGapConfig_PR_setup } MeasGapConfig_PR; typedef enum MeasGapConfig__setup__gapOffset_PR { MeasGapConfig__setup__gapOffset_PR_NOTHING, /* No components present */ MeasGapConfig__setup__gapOffset_PR_gp0, MeasGapConfig__setup__gapOffset_PR_gp1, /* Extensions may appear below */ } MeasGapConfig__setup__gapOffset_PR; /* MeasGapConfig */ typedef struct MeasGapConfig { MeasGapConfig_PR present; union MeasGapConfig_u { NULL_t release; struct MeasGapConfig__setup { struct MeasGapConfig__setup__gapOffset { MeasGapConfig__setup__gapOffset_PR present; union MeasGapConfig__setup__gapOffset_u { long gp0; long gp1; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } gapOffset; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } setup; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } MeasGapConfig_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_MeasGapConfig; #ifdef __cplusplus } #endif #endif /* _MeasGapConfig_H_ */ #include <asn_internal.h>
/** Copyright 2008, 2009, 2010, 2011, 2012 Roland Olbricht * * This file is part of Overpass_API. * * Overpass_API is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * Overpass_API 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 Affero General Public License * along with Overpass_API. If not, see <http://www.gnu.org/licenses/>. */ #ifndef DE__OSM3S___OVERPASS_API__STATEMENTS__NEWER_H #define DE__OSM3S___OVERPASS_API__STATEMENTS__NEWER_H #include <map> #include <set> #include <string> #include <vector> #include "statement.h" using namespace std; class Newer_Statement : public Statement { public: Newer_Statement(int line_number_, const map< string, string >& input_attributes); virtual string get_name() const { return "newer"; } virtual string get_result_name() const { return ""; } virtual void forecast(); virtual void execute(Resource_Manager& rman); virtual ~Newer_Statement(); static Generic_Statement_Maker< Newer_Statement > statement_maker; virtual Query_Constraint* get_query_constraint(); uint64 get_timestamp() const { return than_timestamp; } private: uint64 than_timestamp; vector< Query_Constraint* > constraints; }; #endif
/** ****************************************************************************** * @file USB_Device/MSC_Standalone/Inc/usbd_storage.h * @author MCD Application Team * @version V1.3.3 * @date 29-January-2016 * @brief Header for usbd_storage.c module ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2> * * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 * * 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. * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __USBD_STORAGE_H_ #define __USBD_STORAGE_H_ /* Includes ------------------------------------------------------------------*/ #include "usbd_msc.h" /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ extern USBD_StorageTypeDef USBD_DISK_fops; #endif /* __USBD_STORAGE_H_ */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
// // ItemDetailsViewController.h // test-new-ui // // Created by Mark on 18/04/2019. // Copyright © 2014-2021 Mark McGuill. All rights reserved. // #import <UIKit/UIKit.h> #import "Node.h" #import "Model.h" #ifdef IS_APP_EXTENSION #import "CredentialProviderViewController.h" #endif NS_ASSUME_NONNULL_BEGIN extern NSString *const CellHeightsChangedNotification; extern NSString *const kNotificationNameItemDetailsEditDone; @interface ItemDetailsViewController : UITableViewController + (NSArray<NSNumber*>*)defaultCollapsedSections; @property BOOL createNewItem; @property BOOL editImmediately; @property NSUUID* parentGroupId; @property NSUUID*_Nullable itemId; @property NSNumber*_Nullable historicalIndex; @property BOOL forcedReadOnly; @property Model* databaseModel; #ifdef IS_APP_EXTENSION @property (nonatomic, copy) void (^onAutoFillNewItemAdded)(NSString* username, NSString* password); @property (nonatomic, nullable) NSString* autoFillSuggestedTitle; @property (nonatomic, nullable) NSString* autoFillSuggestedUrl; @property (nonatomic, nullable) NSString* autoFillSuggestedNotes; #endif - (void)performSynchronousUpdate; @end NS_ASSUME_NONNULL_END
#ifndef __EACSMB_ui_scrollWindow_h__ #define __EACSMB_ui_scrollWindow_h__ typedef struct GUIScrollWindow { GUIHeader header; float sbWidth; Vector2 internalSize; // the extent of the child windows internally Vector2 scrollPos;// in pixels } GUIScrollWindow; GUIScrollWindow* GUIScrollWindow_new(GUIManager* gm); #endif // __EACSMB_ui_scrollWindow_h__
/*------------------------------------------------------------------------- * * objectaddress.c * Parstrees almost always target a object that postgres can address by * an ObjectAddress. Here we have a walker for parsetrees to find the * address of the object targeted. * * Copyright (c) Citus Data, Inc. * *------------------------------------------------------------------------- */ #include "postgres.h" #include "commands/extension.h" #include "distributed/commands.h" #include "distributed/deparser.h" #include "catalog/objectaddress.h" #include "catalog/pg_extension_d.h" /* * GetObjectAddressFromParseTree returns the ObjectAddress of the main target of the parse * tree. */ ObjectAddress GetObjectAddressFromParseTree(Node *parseTree, bool missing_ok) { const DistributeObjectOps *ops = GetDistributeObjectOps(parseTree); if (!ops->address) { ereport(ERROR, (errmsg("unsupported statement to get object address for"))); } return ops->address(parseTree, missing_ok); } ObjectAddress RenameAttributeStmtObjectAddress(Node *node, bool missing_ok) { RenameStmt *stmt = castNode(RenameStmt, node); Assert(stmt->renameType == OBJECT_ATTRIBUTE); switch (stmt->relationType) { case OBJECT_TYPE: { return RenameTypeAttributeStmtObjectAddress(node, missing_ok); } default: { ereport(ERROR, (errmsg("unsupported alter rename attribute statement to get " "object address for"))); } } } /* * CreateExtensionStmtObjectAddress finds the ObjectAddress for the extension described * by the CreateExtensionStmt. If missing_ok is false, then this function throws an * error if the extension does not exist. * * Never returns NULL, but the objid in the address could be invalid if missing_ok was set * to true. */ ObjectAddress CreateExtensionStmtObjectAddress(Node *node, bool missing_ok) { CreateExtensionStmt *stmt = castNode(CreateExtensionStmt, node); ObjectAddress address = { 0 }; const char *extensionName = stmt->extname; Oid extensionoid = get_extension_oid(extensionName, missing_ok); /* if we couldn't find the extension, error if missing_ok is false */ if (!missing_ok && extensionoid == InvalidOid) { ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("extension \"%s\" does not exist", extensionName))); } ObjectAddressSet(address, ExtensionRelationId, extensionoid); return address; }
/* * Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra * * This file is part of Essentia * * Essentia is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation (FSF), 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 Affero GNU General Public License * version 3 along with this program. If not, see http://www.gnu.org/licenses/ */ #ifndef FREESOUND_SFX_DESCRIPTORS_H #define FREESOUND_SFX_DESCRIPTORS_H #include "FreesoundDescriptorsSet.h" class FreesoundSfxDescriptors : public FreesoundDescriptorSet { public: static const string nameSpace; FreesoundSfxDescriptors(Pool& options) { this->options = options; } ~FreesoundSfxDescriptors(); void createNetwork(SourceBase& source, Pool& pool); void createPitchNetwork(VectorInput<Real>& pitch, Pool& pool); void createHarmonicityNetwork(SourceBase& source, Pool& pool); }; #endif
/* =========================================================================== Copyright (C) 2010-2013 Ninja and TheKelm of the IceOps-Team Copyright (C) 2006 MaxMind LLC This file is part of CoD4X17a-Server source code. CoD4X17a-Server source code is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. CoD4X17a-Server source code 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/> =========================================================================== */ unsigned int _GeoIP_seek_record ( unsigned long ipnum ); const char* _GeoIP_country_code ( unsigned int index ); const char* _GeoIP_country_code3 ( unsigned int index ); const char* _GeoIP_country_name ( unsigned int index ); const char* _GeoIP_continent_name ( unsigned int index );
/*©mit************************************************************************** * * * This file is part of FRIEND UNIFYING PLATFORM. * * Copyright (c) Friend Software Labs AS. All rights reserved. * * * * Licensed under the Source EULA. Please refer to the copy of the MIT License, * * found in the file license_mit.txt. * * * *****************************************************************************©*/ /** @file * * file contain definitions for MutexManager * * @author PS (Pawel Stefanski) * @date created 05/06/2018 */ #ifndef __MUTEX_MUTEX_MANAGER_H__ #define __MUTEX_MUTEX_MANAGER_H__ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <time.h> #include <core/nodes.h> // // // typedef struct MutexEntry { MinNode node; void *me_MutPointer; char me_MutPlace[ 256 ]; //should be enough to hold filename + code line }MutexEntry; // // // typedef struct MutexManager { void *mm_SB; MutexEntry *mm_MutexList; }MutexManager; // // // MutexManager *MutexManagerNew( void *sb ); // // // void MutexManagerDelete( MutexManager *km ); // // // int PthreadTimedLock( pthread_mutex_t *mut, char *file, int line ); //#define LOCK_TIMER // // // inline int MutexManagerAcquire( MutexManager *mm __attribute__((unused)), void *mutPointer, char *inCode __attribute__((unused)) ) { #ifdef LOCK_TIMER struct timespec MUTEX_TIMEOUT; clock_gettime( CLOCK_REALTIME, &MUTEX_TIMEOUT ); MUTEX_TIMEOUT.tv_sec += 15; int rc = pthread_mutex_timedlock( mutPointer, &MUTEX_TIMEOUT ); // if (rc != EBUSY) { #else return pthread_mutex_lock( mutPointer ); #endif } inline void MutexManagerRelease( MutexManager *mm __attribute__((unused)), void *mutPointer __attribute__((unused)) ) { } #ifdef MUTEX_TIME_LOCK_CHECK #ifndef FRIEND_MUTEX_LOCK #define FRIEND_MUTEX_LOCK( lck ) \ ({ \ struct timespec MUTEX_TIMEOUT; clock_gettime( CLOCK_REALTIME, &MUTEX_TIMEOUT ); MUTEX_TIMEOUT.tv_sec += 15; \ int rc = pthread_mutex_timedlock_np( mutPointer, &MUTEX_TIMEOUT ); \ if (rc != EBUSY) { LOG( FLOG_ERRROR, "Cannot lock mutex" ); } rc; }) #endif #else // MUTEX_TIME_LOCK_CHECK #ifndef FRIEND_MUTEX_LOCK #define FRIEND_MUTEX_LOCK( mutPointer ) \ pthread_mutex_lock( mutPointer ) #endif #endif #ifndef FRIEND_MUTEX_TRYLOCK #define FRIEND_MUTEX_TRYLOCK( mutPointer ) \ pthread_mutex_trylock( mutPointer ) #endif /* #ifndef FRIEND_MUTEX_LOCK #define FRIEND_MUTEX_LOCK( mutPointer ) \ PthreadTimedLock( mutPointer, __FILE__, __LINE__ ) #endif */ //if (rc != EBUSY) { LOG( FLOG_ERRROR, "Cannot lock mutex" ); } rc; }) #ifndef FRIEND_MUTEX_UNLOCK #define FRIEND_MUTEX_UNLOCK( mutPointer ) \ pthread_mutex_unlock( mutPointer ) #endif #endif //__MUTEX_MUTEX_MANAGER_H__
/* * (c) Copyright Ascensio System SIA 2010-2019 * * This program is a free software product. You can redistribute it and/or * modify it under the terms of the GNU Affero General Public License (AGPL) * version 3 as published by the Free Software Foundation. In accordance with * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect * that Ascensio System SIA expressly excludes the warranty of non-infringement * of any third-party rights. * * This program is distributed WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html * * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha * street, Riga, Latvia, EU, LV-1050. * * The interactive user interfaces in modified source and object code versions * of the Program must display Appropriate Legal Notices, as required under * Section 5 of the GNU AGPL version 3. * * Pursuant to Section 7(b) of the License you must retain the original Product * logo when distributing the program. Pursuant to Section 7(e) we decline to * grant you any rights under trademark law for use of our trademarks. * * All the Product's GUI elements, including illustrations and icon sets, as * well as technical writing content are licensed under the terms of the * Creative Commons Attribution-ShareAlike 4.0 International. See the License * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode * */ #pragma once #include "../PptxShape.h" namespace OOXMLShapes { class CFlowChartSummingJunction : public CPPTXShape { public: CFlowChartSummingJunction() { LoadFromXML( _T("<ooxml-shape>") _T("<gdLst xmlns=\"http://schemas.openxmlformats.org/drawingml/2006/main\">") _T("<gd name=\"idx\" fmla=\"cos wd2 2700000\" />") _T("<gd name=\"idy\" fmla=\"sin hd2 2700000\" />") _T("<gd name=\"il\" fmla=\"+- hc 0 idx\" />") _T("<gd name=\"ir\" fmla=\"+- hc idx 0\" />") _T("<gd name=\"it\" fmla=\"+- vc 0 idy\" />") _T("<gd name=\"ib\" fmla=\"+- vc idy 0\" />") _T("</gdLst>") _T("<cxnLst xmlns=\"http://schemas.openxmlformats.org/drawingml/2006/main\">") _T("<cxn ang=\"3cd4\">") _T("<pos x=\"hc\" y=\"t\" />") _T("</cxn>") _T("<cxn ang=\"3cd4\">") _T("<pos x=\"il\" y=\"it\" />") _T("</cxn>") _T("<cxn ang=\"cd2\">") _T("<pos x=\"l\" y=\"vc\" />") _T("</cxn>") _T("<cxn ang=\"cd4\">") _T("<pos x=\"il\" y=\"ib\" />") _T("</cxn>") _T("<cxn ang=\"cd4\">") _T("<pos x=\"hc\" y=\"b\" />") _T("</cxn>") _T("<cxn ang=\"cd4\">") _T("<pos x=\"ir\" y=\"ib\" />") _T("</cxn>") _T("<cxn ang=\"0\">") _T("<pos x=\"r\" y=\"vc\" />") _T("</cxn>") _T("<cxn ang=\"3cd4\">") _T("<pos x=\"ir\" y=\"it\" />") _T("</cxn>") _T("</cxnLst>") _T("<rect l=\"il\" t=\"it\" r=\"ir\" b=\"ib\" xmlns=\"http://schemas.openxmlformats.org/drawingml/2006/main\" />") _T("<pathLst xmlns=\"http://schemas.openxmlformats.org/drawingml/2006/main\">") _T("<path stroke=\"false\" extrusionOk=\"false\">") _T("<moveTo>") _T("<pt x=\"l\" y=\"vc\" />") _T("</moveTo>") _T("<arcTo wR=\"wd2\" hR=\"hd2\" stAng=\"cd2\" swAng=\"cd4\" />") _T("<arcTo wR=\"wd2\" hR=\"hd2\" stAng=\"3cd4\" swAng=\"cd4\" />") _T("<arcTo wR=\"wd2\" hR=\"hd2\" stAng=\"0\" swAng=\"cd4\" />") _T("<arcTo wR=\"wd2\" hR=\"hd2\" stAng=\"cd4\" swAng=\"cd4\" />") _T("<close />") _T("</path>") _T("<path fill=\"none\" extrusionOk=\"false\">") _T("<moveTo>") _T("<pt x=\"il\" y=\"it\" />") _T("</moveTo>") _T("<lnTo>") _T("<pt x=\"ir\" y=\"ib\" />") _T("</lnTo>") _T("<moveTo>") _T("<pt x=\"ir\" y=\"it\" />") _T("</moveTo>") _T("<lnTo>") _T("<pt x=\"il\" y=\"ib\" />") _T("</lnTo>") _T("</path>") _T("<path fill=\"none\">") _T("<moveTo>") _T("<pt x=\"l\" y=\"vc\" />") _T("</moveTo>") _T("<arcTo wR=\"wd2\" hR=\"hd2\" stAng=\"cd2\" swAng=\"cd4\" />") _T("<arcTo wR=\"wd2\" hR=\"hd2\" stAng=\"3cd4\" swAng=\"cd4\" />") _T("<arcTo wR=\"wd2\" hR=\"hd2\" stAng=\"0\" swAng=\"cd4\" />") _T("<arcTo wR=\"wd2\" hR=\"hd2\" stAng=\"cd4\" swAng=\"cd4\" />") _T("<close />") _T("</path>") _T("</pathLst>") _T("</ooxml-shape>") ); } }; }
/* * Common code for GPIO tools. * * Copyright (C) 2017 Bartosz Golaszewski <bartekgola@gmail.com> * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2.1 of the GNU Lesser General Public License * as published by the Free Software Foundation. */ #include <gpiod.h> #include "tools-common.h" #include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include <libgen.h> #define NORETURN __attribute__((noreturn)) static char *progname = "unknown"; void set_progname(char *name) { progname = name; } const char * get_progname(void) { return progname; } void NORETURN PRINTF(1, 2) die(const char *fmt, ...) { va_list va; va_start(va, fmt); fprintf(stderr, "%s: ", progname); vfprintf(stderr, fmt, va); fprintf(stderr, "\n"); va_end(va); exit(EXIT_FAILURE); } void NORETURN PRINTF(1, 2) die_perror(const char *fmt, ...) { va_list va; va_start(va, fmt); fprintf(stderr, "%s: ", progname); vfprintf(stderr, fmt, va); fprintf(stderr, ": %s\n", gpiod_last_strerror()); va_end(va); exit(EXIT_FAILURE); } void print_version(void) { char *prog, *tmp; tmp = strdup(progname); if (!tmp) prog = progname; else prog = basename(tmp); printf("%s (libgpiod) %s\n", prog, gpiod_version_string()); printf("Copyright (C) 2017 Bartosz Golaszewski\n"); printf("License: LGPLv2.1\n"); printf("This is free software: you are free to change and redistribute it.\n"); printf("There is NO WARRANTY, to the extent permitted by law.\n"); if (tmp) free(tmp); }
/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtLocation module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** 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. ** ** 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. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QGEOPOSITIONINFOSOURCEFACTORY_H #define QGEOPOSITIONINFOSOURCEFACTORY_H #include <QtLocation/QGeoPositionInfoSource> #include <QtLocation/QGeoSatelliteInfoSource> #include <QList> QT_BEGIN_NAMESPACE class Q_LOCATION_EXPORT QGeoPositionInfoSourceFactory { public: virtual ~QGeoPositionInfoSourceFactory(); virtual QGeoPositionInfoSource *positionInfoSource(QObject *parent) = 0; virtual QGeoSatelliteInfoSource *satelliteInfoSource(QObject *parent) = 0; }; #define QT_POSITION_SOURCE_INTERFACE Q_DECLARE_INTERFACE(QGeoPositionInfoSourceFactory, "org.qt-project.qt.position.sourcefactory/5.0") QT_END_NAMESPACE #endif // QGEOPOSITIONINFOSOURCEFACTORY_H
/* * spline_handling.h * Copyright (C) 2011 Till Theato <root@ttill.de> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * 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 ROTO_SPLINE_HANDLING_H #define ROTO_SPLINE_HANDLING_H #include <framework/mlt_types.h> #include <stdlib.h> #include <stdio.h> #include "deformation.h" #include "cJSON.h" typedef struct BPointF { struct PointF h1; struct PointF p; struct PointF h2; } BPointF; /** * Normalizes list of Bézier points \param points from image space defined by \param width and \param height. */ void normalizePoints( BPointF *points, int count, int width, int height ); /** * Denormalizes list of Bézier points \param points to image space defined by \param width and \param height. */ void denormalizePoints( BPointF *points, int count, int width, int height ); /** * Calculates points for the cubic Bézier curve defined by \param p1 and \param p2. * Points are calculated until the squared distanced between neighbour points is smaller than 2. * \param points Pointer to list of points. Will be allocted and filled with calculated points. * \param count Number of calculated points in \param points * \param size Allocated size of \param points (in elements not in bytes) */ void curvePoints( BPointF p1, BPointF p2, PointF **points, int *count, int *size ); /** * Gets the spline at postion \param time and writes it into \param points. * If there is no keyframe at \param time, the spline is generated by linear * interpolating the points of the neighboring keyframes. */ int getSplineAt( cJSON *root, mlt_position time, mlt_position in, BPointF **points, int *count, int *isOriginalKeyframe ); void setSplineAt( cJSON *root, mlt_position time, BPointF *points, int count, int isOriginalKeyframe, int keyWidth ); #endif
/* <one line to give the library's name and an idea of what it does.> Copyright (C) 2010 Dan Leinir Turthra Jensen <admin@leinir.dk> 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 GLUON_CORE_SCRIPTENGINE_H #define GLUON_CORE_SCRIPTENGINE_H #include "gluon_core_export.h" #include "singleton.h" #include <QtScript/QScriptEngine> namespace GluonCore { class GLUON_CORE_EXPORT ScriptEngine : public Singleton<ScriptEngine> { Q_OBJECT GLUON_SINGLETON( ScriptEngine ) public: QScriptEngine* scriptEngine(); void resetEngine(); private: ~ScriptEngine(); class Private; Private * const d; }; } #endif // GLUON_CORE_SCRIPTENGINE_H
/****************************************************************************** * This file is part of the Gluon Development Platform * Copyright (c) 2011 Laszlo Papp <djszapi@archlinux.us> * * 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 LIBQGIT2_OID_H #define LIBQGIT2_OID_H #include "../libqgit2_export.h" #include <git2/oid.h> #include <QtCore/QString> #include <QtCore/QDateTime> //typedef struct _git_oid git_oid; namespace LibQGit2 { /** * @brief Wrapper class for git_oid. * Represents a Git sha1 object id. * * @ingroup LibQGit2 * @{ */ class LIBQGIT2_OID_EXPORT QGitOId { public: /** * Constructor */ explicit QGitOId(const git_oid *oid = 0); /** * Copy constructor */ QGitOId(const QGitOId& other); /** * Destructor */ ~QGitOId(); /** * Parse a hex formatted object id into a OId. * * @param string * Input hex string; if less than 40 bytes, prefix lookup will be performed. Must be * at least 4 bytes. * * @return OId; null OId on failure. * @throws QGitException */ static QGitOId fromString(const QByteArray& string); /** * Copy an already raw oid into a git_oid structure. * @param raw the raw input bytes to be copied. */ static QGitOId fromRawData(const QByteArray& raw); /** Checks if this is a valid Git OId. An OId is invalid if it is empty or 0x0000... (20 byte). @return True, if the OId is valid. False if not. */ bool isValid() const; /** * Format a OId into a hex string. */ QByteArray format() const; /** * Format a git_oid into a loose-object path string. * * The resulting string is "aa/...", where "aa" is the first two * hex digitis of the oid and "..." is the remaining 38 digits. */ QByteArray pathFormat() const; git_oid* data(); const git_oid* constData() const; /** * Returns the length of the OId as a number of hexadecimal characters. * * The full length of a OId is 40, but the OId represented by this class may be smaller, * if it represents a prefix created with fromString(). */ int length() const; private: QByteArray d; }; /** * Compare two QGitOIds. */ bool operator ==(const QGitOId &oid1, const QGitOId &oid2); /** * Compare two QGitOIds. */ bool operator !=(const QGitOId &oid1, const QGitOId &oid2); /**@}*/ } #endif // LIBQGIT2_OID_H
/* * "$Id: label.h 624 2008-02-16 00:27:39Z msweet $" * * This file contains model number definitions for the CUPS sample * label printer driver. * * Copyright 2007 by Apple Inc. * Copyright 1997-2005 by Easy Software Products. * * These coded instructions, statements, and computer programs are the * property of Apple Inc. and are protected by Federal copyright * law. Distribution and use rights are outlined in the file "LICENSE.txt" * which should have been included with this file. If this file is * file is missing or damaged, see the license at "http://www.cups.org/". */ #define DYMO_3x0 0 /* Dymo Labelwriter 300/330/330 Turbo */ #define ZEBRA_EPL_LINE 0x10 /* Zebra EPL line mode printers */ #define ZEBRA_EPL_PAGE 0x11 /* Zebra EPL page mode printers */ #define ZEBRA_ZPL 0x12 /* Zebra ZPL-based printers */ #define ZEBRA_CPCL 0x13 /* Zebra CPCL-based printers */ #define INTELLITECH_PCL 0x20 /* Intellitech PCL-based printers */ /* * End of "$Id: label.h 624 2008-02-16 00:27:39Z msweet $". */
/* * Copyright (C) 2015 Freie Universität Berlin * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @ingroup drivers_saul * @{ * * @file * @brief SAUL string functions * * @author Hauke Petersen <hauke.petersen@fu-berlin.de> * * @} */ #include <stdint.h> #include "saul.h" /* * This is surely not the most beautiful implementation of a stringification * function, but works... */ const char *saul_class_to_str(const uint8_t class_id) { switch (class_id) { case SAUL_CLASS_UNDEF: return "CLASS_UNDEF"; case SAUL_ACT_ANY: return "ACT_ANY"; case SAUL_ACT_LED_RGB: return "ACT_LED_RGB"; case SAUL_ACT_SERVO: return "ACT_SERVO"; case SAUL_ACT_MOTOR: return "ACT_MOTOR"; case SAUL_ACT_SWITCH: return "ACT_SWITCH"; case SAUL_ACT_DIMMER: return "ACT_DIMMER"; case SAUL_SENSE_ANY: return "SENSE_ANY"; case SAUL_SENSE_BTN: return "SENSE_BTN"; case SAUL_SENSE_TEMP: return "SENSE_TEMP"; case SAUL_SENSE_HUM: return "SENSE_HUM"; case SAUL_SENSE_LIGHT: return "SENSE_LIGHT"; case SAUL_SENSE_ACCEL: return "SENSE_ACCEL"; case SAUL_SENSE_MAG: return "SENSE_MAG"; case SAUL_SENSE_GYRO: return "SENSE_GYRO"; case SAUL_SENSE_COLOR: return "SENSE_COLOR"; case SAUL_SENSE_PRESS: return "SENSE_PRESS"; case SAUL_SENSE_ANALOG: return "SENSE_ANALOG"; case SAUL_SENSE_COUNT: return "SENSE_PULSE_COUNT"; case SAUL_SENSE_OCCUP: return "SENSE_OCCUP"; case SAUL_SENSE_RADTEMP:return "SENSE_RADTEMP"; case SAUL_CLASS_ANY: return "CLASS_ANY"; default: return "CLASS_UNKNOWN"; } }
#include "mpi.h" #include "mpi_info.h" /** * Create the MPI_Info structure */ int MPI_Info_create(MPI_Info *info) { int i = 0; if (info == NULL) return MPI_ERR_ARG; *info = malloc(sizeof(struct MPI_Info)); (*info)->entries = (info_entry **) malloc(sizeof(info_entry *) * BUCKETS); (*info)->num_entries = 0; for (i = 0; i < BUCKETS; i++) { (*info)->entries[i] = NULL; } return MPI_SUCCESS; } /** * Free the MPI_Info structure */ int MPI_Info_free(MPI_Info *info) { int i; info_entry *p, *t; if (!info || !*info) return MPI_ERR_ARG; for (i = 0; i < BUCKETS; i++) { p = (*info)->entries[i]; while (p) { t = p->next; free(p->key); free(p->value); free(p); p = t; } (*info)->entries[i] = NULL; } free(*info); return MPI_SUCCESS; } /** * Sets nkeys to be the number of keys in the given info */ int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) { if (!info) return MPI_ERR_ARG; *nkeys = info->num_entries; return MPI_SUCCESS; } /** * Sets the key parameter to be the nth key in the given info */ int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) { int cur_key; int i; info_entry *p; char *ret_key; cur_key = -1; ret_key = NULL; if (info->num_entries == 0) return MPI_ERR_ARG; for (i = 0; i < BUCKETS; i++) { p = info->entries[i]; while (p) { cur_key++; if (cur_key == n) { ret_key = p->key; break; } p = p->next; } info->entries[i] = NULL; } if (ret_key == NULL) return MPI_ERR_OTHER; return MPI_SUCCESS; } /** * Adds a key/value pair in the given info */ int MPI_Info_set(MPI_Info info, char *key, char *value) { int bucket; info_entry *p, *n; if (key == NULL || value == NULL) return MPI_ERR_ARG; bucket = hash_key(key); if (bucket < 0 || bucket >= BUCKETS) return MPI_ERR_UNKNOWN; n = malloc(sizeof(info_entry)); memset(n, 0, sizeof(info_entry)); n->key = malloc(strlen(key) + 1); n->value = malloc(strlen(value) + 1); memcpy(n->key, key, strlen(key) + 1); memcpy(n->value, key, strlen(key) + 1); if (info->entries[bucket]) { info->entries[bucket] = n; return MPI_SUCCESS; } p = info->entries[bucket]; while (p) { if (p->next) { p = p->next; continue; } p->next = n; n->prev = p; break; } return MPI_SUCCESS; } /** * Sets the value parameter to be the value for the given key */ int MPI_Info_get(MPI_Info info, char *key, int valuelen, char *value, int *flag) { int cur_key; int i; info_entry *p; *flag = 0; if (info->num_entries == 0) return MPI_ERR_ARG; for (i = 0; i < BUCKETS; i++) { p = info->entries[i]; while (p) { if (strncmp(p->key, key, MPI_MAX_INFO_KEY)) { *flag = 1; memcpy(value, p->value, (strlen(p->value) + 1 < valuelen) ? strlen(p->value) + 1 : valuelen); break; } p = p->next; } info->entries[i] = NULL; } return MPI_SUCCESS; } /** * Hashes the given key to get the bucket number */ int hash_key(char *key) { int len, sum; int i; len = strlen(key); sum = 0; if (len == 0) return -1; for (i = 0; i < len; i++) { sum += (int) key[i]; } sum %= BUCKETS; return sum; }
/* FreeTDS - Library of routines accessing Sybase and Microsoft databases * Copyright (C) 1998-1999 Brian Bruns * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef _tdsversion_h_ #define _tdsversion_h_ /* $Id: 9640daf619734147e3b5ff6a1dad56ad305ffa51 $ */ #define TDS_VERSION_NO "freetds v1.2.dev.20190828" #define TDS_VERSION_MAJOR 1 #define TDS_VERSION_MINOR 1 #define TDS_VERSION_SUBVERSION 9999 #define TDS_VERSION_BUILD_NUMBER 7194 #endif
#ifndef _ALIAS_H #define _ALIAS_H int valid_alias(const char *alias); char *get_user_friendly_alias(const char *wwid, const char *file, const char *prefix, int bindings_readonly); int get_user_friendly_wwid(const char *alias, char *buff, const char *file); char *use_existing_alias (const char *wwid, const char *file, const char *alias_old, const char *prefix, int bindings_read_only); struct config; int check_alias_settings(const struct config *); #endif /* _ALIAS_H */
#include <stdio.h> #include "avr_compiler.h" #include "usart_driver.h" #include "twi_master_driver.h" #include "support.h" TWI_Master_t imu; USART_data_t xbee; volatile int readdata = 0; int main(void){ int i; int bytetobuffer; char xbeebuffer[100]; char receive; uint8_t rollsetupbuffer1[4] = {0x15, 0x04, 0x19, 0x11}; uint8_t rollsetupbuffer2[] = {0x3E, 0b00000001}; uint8_t rollstartbyte = 0x1A; enum states {runningwrite, runningread, stopped} state = stopped; /**Setup directions for serial interfaces*/ PORTC.DIR = 0b00001100; PORTC.OUT |= 0b00001000; PORTE.DIR |= 0b00001000; PORTF.DIR |= 0x03; PORTD.DIR = 0x0F; /**Setup interrupts*/ PMIC.CTRL |= PMIC_LOLVLEX_bm | PMIC_MEDLVLEX_bm | PMIC_HILVLEX_bm | PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm; sei(); /**Setup IMU*/ TWI_MasterInit(&imu, &TWIC, TWI_MASTER_INTLVL_HI_gc, TWI_BAUDSETTING); while(imu.status != TWIM_STATUS_READY); TWI_MasterWriteRead(&imu, ROLL, rollsetupbuffer1, 4, 0); while(imu.status != TWIM_STATUS_READY); TWI_MasterWriteRead(&imu, ROLL, rollsetupbuffer2, 2, 0); while(imu.status != TWIM_STATUS_READY); /**Setup Xbee*/ USART_InterruptDriver_Initialize(&xbee, &USARTE0, USART_DREINTLVL_LO_gc); USART_Format_Set(xbee.usart, USART_CHSIZE_8BIT_gc, USART_PMODE_DISABLED_gc, false); USART_RxdInterruptLevel_Set(xbee.usart, USART_RXCINTLVL_HI_gc); USART_Baudrate_Set(&USARTE0, 12 , 0); USART_Rx_Enable(xbee.usart); USART_Tx_Enable(xbee.usart); while(1){ _delay_ms(100); PORTF.OUT ^= 0x01; if(USART_RXBufferData_Available(&xbee)){ receive = USART_RXBuffer_GetByte(&xbee); if(receive == 'r'){ state = runningread; sprintf(xbeebuffer, "read\n\r"); for(i = 0; xbeebuffer[i] != 0; i ++){ bytetobuffer = 0; while(!bytetobuffer){ bytetobuffer = USART_TXBuffer_PutByte(&xbee, xbeebuffer[i]); } } } else if(receive == 'w'){ state = runningwrite; sprintf(xbeebuffer, "write\n\r"); for(i = 0; xbeebuffer[i] != 0; i ++){ bytetobuffer = 0; while(!bytetobuffer){ bytetobuffer = USART_TXBuffer_PutByte(&xbee, xbeebuffer[i]); } } } else if(receive == 's'){ state = stopped; sprintf(xbeebuffer, "stop\n\r"); for(i = 0; xbeebuffer[i] != 0; i ++){ bytetobuffer = 0; while(!bytetobuffer){ bytetobuffer = USART_TXBuffer_PutByte(&xbee, xbeebuffer[i]); } } } } switch(state){ case stopped: break; case runningread: while(imu.status != TWIM_STATUS_READY); TWI_MasterWriteRead(&imu, ROLL, &rollstartbyte, 1, 10); while(!readdata); readdata = 0; break; case runningwrite: while(imu.status != TWIM_STATUS_READY); TWI_MasterWriteRead(&imu, ROLL, &rollstartbyte, 1, 0 ); while(!readdata); readdata = 0; break; } } } ISR(USARTE0_RXC_vect){ USART_RXComplete(&xbee); } ISR(USARTE0_DRE_vect){ USART_DataRegEmpty(&xbee); } ISR(TWIC_TWIM_vect){ if(TWI_MasterInterruptHandler(&imu)){ readdata = 1; } else{ } }
/* * kinetic-c * Copyright (C) 2014 Seagate Technology. * * 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 _KINETIC_CLIENT_H #define _KINETIC_CLIENT_H #include "kinetic_types.h" /** * Initializes the Kinetic API andcsonfigures logging destination. * * @param log_file (path to log file, 'stdout' to log to STDOUT, NULL to disable logging) * @param log_level Logging level (-1:none, 0:error, 1:info, 2:verbose, 3:full) */ void KineticClient_Init(const char* log_file, int log_level); /** * @brief Performs shutdown/cleanup of the kinetic-c client lib */ void KineticClient_Shutdown(void); /** * @brief Initializes the Kinetic API, configures logging destination, establishes a * connection to the specified Kinetic Device, and establishes a session. * * @param config Session configuration * .host Host name or IP address to connect to * .port Port to establish socket connection on * .nonBlocking Set to true for non-blocking or false for blocking I/O * .clusterVersion Cluster version to use for the session * .identity Identity to use for the session * .hmacKey Key to use for HMAC calculations (NULL-terminated string) * @param handle Pointer to KineticSessionHandle (populated upon successful connection) * * @return Returns the resulting KineticStatus */ KineticStatus KineticClient_Connect(const KineticSession* config, KineticSessionHandle* handle); /** * @brief Closes the connection to a host. * * @param handle KineticSessionHandle for a connected session. * * @return Returns the resulting KineticStatus */ KineticStatus KineticClient_Disconnect(KineticSessionHandle* const handle); /** * @brief Executes a NOOP command to test whether the Kinetic Device is operational. * * @param handle KineticSessionHandle for a connected session. * * @return Returns the resulting KineticStatus */ KineticStatus KineticClient_NoOp(KineticSessionHandle handle); /** * @brief Executes a PUT command to store/update an entry on the Kinetic Device. * * @param handle KineticSessionHandle for a connected session. * @param entry Key/value entry for object to store. 'value' must * specify the data to be stored. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * * * @return Returns the resulting KineticStatus */ KineticStatus KineticClient_Put(KineticSessionHandle handle, KineticEntry* const entry, KineticCompletionClosure* closure); /** * @brief Executes a GET command to retrieve and entry from the Kinetic Device. * * @param handle KineticSessionHandle for a connected session. * @param entry Key/value entry for object to retrieve. 'value' will * be populated unless 'metadataOnly' is set to 'true'. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * * @return Returns the resulting KineticStatus */ KineticStatus KineticClient_Get(KineticSessionHandle handle, KineticEntry* const entry, KineticCompletionClosure* closure); /** * @brief Executes a DELETE command to delete an entry from the Kinetic Device * * @param handle KineticSessionHandle for a connected session. * @param entry Key/value entry for object to delete. 'value' is * not used for this operation. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * * @return Returns the resulting KineticStatus */ KineticStatus KineticClient_Delete(KineticSessionHandle handle, KineticEntry* const entry, KineticCompletionClosure* closure); /** * @brief Executes a GETKEYRANGE command to retrive a set of keys in the range * specified range from the Kinetic Device * * @param handle KineticSessionHandle for a connected session * @param range KineticKeyRange specifying keys to return * @param keys ByteBufferArray to store the retrieved keys * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * * * @return Returns 0 upon succes, -1 or the Kinetic status code * upon failure */ KineticStatus KineticClient_GetKeyRange(KineticSessionHandle handle, KineticKeyRange* range, ByteBufferArray* keys, KineticCompletionClosure* closure); #endif // _KINETIC_CLIENT_H
/* This file is part of libmicrohttpd Copyright (C) 2016 Karlson2k (Evgeny Grin) 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 */ /** * @file microhttpd/mhd_locks.h * @brief Header for platform-independent locks abstraction * @author Karlson2k (Evgeny Grin) * @author Christian Grothoff * * Provides basic abstraction for locks/mutex and semaphores. * Any functions can be implemented as macro on some platforms * unless explicitly marked otherwise. * Any function argument can be skipped in macro, so avoid * variable modification in function parameters. * * @warning Unlike pthread functions, most of functions return * nonzero on success. */ #ifndef MHD_LOCKS_H #define MHD_LOCKS_H 1 #include "mhd_options.h" #if defined(MHD_USE_W32_THREADS) # define MHD_W32_MUTEX_ 1 # ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN 1 # endif /* !WIN32_LEAN_AND_MEAN */ # include <windows.h> #elif defined(HAVE_PTHREAD_H) && defined(MHD_USE_POSIX_THREADS) # define MHD_PTHREAD_MUTEX_ 1 # undef HAVE_CONFIG_H # include <pthread.h> # define HAVE_CONFIG_H 1 #else # error No base mutex API is available. #endif #ifndef MHD_PANIC # include <stdio.h> # include <stdlib.h> /* Simple implementation of MHD_PANIC, to be used outside lib */ # define MHD_PANIC(msg) do { fprintf (stderr, \ "Abnormal termination at %d line in file %s: %s\n", \ (int)__LINE__, __FILE__, msg); abort();} while(0) #endif /* ! MHD_PANIC */ #if defined(MHD_PTHREAD_MUTEX_) typedef pthread_mutex_t MHD_mutex_; #elif defined(MHD_W32_MUTEX_) typedef CRITICAL_SECTION MHD_mutex_; #endif #if defined(MHD_PTHREAD_MUTEX_) /** * Initialise new mutex. * @param pmutex pointer to the mutex * @return nonzero on success, zero otherwise */ #define MHD_mutex_init_(pmutex) (!(pthread_mutex_init((pmutex), NULL))) #elif defined(MHD_W32_MUTEX_) /** * Initialise new mutex. * @param pmutex pointer to mutex * @return nonzero on success, zero otherwise */ #define MHD_mutex_init_(pmutex) (InitializeCriticalSectionAndSpinCount((pmutex),16)) #endif #if defined(MHD_PTHREAD_MUTEX_) /** * Destroy previously initialised mutex. * @param pmutex pointer to mutex * @return nonzero on success, zero otherwise */ #define MHD_mutex_destroy_(pmutex) (!(pthread_mutex_destroy((pmutex)))) #elif defined(MHD_W32_MUTEX_) /** * Destroy previously initialised mutex. * @param pmutex pointer to mutex * @return Always nonzero */ #define MHD_mutex_destroy_(pmutex) (DeleteCriticalSection((pmutex)), !0) #endif /** * Destroy previously initialised mutex and abort execution * if error is detected. * @param pmutex pointer to mutex */ #define MHD_mutex_destroy_chk_(pmutex) do { \ if (!MHD_mutex_destroy_(pmutex)) \ MHD_PANIC(_("Failed to destroy mutex.\n")); \ } while(0) #if defined(MHD_PTHREAD_MUTEX_) /** * Acquire lock on previously initialised mutex. * If mutex was already locked by other thread, function * blocks until mutex becomes available. * @param pmutex pointer to mutex * @return nonzero on success, zero otherwise */ #define MHD_mutex_lock_(pmutex) (!(pthread_mutex_lock((pmutex)))) #elif defined(MHD_W32_MUTEX_) /** * Acquire lock on previously initialised mutex. * If mutex was already locked by other thread, function * blocks until mutex becomes available. * @param pmutex pointer to mutex * @return Always nonzero */ #define MHD_mutex_lock_(pmutex) (EnterCriticalSection((pmutex)), !0) #endif /** * Acquire lock on previously initialised mutex. * If mutex was already locked by other thread, function * blocks until mutex becomes available. * If error is detected, execution will be aborted. * @param pmutex pointer to mutex */ #define MHD_mutex_lock_chk_(pmutex) do { \ if (!MHD_mutex_lock_(pmutex)) \ MHD_PANIC(_("Failed to lock mutex.\n")); \ } while(0) #if defined(MHD_PTHREAD_MUTEX_) /** * Unlock previously initialised and locked mutex. * @param pmutex pointer to mutex * @return nonzero on success, zero otherwise */ #define MHD_mutex_unlock_(pmutex) (!(pthread_mutex_unlock((pmutex)))) #elif defined(MHD_W32_MUTEX_) /** * Unlock previously initialised and locked mutex. * @param pmutex pointer to mutex * @return Always nonzero */ #define MHD_mutex_unlock_(pmutex) (LeaveCriticalSection((pmutex)), !0) #endif /** * Unlock previously initialised and locked mutex. * If error is detected, execution will be aborted. * @param pmutex pointer to mutex */ #define MHD_mutex_unlock_chk_(pmutex) do { \ if (!MHD_mutex_unlock_(pmutex)) \ MHD_PANIC(_("Failed to unlock mutex.\n")); \ } while(0) /** * A semaphore. */ struct MHD_Semaphore; /** * Create a semaphore with an initial counter of @a init * * @param init initial counter * @return the semaphore, NULL on error */ struct MHD_Semaphore * MHD_semaphore_create (unsigned int init); /** * Count down the semaphore, block if necessary. * * @param sem semaphore to count down. */ void MHD_semaphore_down (struct MHD_Semaphore *sem); /** * Increment the semaphore. * * @param sem semaphore to increment. */ void MHD_semaphore_up (struct MHD_Semaphore *sem); /** * Destroys the semaphore. * * @param sem semaphore to destroy. */ void MHD_semaphore_destroy (struct MHD_Semaphore *sem); #endif /* ! MHD_LOCKS_H */
/************************************************************************** ** ** This file is part of Qt Creator ** ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** Commercial Usage ** ** Licensees holding valid Qt Commercial licenses may use this file in ** accordance with the Qt Commercial License Agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Nokia. ** ** 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. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at http://qt.nokia.com/contact. ** **************************************************************************/ #ifndef DEBUGGER_TRK_PRIVATE_UTILS #define DEBUGGER_TRK_PRIVATE_UTILS #include "trkutils.h" #include "symbianutils_global.h" QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE namespace trk { void appendDateTime(QByteArray *ba, QDateTime dateTime, Endianness = TargetByteOrder); // returns a QByteArray containing optionally // the serial frame [0x01 0x90 <len>] and 0x7e encoded7d(ba) 0x7e QByteArray frameMessage(byte command, byte token, const QByteArray &data, bool serialFrame); bool extractResult(QByteArray *buffer, bool serialFrame, TrkResult *r, QByteArray *rawData = 0); } // namespace trk #endif // DEBUGGER_TRK_PRIVATE_UTILS
/*************************************************************************** * Copyright (C) 2005-2013 by the FIFE team * * http://www.fifengine.net * * This file is part of FIFE. * * * * FIFE 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 FIFE_TIMEVENT_H #define FIFE_TIMEVENT_H // Standard C++ library includes // 3rd party library includes // FIFE includes // These includes are split up in two parts, separated by one empty line // First block: files included from the FIFE root src directory // Second block: files included from the same folder #include "util/base/fife_stdint.h" namespace FIFE { /** Interface for events to be registered with TimeManager. * * To register a class with TimeManager firstly derive a class * from this and override the updateEvent() function. updateEvent() * will be called periodically depending on the value of getPeriod() * which can be set using the constructor or setPeriod(). A value * of -1 will never be updated, 0 will updated every frame and a value * over 0 defines the number of milliseconds between updates. * * @see TimeManager */ class TimeEvent { public: /** Default constructor. * * @param period The period of the event. See class description. */ TimeEvent(int32_t period = -1); /** Destructor. * */ virtual ~TimeEvent(); /** Update function to be overridden by client. * * @param time Time delta. */ virtual void updateEvent(uint32_t time) = 0; /** Called by TimeManager to update the event. * * @param time Current time. Used To check if its time to update. */ void managerUpdateEvent(uint32_t time); /** Set the period of the event. * * @param period The period of the event. See class description. */ void setPeriod(int32_t period); /** Get the period of the event. * * @return The period of the event. See class description. */ int32_t getPeriod(); /** Get the last time the event was updated. * * @return Time of last update. */ uint32_t getLastUpdateTime(); /** Set the last time the event was updated. * * @param ms Time of last update. */ void setLastUpdateTime(uint32_t ms); private: // The period of the event. See the class description. int32_t m_period; // The last time the class was updated. uint32_t m_last_updated; }; }//FIFE #endif
/*************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (directui@nokia.com) ** ** This file is part of mhome. ** ** If you have questions regarding the use of this file, please contact ** Nokia at directui@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 WINDOWMONITOR_H #define WINDOWMONITOR_H #include <QWidget> #include <QObject> #include "windowinfo.h" /*! * An interface defining window monitoring functionality. * A window monitor monitors the windows of an application and performs * various things when something happens to the windows. It is only a * monitor: it doesn't change anything on the windows. */ class WindowMonitor : public QObject { Q_OBJECT public: /*! * Queries if the window specified by \a wid belongs to the application * this window monitor belongs to. * \param wid the window id * \return \c true if the window belongs to this application */ virtual bool isOwnWindow(WId wid) const = 0; signals: /*! * A signal that gets emitted when the stacking order of the windows changes. * The topmost window is the last one in the argument list. */ void windowStackingOrderChanged(QList<WindowInfo>); /*! * A signal that gets emitted when a fullscreen window appears on top of application's * own window's and covers it completely. */ void fullscreenWindowOnTopOfOwnWindow(); /*! * A signal that gets emitted when a window appears on top of application's * own window's. * \param window the WindowInfo for the window that appeared. */ void anyWindowOnTopOfOwnWindow(WindowInfo windowInfo); }; #endif // WINDOWMONITOR_H
/**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor ** the names of its contributors may be used to endorse or promote ** products derived from this software without specific prior written ** permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef BLUREFFECT_H #define BLUREFFECT_H #include <QGraphicsEffect> #include <QGraphicsItem> class BlurEffect: public QGraphicsBlurEffect { public: BlurEffect(QGraphicsItem *item); void setBaseLine(qreal y) { m_baseLine = y; } QRectF boundingRect() const; void draw(QPainter *painter); private: void adjustForItem(); private: qreal m_baseLine; QGraphicsItem *item; }; #endif // BLUREFFECT_H
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2004-2006 Sage Weil <sage@newdream.net> * * This 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. See file COPYING. * */ #ifndef CEPH_AUTHMONITOR_H #define CEPH_AUTHMONITOR_H #include <map> #include <set> using namespace std; #include "include/types.h" #include "msg/Messenger.h" #include "PaxosService.h" #include "mon/Monitor.h" class MMonCommand; class MAuth; class MAuthMon; class MMonGlobalID; class KeyRing; #define MIN_GLOBAL_ID 0x1000 class AuthMonitor : public PaxosService { void auth_usage(stringstream& ss); enum IncType { GLOBAL_ID, AUTH_DATA, }; public: struct Incremental { IncType inc_type; uint64_t max_global_id; uint32_t auth_type; bufferlist auth_data; void encode(bufferlist& bl) const { __u8 v = 1; ::encode(v, bl); __u32 _type = (__u32)inc_type; ::encode(_type, bl); if (_type == GLOBAL_ID) { ::encode(max_global_id, bl); } else { ::encode(auth_type, bl); ::encode(auth_data, bl); } } void decode(bufferlist::iterator& bl) { __u8 v; ::decode(v, bl); __u32 _type; ::decode(_type, bl); inc_type = (IncType)_type; assert(inc_type >= GLOBAL_ID && inc_type <= AUTH_DATA); if (_type == GLOBAL_ID) { ::decode(max_global_id, bl); } else { ::decode(auth_type, bl); ::decode(auth_data, bl); } } }; private: vector<Incremental> pending_auth; version_t last_rotating_ver; uint64_t max_global_id; uint64_t last_allocated_id; void export_keyring(KeyRing& keyring); void import_keyring(KeyRing& keyring); void push_cephx_inc(KeyServerData::Incremental& auth_inc) { Incremental inc; inc.inc_type = AUTH_DATA; ::encode(auth_inc, inc.auth_data); inc.auth_type = CEPH_AUTH_CEPHX; pending_auth.push_back(inc); } void on_active(); void election_finished(); bool should_propose(double& delay); void create_initial(); bool update_from_paxos(); void create_pending(); // prepare a new pending bool prepare_global_id(MMonGlobalID *m); void increase_max_global_id(); uint64_t assign_global_id(MAuth *m, bool should_increase_max); void encode_pending(bufferlist &bl); // propose pending update to peers bool preprocess_query(PaxosServiceMessage *m); // true if processed. bool prepare_update(PaxosServiceMessage *m); bool prep_auth(MAuth *m, bool paxos_writable); bool preprocess_command(MMonCommand *m); bool prepare_command(MMonCommand *m); void check_rotate(); public: AuthMonitor(Monitor *mn, Paxos *p) : PaxosService(mn, p), last_rotating_ver(0), max_global_id(0), last_allocated_id(0) {} void pre_auth(MAuth *m); void tick(); // check state, take actions void init(); }; WRITE_CLASS_ENCODER(AuthMonitor::Incremental); #endif
/* Copyright (C) 2012 Collabora Ltd. <info@collabora.com> @author George Kiagiadakis <george.kiagiadakis@collabora.com> 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 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/>. */ #ifndef QGST_UI_GRAPHICSVIDEOSURFACE_H #define QGST_UI_GRAPHICSVIDEOSURFACE_H #include "global.h" #include "../element.h" #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) # include <QtWidgets/QGraphicsView> #else # include <QtGui/QGraphicsView> #endif namespace QGst { namespace Ui { class GraphicsVideoWidget; class GraphicsVideoSurfacePrivate; /*! \headerfile graphicsvideosurface.h <QGst/Ui/GraphicsVideoSurface> * \brief Helper class for painting video on a QGraphicsView * * This is a helper class that represents a video surface on a QGraphicsView. * This is not a QGraphicsItem, though, it is just a helper class to bind * the video sink to a specific view. To use it, create a GraphicsVideoWidget, * add it to your scene and connect it with this surface. * * Example * \code * QGraphicsScene *scene = new QGraphicsScene; * QGraphicsView *view = new QGraphicsView (scene); * view->setViewport(new QGLWidget); //recommended * QGst::Ui::GraphicsVideoSurface *surface = new QGst::Ui::GraphicsVideoSurface(view); * ... * QGst::Ui::GraphicsVideoWidget *widget = new QGst::Ui::GraphicsVideoWidget; * widget->setSurface(surface); * scene->addItem(widget); * \endcode * * This class internally creates and uses either a "qtglvideosink" or a "qtvideosink" * element ("qt5glvideosink" / "qt5videosink" in Qt5). This element is created the * first time it is requested and a reference is kept internally. * * To make use of OpenGL hardware acceleration (using qtglvideosink), you need to set * a QGLWidget as the viewport of the QGraphicsView. Note that you must do this before * the video sink element is requested for the first time using the videoSink() method, * as this method needs to find a GL context to be able to construct qtglvideosink and * query the hardware about supported features. Using OpenGL acceleration is recommended. * If you don't use it, painting will be done in software with QImage and QPainter * (using qtvideosink). * * This class can also be used to paint video on QML. * * Example: * \code * // in your C++ code * QDeclarativeView *view = new QDeclarativeView; * view->setViewport(new QGLWidget); //recommended * QGst::Ui::GraphicsVideoSurface *surface = new QGst::Ui::GraphicsVideoSurface(view); * view->rootContext()->setContextProperty(QLatin1String("videoSurface"), surface); * ... * // and in your qml file: * import QtGStreamer 0.10 * ... * VideoItem { * id: video * width: 320 * height: 240 * surface: videoSurface * } * \endcode * * \sa GraphicsVideoWidget */ class QTGSTREAMERUI_EXPORT GraphicsVideoSurface : public QObject { Q_OBJECT Q_DISABLE_COPY(GraphicsVideoSurface) public: explicit GraphicsVideoSurface(QGraphicsView *parent); virtual ~GraphicsVideoSurface(); /*! Returns the video sink element that provides this surface's image. * The element will be constructed the first time that this function * is called. The surface will always keep a reference to this element. */ ElementPtr videoSink() const; private: QTGSTREAMERUI_NO_EXPORT void onUpdate(); private: friend class GraphicsVideoWidget; GraphicsVideoSurfacePrivate * const d; }; } // namespace Ui } // namespace QGst Q_DECLARE_METATYPE(QGst::Ui::GraphicsVideoSurface*) #endif // QGST_UI_GRAPHICSVIDEOSURFACE_H
/* Categories of Unicode characters. Copyright (C) 2002, 2006-2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2002. 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 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 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/>. */ #include <config.h> /* Specification. */ #include "unictype.h" /* Define u_categ_Pf table. */ #include "categ_Pf.h" const uc_general_category_t UC_CATEGORY_Pf = { UC_CATEGORY_MASK_Pf, 0, { &u_categ_Pf } };
/* * idevicesetlocation.c * Simulate location on iOS device with mounted developer disk image * * Copyright (c) 2016-2020 Nikias Bassen, All Rights Reserved. * * 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 */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #define TOOL_NAME "idevicesetlocation" #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <errno.h> #include <getopt.h> #include <libimobiledevice/libimobiledevice.h> #include <libimobiledevice/lockdown.h> #include <libimobiledevice/service.h> #include <endianness.h> #define DT_SIMULATELOCATION_SERVICE "com.apple.dt.simulatelocation" enum { SET_LOCATION = 0, RESET_LOCATION = 1 }; static void print_usage(int argc, char **argv, int is_error) { char *bname = strrchr(argv[0], '/'); bname = (bname) ? bname + 1 : argv[0]; fprintf(is_error ? stderr : stdout, "Usage: %s [OPTIONS] -- <LAT> <LONG>\n", bname); fprintf(is_error ? stderr : stdout, " %s [OPTIONS] reset\n", bname); fprintf(is_error ? stderr : stdout, "\n" \ "OPTIONS:\n" \ " -u, --udid UDID target specific device by UDID\n" \ " -n, --network connect to network device\n" \ " -d, --debug enable communication debugging\n" \ " -h, --help prints usage information\n" \ " -v, --version prints version information\n" \ "\n" \ "Homepage: <" PACKAGE_URL ">\n" \ "Bug Reports: <" PACKAGE_BUGREPORT ">\n" ); } int main(int argc, char **argv) { int c = 0; const struct option longopts[] = { { "help", no_argument, NULL, 'h' }, { "udid", required_argument, NULL, 'u' }, { "debug", no_argument, NULL, 'd' }, { "network", no_argument, NULL, 'n' }, { "version", no_argument, NULL, 'v' }, { NULL, 0, NULL, 0} }; uint32_t mode = 0; const char *udid = NULL; int use_network = 0; while ((c = getopt_long(argc, argv, "dhu:nv", longopts, NULL)) != -1) { switch (c) { case 'd': idevice_set_debug_level(1); break; case 'u': if (!*optarg) { fprintf(stderr, "ERROR: UDID must not be empty!\n"); print_usage(argc, argv, 1); return 2; } udid = optarg; break; case 'n': use_network = 1; break; case 'h': print_usage(argc, argv, 0); return 0; case 'v': printf("%s %s\n", TOOL_NAME, PACKAGE_VERSION); return 0; default: print_usage(argc, argv, 1); return 2; } } argc -= optind; argv += optind; if ((argc > 2) || (argc < 1)) { print_usage(argc+optind, argv-optind, 1); return -1; } if (argc == 2) { mode = SET_LOCATION; } else if (argc == 1) { if (strcmp(argv[0], "reset") == 0) { mode = RESET_LOCATION; } else { print_usage(argc+optind, argv-optind, 1); return -1; } } idevice_t device = NULL; if (idevice_new_with_options(&device, udid, (use_network) ? IDEVICE_LOOKUP_NETWORK : IDEVICE_LOOKUP_USBMUX) != IDEVICE_E_SUCCESS) { if (udid) { printf("ERROR: Device %s not found!\n", udid); } else { printf("ERROR: No device found!\n"); } return -1; } lockdownd_client_t lockdown; lockdownd_client_new_with_handshake(device, &lockdown, TOOL_NAME); lockdownd_service_descriptor_t svc = NULL; if (lockdownd_start_service(lockdown, DT_SIMULATELOCATION_SERVICE, &svc) != LOCKDOWN_E_SUCCESS) { lockdownd_client_free(lockdown); idevice_free(device); printf("ERROR: Could not start the simulatelocation service. Make sure a developer disk image is mounted!\n"); return -1; } lockdownd_client_free(lockdown); service_client_t service = NULL; service_error_t serr = service_client_new(device, svc, &service); lockdownd_service_descriptor_free(svc); if (serr != SERVICE_E_SUCCESS) { lockdownd_client_free(lockdown); idevice_free(device); printf("ERROR: Could not connect to simulatelocation service (%d)\n", serr); return -1; } uint32_t l; uint32_t s = 0; l = htobe32(mode); service_send(service, (const char*)&l, 4, &s); if (mode == SET_LOCATION) { int len = 4 + strlen(argv[0]) + 4 + strlen(argv[1]); char *buf = malloc(len); uint32_t latlen; latlen = strlen(argv[0]); l = htobe32(latlen); memcpy(buf, &l, 4); memcpy(buf+4, argv[0], latlen); uint32_t longlen = strlen(argv[1]); l = htobe32(longlen); memcpy(buf+4+latlen, &l, 4); memcpy(buf+4+latlen+4, argv[1], longlen); s = 0; service_send(service, buf, len, &s); } idevice_free(device); return 0; }
/* Copyright (C) 2006, Mike Gashler 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. see http://www.gnu.org/copyleft/lesser.html */ #ifndef __GPOLYNOMIAL_H__ #define __GPOLYNOMIAL_H__ #include "GLearner.h" #include <vector> namespace GClasses { class GPolynomialSingleLabel; /// This regresses a multi-dimensional polynomial to fit the data class GPolynomial : public GSupervisedLearner { protected: size_t m_controlPoints; std::vector<GPolynomialSingleLabel*> m_polys; public: /// It will have the same number of control points in every feature dimension GPolynomial(GRand& rand); /// Load from a DOM. GPolynomial(GDomNode* pNode, GLearnerLoader& ll); virtual ~GPolynomial(); /// Set the number of control points in the Bezier representation of the /// polynomial (which is one more than the polynomial order). The default /// is 3. void setControlPoints(size_t n); /// Returns the number of control points. size_t controlPoints(); /// Uses cross-validation to find a set of parameters that works well with /// the provided data. void autoTune(GMatrix& features, GMatrix& labels); #ifndef NO_TEST_CODE /// Performs unit tests for this class. Throws an exception if there is a failure. static void test(); #endif // NO_TEST_CODE /// Marshal this object into a DOM, which can then be converted to a variety of serial formats. virtual GDomNode* serialize(GDom* pDoc); /// See the comment for GSupervisedLearner::clear virtual void clear(); protected: /// See the comment for GSupervisedLearner::trainInner virtual void trainInner(GMatrix& features, GMatrix& labels); /// See the comment for GSupervisedLearner::predictInner virtual void predictInner(const double* pIn, double* pOut); /// See the comment for GSupervisedLearner::predictDistributionInner virtual void predictDistributionInner(const double* pIn, GPrediction* pOut); /// See the comment for GTransducer::canImplicitlyHandleNominalFeatures virtual bool canImplicitlyHandleNominalFeatures() { return false; } /// See the comment for GTransducer::canImplicitlyHandleNominalLabels virtual bool canImplicitlyHandleNominalLabels() { return false; } }; } // namespace GClasses #endif // __GPOLYNOMIAL_H__
/* * This file is part of crash-reporter * * Copyright (C) 2013 Jolla Ltd. * Contact: Jakub Adam <jakub.adam@jollamobile.com> * * This program 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. * * 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, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA */ #ifndef CRASHREPORTERQMLPLUGIN_H #define CRASHREPORTERQMLPLUGIN_H #include <QQmlExtensionPlugin> class CrashReporterQmlPlugin: public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "com.jolla.settings.crashreporter") public: void initializeEngine(QQmlEngine *engine, const char *uri); void registerTypes(const char *uri); }; #endif // CRASHREPORTERQMLPLUGIN_H
/* Copyright 2010, 2011 Michael Steinert * This file is part of Log4g. * * Log4g 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. * * Log4g 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 Log4g. If not, see <http://www.gnu.org/licenses/>. */ /** * SECTION: level-range-filter * @short_description: A filter based on level ranges * @see_also: #Log4gLevelClass * * This is a simple filter which can reject message with levels outside a * specified range. * * This filter accept three properties: * <orderedlist> * <listitem><para>level-min</para></listitem> * <listitem><para>level-max</para></listitem> * <listitem><para>accept-on-range</para></listitem> * </orderedlist> * * If the level of the logging event is not between level-min and level-max * (inclusive) then the decide function returns deny. * * If the logging logging event is within the specified range and * accept-on-range is %TRUE then the decide function returns accept. If * accept-on-range is set to %FALSE then decide will return neutral in this * case. * * The default value for accept-on-range is %TRUE. * * If level-min is not defined then there is no minimum level (a level is * never rejected for being too low). If level-max is not defined then * there is no maximum level (a level is never rejected for being too high). * * Refer to log4g_appender_set_threshold() for a more convenient way to filter * out log events by level. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "filter/level-range-filter.h" G_DEFINE_DYNAMIC_TYPE(Log4gLevelRangeFilter, log4g_level_range_filter, LOG4G_TYPE_FILTER) #define ASSIGN_PRIVATE(instance) \ (G_TYPE_INSTANCE_GET_PRIVATE(instance, LOG4G_TYPE_LEVEL_RANGE_FILTER, \ struct Private)) #define GET_PRIVATE(instance) \ ((struct Private *)((Log4gLevelRangeFilter *)instance)->priv) struct Private { gboolean accept; Log4gLevel *min; Log4gLevel *max; }; static void log4g_level_range_filter_init(Log4gLevelRangeFilter *self) { self->priv = ASSIGN_PRIVATE(self); struct Private *priv = GET_PRIVATE(self); priv->accept = TRUE; } static void dispose(GObject *base) { struct Private *priv = GET_PRIVATE(base); if (priv->min) { g_object_unref(priv->min); priv->min = NULL; } if (priv->max) { g_object_unref(priv->max); priv->max = NULL; } G_OBJECT_CLASS(log4g_level_range_filter_parent_class)->dispose(base); } enum Properties { PROP_O = 0, PROP_LEVEL_MIN, PROP_LEVEL_MAX, PROP_ACCEPT_ON_RANGE, PROP_MAX }; static void set_property(GObject *base, guint id, const GValue *value, GParamSpec *pspec) { struct Private *priv = GET_PRIVATE(base); const gchar *level; switch (id) { case PROP_LEVEL_MIN: if (priv->min) { g_object_unref(priv->min); priv->min = NULL; } level = g_value_get_string(value); if (level) { priv->min = log4g_level_string_to_level(level); if (priv->min) { g_object_ref(priv->min); } } break; case PROP_LEVEL_MAX: if (priv->max) { g_object_unref(priv->max); priv->max = NULL; } level = g_value_get_string(value); if (level) { priv->max = log4g_level_string_to_level(level); if (priv->max) { g_object_ref(priv->max); } } break; case PROP_ACCEPT_ON_RANGE: priv->accept = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(base, id, pspec); break; } } static Log4gFilterDecision decide(Log4gFilter *base, Log4gLoggingEvent *event) { struct Private *priv = GET_PRIVATE(base); Log4gLevel *level = log4g_logging_event_get_level(event); if (priv->min) { if (log4g_level_to_int(level) < log4g_level_to_int(priv->min)) { return LOG4G_FILTER_DENY; } } if (priv->max) { if (log4g_level_to_int(level) > log4g_level_to_int(priv->max)) { return LOG4G_FILTER_DENY; } } return (priv->accept ? LOG4G_FILTER_ACCEPT : LOG4G_FILTER_NEUTRAL); } static void log4g_level_range_filter_class_init(Log4gLevelRangeFilterClass *klass) { Log4gFilterClass *filter_class = LOG4G_FILTER_CLASS(klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->dispose = dispose; object_class->set_property = set_property; filter_class->decide = decide; g_type_class_add_private(klass, sizeof(struct Private)); /* install properties */ g_object_class_install_property(object_class, PROP_LEVEL_MIN, g_param_spec_string("level-min", Q_("Minimum Level"), Q_("Minimum log level to match"), NULL, G_PARAM_WRITABLE)); g_object_class_install_property(object_class, PROP_LEVEL_MAX, g_param_spec_string("level-max", Q_("Maximum Level"), Q_("Maximum log level to match"), NULL, G_PARAM_WRITABLE)); g_object_class_install_property(object_class, PROP_ACCEPT_ON_RANGE, g_param_spec_boolean("accept-on-range", Q_("Accept on Range"), Q_("Accept or deny on log level range match"), TRUE, G_PARAM_WRITABLE)); } static void log4g_level_range_filter_class_finalize( G_GNUC_UNUSED Log4gLevelRangeFilterClass *klass) { /* do nothing */ } void log4g_level_range_filter_register(GTypeModule *module) { log4g_level_range_filter_register_type(module); }
/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** 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, 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. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef LIGHTING_H #define LIGHTING_H #include <QGraphicsEffect> #include <QGraphicsView> class Lighting: public QGraphicsView { Q_OBJECT public: Lighting(QWidget *parent = 0); private slots: void animate(); private: void setupScene(); private: qreal angle; QGraphicsScene m_scene; QGraphicsItem *m_lightSource; QList<QGraphicsItem*> m_items; }; #endif // LIGHTING_H
// // mmOfBone.h // MotionMachine // // Created by Thierry Ravet on 20/04/15. // Copyright (c) 2015 YCAMInterlab. All rights reserved. // #ifndef __mmOfBone__ #define __mmOfBone__ #include <stdio.h> #include "ofMain.h" namespace MoMa{ class ofBone: public of3dPrimitive{ public: ofBone(); }; } #endif
/**************************************************************************** ** ** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtSensors module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** 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. ** ** 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. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef SIMULATORIRPROXIMITYSENSOR_H #define SIMULATORIRPROXIMITYSENSOR_H #include "simulatorcommon.h" #include <qirproximitysensor.h> class SimulatorIRProximitySensor : public SimulatorCommon { public: static const char *id; SimulatorIRProximitySensor(QSensor *sensor); void poll(); private: QIRProximityReading m_reading; }; #endif
/* * SubATSUIRenderer.h * Created by Alexander Strange on 7/30/07. * * This file is part of Perian. * * 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 FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #import <Cocoa/Cocoa.h> #import "SubRenderer.h" @interface SubATSUIRenderer : SubRenderer { SubContext *context; CGColorSpaceRef srgbCSpace; ATSUTextLayout layout; UniCharArrayOffset *breakBuffer; TextBreakLocatorRef breakLocator; float screenScaleX, screenScaleY, videoWidth, videoHeight; BOOL drawTextBounds; } -(SubATSUIRenderer*)initWithScriptType:(int)type header:(NSString*)header videoWidth:(float)width videoHeight:(float)height; -(void)renderPacket:(NSString *)packet inContext:(CGContextRef)c width:(float)cWidth height:(float)cHeight; @end
// ========== This file is under LGPL, the GNU Lesser General Public Licence // ========== Dialing Lemmatizer (www.aot.ru) // ========== Copyright by Alexey Sokirko, Andrey Putrin #ifndef __LEMMATIZERS_H_ #define __LEMMATIZERS_H_ // #pragma warning (disable : 4786) #include "MorphDict.h" #include "Paradigm.h" #include "Statistic.h" #include "Predict.h" // #pragma warning (disable : 4250) class CGraphmatFile; typedef enum { subjFinance = 1, subjComputer = 2, subjLiterature = 4 } SubjectEnum; class CLemmatizer : public CMorphDict { public: string m_Registry; StringVector m_HyphenPostfixs; CStatistic m_Statistic; CPredictBase m_Predict; set<string> m_PrefixesSet; virtual void FilterSrc(string& src) const = 0; string GetRegistryString() const {return m_Registry; }; string GetPath() const; void ReadOptions(string FileName); bool FormatResults(const string& InpuWordStr, const vector<CAutomAnnotationInner>& src, StringVector& results, bool bFound) const; bool LemmatizeWord(string& InputWordStr, const bool cap, const bool predict, vector<CAutomAnnotationInner>& results, bool bGetLemmaInfos) const; void AssignWeightIfNeed(vector<CAutomAnnotationInner>& FindResults) const; // prediction by suffix bool CheckAbbreviation(string InputWordStr,vector<CAutomAnnotationInner>& FindResults, bool is_cap) const; CAutomAnnotationInner ConvertPredictTupleToAnnot(const CPredictTuple& input) const; void PredictByDataBase(string InputWordStr, vector<CAutomAnnotationInner>& results,bool is_cap) const; bool IsPrefix(const string& Prefix) const; public: bool m_bLoaded; bool m_bUsePrediction; bool m_bMaximalPrediction; bool m_bUseStatistic; bool m_bAllowRussianJo; CLemmatizer(MorphLanguageEnum Language); virtual ~CLemmatizer(); // basic methods MorphLanguageEnum GetLanguage() const {return m_pFormAutomat->m_Language; }; const CStatistic& GetStatistic() const; bool CheckABC(const string& WordForm) const; bool IsHyphenPostfix(const string& Postfix) const; // loading bool LoadDictionariesRegistry() ; bool LoadStatisticRegistry(SubjectEnum subj); // main interfaces bool LemmatizeWordForPlmLines(string& InpuWordStr, const bool cap, const bool predict, StringVector& results) const; bool CreateParadigmCollection(bool bNorm, string& WordStr, bool capital, vector<CFormInfo>& Result) const; void GetAllAncodesQuick(const BYTE* WordForm, bool capital, BYTE* OutBuffer) const; //string GetAllAncodesAndLemmasQuick(string& InputWordStr, bool capital) const; bool GetAllAncodesAndLemmasQuick(string& InputWordStr, bool capital, char* OutBuffer, size_t MaxBufferSize) const; bool CreateParadigmFromID(DWORD id, CFormInfo& Result) const; bool ProcessHyphenWords(CGraphmatFile* piGraphmatFile) const; }; ///////////////////////////////////////////////////////////////////////////// class CLemmatizerRussian : public CLemmatizer { public: CLemmatizerRussian(); virtual ~CLemmatizerRussian() {}; void FilterSrc(string& src) const; }; class CLemmatizerEnglish : public CLemmatizer { void FilterSrc(string& src) const; public: CLemmatizerEnglish(); virtual ~CLemmatizerEnglish() {}; }; ///////////////////////////////////////////////////////////////////////////// class CLemmatizerGerman: public CLemmatizer { void FilterSrc(string& src) const; public: CLemmatizerGerman(); virtual ~CLemmatizerGerman() {}; }; #endif //__LEMMATIZERS_H_
/* * Copyright (C) 2014 Freie Universität Berlin * * This file is subject to the terms and conditions of the GNU Lesser General * Public License v2.1. See the file LICENSE in the top level directory for more * details. */ /** * @defgroup cpu_stm32l1 STM32L1 * @brief CPU specific implementations for the STM32F1 * @ingroup cpu * @{ * * @file * @brief Implementation specific CPU configuration options * * @author Thomas Eichinger <thomas.eichinger@fu-berlin.de> */ #ifndef CPUCONF_H_ #define CPUCONF_H_ #include "stm32l1xx.h" #ifdef __cplusplus extern "C" { #endif /** * @name Kernel configuration * * @{ */ #define THREAD_EXTRA_STACKSIZE_PRINTF (1024) #ifndef THREAD_STACKSIZE_DEFAULT #define THREAD_STACKSIZE_DEFAULT (1024) #endif #define THREAD_STACKSIZE_IDLE (256) /** @} */ /** * @name UART0 buffer size definition for compatibility reasons * * TODO: remove once the remodeling of the uart0 driver is done * @{ */ #ifndef UART0_BUFSIZE #define UART0_BUFSIZE (128) #endif /** @} */ /** * @name Length for reading CPU_ID */ #define CPUID_ID_LEN (12) /** * @name Definition of different panic modes */ typedef enum { HARD_FAULT, WATCHDOG, BUS_FAULT, USAGE_FAULT, DUMMY_HANDLER } panic_t; #define TRANSCEIVER_BUFFER_SIZE (3) #ifdef __cplusplus } #endif #endif /* __CPU_CONF_H */ /** @} */ /** @} */
/* * This file was generated by qdbusxml2cpp version 0.7 * Command line was: qdbusxml2cpp -i mabstractappinterface.h -a mdecorator_dbus_adaptor.h: mdecorator_dbus.xml * * qdbusxml2cpp is Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). * * This is an auto-generated file. * This file may have been hand-edited. Look for HAND-EDIT comments * before re-generating it. */ #ifndef MDECORATOR_DBUS_ADAPTOR_H_1364764193 #define MDECORATOR_DBUS_ADAPTOR_H_1364764193 #include <QtCore/QObject> #include <QtDBus/QtDBus> #include "mabstractappinterface.h" class QByteArray; template<class T> class QList; template<class Key, class Value> class QMap; class QString; class QStringList; class QVariant; /* * Adaptor class for interface com.nokia.MDecorator */ class MDecoratorAdaptor: public QDBusAbstractAdaptor { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "com.nokia.MDecorator") Q_CLASSINFO("D-Bus Introspection", "" " <interface name=\"com.nokia.MDecorator\">\n" " <method name=\"setActions\">\n" " <arg direction=\"in\" type=\"a(ssbbuay)\" name=\"actions\"/>\n" " <annotation value=\"MDecoratorIPCActionList\" name=\"com.trolltech.QtDBus.QtTypeName.In0\"/>\n" " <arg direction=\"in\" type=\"u\" name=\"window\"/>\n" " </method>\n" " <signal name=\"triggered\">\n" " <arg direction=\"out\" type=\"s\" name=\"uuid\"/>\n" " <arg direction=\"out\" type=\"b\" name=\"checked\"/>\n" " </signal>\n" " <signal name=\"toggled\">\n" " <arg direction=\"out\" type=\"s\" name=\"uuid\"/>\n" " <arg direction=\"out\" type=\"b\" name=\"checked\"/>\n" " </signal>\n" " </interface>\n" "") public: MDecoratorAdaptor(QObject *parent); virtual ~MDecoratorAdaptor(); public: // PROPERTIES public Q_SLOTS: // METHODS void setActions(MDecoratorIPCActionList actions, uint window); Q_SIGNALS: // SIGNALS void toggled(const QString &uuid, bool checked); void triggered(const QString &uuid, bool checked); }; #endif
//************************************************************************************* /** \file priorities.h * \brief This file contains the #defined for the priority level of each task * * Revisions: * \li 11-27-2014 JF, ML, JR created original file * * License: * This file is copyright 2012 by JF, ML, JR and released under the Lesser GNU * Public License, version 2. It intended for educational use only, but its use * is not limited thereto. */ /* 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 CONSEQUEN- * TIAL 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 _PRIORITY_H_ #define _PRIORITY_H_ #define PRIORITY_COMMS 1 #define PRIORITY_HEARTBEAT 2 #define PRIORITY_SENSORS 2 #define PRIORITY_MOTORS 3 #define PRIORITY_ORIENT 3 #define PRIORITY_SAFETY 6 #define PRIORITY_MASTER 5 #endif
/* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class com_nibsa_nixtla_demo_play_wav_DemoNativeInterface */ #ifndef _Included_com_nibsa_nixtla_android_demo_playwav_DemoNativeInterface #define _Included_com_nibsa_nixtla_android_demo_playwav_DemoNativeInterface #ifdef __cplusplus extern "C" { #endif /* * Class: com_nibsa_nixtla_android_demo_playwav_DemoNativeInterface * Method: nativeInit * Signature: (Landroid/content/res/AssetManager;Ljava/lang/String;)Z */ JNIEXPORT jboolean JNICALL Java_com_nibsa_nixtla_android_demo_playwav_DemoNativeInterface_nativeInit (JNIEnv *, jclass); JNIEXPORT jboolean JNICALL Java_com_nibsa_nixtla_android_demo_playwav_DemoNativeInterface_nativeActionOnWav (JNIEnv *, jclass, jobject, jstring, jboolean, jfloat); /* * Class: com_nibsa_nixtla_android_demo_playwav_DemoNativeInterface * Method: nativeFinalize * Signature: ()V */ JNIEXPORT void JNICALL Java_com_nibsa_nixtla_android_demo_playwav_DemoNativeInterface_nativeFinalize (JNIEnv *, jclass); /* * Class: com_nibsa_nixtla_android_demo_playwav_DemoNativeInterface * Method: nativeTick * Signature: ()V */ JNIEXPORT void JNICALL Java_com_nibsa_nixtla_android_demo_playwav_DemoNativeInterface_nativeTick (JNIEnv *, jclass); JNIEXPORT jstring JNICALL Java_com_nibsa_nixtla_android_demo_playwav_DemoNativeInterface_nativeGetStatusLog (JNIEnv *, jclass); #ifdef __cplusplus } #endif #endif
/*************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (directui@nokia.com) ** ** This file is part of libmeegotouch. ** ** If you have questions regarding the use of this file, please contact ** Nokia at directui@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 UT_MWINDOW_H #define UT_MWINDOW_H #include <QtTest> #include <QObject> #include <MNamespace> #include <MComponentData> #include <MSceneManager> class MWindow; class MApplication; #define MAX_PARAMS 10 class Ut_MWindow: public QObject { Q_OBJECT private slots: void init(); void cleanup(); void testNoSceneManager(); void testNoScene(); void testSceneManagerAutocreation(); void testIfSceneExistsWhenSceneManagerAutocreated(); void testConstructorWithSceneManager(); void testSetSceneManager(); void testSceneRect(); void testOrientation_data(); void testOrientation(); void testSetOrientationAngle_data(); void testSetOrientationAngle(); void testSetOrientation(); void testSetOrientationAngleCalledFromSceneManager(); void testVisibleSceneSize_data(); void testVisibleSceneSize(); void testOrientationChangedSignalPropagationFromSceneManager(); void testNoOrientationChangedSignalWhenRotatingBy180Degrees(); void testOrientationAngleLock(); void testOrientationLock(); void testIsOnDisplay(); void testEnterDisplayEventHandler(); void testExitDisplayEventHandler(); void testDisplayEnteredSignal(); void testDisplayExitedSignal(); void testDisplayExitedOnClose(); void testDisplayExitedOnCloseLazyShutdownApp(); void testSwitcherExitedOnClose(); void testIsInSwitcher(); void testCloseOnLazyShutdown(); void testGlobalAlpha(); void testVideoGlobalAlpha(); void testSetLandscapeOrientation_data(); void testSetLandscapeOrientation(); void testSetPortraitOrientation_data(); void testSetPortraitOrientation(); void testAnimatedOrientationChangeProperty_data(); void testAnimatedOrientationChangeProperty(); void testActiveWindow(); void testNotificationPreviewsDisabled(); public slots: void onDisplayTestSlot(); public: static bool m_onDisplayHandlerCalled; static bool m_onDisplaySignalSent; private: MComponentData* m_componentData; }; #endif
#ifndef _NR_UTILS_H_ #define _NR_UTILS_H_ static float sqrarg; #define SQR(a) ((sqrarg=(a)) == 0.0 ? 0.0 : sqrarg*sqrarg) static double dsqrarg; #define DSQR(a) ((dsqrarg=(a)) == 0.0 ? 0.0 : dsqrarg*dsqrarg) static double dmaxarg1,dmaxarg2; #define DMAX(a,b) (dmaxarg1=(a),dmaxarg2=(b),(dmaxarg1) > (dmaxarg2) ?\ (dmaxarg1) : (dmaxarg2)) static double dminarg1,dminarg2; #define DMIN(a,b) (dminarg1=(a),dminarg2=(b),(dminarg1) < (dminarg2) ?\ (dminarg1) : (dminarg2)) static float maxarg1,maxarg2; #define FMAX(a,b) (maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ?\ (maxarg1) : (maxarg2)) static float minarg1,minarg2; #define FMIN(a,b) (minarg1=(a),minarg2=(b),(minarg1) < (minarg2) ?\ (minarg1) : (minarg2)) static long lmaxarg1,lmaxarg2; #define LMAX(a,b) (lmaxarg1=(a),lmaxarg2=(b),(lmaxarg1) > (lmaxarg2) ?\ (lmaxarg1) : (lmaxarg2)) static long lminarg1,lminarg2; #define LMIN(a,b) (lminarg1=(a),lminarg2=(b),(lminarg1) < (lminarg2) ?\ (lminarg1) : (lminarg2)) static int imaxarg1,imaxarg2; #define IMAX(a,b) (imaxarg1=(a),imaxarg2=(b),(imaxarg1) > (imaxarg2) ?\ (imaxarg1) : (imaxarg2)) static int iminarg1,iminarg2; #define IMIN(a,b) (iminarg1=(a),iminarg2=(b),(iminarg1) < (iminarg2) ?\ (iminarg1) : (iminarg2)) #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) #if defined(__STDC__) || defined(ANSI) || defined(NRANSI) /* ANSI */ void nrerror(const char error_text[]); float *vector(long nl, long nh); int *ivector(long nl, long nh); unsigned char *cvector(long nl, long nh); unsigned long *lvector(long nl, long nh); double *dvector(long nl, long nh); float **matrix(long nrl, long nrh, long ncl, long nch); double **dmatrix(long nrl, long nrh, long ncl, long nch); int **imatrix(long nrl, long nrh, long ncl, long nch); float **submatrix(float **a, long oldrl, long oldrh, long oldcl, long oldch, long newrl, long newcl); float **convert_matrix(float *a, long nrl, long nrh, long ncl, long nch); float ***f3tensor(long nrl, long nrh, long ncl, long nch, long ndl, long ndh); void free_vector(float *v, long nl, long nh); void free_ivector(int *v, long nl, long nh); void free_cvector(unsigned char *v, long nl, long nh); void free_lvector(unsigned long *v, long nl, long nh); void free_dvector(double *v, long nl, long nh); void free_matrix(float **m, long nrl, long nrh, long ncl, long nch); void free_dmatrix(double **m, long nrl, long nrh, long ncl, long nch); void free_imatrix(int **m, long nrl, long nrh, long ncl, long nch); void free_submatrix(float **b, long nrl, long nrh, long ncl, long nch); void free_convert_matrix(float **b, long nrl, long nrh, long ncl, long nch); void free_f3tensor(float ***t, long nrl, long nrh, long ncl, long nch, long ndl, long ndh); #else /* ANSI */ /* traditional - K&R */ void nrerror(); float *vector(); float **matrix(); float **submatrix(); float **convert_matrix(); float ***f3tensor(); double *dvector(); double **dmatrix(); int *ivector(); int **imatrix(); unsigned char *cvector(); unsigned long *lvector(); void free_vector(); void free_dvector(); void free_ivector(); void free_cvector(); void free_lvector(); void free_matrix(); void free_submatrix(); void free_convert_matrix(); void free_dmatrix(); void free_imatrix(); void free_f3tensor(); #endif /* ANSI */ #endif /* _NR_UTILS_H_ */
#import <UIKit/UIKit.h> #import "TiledPage.h" @interface FeedPageView : UIView<TiledPage> //TiledPage protocol: @property (nonatomic) NSUInteger pageNumber; + (NSRange) suggestRangeForward : (NSArray *) items startingFrom : (NSUInteger) index; + (NSRange) suggestRangeBackward : (NSArray *) items endingWith : (NSUInteger) index; - (NSUInteger) setPageItems : (NSArray *) feedItems startingFrom : (NSUInteger) index; - (NSUInteger) setPageItemsFromCache : (NSArray *) cache startingFrom : (NSUInteger) index; @property (nonatomic, readonly) NSRange pageRange; - (void) setThumbnail : (UIImage *) thumbnailImage forTile : (NSUInteger) tileIndex; - (BOOL) tileHasThumbnail : (NSUInteger) tileIndex; - (void) layoutTiles; //Animations: - (void) explodeTiles : (UIInterfaceOrientation) orientation; //Actually, both CFTimeInterval and NSTimeInterval are typedefs for double. - (void) collectTilesAnimatedForOrientation : (UIInterfaceOrientation) orientation from : (CFTimeInterval) start withDuration : (CFTimeInterval) duration; @end
#ifndef UNIVERSALITEMDELEGATE_H_ #define UNIVERSALITEMDELEGATE_H_ #include <QStyledItemDelegate> #include "ItemWidget.h" class UniversalItemDelegate : public QStyledItemDelegate { Q_OBJECT public: explicit UniversalItemDelegate( ItemWidget* view, ItemWidget* editor, QObject* parent = 0); ~UniversalItemDelegate() { } protected: QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index) const; void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; QWidget* createEditor( QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; void updateEditorGeometry( QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const; void setEditorData(QWidget* editor, const QModelIndex& index) const; void setModelData( QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; private: mutable int editingRow; ItemWidget* view; ItemWidget* editor; }; #endif // UNIVERSALITEMDELEGATE_H_
/* GSDebug.h -*-objc-*- Copyright (C) 2003 Free Software Foundation, Inc. Written by: Nicola Pero <n.pero@mi.flashnet.it> Date: October 2003 This file is part of JIGS, the GNUstep Java Interface. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #ifndef _JIGS_GSDEBUG_H #define _JIGS_GSDEBUG_H #include <Foundation/Foundation.h> @interface GSDebug : NSObject + (BOOL) allocationActiveRecordingObjects: (NSString*)className; + (BOOL) allocationActive: (BOOL)flag; + (NSString*) allocationList: (BOOL)flag; + (NSArray*) allocationListRecordedObjects: (NSString*)className; /* * Turn on/off debugging of allocation. Equivalent to * GSDebugAllocationActive (active); */ + (void) setDebugAllocationActive: (BOOL)active; /* * Print to stderr the allocation list of all allocated objects. * Equivalent to * * fprintf (stderr, GSDebugAllocationList (false)); * */ + (void) printAllocationList; /* * Print to stderr the changes in the allocation list of all allocated * objects - changes from last check. Equivalent to * * fprintf (stderr, GSDebugAllocationList (true)); * */ + (void) printAllocationListSinceLastCheck; @end #endif /* _JIGS_GSDEBUG_H */
#if !defined(AFX_MYLISTBOX_H__6ACFFFF8_92D4_4DEF_9710_217E1679ADFA__INCLUDED_) #define AFX_MYLISTBOX_H__6ACFFFF8_92D4_4DEF_9710_217E1679ADFA__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // MyListBox.h : Header-Datei // ///////////////////////////////////////////////////////////////////////////// // Fenster MyListBox class MyListBox : public CListBox { // Konstruktion public: MyListBox(); // Attribute public: // Operationen public: // Überschreibungen // Vom Klassen-Assistenten generierte virtuelle Funktionsüberschreibungen //{{AFX_VIRTUAL(MyListBox) public: virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct); //}}AFX_VIRTUAL // Implementierung public: virtual ~MyListBox(); // Generierte Nachrichtenzuordnungsfunktionen protected: //{{AFX_MSG(MyListBox) // HINWEIS - Der Klassen-Assistent fügt hier Member-Funktionen ein und entfernt diese. //}}AFX_MSG DECLARE_MESSAGE_MAP() private: COLORREF GetColorFromString(CString csText); }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ fügt unmittelbar vor der vorhergehenden Zeile zusätzliche Deklarationen ein. #endif // AFX_MYLISTBOX_H__6ACFFFF8_92D4_4DEF_9710_217E1679ADFA__INCLUDED_
/* DrawingPrimitives.h * * Copyright (C) 2013 Jim Evins <evins@snaught.com> * * This file is part of glbarcode++. * * glbarcode++ 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 3 of the License, or * (at your option) any later version. * * glbarcode++ 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 glbarcode++. If not, see <http://www.gnu.org/licenses/>. */ #ifndef glbarcode_DrawingPrimitives_h #define glbarcode_DrawingPrimitives_h #include <string> namespace glbarcode { /** * @class DrawingPrimitive DrawingPrimitives.h glbarcode/DrawingPrimitives.h * * Base class for all drawing primitives */ class DrawingPrimitive { protected: /** * Constructor * * @param[in] x X coordinate of primitive's origin (points) * @param[in] y Y coordinate of primitive's origin (points) */ DrawingPrimitive( double x, double y ); public: /** * Destructor */ virtual ~DrawingPrimitive(); /** * Get X coordinate of primitive's origin (points). */ double x() const; /** * Get Y coordinate of primitive's origin (points). */ double y() const; private: double mX; /**< X coordinate of primitive's origin (points). */ double mY; /**< Y coordinate of primitive's origin (points). */ }; /** * @class DrawingPrimitiveLine DrawingPrimitives.h glbarcode/DrawingPrimitives.h * * A solid vertical line drawing primitive. * * @image html figure-primitive-line.svg "Line primitive properties" * */ class DrawingPrimitiveLine : public DrawingPrimitive { public: /** * Line constructor * * @param[in] x X coordinate of line's origin (points) * @param[in] y Y coordinate of line's origin (points) * @param[in] w Line width (points) * @param[in] h Line height (points) */ DrawingPrimitiveLine( double x, double y, double w, double h ); /** * Get line width (points). */ double w() const; /** * Get line height (points). */ double h() const; private: double mW; /**< Line width (points). */ double mH; /**< Line length (points). */ }; /** * @class DrawingPrimitiveBox DrawingPrimitives.h glbarcode/DrawingPrimitives.h * * A solid box drawing primitive. * * @image html figure-primitive-box.svg "Box primitive properties" * */ class DrawingPrimitiveBox : public DrawingPrimitive { public: /** * Box constructor * * @param[in] x X coordinate of box's origin (points) * @param[in] y Y coordinate of box's origin (points) * @param[in] w Width of box (points) * @param[in] h Height of box (points) */ DrawingPrimitiveBox( double x, double y, double w, double h ); /** * Get box width (points). */ double w() const; /** * Get box height (points). */ double h() const; private: double mW; /**< Width of box (points). */ double mH; /**< Height of box (points). */ }; /** * @class DrawingPrimitiveText DrawingPrimitives.h glbarcode/DrawingPrimitives.h * * A character string drawing primitive. * * @image html figure-primitive-text.svg "Text primitive properties" * */ class DrawingPrimitiveText : public DrawingPrimitive { public: /** * Text constructor * * @param[in] x X coordinate of text's origin (points) * @param[in] y Y coordinate of text's origin (points) * @param[in] size Font size of text (points) * @param[in] text Text */ DrawingPrimitiveText( double x, double y, double size, const std::string& text ); /** * Get font size (points). */ double size() const; /** * Get text. */ const std::string& text() const; private: double mSize; /**< Font size of text (points). */ std::string mText; /**< Text. */ }; /** * @class DrawingPrimitiveRing DrawingPrimitives.h glbarcode/DrawingPrimitives.h * * A ring (an open circle) drawing primitive. * * @image html figure-primitive-ring.svg "Ring primitive properties" * */ class DrawingPrimitiveRing : public DrawingPrimitive { public: /** * Ring constructor * * @param[in] x X coordinate of ring's origin (points) * @param[in] y Y coordinate of ring's origin (points) * @param[in] r Radius of ring (points) * @param[in] w Line width of ring (points) */ DrawingPrimitiveRing( double x, double y, double r, double w ); /** * Get radius of ring (points). */ double r() const; /** * Get line width (points). */ double w() const; private: double mR; /**< Radius of ring (points). */ double mW; /**< Line width of ring (points). */ }; /** * @class DrawingPrimitiveHexagon DrawingPrimitives.h glbarcode/DrawingPrimitives.h * * A solid regular hexagon (oriented with vertexes at top and bottom) drawing primitive. * * @image html figure-primitive-hexagon.svg "Hexagon primitive properties" * */ class DrawingPrimitiveHexagon : public DrawingPrimitive { public: /** * Hexagon constructor * * @param[in] x X coordinate of hexagon's origin (points) * @param[in] y Y coordinate of hexagon's origin (points) * @param[in] h Height of hexagon (points) */ DrawingPrimitiveHexagon( double x, double y, double h ); /** * Get Hexagon height (points). */ double h() const; private: double mH; /**< Height of hexagon (points). */ }; } #endif // glbarcode_DrawingPrimitives_h
#include <stdio.h> #include <stdlib.h> #include <windows.h> #include "dspl.h" #define N 50 #define P 200 #define K 8 #define FS 1000.0 #define F0 200.0 #define F1 210.0 int main() { /* input signals */ double z0[P], z1[P]; double z0c[P*K], z1c[P*K]; double Z0C[P*K], Z1C[P*K], frqC[P*K]; double Z0[P], Z1[P], frq[P]; double t[P], tc[P*K]; int n; void *pdspl = NULL; /* dspl handle */ HINSTANCE hDSPL; /* load DSPL */ hDSPL = dspl_load(); if(!hDSPL) { printf("dspl.dll loading ERROR!\n"); return 0; } /* create DSPL object for DFT */ dspl_obj_create(&pdspl); /* input signals z0 and z1 */ for(n = 0; n < N; n++) { z0[n] = sin(M_2PI*(double)n*F0/FS); z1[n] = sin(M_2PI*(double)n*F1/FS); } /* time vector */ dspl_linspace(0, P, P, DSPL_PERIODIC, t); dspl_linspace(0, P, P*K, DSPL_SYMMETRIC, tc); for(n = 0; n < N*K; n++) { z0c[n] = sin(M_2PI*tc[n]*F0/FS); z1c[n] = sin(M_2PI*tc[n]*F1/FS); } /* write txt files */ dspl_writetxt(t, z0, P, "dat/win_spectral_leakage_dtft_z0_time.txt"); dspl_writetxt(t, z1, P, "dat/win_spectral_leakage_dtft_z1_time.txt"); dspl_writetxt(tc, z0c, P*K, "dat/win_spectral_leakage_dtft_z0c_time.txt"); dspl_writetxt(tc, z1c, P*K, "dat/win_spectral_leakage_dtft_z1c_time.txt"); /* recalculate s0c and s1c signals */ memset(z0c,0,P*K*sizeof(double)); memset(z1c,0,P*K*sizeof(double)); for(n = 0; n < N; n++) { z0c[n] = sin(M_2PI*(double)n*F0/FS); z1c[n] = sin(M_2PI*(double)n*F1/FS); } /* DFT of s0 signal*/ dspl_fft_abs(z0, NULL, P, pdspl, Z0, DSPL_FLAG_FFT_SHIFT); /* DFT of s1 signal*/ dspl_fft_abs(z1, NULL, P, pdspl, Z1, DSPL_FLAG_FFT_SHIFT); /* frequency vector */ dspl_linspace(-FS/2.0, FS/2.0, P, DSPL_PERIODIC, frq); /* DFT of s0c signal*/ dspl_fft_abs(z0c, NULL, P*K, pdspl, Z0C, DSPL_FLAG_FFT_SHIFT); /* DFT of s1c signal*/ dspl_fft_abs(z1c, NULL, P*K, pdspl, Z1C, DSPL_FLAG_FFT_SHIFT); /* frequency vector */ dspl_linspace(-FS/2.0, FS/2.0, P*K, DSPL_PERIODIC, frqC); dspl_writetxt(frq, Z0, P, "dat/win_spectral_leakage_dtft_z0_freq.txt"); dspl_writetxt(frq, Z1, P, "dat/win_spectral_leakage_dtft_z1_freq.txt"); dspl_writetxt(frqC, Z0C, P*K, "dat/win_spectral_leakage_dtft_z0c_freq.txt"); dspl_writetxt(frqC, Z1C, P*K, "dat/win_spectral_leakage_dtft_z1c_freq.txt"); /* Free DSPL object */ dspl_obj_free(&pdspl); /* clear dspl handle */ FreeLibrary(hDSPL); return 0; }
/* * Copyright (C) 2011 Dov Grobgeld <dov.grobgeld@gmail.com> * * 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 3 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. */ #ifndef QVIVIMAGEVIEWER_H #define QVIVIMAGEVIEWER_H #include <QObject> #include <QImage> #include <QAbstractScrollArea> class QvivImageViewer : public QAbstractScrollArea { Q_OBJECT public: QvivImageViewer(QWidget *parent, QImage image); virtual ~QvivImageViewer(); int zoom_around_fixed_point(double new_scale_x, double new_scale_y, double old_x, double old_y, double new_x, double new_y); int zoom_in(int x, int y, double factor); int zoom_out(int x, int y, double factor); int zoom_translate(int dx, int dy); int zoom_to_box(double world_min_x, double world_min_y, double world_max_x, double world_max_y, double pixel_margin, bool preserve_aspect) ; void zoom_fit(void); void zoom_reset(void); void canv_coord_to_img_coord(double cx, double cy, // output double& imgx, double& imgy); void img_coord_to_canv_coord(double imgx, double imgy, // output double& canvx, double& canvy); // Get a pointer to the current image QImage *get_image(void); // Change the image being displayed void set_image(QImage& image); // Set the scroll area - This is ignored if an image is being used void set_scroll_area(double scroll_min_x, double scroll_min_y, double scroll_max_x, double scroll_max_y); // Check if we are doing mouse dragging bool get_mouse_scrolling(void); void get_scale_and_shift(double &scale_x, double &scale_y, int& shift_x, int& shift_y); // Force a redraw void redraw(); void set_frozen(bool frozen); protected: void paintEvent(QPaintEvent * event); void resizeEvent ( QResizeEvent * event ); void mousePressEvent (QMouseEvent * event); void mouseReleaseEvent (QMouseEvent * event); void mouseMoveEvent (QMouseEvent *event); void wheelEvent (QWheelEvent *event); void keyPressEvent (QKeyEvent * event); void scrollContentsBy (int dx, int dy); void leaveEvent(QEvent *event); QSize sizeHint() const; virtual void imageAnnotate(QImage* image, int x0, int y0, double scale_x, double scale_y); signals: // The image annotate callback is used for drawing overlays // on the image. void qvivImageAnnotate(QImage* image, int x0, int y0, double scale_x, double scale_y); void qvivMouseMoveEvent (QMouseEvent *event); void qvivLeaveEvent (QEvent *event); private: class Priv; Priv *d; }; #endif /* QVIVIMAGEVIEWER */
/* * Copyright (C) 2011 Fredi Machado <https://github.com/fredimachado> * IRCClient 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 3.0 of the License, or 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. * * http://www.gnu.org/licenses/lgpl.html */ #ifndef _IRCHANDLER_H #define _IRCHANDLER_H #include "IRCClient.h" #define NUM_IRC_CMDS 26 struct IRCCommandHandler { std::string command; void (IRCClient::*handler)(IRCMessage /*message*/); }; extern IRCCommandHandler ircCommandTable[NUM_IRC_CMDS]; inline int GetCommandHandler(std::string command) { for (int i = 0; i < NUM_IRC_CMDS; ++i) { if (ircCommandTable[i].command == command) return i; } return NUM_IRC_CMDS; } #endif
// Created file "Lib\src\Uuid\propkeys" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(PKEY_PropGroup_FileSystem, 0xe3a7d2c1, 0x80fc, 0x4b40, 0x8f, 0x34, 0x30, 0xea, 0x11, 0x1b, 0xdc, 0x2e);
// Created file "Lib\src\Svcguid\iid" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(IID_IGetInternalTransaction, 0xbf3108f3, 0xd51c, 0x47f2, 0x9e, 0x58, 0xe2, 0xc8, 0x74, 0xf6, 0x39, 0xa4);
#import <Foundation/Foundation.h> @interface GLTest : NSObject + (void) test; @end
// Created file "Lib\src\ehstorguids\X64\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(PKEY_Media_CreatorApplication, 0x64440492, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03);
/**************************************************************************** ** ** Copyright (C) 2013-2014 Andrey Bogdanov ** ** This file is part of the TeXSampleCore module of the TeXSample library. ** ** TeXSample 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 3 of the License, or ** (at your option) any later version. ** ** TeXSample 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 TeXSample. If not, see <http://www.gnu.org/licenses/>. ** ****************************************************************************/ #ifndef TEDITLABREPLYDATA_H #define TEDITLABREPLYDATA_H class TEditLabReplyDataPrivate; class TLabInfo; class QDataStream; class QDebug; class QVariant; #include "tglobal.h" #include <BBase> #include <QMetaType> /*============================================================================ ================================ TEditLabReplyData =========================== ============================================================================*/ class T_CORE_EXPORT TEditLabReplyData : public BBase { B_DECLARE_PRIVATE(TEditLabReplyData) public: explicit TEditLabReplyData(); TEditLabReplyData(const TEditLabReplyData &other); ~TEditLabReplyData(); public: TLabInfo labInfo() const; void setLabInfo(const TLabInfo &info); public: TEditLabReplyData &operator =(const TEditLabReplyData &other); bool operator ==(const TEditLabReplyData &other) const; bool operator !=(const TEditLabReplyData &other) const; operator QVariant() const; public: T_CORE_EXPORT friend QDataStream &operator <<(QDataStream &stream, const TEditLabReplyData &data); T_CORE_EXPORT friend QDataStream &operator >>(QDataStream &stream, TEditLabReplyData &data); T_CORE_EXPORT friend QDebug operator <<(QDebug dbg, const TEditLabReplyData &data); }; Q_DECLARE_METATYPE(TEditLabReplyData) #endif // TEDITLABREPLYDATA_H
// Created file "Lib\src\Uuid\functiondiscovery" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(PKEY_InstanceValidatorClsid, 0x78c34fc8, 0x104a, 0x4aca, 0x9e, 0xa4, 0x52, 0x4d, 0x52, 0x99, 0x6e, 0x57);
/* ------------------------------------------------------------ * This is the file "laplace2d.h" of this master thesis. * All rights reserved, Bennet Carstensen 2017 * ------------------------------------------------------------ */ /** * @file laplace2d.h * @author Bennet Carstensen * @date 2017 * @copyright All rights reserved, Bennet Carstensen 2017 */ #ifndef LAPLACE2D_H #define LAPLACE2D_H #include "greencross.h" #include "curve2d.h" /** @defgroup laplace2d laplace2d * @brief Algorithms and functions to perform the Green cross approximation * method on the fundamental solution of the negative Laplace operator * in 2D. * * @{*/ /** @brief Prepares a @ref _greencross "greencross" object for approximating the * integral equation @f$ \int\limits_{\Omega} -\frac{1}{2 \pi} * \log{\left \Vert x - y \right \Vert_2} u(y) dy = f(x) @f$, where * @f$\Omega \subset \mathbb{R}^2 @f$. * * Given a subspace @f$\Omega \subset \mathbb{R}^2 @f$ by @p c2d, an object * to approximate the integral equation @f$ \int\limits_{\Omega} * -\frac{1}{2 \pi} \log{\left \Vert x - y \right \Vert_2} u(y) dy = f(x) @f$ * is given with an approximation order @p m, a quadrature order @p q, * necessary data for the admissibility condition in the hierarchical * clustering @p eta and a maximal size of leaf clusters @p res. * * @param[in] c2d Geometry describing the subspace * @f$\Omega \subset \mathbb{R}^2 @f$. * @param[in] res Maximal size of leaf clusters. * @param[in] q Quadratur order. * @param[in] m Approximation order. * @result A @ref _greencross "greencross" object ready for * approximating the integral equation * @f$ \int\limits_{\Omega} -\frac{1}{2 \pi} * \log{\left \Vert x - y \right \Vert_2} u(y) dy = f(x) @f$. */ HEADER_PREFIX pgreencross new_greencross_laplace2d(pcurve2d c2d, uint res, uint q, uint m); /** @} */ #endif // LAPLACE2D_H
// Created file "Lib\src\ehstorguids\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(PKEY_Photo_MaxApertureDenominator, 0xc77724d4, 0x601f, 0x46c5, 0x9b, 0x89, 0xc5, 0x3f, 0x93, 0xbc, 0xeb, 0x77);
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 3 of the License, or (at your option) any later version. QtAws 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 QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEFOLDERCONTENTSREQUEST_H #define QTAWS_DELETEFOLDERCONTENTSREQUEST_H #include "workdocsrequest.h" namespace QtAws { namespace WorkDocs { class DeleteFolderContentsRequestPrivate; class QTAWSWORKDOCS_EXPORT DeleteFolderContentsRequest : public WorkDocsRequest { public: DeleteFolderContentsRequest(const DeleteFolderContentsRequest &other); DeleteFolderContentsRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DeleteFolderContentsRequest) }; } // namespace WorkDocs } // namespace QtAws #endif
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 3 of the License, or (at your option) any later version. QtAws 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 QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEUSERREQUEST_H #define QTAWS_DELETEUSERREQUEST_H #include "transferrequest.h" namespace QtAws { namespace Transfer { class DeleteUserRequestPrivate; class QTAWSTRANSFER_EXPORT DeleteUserRequest : public TransferRequest { public: DeleteUserRequest(const DeleteUserRequest &other); DeleteUserRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DeleteUserRequest) }; } // namespace Transfer } // namespace QtAws #endif
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 3 of the License, or (at your option) any later version. QtAws 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 QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_ASSOCIATECREATEDARTIFACTREQUEST_H #define QTAWS_ASSOCIATECREATEDARTIFACTREQUEST_H #include "migrationhubrequest.h" namespace QtAws { namespace MigrationHub { class AssociateCreatedArtifactRequestPrivate; class QTAWSMIGRATIONHUB_EXPORT AssociateCreatedArtifactRequest : public MigrationHubRequest { public: AssociateCreatedArtifactRequest(const AssociateCreatedArtifactRequest &other); AssociateCreatedArtifactRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(AssociateCreatedArtifactRequest) }; } // namespace MigrationHub } // namespace QtAws #endif
/* crypto/rc2/rc2ofb64.c */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * 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 copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ #include <openssl/rc2.h> #include "rc2_locl.h" /* * The input and output encrypted as though 64bit ofb mode is being used. * The extra state information to record how much of the 64bit block we have * used is contained in *num; */ void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, RC2_KEY *schedule, unsigned char *ivec, int *num) { register unsigned long v0, v1, t; register int n = *num; register long l = length; unsigned char d[8]; register char *dp; unsigned long ti[2]; unsigned char *iv; int save = 0; iv = (unsigned char *)ivec; c2l(iv, v0); c2l(iv, v1); ti[0] = v0; ti[1] = v1; dp = (char *)d; l2c(v0, dp); l2c(v1, dp); while (l--) { if (n == 0) { RC2_encrypt((unsigned long *)ti, schedule); dp = (char *)d; t = ti[0]; l2c(t, dp); t = ti[1]; l2c(t, dp); save++; } *(out++) = *(in++) ^ d[n]; n = (n + 1) & 0x07; } if (save) { v0 = ti[0]; v1 = ti[1]; iv = (unsigned char *)ivec; l2c(v0, iv); l2c(v1, iv); } t = v0 = v1 = ti[0] = ti[1] = 0; *num = n; }
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 3 of the License, or (at your option) any later version. QtAws 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 QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_INITIATEVAULTLOCKRESPONSE_P_H #define QTAWS_INITIATEVAULTLOCKRESPONSE_P_H #include "glacierresponse_p.h" namespace QtAws { namespace Glacier { class InitiateVaultLockResponse; class InitiateVaultLockResponsePrivate : public GlacierResponsePrivate { public: explicit InitiateVaultLockResponsePrivate(InitiateVaultLockResponse * const q); void parseInitiateVaultLockResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(InitiateVaultLockResponse) Q_DISABLE_COPY(InitiateVaultLockResponsePrivate) }; } // namespace Glacier } // namespace QtAws #endif
/* TSPLINE -- A T-spline object oriented package in C++ Copyright (C) 2015- Wenlei Xiao 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 Report problems and direct all questions to: Wenlei Xiao, Ph.D School of Mechanical Engineering and Automation Beijing University of Aeronautics and Astronautics D-315, New Main Building, Beijing, P.R. China, 100191 email: xiaowenlei@buaa.edu.cn ------------------------------------------------------------------------------- Revision_history: 2015/04/08: Wenlei Xiao - Created. 2016/03/31: Wenlei Xiao - Doxygen comments added. ------------------------------------------------------------------------------- */ /** @file [cross] * @brief Cross classes * @author <Wenlei Xiao> * @date <2016.03.31> * @version <v1.0> * @note * The cross classes include the T-mapper cross, the T-vertex cross, the T-link cross, and the T-node cross. */ #ifndef CROSS_H #define CROSS_H #include <tspline.h> #include <unordered_set> #ifdef use_namespace namespace TSPLINE { using namespace NEWMAT; #endif DECLARE_ASSISTANCES(TMapperCross, TMapCrs) DECLARE_ASSISTANCES(TVertexCross, TVtxCrs) DECLARE_ASSISTANCES(TLinkCross, TLnkCrs) DECLARE_ASSISTANCES(TNodeV4Cross, TNodV4Crs) /** * @class <TMapperCross> * @brief T-mapper cross * @note * A T-mapper cross contains a center, and branched T-mappers in the north, west, south and east directions. */ class TMapperCross { public: TMapperCross(); ~TMapperCross(); public: /** Set the center mapper. */ void setCenter(const TMappableObjectPtr &mapper); /** Add the north mapper. */ void addNorth(const TMappableObjectPtr &mapper); /** Add the west mapper. */ void addWest(const TMappableObjectPtr &mapper); /** Add the south mapper. */ void addSouth(const TMappableObjectPtr &mapper); /** Add the east mapper. */ void addEast(const TMappableObjectPtr &mapper); /** Find all the T-faces covered by the cross. */ void findFaces(TFacSet &faces); /** Make all the four T-mapper branches contain unique T-mappers. */ void unique(); /** Clear the T-mapper cross. */ void clear(); /** Get the size of the north branch. */ int sizeNorth() { return _mappers_north.size(); } /** Get the size of the west branch. */ int sizeWest() { return _mappers_west.size(); } /** Get the size of the south branch. */ int sizeSouth() { return _mappers_south.size(); } /** Get the size of the east branch. */ int sizeEast() { return _mappers_east.size(); } protected: void uniqueMappers(TMapObjVector &mappers); ParameterSquarePtr blendParameterSquare(); private: TMappableObjectPtr _mapper_center; TMapObjVector _mappers_north; TMapObjVector _mappers_west; TMapObjVector _mappers_south; TMapObjVector _mappers_east; /** Assister to extend the parameter square. */ class ParameterExtender { public: ParameterExtender(const ParameterSquarePtr &parameter_square) : _parameter_square(parameter_square) {} ~ParameterExtender() {} void operator()(const TMappableObjectPtr &mapper); private: ParameterSquarePtr _parameter_square; }; /** Assister to find the overlapped T-faces. */ class OverlappedFaceFinder { public: OverlappedFaceFinder(const ParameterSquarePtr &target_square, TFacSet &faces) : _target_square(target_square), _faces(faces) {} ~OverlappedFaceFinder() {} void operator()(const TObjectPtr &object); protected: int codeOfArea(Real v, Real vmin, Real vmax); bool isOverlapped(const ParameterSquarePtr check_square); private: ParameterSquarePtr _target_square; TFacSet &_faces; }; }; /** * @class <TNodeV4Cross> * @brief The T-node (valance 4) cross * @note * A T-node cross contains a center T-node, and branched T-nodes in the north, west, south and east directions. */ class TNodeV4Cross { public: TNodeV4Cross(int degree_s = 3, int degree_t = 3); ~TNodeV4Cross(); public: /** Set the center node. */ void setNodeCenter(const TNodeV4Ptr &node); /** Add the north node. */ void addNodeNorth(const TNodeV4Ptr &node); /** Add the west node. */ void addNodeWest(const TNodeV4Ptr &node); /** Add the south node. */ void addNodeSouth(const TNodeV4Ptr &node); /** Add the east node. */ void addNodeEast(const TNodeV4Ptr &node); bool isPrepared(); /** Prepare the mapper and faces. */ void prepareRelationships(); /** Clear the mapper and faces. */ void clearRelationships(); void copyTFaces(TFacVector &faces); protected: /** Prepare the mapper cross. */ void prepareTMapperCross(); /** Prepare the faces. */ void prepareTFaces(); /** Find the vertex of node. */ TVertexPtr findVertexOfNode(const TNodeV4Ptr &node); /** Find the mapper of node. */ TMappableObjectPtr findMapperOfNode(const TNodeV4Ptr &node); private: TNodeV4Ptr _node_center; TNodV4Vector _nodes_north; TNodV4Vector _nodes_west; TNodV4Vector _nodes_south; TNodV4Vector _nodes_east; bool _prepared; TMapperCrossPtr _mapper_cross; TFacSet _faces; int _degree_s; int _degree_t; }; #ifdef use_namespace } #endif #endif
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 3 of the License, or (at your option) any later version. QtAws 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 QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEVPCPEERINGCONNECTIONREQUEST_P_H #define QTAWS_DELETEVPCPEERINGCONNECTIONREQUEST_P_H #include "ec2request_p.h" #include "deletevpcpeeringconnectionrequest.h" namespace QtAws { namespace EC2 { class DeleteVpcPeeringConnectionRequest; class DeleteVpcPeeringConnectionRequestPrivate : public Ec2RequestPrivate { public: DeleteVpcPeeringConnectionRequestPrivate(const Ec2Request::Action action, DeleteVpcPeeringConnectionRequest * const q); DeleteVpcPeeringConnectionRequestPrivate(const DeleteVpcPeeringConnectionRequestPrivate &other, DeleteVpcPeeringConnectionRequest * const q); private: Q_DECLARE_PUBLIC(DeleteVpcPeeringConnectionRequest) }; } // namespace EC2 } // namespace QtAws #endif
// Created file "Lib\src\wmcodecdspuuid\wmcodecdsp_i" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(CLSID_CFrameInterpDMO, 0x0a7cfe1b, 0x6ab5, 0x4334, 0x9e, 0xd8, 0x3f, 0x97, 0xcb, 0x37, 0xda, 0xa1);
// Created file "Lib\src\Uuid\X64\imapi2uuid" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(IID_IIsoImageManager, 0x6ca38be5, 0xfbbb, 0x4800, 0x95, 0xa1, 0xa4, 0x38, 0x86, 0x5e, 0xb0, 0xd4);
#ifndef VEHICLE_RECORD_H #define VEHICLE_RECORD_H #include <QDialog> namespace Ui { class vehicle_record; } class vehicle_record : public QDialog { Q_OBJECT public: explicit vehicle_record(QWidget *parent = 0); ~vehicle_record(); private: Ui::vehicle_record *ui; }; #endif // VEHICLE_RECORD_H
#include<linux/init.h> #include<linux/module.h> MODULE_LICENSE("Dual BSD/GPL"); static char *book_name="Dissecting Linux Device Driber"; static int num=4000; static int __init book_init(void) { printk(KERN_INFO"book name :%s\n",book_name); printk(KERN_INFO"book num :%x\n",num); return 0; } static void __exit book_exit(void) { printk(KERN_INFO"Book module exit\n"); } module_init(book_init); module_exit(book_exit); module_param(num,int,S_IRUGO); module_param(book_name,charp,S_IRUGO); MODULE_AUTHOR("chenbaihu"); MODULE_VERSION("v1.0"); MODULE_DESCRIPTION("A simple Module for testing module params");
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 3 of the License, or (at your option) any later version. QtAws 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 QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DELETEDEPLOYMENTREQUEST_H #define QTAWS_DELETEDEPLOYMENTREQUEST_H #include "apigatewayv2request.h" namespace QtAws { namespace ApiGatewayV2 { class DeleteDeploymentRequestPrivate; class QTAWSAPIGATEWAYV2_EXPORT DeleteDeploymentRequest : public ApiGatewayV2Request { public: DeleteDeploymentRequest(const DeleteDeploymentRequest &other); DeleteDeploymentRequest(); virtual bool isValid() const Q_DECL_OVERRIDE; protected: virtual QtAws::Core::AwsAbstractResponse * response(QNetworkReply * const reply) const Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DeleteDeploymentRequest) }; } // namespace ApiGatewayV2 } // namespace QtAws #endif
/* Fontname: -Misc-Fixed-Medium-R-SemiCondensed--13-120-75-75-C-60-ISO10646-1 Copyright: Public domain font. Share and enjoy. Capital A Height: 0, '1' Height: 7 Calculated Max Values w= 6 h=13 x= 2 y= 5 dx= 6 dy= 0 ascent=11 len=13 Font Bounding box w= 6 h=13 x= 0 y=-2 Calculated Min Values x= 0 y=-2 dx= 0 dy= 0 Pure Font ascent = 7 descent= 0 X Font ascent =10 descent= 0 Max Font ascent =11 descent=-2 */ #include "u8g.h" const u8g_fntpgm_uint8_t u8g_font_6x13_78_79[1470] U8G_SECTION(".progmem.u8g_font_6x13_78_79") = { 1,6,13,0,254,7,1,42,2,11,32,255,0,11,254,10, 0,2,87,103,112,32,168,248,168,32,112,255,2,104,104,48, 48,48,252,252,48,48,48,2,89,105,32,112,32,168,248,168, 32,112,32,2,89,105,32,112,32,168,248,168,32,112,32,2, 89,105,32,112,32,168,248,168,32,112,32,4,85,101,32,112, 248,112,32,4,85,101,32,80,136,80,32,255,4,86,102,32, 32,248,80,112,136,2,89,105,112,216,216,0,136,136,112,248, 112,4,86,102,32,32,248,80,112,136,4,86,102,32,32,248, 112,112,136,4,86,102,32,32,248,112,112,136,4,86,102,32, 32,248,112,112,136,4,86,102,32,32,248,112,112,136,4,102, 102,48,48,252,88,120,204,3,87,103,32,168,112,112,112,168, 32,3,87,103,32,168,112,80,112,168,32,3,87,103,32,168, 112,248,112,168,32,3,87,103,32,168,112,248,112,168,32,3, 87,103,32,168,112,248,112,168,32,3,87,103,32,168,112,112, 112,168,32,3,87,103,80,80,248,32,248,80,80,3,87,103, 80,112,248,112,248,112,80,255,255,3,87,103,32,168,168,112, 168,168,32,3,87,103,32,168,168,80,168,168,32,3,87,103, 32,168,168,112,168,168,32,3,87,103,32,168,168,80,168,168, 32,4,85,101,32,248,80,112,216,255,255,255,3,87,103,32, 168,168,112,168,168,32,3,87,103,32,168,168,112,168,168,32, 3,87,103,32,168,168,112,168,168,32,3,87,103,32,168,168, 112,168,168,32,3,87,103,32,168,112,248,112,168,32,3,87, 103,32,168,112,248,112,168,32,3,87,103,32,168,168,112,168, 168,32,3,87,103,32,168,112,248,112,168,32,3,87,103,32, 168,112,248,112,168,32,255,2,102,102,120,140,140,140,140,120, 255,2,102,102,248,136,140,140,252,60,2,102,102,60,252,140, 140,136,248,2,102,102,248,140,140,140,252,124,2,102,102,124, 252,140,140,140,248,255,255,255,2,89,105,32,112,32,80,248, 80,32,112,32,255,34,25,105,128,128,128,128,128,128,128,128, 128,18,57,105,224,224,224,224,224,224,224,224,224,2,89,105, 248,248,248,248,248,248,248,248,248,23,53,101,96,128,224,224, 64,23,53,101,64,224,224,32,192,7,101,101,108,144,252,252, 72,7,101,101,72,252,252,36,216,255,255,2,106,106,8,124, 232,232,120,8,104,104,72,48,18,57,105,64,224,224,64,64, 0,64,224,64,2,89,105,80,248,248,112,32,0,32,112,32, 2,87,103,80,248,248,248,112,32,32,2,103,103,96,240,248, 124,248,240,96,2,89,105,104,176,16,216,248,240,96,104,48, 2,104,104,64,144,184,124,92,188,184,80,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,2,89,105,112,248,216,152, 216,216,136,248,112,2,89,105,112,248,216,168,232,216,136,248, 112,2,89,105,112,248,216,168,216,232,152,248,112,2,89,105, 112,248,184,184,152,136,216,248,112,2,89,105,112,248,136,184, 152,232,152,248,112,2,89,105,112,248,200,184,152,168,216,248, 112,2,89,105,112,248,136,232,216,216,216,248,112,2,89,105, 112,248,216,168,216,168,216,248,112,2,89,105,112,248,216,168, 200,232,152,248,112,2,105,105,120,252,172,148,148,148,172,252, 120,2,89,105,112,136,168,232,168,168,168,136,112,2,89,105, 112,136,168,216,152,168,248,136,112,2,89,105,112,136,168,216, 168,152,232,136,112,2,89,105,112,136,200,200,232,248,168,136, 112,2,89,105,112,136,248,200,232,152,232,136,112,2,89,105, 112,136,184,200,232,216,168,136,112,2,89,105,112,136,248,152, 168,168,168,136,112,2,89,105,112,136,168,216,168,216,168,136, 112,2,89,105,112,136,168,216,184,152,232,136,112,2,105,105, 120,132,212,236,236,236,212,132,120,2,89,105,112,248,216,152, 216,216,216,248,112,2,89,105,112,248,216,168,232,216,136,248, 112,2,89,105,112,248,216,168,216,232,152,248,112,2,89,105, 112,248,184,184,152,136,216,248,112,2,89,105,112,248,136,184, 152,232,152,248,112,2,89,105,112,248,200,184,152,168,216,248, 112,2,89,105,112,248,136,232,216,216,216,248,112,2,89,105, 112,248,216,168,216,168,216,248,112,2,89,105,112,248,216,168, 200,232,152,248,112,2,105,105,120,252,172,148,148,148,172,252, 120,4,102,102,48,24,252,252,24,48,255,255,255,4,85,101, 128,64,40,24,56,4,85,101,32,48,248,48,32,4,85,101, 56,24,40,64,128,3,103,103,64,32,48,252,48,32,64,3, 104,104,32,48,24,252,252,24,48,32,4,101,101,16,24,252, 24,16,4,102,102,16,24,252,252,24,16,4,102,102,16,24, 188,188,24,16,3,103,103,32,48,184,188,184,48,32,3,103, 103,32,48,248,252,248,48,32,255,255,4,101,101,192,112,60, 112,192,3,103,103,32,176,248,252,120,48,32,3,103,103,32, 48,120,252,248,176,32,0,109,109,32,32,48,240,248,248,252, 248,248,240,48,32,32,255,255,255,255,255,255,255,255,255,255, 1,107,107,120,252,220,204,4,0,4,204,220,248,120,255,4, 102,102,32,32,224,20,12,28,4,101,101,144,200,124,200,144, 4,102,102,28,12,20,224,32,32,4,102,102,32,32,224,20, 12,28,4,101,101,144,200,124,200,144,4,102,102,28,12,20, 224,32,32,4,101,101,16,8,252,8,16,4,101,101,16,200, 252,200,16,5,99,99,232,124,232,4,101,101,208,216,124,216, 208,2,105,105,160,80,40,244,4,244,40,80,160,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,1,91,107,248,160,160,160,160,160,160,160,160, 160,248,1,91,107,248,40,40,40,40,40,40,40,40,40,248, 17,75,107,16,32,32,64,64,128,64,64,32,32,16,17,75, 107,128,64,64,32,32,16,32,32,64,64,128,1,107,107,20, 40,40,80,80,160,80,80,40,40,20,1,107,107,160,80,80, 40,40,20,40,40,80,80,160,255,255,255,255,255,255,255,255, 255,3,101,101,32,64,252,64,32,3,101,101,16,8,252,8, 16,4,99,99,72,252,72,2,103,103,16,32,124,128,124,32, 16,2,103,103,32,16,248,4,248,16,32,3,101,101,72,252, 132,252,72,3,101,101,36,68,252,68,36,3,101,101,144,136, 252,136,144,2,103,103,20,36,124,132,124,36,20,2,103,103, 160,144,248,132,248,144,160,4,100,100,8,92,172,8};
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 3 of the License, or (at your option) any later version. QtAws 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 QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_GETDATACATALOGENCRYPTIONSETTINGSRESPONSE_P_H #define QTAWS_GETDATACATALOGENCRYPTIONSETTINGSRESPONSE_P_H #include "glueresponse_p.h" namespace QtAws { namespace Glue { class GetDataCatalogEncryptionSettingsResponse; class GetDataCatalogEncryptionSettingsResponsePrivate : public GlueResponsePrivate { public: explicit GetDataCatalogEncryptionSettingsResponsePrivate(GetDataCatalogEncryptionSettingsResponse * const q); void parseGetDataCatalogEncryptionSettingsResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(GetDataCatalogEncryptionSettingsResponse) Q_DISABLE_COPY(GetDataCatalogEncryptionSettingsResponsePrivate) }; } // namespace Glue } // namespace QtAws #endif
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 3 of the License, or (at your option) any later version. QtAws 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 QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_DESCRIBEAUDITFINDINGREQUEST_P_H #define QTAWS_DESCRIBEAUDITFINDINGREQUEST_P_H #include "iotrequest_p.h" #include "describeauditfindingrequest.h" namespace QtAws { namespace IoT { class DescribeAuditFindingRequest; class DescribeAuditFindingRequestPrivate : public IoTRequestPrivate { public: DescribeAuditFindingRequestPrivate(const IoTRequest::Action action, DescribeAuditFindingRequest * const q); DescribeAuditFindingRequestPrivate(const DescribeAuditFindingRequestPrivate &other, DescribeAuditFindingRequest * const q); private: Q_DECLARE_PUBLIC(DescribeAuditFindingRequest) }; } // namespace IoT } // namespace QtAws #endif
// Created file "Lib\src\ehstorguids\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(PKEY_ItemNameDisplay, 0xb725f130, 0x47ef, 0x101a, 0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac);
/* * Copyright (C) 2018 Ondrej Starek * * This file is part of OTest2. * * OTest2 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 3 of the License, * or (at your option) any later version. * * OTest2 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 OTest2. If not, see <http://www.gnu.org/licenses/>. */ #ifndef OTest2__LIB_RUNCODE_H_ #define OTest2__LIB_RUNCODE_H_ #include <functional> namespace OTest2 { class Context; bool runUserCode( const Context& context_, std::function<void(const Context&)> ftor_) noexcept; } /* -- namespace OTest2 */ #endif /* OTest2__LIB_RUNCODE_H_ */
/* Types.h -- Basic types 2008-11-23 : Igor Pavlov : Public domain */ #ifndef __7Z_TYPES_H #define __7Z_TYPES_H #include <stddef.h> #if _WIN32 || _WIN64 #include <windows.h> #endif #define SZ_OK 0 #define SZ_ERROR_DATA 1 #define SZ_ERROR_MEM 2 #define SZ_ERROR_CRC 3 #define SZ_ERROR_UNSUPPORTED 4 #define SZ_ERROR_PARAM 5 #define SZ_ERROR_INPUT_EOF 6 #define SZ_ERROR_OUTPUT_EOF 7 #define SZ_ERROR_READ 8 #define SZ_ERROR_WRITE 9 #define SZ_ERROR_PROGRESS 10 #define SZ_ERROR_FAIL 11 #define SZ_ERROR_THREAD 12 #define SZ_ERROR_ARCHIVE 16 #define SZ_ERROR_NO_ARCHIVE 17 typedef int SRes; #if _WIN32 || _WIN64 typedef DWORD WRes; #else typedef int WRes; #endif #ifndef RINOK #define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } #endif typedef unsigned char Byte; typedef short Int16; typedef unsigned short UInt16; #ifdef _LZMA_UINT32_IS_ULONG typedef long Int32; typedef unsigned long UInt32; #else typedef int Int32; typedef unsigned int UInt32; #endif #ifdef _SZ_NO_INT_64 /* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers. NOTES: Some code will work incorrectly in that case! */ typedef long Int64; typedef unsigned long UInt64; #else #if defined(_MSC_VER) || defined(__BORLANDC__) typedef __int64 Int64; typedef unsigned __int64 UInt64; #else typedef long long int Int64; typedef unsigned long long int UInt64; #endif #endif #ifdef _LZMA_NO_SYSTEM_SIZE_T typedef UInt32 SizeT; #else typedef size_t SizeT; #endif typedef int Bool; #define True 1 #define False 0 #ifdef _MSC_VER #if _MSC_VER >= 1300 #define MY_NO_INLINE __declspec(noinline) #else #define MY_NO_INLINE #endif #define MY_CDECL __cdecl #define MY_STD_CALL __stdcall #define MY_FAST_CALL MY_NO_INLINE __fastcall #else #define MY_CDECL #define MY_STD_CALL #define MY_FAST_CALL #endif /* The following interfaces use first parameter as pointer to structure */ typedef struct ISeqInStream { SRes (*Read)(void *p, void *buf, size_t *size); /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. (output(*size) < input(*size)) is allowed */ } ISeqInStream; /* it can return SZ_ERROR_INPUT_EOF */ SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size); SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType); SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf); typedef struct ISeqOutStream { size_t (*Write)(void *p, const void *buf, size_t size); /* Returns: result - the number of actually written bytes. (result < size) means error */ } ISeqOutStream; typedef enum ESzSeek { SZ_SEEK_SET = 0, SZ_SEEK_CUR = 1, SZ_SEEK_END = 2 } ESzSeek; typedef struct ISeekInStream { SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */ SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); } ISeekInStream; typedef struct ILookInStream { SRes (*Look)(void *p, void **buf, size_t *size); /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. (output(*size) > input(*size)) is not allowed (output(*size) < input(*size)) is allowed */ SRes (*Skip)(void *p, size_t offset); /* offset must be <= output(*size) of Look */ SRes (*Read)(void *p, void *buf, size_t *size); /* reads directly (without buffer). It's same as ISeqInStream::Read */ SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); } ILookInStream; SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size); SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset); /* reads via ILookInStream::Read */ SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType); SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size); #define LookToRead_BUF_SIZE (1 << 14) typedef struct CLookToRead { ILookInStream s; ISeekInStream *realStream; size_t pos; size_t size; Byte buf[LookToRead_BUF_SIZE]; } CLookToRead; void LookToRead_CreateVTable(CLookToRead *p, int lookahead); void LookToRead_Init(CLookToRead *p); typedef struct CSecToLook { ISeqInStream s; ILookInStream *realStream; } CSecToLook; void SecToLook_CreateVTable(CSecToLook *p); typedef struct CSecToRead { ISeqInStream s; ILookInStream *realStream; } CSecToRead; void SecToRead_CreateVTable(CSecToRead *p); typedef struct ICompressProgress { SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize); /* Returns: result. (result != SZ_OK) means break. Value (UInt64)(Int64)-1 for size means unknown value. */ } ICompressProgress; typedef struct ISzAlloc { void *(*Alloc)(void *p, size_t size); void (*Free)(void *p, void *address); /* address can be 0 */ } ISzAlloc; #define IAlloc_Alloc(p, size) (p)->Alloc((p), size) #define IAlloc_Free(p, a) (p)->Free((p), a) #endif
// Created file "Lib\src\Uuid\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(WPD_PROPERTY_OBJECT_PROPERTIES_PROPERTY_DELETE_RESULTS, 0x9e5582e4, 0x0814, 0x44e6, 0x98, 0x1a, 0xb2, 0x99, 0x8d, 0x58, 0x38, 0x04);
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 3 of the License, or (at your option) any later version. QtAws 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 QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_ASSOCIATETRACKERCONSUMERRESPONSE_H #define QTAWS_ASSOCIATETRACKERCONSUMERRESPONSE_H #include "locationserviceresponse.h" #include "associatetrackerconsumerrequest.h" namespace QtAws { namespace LocationService { class AssociateTrackerConsumerResponsePrivate; class QTAWSLOCATIONSERVICE_EXPORT AssociateTrackerConsumerResponse : public LocationServiceResponse { Q_OBJECT public: AssociateTrackerConsumerResponse(const AssociateTrackerConsumerRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const AssociateTrackerConsumerRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(AssociateTrackerConsumerResponse) Q_DISABLE_COPY(AssociateTrackerConsumerResponse) }; } // namespace LocationService } // namespace QtAws #endif
// Created file "Lib\src\Uuid\X64\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(PKEY_Task_CompletionStatus, 0x084d8a0a, 0xe6d5, 0x40de, 0xbf, 0x1f, 0xc8, 0x82, 0x0e, 0x7c, 0x87, 0x7c);
/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 3 of the License, or (at your option) any later version. QtAws 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 QtAws. If not, see <http://www.gnu.org/licenses/>. */ #ifndef QTAWS_GETUSERREQUEST_P_H #define QTAWS_GETUSERREQUEST_P_H #include "chimerequest_p.h" #include "getuserrequest.h" namespace QtAws { namespace Chime { class GetUserRequest; class GetUserRequestPrivate : public ChimeRequestPrivate { public: GetUserRequestPrivate(const ChimeRequest::Action action, GetUserRequest * const q); GetUserRequestPrivate(const GetUserRequestPrivate &other, GetUserRequest * const q); private: Q_DECLARE_PUBLIC(GetUserRequest) }; } // namespace Chime } // namespace QtAws #endif
#ifndef NODE_H #define NODE_H #include "boundary.h" class Node { public: int index; double x; double y; double z; double *loadValues; bool *lockStatus; Node(); Node(int index, double x, double y, double z = 0.0); void setup(Boundary &b); void draw(void); void draw_lock(void); void draw_load(void); ~Node(); }; #endif // NODE_H
//.. _more-quickcheck-examples: // // ================== // Testing quickcheck // ================== // // Test quickcheck with a few simple examples. // // Project includes // ================ // // .. code-block:: cpp // #include "quickcheck_test.h" // Test functions // ============== // // .. code-block:: cpp static void ch_gen_odd(ch_buf* data) { int i; ch_qc_gen_int((ch_buf*) &i); if (i % 2 == 0) { i++; } ch_qc_return(int, i); } static int ch_is_rand_double_range(ch_buf* data) { double x = ch_qc_args(double, 0, double); return x >= 0 && x <= 1; } static int ch_is_odd(ch_buf* data) { int n = ch_qc_args(int, 0, int); return n % 2 == 1; } static int ch_is_ascii_string(ch_buf* data) { ch_qc_mem_track_t* item = ch_qc_args( ch_qc_mem_track_t*, 0, ch_qc_mem_track_t* ); for( int i = 0; i < (item->count - 1); i++ ) { if(item->data[i] < 1) return 0; } return item->data[(item->count * item->size) - 1] == 0; } // Runner // ====== // // .. code-block:: cpp // int main() { int ret = 0; ch_qc_init(); ch_qc_gen gs0[] = { ch_gen_odd }; ch_qc_print ps0[] = { ch_qc_print_int }; printf("Testing ch_gen_odd: "); ret |= !ch_qc_for_all(ch_is_odd, 1, gs0, ps0, int); ch_qc_gen gs1[] = { ch_qc_gen_string }; ch_qc_print ps1[] = { ch_qc_print_string }; printf("Testing ch_qc_gen_string: "); ret |= !ch_qc_for_all( ch_is_ascii_string, 1, gs1, ps1, ch_qc_mem_track_t* ); #ifndef NDEBUG ch_qc_gen gs2[] = { ch_qc_gen_bytes }; ch_qc_print ps2[] = { ch_qc_print_bytes }; printf("The next test may (should) fail: "); ch_qc_for_all( ch_is_ascii_string, 1, gs2, ps2, ch_qc_mem_track_t* ); // Just for memcheck #endif ch_qc_gen gs3[] = { ch_qc_gen_double }; ch_qc_print ps3[] = { ch_qc_print_double }; printf("Testing ch_qc_gen_double: "); ret |= !ch_qc_for_all(ch_is_rand_double_range, 1, gs3, ps3, double); return ret; }
// Created file "Lib\src\Uuid\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(WPD_OBJECT_IS_DRM_PROTECTED, 0xef6b490d, 0x5cd8, 0x437a, 0xaf, 0xfc, 0xda, 0x8b, 0x60, 0xee, 0x4a, 0x3c);
//--------------------------------------------------------------------------- // FunkOS - Copyright (c) 2009, Funkenstein Software, See license.txt for details //--------------------------------------------------------------------------- /*! \file: font.h Description: Functions related to accessing fonts. */ //--------------------------------------------------------------------------- #ifndef __FONT_H__ #define __FONT_H__ #include "types.h" #include "font_port.h" //--------------------------------------------------------------------------- // Font library configuration (determines the size of the font table) #define FONT_PRINTABLE_CHARS (256) #define FONT_ASCII_OFFSET (0) //--------------------------------------------------------------------------- // Font flags #define FONT_FLAG_NORMAL (0x00) #define FONT_FLAG_BOLD (0x01) #define FONT_FLAG_ITALIC (0x02) #define FONT_FLAG_UNDERLINE (0x04) #define FONT_FLAG_SUBSCRIPT (0x08) #define FONT_FLAG_SUPERSCRIPT (0x10) #define FONT_FLAG_STRIKETHROUGH (0x20) //--------------------------------------------------------------------------- // Font structure definition typedef struct { CHAR *szFontName; //!< Name of the font (i.e. windows TTF name) UCHAR ucSize; //!< Size of the font (i.e. windows TTF font size) UCHAR ucFlags; //!< Font properties (Bold, italic, underline, etc.) //-- Values below are used to calculate the size of the font table and font indexing. UCHAR ucFontWidth; //!< Width of the font characters in pixels (max of the whole font) UCHAR ucFontHeight; //!< Height of the font characters in pixels (max of the whole font) UCHAR ucStartChar; //!< Starting character (ASCII char index) UCHAR ucNumChars; //!< Number of chars const FONT_RAW_TYPE *pucCharData; //!< Pointer to characters used in the font } FONT_STRUCT; //--------------------------------------------------------------------------- const FONT_STRUCT *Font_Load(CHAR *szFontName_, UCHAR ucFontWidth_, UCHAR ucFlags_); #endif
// Created file "Lib\src\mfuuid\X64\guids" typedef struct _GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; } GUID; #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } DEFINE_GUID(MFSampleExtension_DeviceTimestamp, 0x8f3e35e7, 0x2dcd, 0x4887, 0x86, 0x22, 0x2a, 0x58, 0xba, 0xa6, 0x52, 0xb0);
/* Copyright 2012 Adam Green (http://mbed.org/users/AdamGreen/) 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 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 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/>. */ /* Handler for continue gdb command. */ #ifndef _CMD_CONTINUE_H_ #define _CMD_CONTINUE_H_ #include <stdint.h> /* Real name of functions are in __mri namespace. */ uint32_t __mriCmd_HandleContinueCommand(void); /* Macroes which allow code to drop the __mri namespace prefix. */ #define HandleContinueCommand __mriCmd_HandleContinueCommand #endif /* _CMD_CONTINUE_H_ */
/* * Copyright (c) 2016 Vladimir L. Shabanov <virlof@gmail.com> * * Licensed under the Underdark License, Version 1.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://underdark.io/LICENSE.txt * * 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. */ #import <Foundation/Foundation.h> @protocol UDNsdAdvertiserDelegate @end @interface UDNsdAdvertiser : NSObject @property (nonatomic) bool peerToPeer; - (instancetype) init NS_UNAVAILABLE; - (instancetype) initWithDelegate:(id<UDNsdAdvertiserDelegate>)delegate service:(NSString*)serviceType name:(NSString*)serviceName queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER; - (bool) startWithPort:(int)port; - (void) stop; @end
/* mpfr_get_f -- convert a MPFR number to a GNU MPF number Copyright 2005-2021 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. The GNU MPFR 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 3 of the License, or (at your option) any later version. The GNU MPFR 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 MPFR Library; see the file COPYING.LESSER. If not, see https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #define MPFR_NEED_MPF_INTERNALS #include "mpfr-impl.h" #ifndef MPFR_USE_MINI_GMP /* Since MPFR-3.0, return the usual inexact value. The erange flag is set if an error occurred in the conversion (y is NaN, +Inf, or -Inf that have no equivalent in mpf) */ int mpfr_get_f (mpf_ptr x, mpfr_srcptr y, mpfr_rnd_t rnd_mode) { int inex; mp_size_t sx, sy; mpfr_prec_t precx, precy; mp_limb_t *xp; int sh; if (MPFR_UNLIKELY(MPFR_IS_SINGULAR(y))) { if (MPFR_IS_ZERO(y)) { mpf_set_ui (x, 0); return 0; } else if (MPFR_IS_NAN (y)) { MPFR_SET_ERANGEFLAG (); return 0; } else /* y is +inf (resp. -inf); set x to the maximum value (resp. the minimum value) in precision PREC(x) */ { int i; mp_limb_t *xp; MPFR_SET_ERANGEFLAG (); /* To this day, [mp_exp_t] and mp_size_t are #defined as the same type */ EXP (x) = MP_SIZE_T_MAX; sx = PREC (x); SIZ (x) = sx; xp = PTR (x); for (i = 0; i < sx; i++) xp[i] = MPFR_LIMB_MAX; if (MPFR_IS_POS (y)) return -1; else { mpf_neg (x, x); return +1; } } } sx = PREC(x); /* number of limbs of the mantissa of x */ precy = MPFR_PREC(y); precx = (mpfr_prec_t) sx * GMP_NUMB_BITS; sy = MPFR_LIMB_SIZE (y); xp = PTR (x); /* since mpf numbers are represented in base 2^GMP_NUMB_BITS, we loose -EXP(y) % GMP_NUMB_BITS bits in the most significant limb */ sh = MPFR_GET_EXP(y) % GMP_NUMB_BITS; sh = sh <= 0 ? - sh : GMP_NUMB_BITS - sh; MPFR_ASSERTD (sh >= 0); if (precy + sh <= precx) /* we can copy directly */ { mp_size_t ds; MPFR_ASSERTN (sx >= sy); ds = sx - sy; if (sh != 0) { mp_limb_t out; out = mpn_rshift (xp + ds, MPFR_MANT(y), sy, sh); MPFR_ASSERTN (ds > 0 || out == 0); if (ds > 0) xp[--ds] = out; } else MPN_COPY (xp + ds, MPFR_MANT (y), sy); if (ds > 0) MPN_ZERO (xp, ds); EXP(x) = (MPFR_GET_EXP(y) + sh) / GMP_NUMB_BITS; inex = 0; } else /* we have to round to precx - sh bits */ { mpfr_t z; mp_size_t sz; /* Recall that precx = (mpfr_prec_t) sx * GMP_NUMB_BITS, thus removing sh bits (sh < GMP_NUMB_BITSS) won't reduce the number of limbs. */ mpfr_init2 (z, precx - sh); sz = MPFR_LIMB_SIZE (z); MPFR_ASSERTN (sx == sz); inex = mpfr_set (z, y, rnd_mode); /* warning, sh may change due to rounding, but then z is a power of two, thus we can safely ignore its last bit which is 0 */ sh = MPFR_GET_EXP(z) % GMP_NUMB_BITS; sh = sh <= 0 ? - sh : GMP_NUMB_BITS - sh; MPFR_ASSERTD (sh >= 0); if (sh != 0) { mp_limb_t out; out = mpn_rshift (xp, MPFR_MANT(z), sz, sh); /* If sh hasn't changed, it is the number of the non-significant bits in the lowest limb of z. Therefore out == 0. */ MPFR_ASSERTD (out == 0); (void) out; /* avoid a warning */ } else MPN_COPY (xp, MPFR_MANT(z), sz); EXP(x) = (MPFR_GET_EXP(z) + sh) / GMP_NUMB_BITS; mpfr_clear (z); } /* set size and sign */ SIZ(x) = (MPFR_FROM_SIGN_TO_INT(MPFR_SIGN(y)) < 0) ? -sx : sx; return inex; } #endif
/*************************************************************************** * Copyright (C) 2010 by Erik Sohns * * erik.sohns@web.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * 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 NET_CALLBACKS_H #define NET_CALLBACKS_H #include "gtk/gtk.h" //------------------------------------------------------------------------------ // idle routines gboolean idle_finalize_UI_cb (gpointer); gboolean idle_update_info_display_cb (gpointer); gboolean idle_update_progress_cb (gpointer); gboolean idle_start_session_cb (gpointer); gboolean idle_end_session_cb (gpointer); ////////////////////////////////////////// gboolean idle_initialize_client_UI_cb (gpointer); ////////////////////////////////////////// gboolean idle_initialize_server_UI_cb (gpointer); //------------------------------------------------------------------------------ // GTK callback functions #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ G_MODULE_EXPORT gint button_connect_clicked_cb (GtkWidget*, gpointer); G_MODULE_EXPORT gint button_close_clicked_cb (GtkWidget*, gpointer); G_MODULE_EXPORT gint button_close_all_clicked_cb (GtkWidget*, gpointer); G_MODULE_EXPORT gint togglebutton_test_toggled_cb (GtkWidget*, gpointer); G_MODULE_EXPORT gint radiobutton_mode_toggled_cb (GtkWidget*, gpointer); G_MODULE_EXPORT gint radiobutton_protocol_toggled_cb (GtkWidget*, gpointer); G_MODULE_EXPORT gint button_ping_clicked_cb (GtkWidget*, gpointer); ///////////////////////////////////////// G_MODULE_EXPORT gint togglebutton_listen_toggled_cb (GtkWidget*, gpointer); G_MODULE_EXPORT gint button_report_clicked_cb (GtkWidget*, gpointer); ///////////////////////////////////////// G_MODULE_EXPORT void spinbutton_connections_value_changed_client_cb (GtkSpinButton*, gpointer); G_MODULE_EXPORT void spinbutton_ping_interval_value_changed_client_cb (GtkSpinButton*, gpointer); G_MODULE_EXPORT void spinbutton_connections_value_changed_server_cb (GtkSpinButton*, gpointer); G_MODULE_EXPORT void spinbutton_ping_interval_value_changed_server_cb (GtkSpinButton*, gpointer); //G_MODULE_EXPORT gint spinbutton_messages_value_changed_cb (GtkWidget*, gpointer); //G_MODULE_EXPORT gint spinbutton_session_messages_value_changed_cb (GtkWidget*, gpointer); G_MODULE_EXPORT gint button_about_clicked_cb (GtkWidget*, gpointer); G_MODULE_EXPORT gint button_quit_clicked_cb (GtkWidget*, gpointer); #ifdef __cplusplus } #endif /* __cplusplus */ #endif