text
stringlengths
4
6.14k
// // UMSocialUIManager.h // UMSocialSDK // // Created by umeng on 16/8/10. // Copyright © 2016年 dongjianxiong. All rights reserved. // #import <Foundation/Foundation.h> #import "UMSocialShareSelectionView.h" @interface UMSocialUIManager : NSObject + (void)showShareMenuViewInView:(UIView *)view sharePlatformSelectionBlock:(UMSocialSharePlatformSelectionBlock)sharePlatformSelectionBlock; + (void)showShareMenuViewInWindowWithPlatformSelectionBlock:(UMSocialSharePlatformSelectionBlock)sharePlatformSelectionBlock; + (void)dismissShareMenuView; @end
#include <stdio.h> #include <string.h> #include <stdbool.h> #include "bankswitch.h" unsigned int default_mem_bank; unsigned char bank_switch_method = 0xff; unsigned int una_entry_vector = 0; unsigned int rom_bank_count = 0; void init_bankswitch(unsigned char method) { bank_switch_method = method; /* For UNA BIOS, we need to know where the RST 8 entry vector * takes us, since we're going to overlay this vector with * flash ROM contents and we need it to get our RAM back! */ if(bank_switch_method == BANKSWITCH_UNABIOS) una_entry_vector = *((unsigned int*)9); default_mem_bank = bankswitch_get_current_bank(); rom_bank_count = bankswitch_get_rom_bank_count(); }
/* * This file is part of Cleanflight. * * Cleanflight 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. * * Cleanflight 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>. */ #include <stdbool.h> #include <stdint.h> #include "platform.h" #ifdef TARGET_CONFIG #include "io/serial.h" #include "sensors/sensors.h" #include "sensors/compass.h" #include "sensors/barometer.h" #include "telemetry/telemetry.h" void targetConfiguration(void) { barometerConfigMutable()->baro_hardware = BARO_AUTODETECT; compassConfigMutable()->mag_hardware = MAG_AUTODETECT; serialConfigMutable()->portConfigs[1].functionMask = FUNCTION_MSP; // So Bluetooth users don't have to change anything. serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(TELEMETRY_UART)].functionMask = FUNCTION_TELEMETRY_SMARTPORT; serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(GPS_UART)].functionMask = FUNCTION_GPS; //telemetryConfigMutable()->halfDuplex = 1; } #endif
/* * Copyright (c) 2015, EURECOM (www.eurecom.fr) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY 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. * * The views and conclusions contained in the software and documentation are those * of the authors and should not be interpreted as representing official policies, * either expressed or implied, of the FreeBSD Project. */ MESSAGE_DEF(GTPV1U_CREATE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, Gtpv1uCreateTunnelReq, gtpv1uCreateTunnelReq) MESSAGE_DEF(GTPV1U_CREATE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, Gtpv1uCreateTunnelResp, gtpv1uCreateTunnelResp) MESSAGE_DEF(GTPV1U_UPDATE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, Gtpv1uUpdateTunnelReq, gtpv1uUpdateTunnelReq) MESSAGE_DEF(GTPV1U_UPDATE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, Gtpv1uUpdateTunnelResp, gtpv1uUpdateTunnelResp) MESSAGE_DEF(GTPV1U_DELETE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, Gtpv1uDeleteTunnelReq, gtpv1uDeleteTunnelReq) MESSAGE_DEF(GTPV1U_DELETE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, Gtpv1uDeleteTunnelResp, gtpv1uDeleteTunnelResp) MESSAGE_DEF(GTPV1U_TUNNEL_DATA_IND, MESSAGE_PRIORITY_MED, Gtpv1uTunnelDataInd, gtpv1uTunnelDataInd) MESSAGE_DEF(GTPV1U_TUNNEL_DATA_REQ, MESSAGE_PRIORITY_MED, Gtpv1uTunnelDataReq, gtpv1uTunnelDataReq)
#ifndef TBP_LITTLE_LITTLE_H #define TBP_LITTLE_LITTLE_H #include <stack> #include <limits> #include <vector> #include <iostream> #include <fstream> #include <chrono> #include "LittleNode.h" #include "Segment.h" #include "Coordinates.h" using namespace std; typedef chrono::high_resolution_clock Clock; class Little { private: stack<LittleNode> nodes; vector<Segment> segments; double reference; MatrixXd *distanceMatrix; string fileName; size_t nbOfVisitedNodes; public: Little(); Little(const string &fileName); virtual ~Little(); const stack<LittleNode> & getNodes() const; void setNodes(const stack<LittleNode> &nodes); const vector<Segment> & getSegments() const; void setSegments(const vector<Segment> &segments); double getReference() const; void setReference(double reference); MatrixXd *getDistanceMatrix() const; void setDistanceMatrix(MatrixXd *distanceMatrix); const string &getFileName() const; void setFileName(const string &fileName); /** * Satrt the algorithm */ void start(); /** * Sort the segments for better readability * 7-6, 8-7, 6-8 -> 7-6, 6-8, 8-7 */ void sortSegments(); /** * Print the results of the algorithm */ void printResults(); /** * Examine the node * @param node */ void examineNode(LittleNode node); /** * Return a vector of Coordinates containing the coordinates of all towers described inside fileName * @param fileName the name of the file containing all the points coordinates * @return a vector of coordinates */ vector<Coordinates> getCoordinates(string fileName); /** * Return the matrix of distances between all points * @param coordinates a vector of coordinates * @return A matrix of doubles */ MatrixXd *getDistancesMatrix(vector<Coordinates> coordinates); /** * Compute the maximum number of nodes the matrix size can create * @param nbRows the matrix's number of rows * @return the number of nodes this matrix can create at most */ size_t computeMaxNumberOfNodes(size_t nbRows); }; #endif //TBP_LITTLE_LITTLE_H
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef nsPluginStreamListenerPeer_h_ #define nsPluginStreamListenerPeer_h_ #include "nscore.h" #include "nsIFile.h" #include "nsIStreamListener.h" #include "nsIProgressEventSink.h" #include "nsIHttpHeaderVisitor.h" #include "nsWeakReference.h" #include "nsNPAPIPluginStreamListener.h" #include "nsDataHashtable.h" #include "nsHashKeys.h" #include "nsNPAPIPluginInstance.h" #include "nsIInterfaceRequestor.h" #include "nsIChannelEventSink.h" class nsIChannel; /** * When a plugin requests opens multiple requests to the same URL and * the request must be satified by saving a file to disk, each stream * listener holds a reference to the backing file: the file is only removed * when all the listeners are done. */ class CachedFileHolder { public: explicit CachedFileHolder(nsIFile* cacheFile); ~CachedFileHolder(); void AddRef(); void Release(); nsIFile* file() const { return mFile; } private: nsAutoRefCnt mRefCnt; nsCOMPtr<nsIFile> mFile; }; class nsPluginStreamListenerPeer : public nsIStreamListener, public nsIProgressEventSink, public nsIHttpHeaderVisitor, public nsSupportsWeakReference, public nsIInterfaceRequestor, public nsIChannelEventSink { virtual ~nsPluginStreamListenerPeer(); public: nsPluginStreamListenerPeer(); NS_DECL_ISUPPORTS NS_DECL_NSIPROGRESSEVENTSINK NS_DECL_NSIREQUESTOBSERVER NS_DECL_NSISTREAMLISTENER NS_DECL_NSIHTTPHEADERVISITOR NS_DECL_NSIINTERFACEREQUESTOR NS_DECL_NSICHANNELEVENTSINK // Called by RequestRead void MakeByteRangeString(NPByteRange* aRangeList, nsACString &string, int32_t *numRequests); bool UseExistingPluginCacheFile(nsPluginStreamListenerPeer* psi); // Called by GetURL and PostURL (via NewStream) or by the host in the case of // the initial plugin stream. nsresult Initialize(nsIURI *aURL, nsNPAPIPluginInstance *aInstance, nsNPAPIPluginStreamListener *aListener); nsresult OnFileAvailable(nsIFile* aFile); nsresult ServeStreamAsFile(nsIRequest *request, nsISupports *ctxt); nsNPAPIPluginInstance *GetPluginInstance() { return mPluginInstance; } nsresult RequestRead(NPByteRange* rangeList); nsresult GetLength(uint32_t* result); nsresult GetURL(const char** result); nsresult GetLastModified(uint32_t* result); nsresult IsSeekable(bool* result); nsresult GetContentType(char** result); nsresult GetStreamOffset(int32_t* result); nsresult SetStreamOffset(int32_t value); void TrackRequest(nsIRequest* request) { mRequests.AppendObject(request); } void ReplaceRequest(nsIRequest* oldRequest, nsIRequest* newRequest) { int32_t i = mRequests.IndexOfObject(oldRequest); if (i == -1) { NS_ASSERTION(mRequests.Count() == 0, "Only our initial stream should be unknown!"); mRequests.AppendObject(oldRequest); } else { mRequests.ReplaceObjectAt(newRequest, i); } } void CancelRequests(nsresult status) { // Copy the array to avoid modification during the loop. nsCOMArray<nsIRequest> requestsCopy(mRequests); for (int32_t i = 0; i < requestsCopy.Count(); ++i) requestsCopy[i]->Cancel(status); } void SuspendRequests() { nsCOMArray<nsIRequest> requestsCopy(mRequests); for (int32_t i = 0; i < requestsCopy.Count(); ++i) requestsCopy[i]->Suspend(); } void ResumeRequests() { nsCOMArray<nsIRequest> requestsCopy(mRequests); for (int32_t i = 0; i < requestsCopy.Count(); ++i) requestsCopy[i]->Resume(); } // Called by nsNPAPIPluginStreamListener void OnStreamTypeSet(const int32_t aStreamType); enum { STREAM_TYPE_UNKNOWN = UINT16_MAX }; private: nsresult SetUpStreamListener(nsIRequest* request, nsIURI* aURL); nsresult SetupPluginCacheFile(nsIChannel* channel); nsresult GetInterfaceGlobal(const nsIID& aIID, void** result); nsCOMPtr<nsIURI> mURL; nsCString mURLSpec; // Have to keep this member because GetURL hands out char* RefPtr<nsNPAPIPluginStreamListener> mPStreamListener; // Set to true if we request failed (like with a HTTP response of 404) bool mRequestFailed; /* * Set to true after nsNPAPIPluginStreamListener::OnStartBinding() has * been called. Checked in ::OnStopRequest so we can call the * plugin's OnStartBinding if, for some reason, it has not already * been called. */ bool mStartBinding; bool mHaveFiredOnStartRequest; // these get passed to the plugin stream listener uint32_t mLength; int32_t mStreamType; // local cached file, we save the content into local cache if browser cache is not available, // or plugin asks stream as file and it expects file extension until bug 90558 got fixed RefPtr<CachedFileHolder> mLocalCachedFileHolder; nsCOMPtr<nsIOutputStream> mFileCacheOutputStream; nsDataHashtable<nsUint32HashKey, uint32_t>* mDataForwardToRequest; nsCString mContentType; bool mUseLocalCache; nsCOMPtr<nsIRequest> mRequest; bool mSeekable; uint32_t mModified; RefPtr<nsNPAPIPluginInstance> mPluginInstance; int32_t mStreamOffset; bool mStreamComplete; public: bool mAbort; int32_t mPendingRequests; nsWeakPtr mWeakPtrChannelCallbacks; nsWeakPtr mWeakPtrChannelLoadGroup; nsCOMArray<nsIRequest> mRequests; }; #endif // nsPluginStreamListenerPeer_h_
/** * Created by universallp on 26.07.2017. * This file is part of reloded which is licenced * under the MOZILLA PUBLIC LICENSE 2.0 - mozilla.org/en-US/MPL/2.0/ * github.com/univrsal/reloded */ #ifndef PZLCONSTANTS_H #define PZLCONSTANTS_H #define LEVEL_COUNT_OFFSET 0x66 #define LEVEL_FIRST_HEADER 0x70 #define LEVEL_HEADER_SPACE 0x06 #define LEVEL_NAME_LENGTH 0x09 #define LEVEL_NAME 0x08 #endif
// // Aspia Project // Copyright (C) 2020 Dmitry Chapyshev <dmitry@aspia.ru> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. // #ifndef BASE__CODEC__AUDIO_DECODER_OPUS_H #define BASE__CODEC__AUDIO_DECODER_OPUS_H #include "base/macros_magic.h" #include "base/codec/audio_decoder.h" struct OpusDecoder; namespace base { class AudioDecoderOpus : public AudioDecoder { public: AudioDecoderOpus(); ~AudioDecoderOpus() override; // AudioDecoder interface. std::unique_ptr<proto::AudioPacket> decode(const proto::AudioPacket& packet) override; private: void initDecoder(); void destroyDecoder(); bool resetForPacket(const proto::AudioPacket& packet); int sampling_rate_ = 0; int channels_ = 0; OpusDecoder* decoder_ = nullptr; DISALLOW_COPY_AND_ASSIGN(AudioDecoderOpus); }; } // namespace base #endif // BASE__CODEC__AUDIO_DECODER_OPUS_H
/** * Copyright 2013-2015 Seagate Technology LLC. * * This Source Code Form is subject to the terms of the Mozilla * Public License, v. 2.0. If a copy of the MPL was not * distributed with this file, You can obtain one at * https://mozilla.org/MP:/2.0/. * * This program is distributed in the hope that it will be useful, * but is provided AS-IS, WITHOUT ANY WARRANTY; including without * the implied warranty of MERCHANTABILITY, NON-INFRINGEMENT or * FITNESS FOR A PARTICULAR PURPOSE. See the Mozilla Public * License for more details. * * See www.openkinetic.org for more project information */ #include "system_test_fixture.h" #include "kinetic_admin_client.h" const int64_t ClusterVersion = 1981; bool ClusterVersionSet; void setUp(void) { SystemTestSetup(1, true); ClusterVersionSet = false; } void tearDown(void) { if (ClusterVersionSet) { KineticStatus status = KineticAdminClient_SetClusterVersion(Fixture.adminSession, 0); TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, status); } SystemTestShutDown(); } void test_SetClusterVersion_should_succeed(void) { KineticStatus status = KineticAdminClient_SetClusterVersion(Fixture.adminSession, 12); TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, status); ClusterVersionSet = true; }
//-------------------------------------------------------------------------------------------------- /** @file main.c * * Unit test for verifying watchdog long timeout behavior * * Copyright (C) Sierra Wireless Inc. */ //-------------------------------------------------------------------------------------------------- #include "legato.h" #include "interfaces.h" COMPONENT_INIT { int32_t timeoutSec = 5 * 60; int32_t timeoutMs = timeoutSec * 1000; int32_t checkIntervalSec = 5; le_wdog_Timeout(timeoutMs); LE_INFO("Setting timeout to %d ms", timeoutMs); for (int32_t timeoutCount = 0; timeoutCount < timeoutSec - checkIntervalSec; timeoutCount += checkIntervalSec) { LE_INFO("Alive for %d seconds", timeoutCount); le_thread_Sleep(checkIntervalSec); } LE_INFO("Done test to ensure device doesn't reboot prematurely " "but need to ensure device reboots"); le_thread_Sleep(10); LE_INFO("FAILED: Should not reach here"); }
/* * Copyright (c) 2014-2019 Jim Tremblay * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #define NOS_PRIVATE #include "nOS.h" #ifdef __cplusplus extern "C" { #endif void nOS_AppendToList (nOS_List *list, nOS_Node *node) { node->prev = list->tail; node->next = NULL; if (node->prev != NULL) { node->prev->next = node; } list->tail = node; if (list->head == NULL) { list->head = node; } } void nOS_RemoveFromList (nOS_List *list, nOS_Node *node) { if (list->head == node) { list->head = node->next; } if (list->tail == node) { list->tail = node->prev; } if (node->prev != NULL) { node->prev->next = node->next; } if (node->next != NULL) { node->next->prev = node->prev; } node->prev = NULL; node->next = NULL; } void nOS_RotateList (nOS_List *list) { if (list->head != NULL) { if (list->head->next != NULL) { list->head->prev = list->tail; list->tail->next = list->head; list->head = list->head->next; list->tail = list->tail->next; list->head->prev = NULL; list->tail->next = NULL; } } } void nOS_WalkInList (nOS_List *list, nOS_NodeHandler handler, void *arg) { nOS_Node *it = list->head; nOS_Node *next; while (it != NULL) { next = it->next; handler(it->payload, arg); it = next; } } #ifdef __cplusplus } #endif
// Copyright 2015, 2016, 2017 Ingo Steinwart // // This file is part of liquidSVM. // // liquidSVM 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. // // liquidSVM 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 liquidSVM. If not, see <http://www.gnu.org/licenses/>. #if !defined (EXTRA_STRING_FUNCTIONS_H) #define EXTRA_STRING_FUNCTIONS_H #include <limits> #include <string> #include <cstring> using namespace std; //********************************************************************************************************************************** enum {DISPLAY_SCIENTIFIC, DISPLAY_FLOAT}; bool is_integer(char* string); bool is_real(char* string); template <typename Template_type> bool string_to_number(char* string, Template_type& number); template <typename Template_type> bool string_to_number(char* string, Template_type& number, Template_type min, Template_type max = numeric_limits<Template_type>::max( )); template <typename Template_type> bool string_to_number_no_limits(char* string, Template_type& number, Template_type min, Template_type max = numeric_limits<Template_type>::max( )); template <typename Template_type> bool string_to_number_no_lower_limits(char* string, Template_type& number, Template_type min, Template_type max = numeric_limits<Template_type>::max( )); template <typename Template_type> bool string_to_number_no_upper_limits(char* string, Template_type& number, Template_type min, Template_type max = numeric_limits<Template_type>::max( )); template <typename Template_type> string number_to_string(Template_type number, unsigned precision, unsigned mode = DISPLAY_SCIENTIFIC); template <typename Template_type> string number_to_adjusted_string(Template_type number, unsigned precision, unsigned mode = DISPLAY_SCIENTIFIC); template <typename Template_type> string pos_number_to_string(Template_type number, unsigned precision); string reduce(const string& original_string); //********************************************************************************************************************************** #include "sources/shared/basic_functions/extra_string_functions.ins.cpp" #ifndef COMPILE_SEPERATELY__ #include "sources/shared/basic_functions/extra_string_functions.cpp" #endif #endif
/**************************************************************** * * * Copyright 2003, 2013 Fidelity Information Services, Inc * * * * This source code contains the intellectual property * * of its copyright holder(s), and is made available * * under a license. If you do not know the terms of * * the license, please stop and do not read further. * * * ****************************************************************/ #include "mdef.h" #include "gdsroot.h" #include "gdsbt.h" #include "gtm_facility.h" #include "fileinfo.h" #include "gdsfhead.h" #include "filestruct.h" #include "jnl.h" #include "buddy_list.h" #include "hashtab_int4.h" /* needed for muprec.h */ #include "hashtab_int8.h" /* needed for muprec.h */ #include "hashtab_mname.h" /* needed for muprec.h */ #include "muprec.h" /* this routine resets new_pini_addr to 0 for all process-vectors in the current rctl->jctl hash-table entries. * this is usually invoked in case a journal auto switch occurs while backward recover/rollback is playing forward the updates */ void mur_pini_addr_reset(sgmnt_addrs *csa) { reg_ctl_list *rctl; jnl_ctl_list *jctl; pini_list_struct *plst; ht_ent_int4 *tabent, *topent; rctl = (reg_ctl_list *)csa->miscptr; assert(NULL != rctl); jctl = rctl->jctl; assert(NULL != jctl); for (tabent = jctl->pini_list.base, topent = jctl->pini_list.top; tabent < topent; tabent++) { if (HTENT_VALID_INT4(tabent, pini_list_struct, plst)) plst->new_pini_addr = 0; } }
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <pthread.h> #include <errno.h> #define MAXDATA 1024 #define MAXREDER 100 #define MAXWRITER 100 struct { pthread_rwlock_t rwlock; //读写锁 char datas[MAXDATA]; //共享数据域 }shared = { PTHREAD_RWLOCK_INITIALIZER }; void *reader(void *arg); void *writer(void *arg); int main(int argc,char *argv[]) { int i,readercount,writercount; pthread_t tid_reader[MAXREDER],tid_writer[MAXWRITER]; if(argc != 3) { printf("usage :%s #<readercount> #<writercount>\n",argv[0]); exit(0); } readercount = atoi(argv[1]); //读者个数 writercount = atoi(argv[2]); //写者个数 pthread_setconcurrency(readercount+writercount); for(i=0;i<writercount;++i) pthread_create(&tid_writer[i],NULL,writer,NULL); sleep(1); //等待写者先执行 for(i=0;i<readercount;++i) pthread_create(&tid_reader[i],NULL,reader,NULL); //等待线程终止 for(i=0;i<writercount;++i) pthread_join(tid_writer[i],NULL); for(i=0;i<readercount;++i) pthread_join(tid_reader[i],NULL); if(pthread_rwlock_destroy(&shared.rwlock)!=0) printf("pthread rwlock destroy fail.\n"); return 0; } void *reader(void *arg) { if( pthread_rwlock_rdlock(&shared.rwlock) ==0 ) //获取读出锁 printf("pthread_rwlock_rdlock OK\n"); printf("pthread ID: %ld\n",pthread_self()); printf("Reader begins read message.\n"); printf("Read message is: %s\n",shared.datas); if( pthread_rwlock_unlock(&shared.rwlock) != 0 ) printf("pthread_rwlock_unlock read fail\n"); else printf("pthread rwlock unlock read ok\n"); return NULL; } void *writer(void *arg) { char datas[MAXDATA]; printf("pthread ID: %ld\n",pthread_self()); if( pthread_rwlock_wrlock(&shared.rwlock) != 0)//再次获取写锁 perror("pthread_rwlock_wrlock\n"); printf("Writers begings write message.\n"); //sleep(1); printf("Enter the write message: \n"); scanf("%s",datas); //写入数据 strcat(shared.datas,datas); if(pthread_rwlock_unlock(&shared.rwlock)!=0) //释放锁 printf("pthread_rwlock_unlock write fail\n"); else printf("pthread rwlock unlock write ok\n"); return NULL; }
#pragma once #include <array> #include <bitset> #include "augs/ensure.h" #include "augs/templates/maybe_const.h" namespace augs { struct introspection_access; template<class Enum, class T> class enum_associative_array { public: typedef Enum key_type; typedef T mapped_type; private: static constexpr size_t max_n = static_cast<size_t>(key_type::COUNT); typedef std::array<mapped_type, max_n> arr_type; typedef std::bitset<max_n> bitset_type; // GEN INTROSPECTOR class augs::enum_associative_array class key_type class mapped_type bitset_type is_set; arr_type raw; // END GEN INTROSPECTOR friend struct augs::introspection_access; unsigned find_first_set_index(unsigned from) const { while (from < max_n && !is_set.test(from)) { ++from; } return from; } public: template<bool is_const> class basic_iterator { typedef maybe_const_ptr_t<is_const, enum_associative_array> ptr_type; typedef std::pair<key_type, maybe_const_ref_t<is_const, mapped_type>> ref_type; ptr_type ptr = nullptr; size_t idx = 0; friend class enum_associative_array<Enum, T>; public: basic_iterator(const ptr_type ptr, const size_t idx) : ptr(ptr), idx(idx) {} const basic_iterator operator++(int) { const iterator temp = *this; ++*this; return temp; } basic_iterator& operator++() { idx = ptr->find_first_set_index(idx + 1); return *this; } bool operator==(const basic_iterator& b) const { return idx == b.idx; } bool operator!=(const basic_iterator& b) const { return idx != b.idx; } ref_type operator*() const { ensure(idx < ptr->capacity()); return { static_cast<key_type>(idx), ptr->raw[idx] }; } }; typedef basic_iterator<false> iterator; typedef basic_iterator<true> const_iterator; template<bool> friend class basic_iterator; iterator begin() { return iterator(this, find_first_set_index(0u)); } iterator end() { return iterator(this, max_n); } const_iterator begin() const { return const_iterator(this, find_first_set_index(0)); } const_iterator end() const { return const_iterator(this, max_n); } iterator find(const key_type enum_idx) { const size_t i = static_cast<size_t>(enum_idx); ensure(i < capacity()); if (is_set.test(i)) { return iterator(this, i); } return end(); } const_iterator find(const key_type enum_idx) const { const size_t i = static_cast<size_t>(enum_idx); ensure(i < capacity()); if (is_set.test(i)) { return const_iterator(this, i); } return end(); } mapped_type& at(const key_type enum_idx) { const auto i = static_cast<size_t>(enum_idx); ensure(i < capacity()); ensure(is_set.test(i)); return raw[i]; } const mapped_type& at(const key_type enum_idx) const { const auto i = static_cast<size_t>(enum_idx); ensure(i < capacity()); ensure(is_set.test(i)); return raw[i]; } mapped_type& operator[](const key_type enum_idx) { const auto i = static_cast<size_t>(enum_idx); if (!is_set.test(i)) { is_set.set(i); } return raw[i]; } const mapped_type& operator[](const key_type enum_idx) const { return at(enum_idx); } constexpr size_t capacity() const { return raw.size(); } void clear() { for (auto& v : raw) { v.~mapped_type(); new (&v) mapped_type; } is_set = bitset_type(); } }; }
/**************************************************************** * * * Copyright 2001, 2013 Fidelity Information Services, Inc * * * * This source code contains the intellectual property * * of its copyright holder(s), and is made available * * under a license. If you do not know the terms of * * the license, please stop and do not read further. * * * ****************************************************************/ /* maintained in conjunction with table in deviceparameters */ typedef struct { char offset; char letter; }zshow_index; enum zshow_params { zshow_allo, zshow_bloc, zshow_command, zshow_conv, zshow_ctra, zshow_dele, zshow_dest, zshow_ebcd, zshow_edit, zshow_exce, zshow_exte, zshow_field, zshow_fil, zshow_fixed, zshow_follow, zshow_host, zshow_ichset, zshow_independent, zshow_inse, zshow_lab, zshow_leng, zshow_nocene, zshow_nodest, zshow_noecho, zshow_noedit, zshow_noesca, zshow_nofollow, zshow_nohost, zshow_noinse, zshow_nopast, zshow_noreads, zshow_nottsy, zshow_notype, zshow_nowrap, zshow_ochset, zshow_pad, zshow_parse, zshow_past, zshow_prmmbx, zshow_rchk, zshow_read, zshow_reads, zshow_rec, zshow_shar, zshow_shell, zshow_stderr, zshow_term, zshow_ttsy, zshow_type, zshow_uic, zshow_wait, zshow_wchk, zshow_width, zshow_write };
/* * retrieved_data.h * * */ #ifndef _OpenAPI_retrieved_data_H_ #define _OpenAPI_retrieved_data_H_ #include <string.h> #include "../external/cJSON.h" #include "../include/list.h" #include "../include/keyValuePair.h" #include "../include/binary.h" #include "small_data_rate_status.h" #ifdef __cplusplus extern "C" { #endif typedef struct OpenAPI_retrieved_data_s OpenAPI_retrieved_data_t; typedef struct OpenAPI_retrieved_data_s { struct OpenAPI_small_data_rate_status_s *small_data_rate_status; } OpenAPI_retrieved_data_t; OpenAPI_retrieved_data_t *OpenAPI_retrieved_data_create( OpenAPI_small_data_rate_status_t *small_data_rate_status ); void OpenAPI_retrieved_data_free(OpenAPI_retrieved_data_t *retrieved_data); OpenAPI_retrieved_data_t *OpenAPI_retrieved_data_parseFromJSON(cJSON *retrieved_dataJSON); cJSON *OpenAPI_retrieved_data_convertToJSON(OpenAPI_retrieved_data_t *retrieved_data); OpenAPI_retrieved_data_t *OpenAPI_retrieved_data_copy(OpenAPI_retrieved_data_t *dst, OpenAPI_retrieved_data_t *src); #ifdef __cplusplus } #endif #endif /* _OpenAPI_retrieved_data_H_ */
#ifndef SRC_LIB_MONGODRIVER_CONNECTIONOPERATIONS_H_ #define SRC_LIB_MONGODRIVER_CONNECTIONOPERATIONS_H_ /* * * Copyright 2020 Telefonica Investigacion y Desarrollo, S.A.U * * This file is part of Orion Context Broker. * * Orion Context Broker 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. * * Orion Context Broker 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 Orion Context Broker. If not, see http://www.gnu.org/licenses/. * * For those usages not covered by this license please contact with * iot_support at tid dot es * * Author: Fermín Galán */ #include <string> #include "mongoDriver/DBConnection.h" #include "mongoDriver/DBCursor.h" #include "mongoDriver/BSONObj.h" #include "mongoDriver/BSONArray.h" namespace orion { /* **************************************************************************** * * orion::collectionQuery - */ extern bool collectionQuery ( const DBConnection& connection, const std::string& db, const std::string& col, const BSONObj& q , DBCursor* cursor, std::string* err ); /* **************************************************************************** * * orion::collectionRangedQuery - */ extern bool collectionRangedQuery ( const DBConnection& connection, const std::string& db, const std::string& col, const BSONObj& q, const BSONObj& sort, int limit, int offset, DBCursor* cursor, long long* count, std::string* err ); /* **************************************************************************** * * orion::collectionCount - */ extern bool collectionCount ( const std::string& db, const std::string& col, const BSONObj& q, unsigned long long* c, std::string* err ); /* **************************************************************************** * * orion::collectionFindOne - */ extern bool collectionFindOne ( const std::string& db, const std::string& col, const BSONObj& q, BSONObj* doc, std::string* err ); /* **************************************************************************** * * orion::collectionFindAndModify - */ extern bool collectionFindAndModify ( const std::string& db, const std::string& col, const BSONObj& q, const BSONObj& doc, bool _new, BSONObj* reply, std::string* err ); /* **************************************************************************** * * orion::collectionInsert - */ extern bool collectionInsert ( const std::string& db, const std::string& col, const BSONObj& doc, std::string* err ); /* **************************************************************************** * * orion::collectionUpdate - */ extern bool collectionUpdate ( const std::string& db, const std::string& col, const BSONObj& q, const BSONObj& doc, bool upsert, std::string* err ); /* **************************************************************************** * * orion::collectionRemove - */ extern bool collectionRemove ( const std::string& db, const std::string& col, const BSONObj& q, std::string* err ); /* **************************************************************************** * * orion::collectionCreateIndex - */ extern bool collectionCreateIndex ( const std::string& db, const std::string& col, const std::string& name, const BSONObj& indexes, const bool& isTTL, std::string* err ); /* **************************************************************************** * * orion::collectionAggregate - */ extern bool collectionAggregate ( const DBConnection& connection, const std::string& db, const std::string& col, const BSONArray& pipeline, unsigned int batchSize, DBCursor* cursor, std::string* err ); /* **************************************************************************** * * runDatabaseCommand - * */ extern bool runDatabaseCommand ( const std::string& db, const BSONObj& command, BSONObj* result, std::string* err ); /* **************************************************************************** * * orion::runCollectionCommand - * * Currently this operation doesn't have any use from outside mongoDriver. * However, we keep in the .h as part of mongoDriver API because makes sense * as collection operation. */ extern bool runCollectionCommand ( const std::string& db, const std::string& col, const BSONObj& command, BSONObj* result, std::string* err ); } #endif // SRC_LIB_MONGODRIVER_CONNECTIONOPERATIONS_H_
/** ****************************************************************************** * @file USB_Device/CDC_Standalone/Inc/stm32f4xx_it.h * @author MCD Application Team * @version V1.3.3 * @date 29-January-2016 * @brief This file contains the headers of the interrupt handlers. ****************************************************************************** * @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. * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F4xx_IT_H #define __STM32F4xx_IT_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void NMI_Handler(void); void HardFault_Handler(void); void MemManage_Handler(void); void BusFault_Handler(void); void UsageFault_Handler(void); void SVC_Handler(void); void DebugMon_Handler(void); void PendSV_Handler(void); void SysTick_Handler(void); #ifdef USE_USB_FS void OTG_FS_IRQHandler(void); #else void OTG_HS_IRQHandler(void); #endif void USARTx_DMA_TX_IRQHandler(void); void USARTx_IRQHandler(void); void TIMx_IRQHandler(void); #ifdef __cplusplus } #endif #endif /* __STM32F4xx_IT_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
// // ViewController.h // scc // // Created by qing on 15/6/25. // Copyright (c) 2015年 qing. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewController : UIViewController @property (weak, nonatomic) IBOutlet UIScrollView *scc; @property (weak, nonatomic) IBOutlet UILabel *n1; @property (weak, nonatomic) IBOutlet UILabel *n2; @property (weak, nonatomic) IBOutlet UILabel *n3; @property (weak, nonatomic) IBOutlet UILabel *n4; @property (weak, nonatomic) IBOutlet UILabel *n5; @end
#ifndef PACKETMODELABSTRACT_H #define PACKETMODELABSTRACT_H #include <QAbstractTableModel> #include <QStringList> #include <QList> #include <QMap> #include <QPair> #include <QItemSelection> #include <transformabstract.h> #include <QSharedPointer> #include <pipelinecommon.h> using namespace Pip3lineCommon; class TransformRequest; class TransformMgmt; class PacketModelAbstract : public QAbstractTableModel { Q_OBJECT public: enum HARDCODED_COLUMN_INDEXES { COLUMN_DIRECTION = 0, COLUMN_TIMESPTAMP = 1, COLUMN_PAYLOAD = 2, COLUMN_COMMENT = 3, COLUMN_CID = 4, COLUMN_LENGTH = 5, COLUMN_INVALID = -1 }; static const QString COLUMN_DIRECTION_STR; static const QString COLUMN_TIMESPTAMP_STR; static const QString COLUMN_PAYLOAD_STR; static const QString COLUMN_COMMENT_STR; static const QString COLUMN_CID_STR; static const QString COLUMN_LENGTH_STR; static const int DEFAULT_MAX_PAYLOAD_DISPLAY_SIZE; static const int MAX_PAYLOAD_DISPLAY_SIZE_MIN_VAL; static const int MAX_PAYLOAD_DISPLAY_SIZE_MAX_VAL; static const qint64 INVALID_POS; PacketModelAbstract(TransformMgmt *transformFactory, QObject *parent = nullptr); virtual ~PacketModelAbstract(); virtual QStringList getColumnNames() const; virtual void setColumnNames(const QStringList &value); virtual int columnCount(const QModelIndex &parent = QModelIndex()) const; virtual QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; virtual QVariant payloadData(const QSharedPointer<Packet> packet, int column, int role) const; virtual QSharedPointer<Packet> getPacket(qint64 index) = 0; virtual QSharedPointer<Packet> getPreviousPacket(qint64 index, Packet::Direction direction = Packet::NODIRECTION) = 0; virtual QSharedPointer<Packet> getPacket(const QModelIndex & index); virtual qint64 indexToPacketIndex(const QModelIndex & index); virtual void removePacket(qint64 index) = 0; virtual void removePackets(QList<qint64> &index) = 0; virtual qint64 merge(QList<qint64> &list) = 0; virtual qint64 size() const = 0 ; QModelIndex createIndex ( int row, int column) const; virtual QItemSelection getLastPacketRow() = 0; void addUserColumn(const QString &name, TransformAbstract * transform, OutputFormat outFormat); QWidget *getGuiForUserColumn(const QString &name, QWidget *parent = nullptr); QWidget *getGuiForUserColumn(int index, QWidget *parent = nullptr); TransformAbstract *getTransform(const QString &columnName); TransformAbstract *getTransform(int index); void setColumnFormat(int index, Pip3lineConst::OutputFormat format); void setColumnFormat(const QString &columnName, Pip3lineConst::OutputFormat format); Pip3lineConst::OutputFormat getColumnFormat(int index); Pip3lineConst::OutputFormat getColumnFormat(const QString &columnName); QString getColumnName(int index); void removeUserColumn(const QString &name); void removeUserColumn(const int &index); void clearUserColumns(); bool isUserColumn(const QString &name) const; bool isUserColumn(int column) const; bool isDefaultColumn(const QString &name) const; bool isDefaultColumn(int column) const; int getColumnIndex(const QString &name); virtual void clearAdditionalField(const QString &name) = 0; bool isAutoMergeConsecutivePackets() const; int getMaxPayloadDisplaySize() const; int getDefaultWidthForColumn(const int &col); signals: void updated(); void columnsUpdated(); void sendRequest(TransformRequest *); void readOnlyStateChanged(bool readonly); void log(QString message, QString source, Pip3lineConst::LOGLEVEL level); public slots: virtual qint64 addPacket(const QSharedPointer<Packet> &packet) = 0; virtual qint64 addPackets(const QList<QSharedPointer<Packet> > &packets) = 0; virtual void mergeConsecutivePackets() = 0; virtual void clear() = 0; virtual void refreshAllColumn(); void setAutoMergeConsecutivePackets(bool value); void setMaxPayloadDisplaySize(int value); protected slots: virtual void transformRequestFinished(QList<QByteArray> dataList, Messages messages) = 0; virtual void transformUpdated() = 0; virtual void refreshColumn(const QString colName) = 0; virtual void onRowsInserted(const QModelIndex & parent, int start, int end); protected: struct Usercolumn { Usercolumn() : transform(nullptr), format(Pip3lineConst::TEXTFORMAT) {} TransformAbstract * transform; OutputFormat format; }; enum DEFAULT_COLUMN_WIDTH { TIMESTAMP_COLUMN_WIDTH = 150, DIRECTION_COLUMN_WIDTH = 25, LENGTH_COLUMN_WIDTH = 40, CID_COLUMN_WIDTH = 50, RAWDATA_COLUMN_WIDTH = 200 }; virtual void internalAddUserColumn(const QString &name, TransformAbstract * transform) = 0; virtual void launchUpdate(TransformAbstract * transform, int row, int column,int length = -1) = 0; void resetColumnNames(); static const QString TRUNCATED_STR; QStringList columnNames; static const QString DEFAULT_DATETIME_FORMAT; QString dateTimeFormat; QHash<QString, Usercolumn> userColumnsDef; QHash<quintptr, QPair<int, int> > transformRequests; TransformMgmt *transformFactory; bool autoMergeConsecutivePackets; int lastPredefinedColumn; int maxPayloadDisplaySize; private: Q_DISABLE_COPY(PacketModelAbstract) }; #endif // PACKETMODELABSTRACT_H
/***************************************************************************//** * @file em_chip.h * @brief Chip Initialization API * @version 3.20.6 ******************************************************************************* * @section License * <b>(C) Copyright 2014 Silicon Labs, http://www.silabs.com</b> ******************************************************************************* * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no * obligation to support this Software. Silicon Labs is providing the * Software "AS IS", with no express or implied warranties of any kind, * including, but not limited to, any implied warranties of merchantability * or fitness for any particular purpose or warranties against infringement * of any proprietary rights of a third party. * * Silicon Labs will not be liable for any consequential, incidental, or * special damages, or any other relief, or for any claim by any third party, * arising from your use of this Software. * ******************************************************************************/ #ifndef __EM_CHIP_H #define __EM_CHIP_H #include "em_device.h" #include "em_system.h" #ifdef __cplusplus extern "C" { #endif /***************************************************************************//** * @addtogroup EM_Library * @{ ******************************************************************************/ /***************************************************************************//** * @addtogroup CHIP * @brief Chip Initialization API * @{ ******************************************************************************/ /**************************************************************************//** * @brief * Chip initialization routine for revision errata workarounds * * This init function will configure the EFM32 device to a state where it is * as similar as later revisions as possible, to improve software compatibility * with newer parts. See the device specific errata for details. *****************************************************************************/ __STATIC_INLINE void CHIP_Init(void) { #if defined(_EFM32_GECKO_FAMILY) uint32_t rev; SYSTEM_ChipRevision_TypeDef chipRev; volatile uint32_t *reg; rev = *(volatile uint32_t *)(0x0FE081FC); /* Engineering Sample calibration setup */ if ((rev >> 24) == 0) { reg = (volatile uint32_t *)0x400CA00C; *reg &= ~(0x70UL); /* DREG */ reg = (volatile uint32_t *)0x400C6020; *reg &= ~(0xE0000000UL); *reg |= ~(7UL << 25); } if ((rev >> 24) <= 3) { /* DREG */ reg = (volatile uint32_t *)0x400C6020; *reg &= ~(0x00001F80UL); /* Update CMU reset values */ reg = (volatile uint32_t *)0x400C8040; *reg = 0; reg = (volatile uint32_t *)0x400C8044; *reg = 0; reg = (volatile uint32_t *)0x400C8058; *reg = 0; reg = (volatile uint32_t *)0x400C8060; *reg = 0; reg = (volatile uint32_t *)0x400C8078; *reg = 0; } SYSTEM_ChipRevisionGet(&chipRev); if (chipRev.major == 0x01) { /* Rev A errata handling for EM2/3. Must enable DMA clock in order for EM2/3 */ /* to work. This will be fixed in later chip revisions, so only do for rev A. */ if (chipRev.minor == 00) { reg = (volatile uint32_t *)0x400C8040; *reg |= 0x2; } /* Rev A+B errata handling for I2C when using EM2/3. USART0 clock must be enabled */ /* after waking up from EM2/EM3 in order for I2C to work. This will be fixed in */ /* later chip revisions, so only do for rev A+B. */ if (chipRev.minor <= 0x01) { reg = (volatile uint32_t *)0x400C8044; *reg |= 0x1; } } /* Ensure correct ADC/DAC calibration value */ rev = *(volatile uint32_t *)0x0FE081F0; if (rev < 0x4C8ABA00) { uint32_t cal; /* Enable ADC/DAC clocks */ reg = (volatile uint32_t *)0x400C8044UL; *reg |= (1 << 14 | 1 << 11); /* Retrive calibration values */ cal = ((*(volatile uint32_t *)(0x0FE081B4UL) & 0x00007F00UL) >> 8) << 24; cal |= ((*(volatile uint32_t *)(0x0FE081B4UL) & 0x0000007FUL) >> 0) << 16; cal |= ((*(volatile uint32_t *)(0x0FE081B4UL) & 0x00007F00UL) >> 8) << 8; cal |= ((*(volatile uint32_t *)(0x0FE081B4UL) & 0x0000007FUL) >> 0) << 0; /* ADC0->CAL = 1.25 reference */ reg = (volatile uint32_t *)0x40002034UL; *reg = cal; /* DAC0->CAL = 1.25 reference */ reg = (volatile uint32_t *)(0x4000402CUL); cal = *(volatile uint32_t *)0x0FE081C8UL; *reg = cal; /* Turn off ADC/DAC clocks */ reg = (volatile uint32_t *)0x400C8044UL; *reg &= ~(1 << 14 | 1 << 11); } #endif #if defined(_EFM32_GIANT_FAMILY) uint32_t rev; SYSTEM_ChipRevision_TypeDef chipRev; rev = *(volatile uint32_t *)(0x0FE081FC); SYSTEM_ChipRevisionGet(&chipRev); if (((rev >> 24) > 15) && (chipRev.minor == 3)) { /* This fixes an issue with the LFXO on high temperatures. */ *(volatile uint32_t*)0x400C80C0 = ( *(volatile uint32_t*)0x400C80C0 & ~(1<<6) ) | (1<<4); } #endif } /** @} (end addtogroup CHIP) */ /** @} (end addtogroup EM_Library) */ #ifdef __cplusplus } #endif #endif /* __EM_CHIP_H */
/**************************************************************************** * Copyright (C) 2014-2019 Jaroslaw Stanczyk <jaroslaw.stanczyk@upwr.edu.pl>* * The source code presented on my lectures: "C Programming Language" * ****************************************************************************/ #include <stdio.h> char *dane = "\n\ żyj, aby zrywać łańcuchy głuchych ciężkich dni\n \ i nagle płynąć, i myśleć, że się tylko śni\n \ błądź wśród obłoków marzeń z tą nadzieją, że\n \ po tobie przyjdą inni i rozgrzeszą cię\n\n"; int main (void) { printf ("%s", dane); return 0; } /* eof. */
// // Created by horacio on 3/19/17. // #ifndef DAKARASERVER_DOTIOCHARINITIALIZER_H #define DAKARASERVER_DOTIOCHARINITIALIZER_H void updateInventory(int UserIndex); #endif //DAKARASERVER_DOTIOCHARINITIALIZER_H
/* Support for fixing grammar files. Copyright (C) 2019-2020 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "bison.h" #pragma hdrstop //#include <progname.h> struct fixit { Location location; char * fix; }; gl_list_t fixits = NULL; // @global static fixit * fixit_new(Location const * loc, char const* fix) { fixit * res = (fixit *)xmalloc(sizeof *res); res->location = *loc; res->fix = xstrdup(fix); return res; } static int fixit_cmp(const fixit * a, const fixit * b) { return location_cmp(a->location, b->location); } static void fixit_free(fixit * f) { SAlloc::F(f->fix); SAlloc::F(f); } /* GCC and Clang follow the same pattern. https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html http://clang.llvm.org/docs/UsersManual.html#cmdoption-fdiagnostics-parseable-fixits */ static void fixit_print(fixit const * f, FILE * out) { fprintf(out, "fix-it:%s:{%d:%d-%d:%d}:%s\n", quotearg_n_style(1, c_quoting_style, f->location.start.file), f->location.start.line, f->location.start.byte, f->location.end.line, f->location.end.byte, quotearg_n_style(2, c_quoting_style, f->fix)); } void fixits_register(Location const * loc, char const* fix) { if(!fixits) fixits = gl_list_create_empty(GL_ARRAY_LIST, /* equals */ NULL, /* hashcode */ NULL, (gl_listelement_dispose_fn)fixit_free, true); fixit * f = fixit_new(loc, fix); gl_sortedlist_add(fixits, (gl_listelement_compar_fn)fixit_cmp, f); if(feature_flag & feature_fixit) fixit_print(f, stderr); } bool fixits_empty() { return !fixits; } void fixits_run() { if(!fixits) return; /* This is not unlike what is done in location_caret. */ uniqstr input = ((fixit*)gl_list_get_at(fixits, 0))->location.start.file; /* Backup the file. */ char buf[256]; size_t len = sizeof(buf); char * backup = asnprintf(buf, &len, "%s~", input); if(!backup) xalloc_die(); if(rename(input, backup)) error(EXIT_FAILURE, get_errno(), _("%s: cannot backup"), quotearg_colon(input)); FILE * in = xfopen(backup, "r"); FILE * out = xfopen(input, "w"); size_t line = 1; size_t offset = 1; void const * p = NULL; gl_list_iterator_t iter = gl_list_iterator(fixits); while(gl_list_iterator_next(&iter, &p, NULL)) { fixit const * f = (fixit const * )p; /* Look for the correct line. */ while((int)line < f->location.start.line) { int c = getc(in); if(c == EOF) break; if(c == '\n') { ++line; offset = 1; } putc(c, out); } /* Look for the right offset. */ bool need_eol = false; while((int)offset < f->location.start.byte) { int c = getc(in); if(c == EOF) break; ++offset; if(c == '\n') /* The position we are asked for is beyond the actual line: pad with spaces, and remember we need a \n. */ need_eol = true; putc(need_eol ? ' ' : c, out); } /* Paste the fix instead. */ fputs(f->fix, out); /* Maybe install the eol afterwards. */ if(need_eol) putc('\n', out); /* Skip the bad input. */ while((int)line < f->location.end.line) { int c = getc(in); if(c == EOF) break; if(c == '\n') { ++line; offset = 1; } } while((int)offset < f->location.end.byte) { int c = getc(in); if(c == EOF) break; ++offset; } /* If erasing the content of a full line, also remove the end-of-line. */ if(f->fix[0] == 0 && f->location.start.byte == 1) { int c = getc(in); if(c == EOF) break; else if(c == '\n') { ++line; offset = 1; } else ungetc(c, in); } } /* Paste the rest of the file. */ { int c; while((c = getc(in)) != EOF) putc(c, out); } gl_list_iterator_free(&iter); xfclose(out); xfclose(in); slfprintf_stderr("%s: file %s was updated (backup: %s)\n", get_program_name(), quote_n(0, input), quote_n(1, backup)); if(backup != buf) SAlloc::F(backup); } /* Free the registered fixits. */ void fixits_free() { if(fixits) { gl_list_free(fixits); fixits = NULL; } }
/* * File: SensorPin.h * Author: mat * * Created on 22 August 2013, 19:36 */ #pragma once #include "Brewpi.h" #include "Board.h" class DigitalPinSensor final : public SwitchSensor { private: bool invert; uint8_t pin; public: DigitalPinSensor(uint8_t pin, bool invert) { pinMode(pin, USE_INTERNAL_PULL_UP_RESISTORS ? INPUT_PULLUP : INPUT); this->invert = invert; this->pin = pin; } virtual bool sense() override final{ return digitalRead(pin) ^ invert; } };
/** Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Roland Olbricht et al. * * 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__OUTPUT_FORMATS__OUTPUT_JSON_H #define DE__OSM3S___OVERPASS_API__OUTPUT_FORMATS__OUTPUT_JSON_H #include "../core/datatypes.h" #include "../core/geometry.h" #include "../frontend/output_handler.h" #include <string> #include <vector> class Output_JSON : public Output_Handler { public: Output_JSON() : padding(""), first_elem(true) {} bool write_http_headers() override; void write_payload_header(const std::string& db_dir, const std::string& timestamp, const std::string& area_timestamp) override; void write_footer() override; void display_remark(const std::string& text) override; void display_error(const std::string& text) override; void print_global_bbox(const Bbox_Double& bbox) override {} void print_item(const Node_Skeleton& skel, const Opaque_Geometry& geometry, const std::vector< std::pair< std::string, std::string > >* tags, const OSM_Element_Metadata_Skeleton< Node::Id_Type >* meta, const std::map< uint32, std::string >* users, Output_Mode mode, const Feature_Action& action = keep, const Node_Skeleton* new_skel = 0, const Opaque_Geometry* new_geometry = 0, const std::vector< std::pair< std::string, std::string > >* new_tags = 0, const OSM_Element_Metadata_Skeleton< Node::Id_Type >* new_meta = 0) override; void print_item(const Way_Skeleton& skel, const Opaque_Geometry& geometry, const std::vector< std::pair< std::string, std::string > >* tags, const OSM_Element_Metadata_Skeleton< Way::Id_Type >* meta, const std::map< uint32, std::string >* users, Output_Mode mode, const Feature_Action& action = keep, const Way_Skeleton* new_skel = 0, const Opaque_Geometry* new_geometry = 0, const std::vector< std::pair< std::string, std::string > >* new_tags = 0, const OSM_Element_Metadata_Skeleton< Way::Id_Type >* new_meta = 0) override; void print_item(const Relation_Skeleton& skel, const Opaque_Geometry& geometry, const std::vector< std::pair< std::string, std::string > >* tags, const OSM_Element_Metadata_Skeleton< Relation::Id_Type >* meta, const std::map< uint32, std::string >* roles, const std::map< uint32, std::string >* users, Output_Mode mode, const Feature_Action& action = keep, const Relation_Skeleton* new_skel = 0, const Opaque_Geometry* new_geometry = 0, const std::vector< std::pair< std::string, std::string > >* new_tags = 0, const OSM_Element_Metadata_Skeleton< Relation::Id_Type >* new_meta = 0) override; void print_item(const Derived_Skeleton& skel, const Opaque_Geometry& geometry, const std::vector< std::pair< std::string, std::string > >* tags, Output_Mode mode, const Feature_Action& action = keep) override; private: std::string padding; std::string messages; mutable bool first_elem; }; #endif
// // CourtesyStyleTableViewController.h // Courtesy // // Created by Zheng on 5/3/16. // Copyright © 2016 82Flex. All rights reserved. // #import <UIKit/UIKit.h> @interface CourtesyStyleTableViewController : UITableViewController @end
/* * Generated by util/mkerr.pl DO NOT EDIT * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #ifndef OPENSSL_CMPERR_H # define OPENSSL_CMPERR_H # include <openssl/opensslconf.h> # include <openssl/symhacks.h> # include <openssl/opensslconf.h> # ifndef OPENSSL_NO_CMP # ifdef __cplusplus extern "C" # endif int ERR_load_CMP_strings(void); /* * CMP function codes. */ # if !OPENSSL_API_3 # endif /* * CMP reason codes. */ # define CMP_R_INVALID_ARGS 100 # define CMP_R_MULTIPLE_SAN_SOURCES 102 # define CMP_R_NO_STDIO 194 # define CMP_R_NULL_ARGUMENT 103 # endif #endif
#define STRINGIZE2(s) #s #define STRINGIZE(s) STRINGIZE2(s) #define VERSION_MAJOR 4 #define VERSION_MINOR 14 #define VERSION_REVISION 0 #define VERSION_BUILD 31 #define VER_FILE_DESCRIPTION_STR "The PCILeech Direct Memory Access Attack Toolkit" #define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD #define VER_FILE_VERSION_STR STRINGIZE(VERSION_MAJOR) \ "." STRINGIZE(VERSION_MINOR) \ "." STRINGIZE(VERSION_REVISION) \ "." STRINGIZE(VERSION_BUILD) \ #define VER_COMPANY_NAME_STR "" #define VER_PRODUCTNAME_STR "PCILeech" #define VER_PRODUCT_VERSION VER_FILE_VERSION #define VER_PRODUCT_VERSION_STR VER_FILE_VERSION_STR #define VER_ORIGINAL_FILENAME_STR VER_PRODUCTNAME_STR ".exe" #define VER_INTERNAL_NAME_STR VER_ORIGINAL_FILENAME_STR #define VER_COPYRIGHT_STR "Copyright (c) Ulf Frisk 2016-2020"
/* $Id: lxparam.c,v 1.27 2006/02/16 23:07:14 smilcke Exp $ */ /* * lxparam.c * Autor: Stefan Milcke * Erstellt am: 10.12.2001 * Letzte Aenderung am: 05.02.2006 * */ #include <lxcommon.h> #include <devrp.h> #include <linux/string.h> #include <linux/module.h> #include <lxapilib.h> #include <lxdaemon.h> #define MAX_PARM_LENGTH 256 int lx_do_verbose=0; int lx_verbose_modulelist=0; static char PARM_LENGTH_ERROR[]="LXAPI32: Parameter to long: "; static char PARM_UNKNOWN[]="LXAPI32: Unknown parameter: "; static char PARM_MALLOC_ERROR[]="LXAPI32: Memory allocation error\r\n"; static char CRLF[]="\r\n"; extern char lx_drv_homepath[]; char *drvparams=0; extern int lx_do_last_startup_check; static char *parmList[]= { "/3", "/VM", "/V", "/NOSTARTCHECK" }; static int numParms=sizeof(parmList)/sizeof(char *); //------------------------------- LX_load_module ------------------------------- int LX_load_module(char *moduleName) { int rc=0; if(moduleName) rc=0; return rc; } extern void LX_WriteString(const char *str); extern int testfn(int testval); //---------------------------------- parseArg ---------------------------------- int LX_parseArg(char* arg) { int i; for(i=0;i<numParms;i++) { if(!strncmp(arg,parmList[i],strlen(parmList[i]))) { switch(i) { case 0: DevInt3(); break; case 1: lx_verbose_modulelist=1; case 2: lx_do_verbose=1; break; case 3: lx_do_last_startup_check=0; break; } break; } } if(i>=numParms) { LX_WriteString(PARM_UNKNOWN); LX_WriteString(arg); LX_WriteString(CRLF); return 1; } return 0; } //--------------------------------- parseArgs ---------------------------------- void LX_parseArgs(struct LX_RP* prp) { char *args; char *carg; char *p; char *sl=NULL; int i; carg=(char*)kmalloc(MAX_PARM_LENGTH,GFP_KERNEL); if(carg) { if(0==DevVirtToLin(SELECTOROF(prp->RPBODY.RPINITIN.Args) ,OFFSETOF(prp->RPBODY.RPINITIN.Args) ,(LINEAR*)&args)) { // Remove leading blanks while(*args && *args==' ') args++; // skip device=... statement while storing the path into lx_drv_homepath p=lx_drv_homepath; while(*args && *args!=' ') { *p=*args++; if(*p=='\\') sl=p; p++; } if(sl) *++sl=(char)0; drvparams=args; while(*args) { p=carg; while(*args && *args==' ') args++; i=0; while(*args && *args!=' ' && i<MAX_PARM_LENGTH-1) { *p++=*args++; i++; } if(i>=MAX_PARM_LENGTH-1) { carg[MAX_PARM_LENGTH-1]=(char)0; LX_WriteString(PARM_LENGTH_ERROR); LX_WriteString(carg); LX_WriteString(CRLF); } else { *p=(char)0; if(strlen(carg)) if(LX_parseArg(carg)) break; } } } kfree(carg); } else LX_WriteString(PARM_MALLOC_ERROR); }
/* * This file is part of telepathy-accounts-kcm * * Copyright (C) 2011 Lasse Liehu <lliehu@kolumbus.fi> * * 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 St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef KCMTELEPATHYACCOUNTS_PLUGIN_IDLE_ACCOUNT_MAIN_PARAMETERS_WIDGET_H #define KCMTELEPATHYACCOUNTS_PLUGIN_IDLE_ACCOUNT_MAIN_PARAMETERS_WIDGET_H #include "ui_main-options-widget.h" #include <KCMTelepathyAccounts/AbstractAccountParametersWidget> class MainOptionsWidget : public AbstractAccountParametersWidget { Q_OBJECT public: explicit MainOptionsWidget(ParameterEditModel *model, QWidget *parent = nullptr); ~MainOptionsWidget() override; QString defaultDisplayName() const override; private: Q_DISABLE_COPY(MainOptionsWidget) Ui::MainOptionsWidget *m_ui; }; #endif // header guard
/**************************************************************************** ** ** 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 Qt Mobility Components. ** ** $QT_BEGIN_LICENSE:LGPL$ ** 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. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at qt-sales@nokia.com. ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef ORGANIZERTODOTIMETRANSFORM_H_ #define ORGANIZERTODOTIMETRANSFORM_H_ #include "organizeritemdetailtransform.h" class OrganizerTodoTimeTransform : public OrganizerItemDetailTransform { public: void transformToDetailL(const CCalEntry& entry, QOrganizerItem *item); void transformToDetailL(const CCalInstance& instance, QOrganizerItem *itemOccurrence); void transformToEntryL(const QOrganizerItem& item, CCalEntry* entry); QString detailDefinitionName(); }; #endif /* ORGANIZERTODOTIMETRANSFORM_H_ */
#include "llvm/Config/llvm-config.h" #ifdef HAS_GL_EGL #include "EGL/egl.h" #include "EGL/eglext.h" #endif #include "cl_platform_id.h" #include "cl_device_id.h" #include "cl_internals.h" #include "CL/cl.h" #include "cl_utils.h" #include <stdlib.h> #include <string.h> #include <assert.h> /* This extension should be common for all the intel GPU platform. Every device may have its own additional externsions. */ static struct cl_extensions intel_platform_extensions = { { #define DECL_EXT(name) \ {(struct cl_extension_base){.ext_id = cl_##name##_ext_id, .ext_name = "cl_" #name, .ext_enabled = 0}}, DECL_ALL_EXTENSIONS }, #undef DECL_EXT {""} }; void check_basic_extension(cl_extensions_t *extensions) { int id; for(id = BASE_EXT_START_ID; id <= BASE_EXT_END_ID; id++) if (id != EXT_ID(khr_fp64)) extensions->extensions[id].base.ext_enabled = 1; } void check_opt1_extension(cl_extensions_t *extensions) { int id; for(id = OPT1_EXT_START_ID; id <= OPT1_EXT_END_ID; id++) { if (id == EXT_ID(khr_icd)) extensions->extensions[id].base.ext_enabled = 1; #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 35 if (id == EXT_ID(khr_spir)) extensions->extensions[id].base.ext_enabled = 1; #endif if (id == EXT_ID(khr_image2d_from_buffer)) extensions->extensions[id].base.ext_enabled = 1; if (id == EXT_ID(khr_3d_image_writes)) extensions->extensions[id].base.ext_enabled = 1; } } void check_gl_extension(cl_extensions_t *extensions) { #if defined(HAS_GL_EGL) int id; /* For now, we only support cl_khr_gl_sharing. */ for(id = GL_EXT_START_ID; id <= GL_EXT_END_ID; id++) if (id == EXT_ID(khr_gl_sharing)) extensions->extensions[id].base.ext_enabled = 1; #endif } void check_intel_extension(cl_extensions_t *extensions) { int id; for(id = INTEL_EXT_START_ID; id <= INTEL_EXT_END_ID; id++) { if(id != EXT_ID(intel_motion_estimation) && id != EXT_ID(intel_device_side_avc_motion_estimation)) extensions->extensions[id].base.ext_enabled = 1; if(id == EXT_ID(intel_required_subgroup_size)) #if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR > 40 extensions->extensions[id].base.ext_enabled = 1; #else extensions->extensions[id].base.ext_enabled = 0; #endif } } void process_extension_str(cl_extensions_t *extensions) { int str_max = sizeof(extensions->ext_str); int str_offset = 0; int id; memset(extensions->ext_str, 0, sizeof(extensions->ext_str)); for(id = 0; id < cl_khr_extension_id_max; id++) { if (extensions->extensions[id].base.ext_enabled) { int copy_len; char *ext_name = extensions->extensions[id].base.ext_name; if (str_offset + 1 >= str_max) return; if (str_offset != 0) extensions->ext_str[str_offset - 1] = ' '; copy_len = (strlen(ext_name) + 1 + str_offset) < str_max ? (strlen(ext_name) + 1) : (str_max - str_offset - 1); strncpy(&extensions->ext_str[str_offset], extensions->extensions[id].base.ext_name, copy_len); str_offset += copy_len; } } } LOCAL void cl_intel_platform_get_default_extension(cl_device_id device) { cl_platform_id pf = device->platform; memcpy((char*)device->extensions, pf->internal_extensions->ext_str, sizeof(device->extensions)); device->extensions_sz = strlen(pf->internal_extensions->ext_str) + 1; } LOCAL void cl_intel_platform_enable_extension(cl_device_id device, uint32_t ext) { int id; char* ext_str = NULL; cl_platform_id pf = device->platform; assert(pf); for(id = BASE_EXT_START_ID; id < cl_khr_extension_id_max; id++) { if (id == ext) { if (!pf->internal_extensions->extensions[id].base.ext_enabled) ext_str = pf->internal_extensions->extensions[id].base.ext_name; break; } } /* already enabled, skip. */ if (ext_str && strstr(device->extensions, ext_str)) ext_str = NULL; if (ext_str) { if (device->extensions_sz <= 1) { memcpy((char*)device->extensions, ext_str, strlen(ext_str)); device->extensions_sz = strlen(ext_str) + 1; } else { assert(device->extensions_sz + 1 + strlen(ext_str) < EXTENSTION_LENGTH); *(char*)(device->extensions + device->extensions_sz - 1) = ' '; memcpy((char*)device->extensions + device->extensions_sz, ext_str, strlen(ext_str)); device->extensions_sz = device->extensions_sz + strlen(ext_str) + 1; } *(char*)(device->extensions + device->extensions_sz - 1) = 0; } } LOCAL void cl_intel_platform_extension_init(cl_platform_id intel_platform) { static int ext_initialized = 0; /* The EXT should be only inited once. */ (void) ext_initialized; assert(!ext_initialized); check_basic_extension(&intel_platform_extensions); check_opt1_extension(&intel_platform_extensions); check_gl_extension(&intel_platform_extensions); check_intel_extension(&intel_platform_extensions); process_extension_str(&intel_platform_extensions); ext_initialized = 1; intel_platform->internal_extensions = &intel_platform_extensions; intel_platform->extensions = intel_platform_extensions.ext_str; intel_platform->extensions_sz = strlen(intel_platform->extensions) + 1; return; }
/* StarPU --- Runtime system for heterogeneous multicore architectures. * * Copyright (C) 2010,2011 University of Bordeaux * * StarPU 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. * * StarPU 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 in COPYING.LGPL for more details. */ #include "socl.h" int starpu_worker_get_range_by_id(int id) { int i, oid = 0; for (i=0; i<id; i++) if (starpu_worker_get_type(i) == STARPU_OPENCL_WORKER) oid++; return oid; } int starpu_worker_get_range() { int id = starpu_worker_get_id(); return starpu_worker_get_range_by_id(id); } void * memdupa(const void *p, size_t size) { void * s = malloc(size); memcpy(s,p,size); return s; } void ** memdup_deep_safea(const void **p, unsigned n, size_t size) { void ** s = (void**)malloc(sizeof(void*) * n); unsigned i; for (i=0; i<n; i++) { s[i] = memdup_safe((void*)p[i], size); } return s; } void ** memdup_deep_varsize_safea(const void **p, unsigned n, size_t * size) { void ** s = (void**)malloc(sizeof(void*) * n); unsigned i; for (i=0; i<n; i++) { s[i] = memdup_safe((void*)p[i], size[i]); } return s; } cl_ulong _socl_nanotime() { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); return (ts.tv_sec * 1e9 + ts.tv_nsec); }
#pragma once #include "Kernel.h" class GammaHeatSource : public Kernel { public: GammaHeatSource(const InputParameters & parameters); static InputParameters validParams(); protected: virtual Real computeQpResidual() override; virtual Real computeQpJacobian() override; const PostprocessorValue & _average_fission_heat; const Function & _gamma; };
/**************************************************************************** ** ** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef DRAGWIDGET_H #define DRAGWIDGET_H #include <QWidget> QT_BEGIN_NAMESPACE class QDragEnterEvent; class QDropEvent; QT_END_NAMESPACE //! [0] class DragWidget : public QWidget { public: DragWidget(QWidget *parent = 0); protected: void dragEnterEvent(QDragEnterEvent *event); void dragMoveEvent(QDragMoveEvent *event); void dropEvent(QDropEvent *event); void mousePressEvent(QMouseEvent *event); }; //! [0] #endif
// // libavg - Media Playback Engine. // Copyright (C) 2003-2014 Ulrich von Zadow // // 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 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 // // Current versions can be found at www.libavg.de // #ifndef _NullFXNode_H_ #define _NullFXNode_H_ #include "../api.h" #include "FXNode.h" #include "../graphics/GPUNullFilter.h" #include <boost/shared_ptr.hpp> namespace avg { class AVG_API NullFXNode: public FXNode { public: NullFXNode(); virtual ~NullFXNode(); virtual void connect(); virtual void disconnect(); private: virtual GPUFilterPtr createFilter(const IntPoint& size); GPUNullFilterPtr m_pFilter; }; typedef boost::shared_ptr<NullFXNode> NullFXNodePtr; } #endif
#ifndef __CR_FDINFO_H__ #define __CR_FDINFO_H__ #include "list.h" #include "images/eventfd.pb-c.h" #include "images/eventpoll.pb-c.h" #include "images/signalfd.pb-c.h" #include "images/fsnotify.pb-c.h" #include "images/timerfd.pb-c.h" struct inotify_wd_entry { InotifyWdEntry e; FhEntry f_handle; struct list_head node; }; struct fanotify_mark_entry { FanotifyMarkEntry e; FhEntry f_handle; struct list_head node; union { FanotifyInodeMarkEntry ie; FanotifyMountMarkEntry me; }; }; struct eventpoll_tfd_entry { EventpollTfdEntry e; struct list_head node; }; union fdinfo_entries { EventfdFileEntry efd; SignalfdEntry sfd; struct inotify_wd_entry ify; struct fanotify_mark_entry ffy; struct eventpoll_tfd_entry epl; TimerfdEntry tfy; }; extern void free_inotify_wd_entry(union fdinfo_entries *e); extern void free_fanotify_mark_entry(union fdinfo_entries *e); extern void free_event_poll_entry(union fdinfo_entries *e); struct fdinfo_common { off64_t pos; int flags; int mnt_id; int owner; }; extern int parse_fdinfo(int fd, int type, int (*cb)(union fdinfo_entries *e, void *arg), void *arg); extern int parse_fdinfo_pid(int pid, int fd, int type, int (*cb)(union fdinfo_entries *e, void *arg), void *arg); #endif
/* * tintamp.c * * Part of libtt (the integer amplifier library) * * Copyright (C) 2012 Daniel Thompson <daniel@redfelineninja.org.uk> * * 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. */ #include <string.h> #include "librfn.h" #include "libtt.h" void tt_tintamp_init(tt_tintamp_t *tt, tt_context_t *ctx) { memset(tt, 0, sizeof(*tt)); tt->ctx = ctx; tt_preamp_init(&tt->preamp, ctx); tt_tonestack_init(&tt->tonestack, ctx); tt_cabsim_init(&tt->cabsim, ctx); tt->tmpbuf = tt_sbuf_new(ctx->grain_size); tt_preamp_setup(&tt->preamp, TT_PREAMP_CLEAN); tt_tonestack_setup(&tt->tonestack, TT_TONESTACK_DIGITAL); } void tt_tintamp_finalize(tt_tintamp_t *tt) { tt_preamp_finalize(&tt->preamp); tt_tonestack_finalize(&tt->tonestack); tt_cabsim_finalize(&tt->cabsim); tt_sbuf_delete(tt->tmpbuf); } tt_generic_new(tintamp); tt_generic_delete(tintamp); ttspl_t tt_tintamp_get_control(tt_tintamp_t *tt, tt_tintamp_control_t ctrl) { switch(TT_TAG2BASE(ctrl)) { case TT_PREAMP_BASE: return tt_preamp_get_control(&tt->preamp, ctrl); case TT_TONESTACK_BASE: return tt_tonestack_get_control(&tt->tonestack, ctrl); case TT_TINTAMP_BASE: default: break; } assert(ctrl >= TT_TINTAMP_CONTROL_MIN && ctrl < TT_TINTAMP_CONTROL_MAX); switch(ctrl) { case TT_TINTAMP_CONTROL_MASTER_VOLUME: return tt_tonestack_get_control(&tt->tonestack, TT_TONESTACK_CONTROL_GAIN); default: assert(0); break; } return TTINT(0); } void tt_tintamp_set_control(tt_tintamp_t *tt, tt_tintamp_control_t ctrl, ttspl_t val) { switch(TT_TAG2BASE(ctrl)) { case TT_PREAMP_BASE: tt_preamp_set_control(&tt->preamp, ctrl, val); return; case TT_TONESTACK_BASE: tt_tonestack_set_control(&tt->tonestack, ctrl, val); return; case TT_TINTAMP_BASE: default: break; } assert(ctrl >= TT_TINTAMP_CONTROL_MIN && ctrl < TT_TINTAMP_CONTROL_MAX); switch(ctrl) { case TT_TINTAMP_CONTROL_MASTER_VOLUME: return tt_tonestack_set_control(&tt->tonestack, TT_TONESTACK_CONTROL_GAIN, val); return; default: assert(0); break; } } tt_tintamp_control_t tt_tintamp_enum_control(tt_tintamp_control_t ctrl) { if (0 == ctrl) return TT_PREAMP_CONTROL_MIN; switch(TT_TAG2BASE(ctrl)) { case TT_PREAMP_BASE: ctrl = tt_preamp_enum_control(ctrl); if (ctrl) return ctrl; //FALLTHRU case TT_TONESTACK_BASE: ctrl = tt_tonestack_enum_control(ctrl); // do not expose the tonestack gain control, we expose this as master volume if (TT_TONESTACK_CONTROL_GAIN == (int) ctrl) return tt_tintamp_enum_control(ctrl); if (ctrl) return ctrl; //FALLTHRU #if 0 case TT_CABSIM_BASE: ctrl = tt_cabsim_enum_control(ctrl); if (ctrl) return ctrl; //FALLTHRU #endif default: return (ctrl < TT_TINTAMP_CONTROL_MIN ? TT_TINTAMP_CONTROL_MIN : ctrl >= TT_TINTAMP_CONTROL_MAX-1 ? 0 : ctrl+1); } } void tt_tintamp_process(tt_tintamp_t *tt, tt_sbuf_t *inbuf, tt_sbuf_t *outbuf) { tt_preamp_process(&tt->preamp, inbuf, outbuf); tt_tonestack_process(&tt->tonestack, outbuf, tt->tmpbuf); tt_cabsim_process(&tt->cabsim, tt->tmpbuf, outbuf); }
/* * This file is a part of hildon examples * * Copyright (C) 2009 Nokia Corporation, all rights reserved. * * Author: Alejandro Pinheiro <apinheiro@igalia.com> * Based on hildon-touch-selector-example.c * * 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; 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 St, Fifth Floor, Boston, MA * 02110-1301 USA * */ #include <glib.h> #include <gtk/gtk.h> #include <hildon/hildon.h> static GtkWidget *create_selector (); static GtkWidget *get_visible_content (GtkWidget * window); static GtkWindow *parent_window = NULL; static GtkWidget *label = NULL; static void value_changed (HildonPickerButton * button, gpointer user_data) { HildonTouchSelector *selector; gchar *aux_string = NULL; GtkTreePath *path = NULL; GtkTreeModel *model = NULL; GtkTreeIter iter; selector = hildon_picker_button_get_selector (button); model = hildon_touch_selector_get_model (selector, 0); path = hildon_touch_selector_get_last_activated_row (selector, 0); if (path != NULL) { gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, 0, &aux_string, -1); gtk_label_set_text (GTK_LABEL (label), aux_string); g_free (aux_string); } gtk_tree_path_free (path); } static GtkWidget * create_selector () { GtkWidget *selector = NULL; GList *icon_list = NULL; GtkListStore *store_icons = NULL; GList *item = NULL; GtkCellRenderer *renderer = NULL; HildonTouchSelectorColumn *column = NULL; selector = hildon_touch_selector_new (); //Set context to NULL to list all icons. icon_list = gtk_icon_theme_list_icons (gtk_icon_theme_get_default (), "Actions"); store_icons = gtk_list_store_new (1, G_TYPE_STRING); for (item = icon_list; item; item = g_list_next (item)) { GtkTreeIter iter; gchar *label = item->data; if (gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), label, 24, 0)) { gtk_list_store_append (store_icons, &iter); gtk_list_store_set (store_icons, &iter, 0, label, -1); } g_free (label); } g_list_free (icon_list); renderer = gtk_cell_renderer_pixbuf_new (); gtk_cell_renderer_set_fixed_size (renderer, -1, 100); column = hildon_touch_selector_append_column (HILDON_TOUCH_SELECTOR (selector), GTK_TREE_MODEL (store_icons), renderer, "icon-name", 0, NULL); g_object_set (G_OBJECT (column), "text-column", 0, NULL); g_object_unref (store_icons); return selector; } static GtkWidget * get_visible_content (GtkWidget * window) { GtkWidget *result = NULL; GtkWidget *button = NULL; GtkWidget *selector; label = gtk_label_new ("Here we are going to put the selection"); button = hildon_picker_button_new (HILDON_SIZE_AUTO, HILDON_BUTTON_ARRANGEMENT_VERTICAL); hildon_button_set_title (HILDON_BUTTON (button), "Click me.."); selector = create_selector (); hildon_picker_button_set_selector (HILDON_PICKER_BUTTON (button), HILDON_TOUCH_SELECTOR (selector)); g_signal_connect (G_OBJECT (button), "value-changed", G_CALLBACK (value_changed), window); result = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_container_add (GTK_CONTAINER (result), button); gtk_container_add (GTK_CONTAINER (result), label); return result; } int main (int argc, char **argv) { HildonProgram *program = NULL; GtkWidget *window = NULL; hildon_gtk_init (&argc, &argv); program = hildon_program_get_instance (); g_set_application_name ("hildon-touch-selector normal mode example"); window = hildon_stackable_window_new (); parent_window = GTK_WINDOW (window); hildon_program_add_window (program, HILDON_WINDOW (window)); gtk_container_set_border_width (GTK_CONTAINER (window), 6); GtkWidget *vbox = get_visible_content (window); gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (vbox)); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL); gtk_widget_show_all (GTK_WIDGET (window)); gtk_main (); return 0; }
/*---------------------------------------------------------------------------*\ * OpenSG * * * * * * Copyright (C) 2000-2013 by the OpenSG Forum * * * * www.opensg.org * * * * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net * * * \*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*\ * License * * * * 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, version 2. * * * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. * * * \*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*\ * Changes * * * * * * * * * * * * * \*---------------------------------------------------------------------------*/ /*****************************************************************************\ ***************************************************************************** ** ** ** This file is automatically generated. ** ** ** ** Any changes made to this file WILL be lost when it is ** ** regenerated, which can become necessary at any time. ** ** ** ***************************************************************************** \*****************************************************************************/ #ifndef _OSGSPOTLIGHTFIELDS_H_ #define _OSGSPOTLIGHTFIELDS_H_ #ifdef __sgi #pragma once #endif #include "OSGConfig.h" #include "OSGGroupDef.h" #include "OSGFieldContainerFields.h" #include "OSGPointerSField.h" #include "OSGPointerMField.h" OSG_BEGIN_NAMESPACE class SpotLight; OSG_GEN_CONTAINERPTR(SpotLight); /*! \ingroup GrpGroupLightFieldTraits \ingroup GrpLibOSGGroup */ template <> struct FieldTraits<SpotLight *, nsOSG> : public FieldTraitsFCPtrBase<SpotLight *, nsOSG> { private: static PointerType _type; public: typedef FieldTraits<SpotLight *, nsOSG> Self; enum { Convertible = NotConvertible }; static OSG_GROUP_DLLMAPPING DataType &getType(void); }; #ifndef DOXYGEN_SHOULD_SKIP_THIS #else // these are the doxygen hacks #endif // these are the doxygen hacks OSG_END_NAMESPACE #endif /* _OSGSPOTLIGHTFIELDS_H_ */
// The libMesh Finite Element Library. // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner // 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 #ifndef LIBMESH_CELL_INF_HEX8_H #define LIBMESH_CELL_INF_HEX8_H #include "libmesh/libmesh_config.h" #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS // Local includes #include "libmesh/cell_inf_hex.h" // C++ includes #include <cstddef> namespace libMesh { /** * The \p InfHex8 is an infinite element in 3D composed of 8 nodes. * It is numbered like this: * \verbatim * INFHEX8: 7 6 z^ / y * o o closer to infinity | / * : | |/ * : | +----> x * 4 : 5 | * o : o | * | o....|...o 2 * | .3 | / * | . | / * |. |/ base face * o--------o * 0 1 * * \endverbatim */ class InfHex8 : public InfHex { public: /** * Constructor. By default this element has no parent. */ explicit InfHex8 (Elem* p=NULL); /** * @returns 8. The \p InfHex8 has 8 nodes. */ unsigned int n_nodes() const { return 8; } /** * @returns \p INFHEX8 */ ElemType type() const { return INFHEX8; } /** * @returns 1 */ unsigned int n_sub_elem() const { return 1; } /** * @returns true iff the specified (local) node number is a vertex. */ virtual bool is_vertex(const unsigned int i) const; /** * @returns true iff the specified (local) node number is an edge. */ virtual bool is_edge(const unsigned int i) const; /** * @returns true iff the specified (local) node number is a face. */ virtual bool is_face(const unsigned int i) const; /* * @returns true iff the specified (local) node number is on the * specified side */ virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const; /* * @returns true iff the specified (local) node number is on the * specified edge */ virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const; /** * @returns FIRST */ Order default_order() const { return FIRST; } /** * Returns a \p QUAD4 built coincident with face 0, an \p INFQUAD4 * built coincident with faces 1 to 4. Note that the \p UniquePtr<Elem> * takes care of freeing memory. */ UniquePtr<Elem> build_side (const unsigned int i, bool proxy) const; /** * Returns an \p EDGE2 built coincident with edges 0 to 3, an \p INFEDGE2 * built coincident with edges 4 to 7. Note that the \p UniquePtr<Elem> * takes care of freeing memory. */ UniquePtr<Elem> build_edge (const unsigned int i) const; virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector<dof_id_type>& conn) const; unsigned int vtk_element_type (const unsigned int) const { return 12; } /** * @returns \p true when this element contains the point * \p p. Customized for infinite elements, since knowledge * about the envelope can be helpful. */ bool contains_point (const Point& p, Real tol=TOLERANCE) const; /** * This maps the \f$ j^{th} \f$ node of the \f$ i^{th} \f$ side to * element node numbers. */ static const unsigned int side_nodes_map[5][4]; /** * This maps the \f$ j^{th} \f$ node of the \f$ i^{th} \f$ side to * element node numbers. */ static const unsigned int edge_nodes_map[8][2]; protected: /** * Data for links to nodes */ Node* _nodelinks_data[8]; #ifdef LIBMESH_ENABLE_AMR /** * Matrix used to create the elements children. */ float embedding_matrix (const unsigned int i, const unsigned int j, const unsigned int k) const { return _embedding_matrix[i][j][k]; } /** * Matrix that computes new nodal locations/solution values * from current nodes/solution. */ static const float _embedding_matrix[4][8][8]; LIBMESH_ENABLE_TOPOLOGY_CACHES #endif // LIBMESH_ENABLE_AMR }; // ------------------------------------------------------------ // InfHex8 class member functions inline InfHex8::InfHex8(Elem* p) : InfHex(InfHex8::n_nodes(), p, _nodelinks_data) { } } // namespace libMesh #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS #endif // LIBMESH_CELL_INF_HEX8_H
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* flow-io.h - A prefab I/O class based on a bin of processing elements. * * Copyright (C) 2006 Hans Petter Jansson * * 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 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. * * Authors: Hans Petter Jansson <hpj@copyleft.no> */ #ifndef _FLOW_IO_H #define _FLOW_IO_H #include <flow/flow-bin.h> #include <flow/flow-user-adapter.h> G_BEGIN_DECLS #define FLOW_TYPE_IO (flow_io_get_type ()) #define FLOW_IO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FLOW_TYPE_IO, FlowIO)) #define FLOW_IO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FLOW_TYPE_IO, FlowIOClass)) #define FLOW_IS_IO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FLOW_TYPE_IO)) #define FLOW_IS_IO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FLOW_TYPE_IO)) #define FLOW_IO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FLOW_TYPE_IO, FlowIOClass)) GType flow_io_get_type (void) G_GNUC_CONST; typedef struct _FlowIO FlowIO; typedef struct _FlowIOPrivate FlowIOPrivate; typedef struct _FlowIOClass FlowIOClass; struct _FlowIO { FlowBin parent; /*< private >*/ /* --- Protected --- */ guint read_stream_is_open : 1; guint write_stream_is_open : 1; guint need_to_check_bin : 1; guint drop_read_data : 1; /* Return copies only, not the error itself */ GError *error; FlowIOPrivate *priv; }; struct _FlowIOClass { FlowBinClass parent_class; /* Methods */ void (*check_bin) (FlowIO *io); gboolean (*handle_input_object) (FlowIO *io, gpointer object); void (*prepare_read) (FlowIO *io, gint request_len); void (*successful_read) (FlowIO *io, gint len); void (*prepare_write) (FlowIO *io, gint request_len); /*< private >*/ /* Padding for future expansion */ void (*_pad_1) (void); void (*_pad_2) (void); void (*_pad_3) (void); void (*_pad_4) (void); }; FlowIO *flow_io_new (void); gint flow_io_read (FlowIO *io, gpointer dest_buffer, gint max_len); gboolean flow_io_read_exact (FlowIO *io, gpointer dest_buffer, gint exact_len); gpointer flow_io_read_object (FlowIO *io); void flow_io_write (FlowIO *io, gpointer src_buffer, gint exact_len); void flow_io_write_object (FlowIO *io, gpointer object); void flow_io_flush (FlowIO *io); void flow_io_set_read_notify (FlowIO *io, FlowNotifyFunc func, gpointer user_data); void flow_io_set_write_notify (FlowIO *io, FlowNotifyFunc func, gpointer user_data); void flow_io_block_reads (FlowIO *io); void flow_io_unblock_reads (FlowIO *io); void flow_io_block_writes (FlowIO *io); void flow_io_unblock_writes (FlowIO *io); gint flow_io_sync_read (FlowIO *io, gpointer dest_buffer, gint max_len, GError **error); gboolean flow_io_sync_read_exact (FlowIO *io, gpointer dest_buffer, gint exact_len, GError **error); gpointer flow_io_sync_read_object (FlowIO *io, GError **error); gboolean flow_io_sync_write (FlowIO *io, gpointer src_buffer, gint exact_len, GError **error); gboolean flow_io_sync_write_object (FlowIO *io, gpointer object, GError **error); gboolean flow_io_sync_flush (FlowIO *io, GError **error); GError *flow_io_get_last_error (FlowIO *io); FlowUserAdapter *flow_io_get_user_adapter (FlowIO *io); void flow_io_set_user_adapter (FlowIO *io, FlowUserAdapter *user_adapter); void flow_io_check_bin (FlowIO *io); void flow_io_check_events (FlowIO *io); G_END_DECLS #endif /* _FLOW_IO_H */
/* GTK - The GIMP Toolkit * Copyright (C) 2007 Openismus GmbH * * 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 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. * * Author: * Mathias Hasselmann */ #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) #error "Only <gtk/gtk.h> can be included directly." #endif #ifndef __GTK_TOOL_SHELL_H__ #define __GTK_TOOL_SHELL_H__ #include <gtk/gtkenums.h> G_BEGIN_DECLS #define GTK_TYPE_TOOL_SHELL (gtk_tool_shell_get_type ()) #define GTK_TOOL_SHELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TOOL_SHELL, GtkToolShell)) #define GTK_IS_TOOL_SHELL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOOL_SHELL)) #define GTK_TOOL_SHELL_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_TOOL_SHELL, GtkToolShellIface)) typedef struct _GtkToolShell GtkToolShell; /* dummy typedef */ typedef struct _GtkToolShellIface GtkToolShellIface; /** * GtkToolShellIface: * @get_icon_size: mandatory implementation of gtk_tool_shell_get_icon_size(). * @get_orientation: mandatory implementation of gtk_tool_shell_get_orientation(). * @get_style: mandatory implementation of gtk_tool_shell_get_style(). * @get_relief_style: optional implementation of gtk_tool_shell_get_relief_style(). * @rebuild_menu: optional implementation of gtk_tool_shell_rebuild_menu(). * * Virtual function table for the #GtkToolShell interface. */ struct _GtkToolShellIface { /*< private >*/ GTypeInterface g_iface; /*< public >*/ GtkIconSize (*get_icon_size) (GtkToolShell *shell); GtkOrientation (*get_orientation) (GtkToolShell *shell); GtkToolbarStyle (*get_style) (GtkToolShell *shell); GtkReliefStyle (*get_relief_style) (GtkToolShell *shell); void (*rebuild_menu) (GtkToolShell *shell); }; GType gtk_tool_shell_get_type (void) G_GNUC_CONST; GtkIconSize gtk_tool_shell_get_icon_size (GtkToolShell *shell); GtkOrientation gtk_tool_shell_get_orientation (GtkToolShell *shell); GtkToolbarStyle gtk_tool_shell_get_style (GtkToolShell *shell); GtkReliefStyle gtk_tool_shell_get_relief_style (GtkToolShell *shell); void gtk_tool_shell_rebuild_menu (GtkToolShell *shell); G_END_DECLS #endif /* __GTK_TOOL_SHELL_H__ */
/* this file is part of libccc, criawips' cairo-based canvas * * AUTHORS * Sven Herzberg <herzi@gnome-de.org> * * Copyright (C) 2005,2006 Sven Herzberg * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #include "demo-canvas.h" #ifdef HAVE_CONFIG_H #include <cc-config.h> #endif /* HAVE_CONFIG_H */ #include <math.h> #include <ccc.h> CcItem* demo_canvas_create(void) { CcItem* retval = cc_item_new(); gdouble center = DEMO_CANVAS_CENTER, radius = 125.0; CcItem* item; gint i; CcColor* color; CcBrush* brush; // the mid-point gets calculated, the top-left corner is -50.0 in each dimension /*item = cc_rectangle_new(); cc_rectangle_set_position(CC_RECTANGLE(item), 0.0, 0.0, center, center); color = cc_color_new_rgb(0.0, 0.0, 0.0); brush = cc_brush_color_new(color); cc_shape_set_brush_border(CC_SHAPE(item), brush); cc_item_append(retval, item);*/ for(i = 0; i < 12; i++) { item = cc_rectangle_new(); cc_item_set_grid_aligned(item, TRUE); color = cc_color_new_rgb(0.0, 0.0, 0.0); brush = cc_brush_color_new(color); cc_shape_set_brush_border(CC_SHAPE(item), brush); color = cc_color_new_hsva(1.0 * i / 12, 0.75, 1.0, 0.5); brush = cc_brush_color_new(color); cc_shape_set_brush_content(CC_SHAPE(item), brush); cc_item_append(retval, item); cc_rectangle_set_position(CC_RECTANGLE(item), center - 50.0 + sin(i*G_PI/6) * radius, center - 50.0 + cos(i*G_PI/6) * radius, 100.0, 100.0); } item = cc_text_new(PACKAGE " " VERSION); cc_text_set_anchor(CC_TEXT(item), center, center); cc_text_set_anchor_type(CC_TEXT(item), GTK_ANCHOR_CENTER); cc_item_append(retval, item); return retval; }
#include <stdio.h> #include <string.h> #include "SDL.h" #include "SDL_ttf.h" #define LINES_X 80 #define LINES_Y 25 #define FONT_SIZE 12 #define FONT_RATIO 0.75 #define FONT_SPACE 1 const char* map = "_______\n|.....|\n|..@..|____\n|________ |\n |i|\n |#|\n |#|\n"; int main (int argc, char* argv[]) { SDL_Surface* screen, *text; SDL_Event event; SDL_Color color = {255, 255, 255}; TTF_Font* font; int quit = 0, i, map_size, buf_size = 0, current_line = 0; char* glyph_buffer = NULL; SDL_Init(SDL_INIT_VIDEO); if(TTF_Init() == -1) { fprintf(stderr, "TTF_Init: %s\n", TTF_GetError()); exit(2); } #ifdef __MINGW32__ font = TTF_OpenFont("C:/Windows/Fonts/cour.ttf", FONT_SIZE); #else #error "Please rewrite code for unix ttf paths!" #endif if(!font) { fprintf(stderr, "TTF_OpenFont: %s\n", TTF_GetError()); exit(2); } screen = SDL_SetVideoMode(LINES_X * FONT_SIZE * FONT_RATIO, LINES_Y * FONT_SIZE + (LINES_X - 1) * FONT_SPACE, 16, SDL_HWSURFACE); SDL_WM_SetCaption("SDL_ttf Demo", NULL); SDL_UpdateRect(screen, 0, 0, 0, 0); map_size = strlen(map); for(i = 0; i < map_size; ++i) { SDL_Rect position; switch (*(map+i)) { case '\n': if(buf_size == 0) { continue; } position.x = 0; position.y = -( (current_line * FONT_SPACE) + current_line * FONT_SIZE); position.w = LINES_X * FONT_SIZE * FONT_RATIO; position.h = FONT_SIZE + (LINES_X - 1) * FONT_SPACE; text = TTF_RenderText_Solid(font, glyph_buffer, color); SDL_BlitSurface(text, &position, screen, NULL); SDL_FreeSurface(text); text = NULL; free(glyph_buffer); glyph_buffer = NULL; buf_size = 0; ++current_line; break; default: glyph_buffer = realloc(glyph_buffer, sizeof(char) * (++buf_size)); *(glyph_buffer + buf_size - 1) = *(map+i); break; } } SDL_UpdateRect(screen, 0, 0, 0, 0); while (SDL_WaitEvent(&event) && !quit){ if(event.type == SDL_KEYDOWN){ switch (event.key.keysym.sym){ case SDLK_ESCAPE: quit = 1; break; } } } free(glyph_buffer); TTF_CloseFont(font); SDL_Quit(); return 0; }
/* Copyright (C) 2013 Erik Ogenvik 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 PRESENTATIONBRIDGE_H_ #define PRESENTATIONBRIDGE_H_ #include <sstream> #include <string> #include <stack> #include <deque> #include "Bridge.h" namespace Atlas { /** * @brief A bridge which is meant to be used solely for presenting Element data. * */ class PresentationBridge: public Atlas::Bridge { public: explicit PresentationBridge(std::ostream& stream); ~PresentationBridge() override = default; void streamBegin() override; void streamMessage() override; void streamEnd() override; void mapMapItem(std::string name) override; void mapListItem(std::string name) override; void mapIntItem(std::string name, std::int64_t) override; void mapFloatItem(std::string name, double) override; void mapStringItem(std::string name, std::string) override; void mapNoneItem(std::string name) override; void mapEnd() override; void listMapItem() override; void listListItem() override; void listIntItem(std::int64_t) override; void listFloatItem(double) override; void listStringItem(std::string) override; void listNoneItem() override; void listEnd() override; /** * Sets the max number of items to print per level. * * This is useful to prevent too much output. * * @param maxItems The max number of items. 0 disables this feature (which is the default). */ void setMaxItemsPerLevel(size_t maxItems); /** * Sets the level at which filtering, if setMaxItemsPerLevel() has been called, should occur. * Default is 1 (i.e. print everything for the top level). * @param startFilteringLevel At which level filtering should start. */ void setStartFilteringLevel(size_t startFilteringLevel); private: void addPadding(); void removePadding(); /** * Checks if the current item should be printed or not, depending on if mMaxItemsPerLevel is set. * @return True if the current item should be printed. */ bool checkAndUpdateMaxItemCounter(); std::string mPadding; std::ostream& mStream; /** * @brief Keeps track of the number of maps in lists. * * This is used to determine if we should print a separator to make it easier to see where a new map starts. */ std::stack<int> mMapsInList; /** * If set to > 0 denotes the max number of items to print (per level). */ size_t mMaxItemsPerLevel; /** * Set to true when entries should be skipped because the max number of items for a level has been reached. */ bool mIsSkipEntry; /** * Denotes the level at which filtering through the mMaxItemsPerLevel field should occur. * Set by default to 1 (i.e. always print all entries on the first level). */ size_t mStartFilterLevel; /** * Keeps track of the number of entries in each level. Used when mMaxItemsPerLevel is > 0. */ std::deque<size_t> mEntriesPerLevelCounter; }; } #endif /* PRESENTATIONBRIDGE_H_ */
/****************************************************************/ /* MOOSE - Multiphysics Object Oriented Simulation Environment */ /* */ /* All contents are licensed under LGPL V2.1 */ /* See LICENSE for full restrictions */ /****************************************************************/ #ifndef RICHARDSPIECEWISELINEARSINKFLUX_H #define RICHARDSPIECEWISELINEARSINKFLUX_H #include "SideIntegralVariablePostprocessor.h" #include "LinearInterpolation.h" #include "RichardsVarNames.h" class Function; //Forward Declarations class RichardsPiecewiseLinearSinkFlux; template<> InputParameters validParams<RichardsPiecewiseLinearSinkFlux>(); /** * This postprocessor computes the fluid flux to a RichardsPiecewiseLinearSink. * The flux is integral_over_boundary of * _sink_func*_dt (here _sink_func is a function of porepressure) * and if _use_relperm = true, this integrand is multiplied by _rel_perm * and if _m_func is entered, this integrand is multiplied by _m_func at the quad point * and if _use_mobility = true, this integrand is multiplied by density*knn/viscosity, * where knn is n.permeability.n where n is the normal to the boundary */ class RichardsPiecewiseLinearSinkFlux: public SideIntegralVariablePostprocessor { public: RichardsPiecewiseLinearSinkFlux(const std::string & name, InputParameters parameters); protected: virtual Real computeQpIntegral(); /// the sink function, which is a piecewise linear function of porepressure values LinearInterpolation _sink_func; /// whether to include density*permeability_nn/viscosity in the flux bool _use_mobility; /// whether to include relative permeability in the flux bool _use_relperm; /// the multiplier function Function & _m_func; /// holds info regarding the Richards variable names, and their values in the simulation const RichardsVarNames & _richards_name_UO; /** * the index into _richards_name_UO corresponding to this Postprocessor's variable * eg, if the richards names are 'pwater pgas poil pplasma' * and the variable of this Postprocessor is pgas, then _pvar=1 */ unsigned int _pvar; /// porepressure values (only the _pvar component is used) const MaterialProperty<std::vector<Real> > &_pp; /// fluid viscosity const MaterialProperty<std::vector<Real> > &_viscosity; /// medium permeability const MaterialProperty<RealTensorValue> & _permeability; /// fluid relative permeability const MaterialProperty<std::vector<Real> > &_rel_perm; /// fluid density const MaterialProperty<std::vector<Real> > &_density; }; #endif
/**************************************************************************** ** ** 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 Qt Mobility Components. ** ** $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 QCONTACTFETCHBYIDREQUEST_H #define QCONTACTFETCHBYIDREQUEST_H #include "qtcontactsglobal.h" #include "qcontactabstractrequest.h" #include "qcontact.h" #include "qcontactfetchhint.h" #include <QList> #include <QStringList> QTM_BEGIN_NAMESPACE class QContactFetchByIdRequestPrivate; class Q_CONTACTS_EXPORT QContactFetchByIdRequest : public QContactAbstractRequest { Q_OBJECT public: QContactFetchByIdRequest(QObject* parent = 0); ~QContactFetchByIdRequest(); /* Selection, restriction and sorting */ void setLocalIds(const QList<QContactLocalId>& localIds); void setFetchHint(const QContactFetchHint& fetchHint); QList<QContactLocalId> localIds() const; QContactFetchHint fetchHint() const; /* Results */ QList<QContact> contacts() const; QMap<int, QContactManager::Error> errorMap() const; private: Q_DISABLE_COPY(QContactFetchByIdRequest) friend class QContactManagerEngine; Q_DECLARE_PRIVATE_D(d_ptr, QContactFetchByIdRequest) }; QTM_END_NAMESPACE #endif
/* * kinetic-c * Copyright (C) 2015 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. * */ #include "kinetic_client.h" #include "kinetic_types.h" #include "kinetic_device_info.h" #include "kinetic_types_internal.h" #include "mock_kinetic_builder.h" #include "mock_kinetic_operation.h" #include "mock_kinetic_session.h" #include "mock_kinetic_controller.h" #include "mock_kinetic_bus.h" #include "mock_kinetic_memory.h" #include "mock_kinetic_allocator.h" #include "mock_kinetic_resourcewaiter.h" #include "kinetic_logger.h" #include "kinetic.pb-c.h" #include "protobuf-c/protobuf-c.h" #include "byte_array.h" #include "unity.h" #include "unity_helper.h" void setUp(void) { KineticLogger_Init("stdout", 3); } void tearDown(void) { KineticLogger_Close(); } void test_KineticClient_flush_should_get_success_if_no_writes_are_in_progress(void) { KineticOperation operation; KineticSession session; KineticAllocator_NewOperation_ExpectAndReturn(&session, &operation); KineticBuilder_BuildFlush_ExpectAndReturn(&operation, KINETIC_STATUS_SUCCESS); KineticController_ExecuteOperation_ExpectAndReturn(&operation, NULL, KINETIC_STATUS_SUCCESS); KineticStatus status = KineticClient_Flush(&session, NULL); TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, status); } void test_KineticClient_flush_should_expose_memory_error_from_CreateOperation(void) { KineticSession session; KineticAllocator_NewOperation_ExpectAndReturn(&session, NULL); KineticStatus status = KineticClient_Flush(&session, NULL); TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_MEMORY_ERROR, status); }
/* * GeeXboX libplayer: a multimedia A/V abstraction layer API. * Copyright (C) 2008 Mathieu Schroeter <mathieu@schroetersa.ch> * * This file is part of libplayer. * * libplayer 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. * * libplayer 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 libplayer; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef FS_UTILS_H #define FS_UTILS_H #include <sys/types.h> int pl_copy_file (const char *src, const char *dst); int pl_file_exists (const char *file); off_t pl_file_size (const char *file); #endif /* FS_UTILS_H */
/* SDL - Simple DirectMedia Layer Copyright (C) 1997-2011 Sam Lantinga 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 St, Fifth Floor, Boston, MA 02110-1301 USA Sam Lantinga slouken@libsdl.org */ #ifdef SAVE_RCSID static char rcsid = "@(#) $Id: SDL_sysmutex.c,v 1.2 2001/04/26 16:50:18 hercules Exp $"; #endif /* An implementation of mutexes using semaphores */ #include <stdio.h> #include <stdlib.h> #include "SDL_error.h" #include "SDL_thread.h" #include "SDL_systhread_c.h" struct SDL_mutex { int recursive; SDL_threadID owner; SDL_sem *sem; }; /* Create a mutex */ SDL_mutex * SDL_CreateMutex(void) { SDL_mutex *mutex; /* Allocate mutex memory */ mutex = (SDL_mutex *) malloc(sizeof(*mutex)); if (mutex) { /* Create the mutex semaphore, with initial value 1 */ mutex->sem = SDL_CreateSemaphore(1); mutex->recursive = 0; mutex->owner = 0; if (!mutex->sem) { free(mutex); mutex = NULL; } } else { SDL_OutOfMemory(); } return mutex; } /* Free the mutex */ void SDL_DestroyMutex(SDL_mutex * mutex) { if (mutex) { if (mutex->sem) { SDL_DestroySemaphore(mutex->sem); } free(mutex); } } /* Lock the semaphore */ int SDL_mutexP(SDL_mutex * mutex) { #ifdef DISABLE_THREADS return 0; #else SDL_threadID this_thread; if (mutex == NULL) { SDL_SetError("Passed a NULL mutex"); return -1; } this_thread = SDL_ThreadID(); if (mutex->owner == this_thread) { ++mutex->recursive; } else { /* The order of operations is important. We set the locking thread id after we obtain the lock so unlocks from other threads will fail. */ SDL_SemWait(mutex->sem); mutex->owner = this_thread; mutex->recursive = 0; } return 0; #endif /* DISABLE_THREADS */ } /* Unlock the mutex */ int SDL_mutexV(SDL_mutex * mutex) { #ifdef DISABLE_THREADS return 0; #else if (mutex == NULL) { SDL_SetError("Passed a NULL mutex"); return -1; } /* If we don't own the mutex, we can't unlock it */ if (SDL_ThreadID() != mutex->owner) { SDL_SetError("mutex not owned by this thread"); return -1; } if (mutex->recursive) { --mutex->recursive; } else { /* The order of operations is important. First reset the owner so another thread doesn't lock the mutex and set the ownership before we reset it, then release the lock semaphore. */ mutex->owner = 0; SDL_SemPost(mutex->sem); } return 0; #endif /* DISABLE_THREADS */ } /* vi: set ts=4 sw=4 expandtab: */
/* * Copyright (C) 2001,2002,2003,2009,2010 Red Hat, Inc. * * 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 */ #if !defined (__VTE_VTE_H_INSIDE__) && !defined (VTE_COMPILATION) #error "Only <vte/vte.h> can be included directly." #endif #ifndef VTE_DISABLE_DEPRECATED #ifndef vte_deprecated_h_included #define vte_deprecated_h_included #include <sys/types.h> /* for pid_t */ G_BEGIN_DECLS /** * VTE_IS_TERMINAL_ERASE_BINDING: * * Does nothing. * * Returns: %FALSE * * @Deprecated: 0.20 */ #define VTE_IS_TERMINAL_ERASE_BINDING(obj) (FALSE) /** * VTE_IS_TERMINAL_ANTI_ALIAS: * * Does nothing. * * Returns: %FALSE * * @Deprecated: 0.20 */ #define VTE_IS_TERMINAL_ANTI_ALIAS(obj) (FALSE) /** * VteTerminalAntiAlias: * @VTE_ANTI_ALIAS_USE_DEFAULT: Use the system default anti-alias setting * @VTE_ANTI_ALIAS_FORCE_ENABLE: Force enable anti-aliasing * @VTE_ANTI_ALIAS_FORCE_DISABLE: Force disable anti-aliasing * * An enumeration describing which anti-alias setting to use. * * @Deprecated: 0.20 */ typedef enum { VTE_ANTI_ALIAS_USE_DEFAULT, VTE_ANTI_ALIAS_FORCE_ENABLE, VTE_ANTI_ALIAS_FORCE_DISABLE } VteTerminalAntiAlias; void vte_terminal_set_cursor_blinks(VteTerminal *terminal, gboolean blink) G_GNUC_DEPRECATED; gboolean vte_terminal_get_using_xft(VteTerminal *terminal) G_GNUC_DEPRECATED; int vte_terminal_match_add(VteTerminal *terminal, const char *match) G_GNUC_DEPRECATED; glong vte_terminal_get_char_descent(VteTerminal *terminal) G_GNUC_DEPRECATED; glong vte_terminal_get_char_ascent(VteTerminal *terminal) G_GNUC_DEPRECATED; void vte_terminal_set_font_full(VteTerminal *terminal, const PangoFontDescription *font_desc, VteTerminalAntiAlias antialias) G_GNUC_DEPRECATED; void vte_terminal_set_font_from_string_full(VteTerminal *terminal, const char *name, VteTerminalAntiAlias antialias) G_GNUC_DEPRECATED; pid_t vte_terminal_fork_command(VteTerminal *terminal, const char *command, char **argv, char **envv, const char *working_directory, gboolean lastlog, gboolean utmp, gboolean wtmp) G_GNUC_DEPRECATED; pid_t vte_terminal_forkpty(VteTerminal *terminal, char **envv, const char *working_directory, gboolean lastlog, gboolean utmp, gboolean wtmp) G_GNUC_DEPRECATED; void vte_terminal_get_padding(VteTerminal *terminal, int *xpad, int *ypad) G_GNUC_DEPRECATED; void vte_terminal_set_pty(VteTerminal *terminal, int pty_master); int vte_terminal_get_pty(VteTerminal *terminal); void vte_terminal_im_append_menuitems(VteTerminal *terminal, GtkMenuShell *menushell) G_GNUC_DEPRECATED; GtkAdjustment *vte_terminal_get_adjustment(VteTerminal *terminal) G_GNUC_DEPRECATED; /* Background effects. */ void vte_terminal_set_scroll_background(VteTerminal *terminal, gboolean scroll) G_GNUC_DEPRECATED; void vte_terminal_set_background_image(VteTerminal *terminal, GdkPixbuf *image) G_GNUC_DEPRECATED; void vte_terminal_set_background_image_file(VteTerminal *terminal, const char *path) G_GNUC_DEPRECATED; void vte_terminal_set_background_tint_color(VteTerminal *terminal, const GdkColor *color) G_GNUC_DEPRECATED; void vte_terminal_set_background_saturation(VteTerminal *terminal, double saturation) G_GNUC_DEPRECATED; void vte_terminal_set_background_transparent(VteTerminal *terminal, gboolean transparent) G_GNUC_DEPRECATED; void vte_terminal_set_opacity(VteTerminal *terminal, guint16 opacity) G_GNUC_DEPRECATED; G_END_DECLS void vte_terminal_set_alternate_screen_scroll(VteTerminal *terminal, gboolean scroll) G_GNUC_DEPRECATED; #endif /* !vte_deprecated_h_included */ #endif /* !VTE_DISABLE_DEPRECATED */
/* Copyright (C) 2015 Fredrik Johansson Copyright (C) 2015 Arb authors This file is part of Arb. Arb is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) 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/licenses/>. */ #include "acb.h" void acb_fprintn(FILE * file, const acb_t z, slong digits, ulong flags) { if (arb_is_zero(acb_imagref(z))) { arb_fprintn(file, acb_realref(z), digits, flags); } else if (arb_is_zero(acb_realref(z))) { arb_fprintn(file, acb_imagref(z), digits, flags); flint_fprintf(file, "*I"); } else { arb_fprintn(file, acb_realref(z), digits, flags); if ((arb_is_exact(acb_imagref(z)) || (flags & ARB_STR_NO_RADIUS)) && arf_sgn(arb_midref(acb_imagref(z))) < 0) { arb_t t; arb_init(t); arb_neg(t, acb_imagref(z)); flint_fprintf(file, " - "); arb_fprintn(file, t, digits, flags); arb_clear(t); } else { flint_fprintf(file, " + "); arb_fprintn(file, acb_imagref(z), digits, flags); } flint_fprintf(file, "*I"); } }
/* Turn XYZ to scRGB colourspace. * * 11/12/12 * - from Yxy2XYZ.c */ /* This file is part of VIPS. VIPS 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 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk */ #ifdef HAVE_CONFIG_H #include <config.h> #endif /*HAVE_CONFIG_H*/ #include <vips/intl.h> #include <stdio.h> #include <math.h> #include <vips/vips.h> #include "colour.h" typedef VipsColourSpace VipsXYZ2scRGB; typedef VipsColourSpaceClass VipsXYZ2scRGBClass; G_DEFINE_TYPE( VipsXYZ2scRGB, vips_XYZ2scRGB, VIPS_TYPE_COLOUR_SPACE ); void vips_XYZ2scRGB_line( VipsColour *colour, VipsPel *out, VipsPel **in, int width ) { float *p = (float *) in[0]; float *q = (float *) out; int i; for( i = 0; i < width; i++ ) { float X = p[0]; float Y = p[1]; float Z = p[2]; float R, G, B; p += 3; vips_col_XYZ2scRGB( X, Y, Z, &R, &G, &B ); q[0] = R; q[1] = G; q[2] = B; q += 3; } } static void vips_XYZ2scRGB_class_init( VipsXYZ2scRGBClass *class ) { VipsObjectClass *object_class = (VipsObjectClass *) class; VipsColourClass *colour_class = VIPS_COLOUR_CLASS( class ); object_class->nickname = "XYZ2scRGB"; object_class->description = _( "transform XYZ to scRGB" ); colour_class->process_line = vips_XYZ2scRGB_line; } static void vips_XYZ2scRGB_init( VipsXYZ2scRGB *XYZ2scRGB ) { VipsColour *colour = VIPS_COLOUR( XYZ2scRGB ); colour->interpretation = VIPS_INTERPRETATION_scRGB; } /** * vips_XYZ2scRGB: * @in: input image * @out: output image * * Turn XYZ to Yxy. * * Returns: 0 on success, -1 on error */ int vips_XYZ2scRGB( VipsImage *in, VipsImage **out, ... ) { va_list ap; int result; va_start( ap, out ); result = vips_call_split( "XYZ2scRGB", ap, in, out ); va_end( ap ); return( result ); }
/* * Cogl * * A Low-Level GPU Graphics and Utilities API * * Copyright (C) 2011 Intel Corporation. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * */ #ifndef __COGL_WINSYS_STUB_PRIVATE_H #define __COGL_WINSYS_STUB_PRIVATE_H const CoglWinsysVtable * _cogl_winsys_stub_get_vtable (void); #endif /* __COGL_WINSYS_STUB_PRIVATE_H */
/* * Cogl * * A Low-Level GPU Graphics and Utilities API * * Copyright (C) 2008,2009,2010 Intel Corporation. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * * * * Authors: * Neil Roberts <neil@linux.intel.com> */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "cogl-context-private.h" #include "cogl-util-gl-private.h" #include "cogl-pipeline-private.h" #include "cogl-pipeline-state-private.h" #include "cogl-pipeline-opengl-private.h" #include "cogl-framebuffer-private.h" #ifdef COGL_PIPELINE_VERTEND_FIXED #include "cogl-context-private.h" #include "cogl-object-private.h" const CoglPipelineVertend _cogl_pipeline_fixed_vertend; static void _cogl_pipeline_vertend_fixed_start (CoglPipeline *pipeline, int n_layers, unsigned long pipelines_difference) { _cogl_use_vertex_program (0, COGL_PIPELINE_PROGRAM_TYPE_FIXED); } static CoglBool _cogl_pipeline_vertend_fixed_add_layer (CoglPipeline *pipeline, CoglPipelineLayer *layer, unsigned long layers_difference, CoglFramebuffer *framebuffer) { return TRUE; } static CoglBool _cogl_pipeline_vertend_fixed_end (CoglPipeline *pipeline, unsigned long pipelines_difference) { _COGL_GET_CONTEXT (ctx, FALSE); if (pipelines_difference & COGL_PIPELINE_STATE_POINT_SIZE) { CoglPipeline *authority = _cogl_pipeline_get_authority (pipeline, COGL_PIPELINE_STATE_POINT_SIZE); if (authority->big_state->point_size > 0.0f) GE( ctx, glPointSize (authority->big_state->point_size) ); } return TRUE; } const CoglPipelineVertend _cogl_pipeline_fixed_vertend = { _cogl_pipeline_vertend_fixed_start, _cogl_pipeline_vertend_fixed_add_layer, _cogl_pipeline_vertend_fixed_end, NULL, /* pipeline_change_notify */ NULL /* layer_change_notify */ }; #endif /* COGL_PIPELINE_VERTEND_FIXED */
/* * Info handle * * Copyright (C) 2011-2022, Joachim Metz <joachim.metz@gmail.com> * * Refer to AUTHORS for acknowledgements. * * 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 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 <https://www.gnu.org/licenses/>. */ #if !defined( _INFO_HANDLE_H ) #define _INFO_HANDLE_H #include <common.h> #include <file_stream.h> #include <types.h> #include "exetools_libcerror.h" #include "exetools_libexe.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct info_handle info_handle_t; struct info_handle { /* The libexe input file */ libexe_file_t *input_file; /* The ascii codepage */ int ascii_codepage; /* The notification output stream */ FILE *notify_stream; /* Value to indicate if abort was signalled */ int abort; }; int info_handle_initialize( info_handle_t **info_handle, libcerror_error_t **error ); int info_handle_free( info_handle_t **info_handle, libcerror_error_t **error ); int info_handle_signal_abort( info_handle_t *info_handle, libcerror_error_t **error ); int info_handle_set_ascii_codepage( info_handle_t *info_handle, const system_character_t *string, libcerror_error_t **error ); int info_handle_open_input( info_handle_t *info_handle, const system_character_t *filename, libcerror_error_t **error ); int info_handle_close_input( info_handle_t *info_handle, libcerror_error_t **error ); int info_handle_file_fprint( info_handle_t *info_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif /* !defined( _INFO_HANDLE_H ) */
/* File: x_epiphany_control.h Copyright 2013 Mark Honman This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License and the GNU Lesser General Public License along with this program, see the files COPYING and COPYING.LESSER. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _X_EPIPHANY_CONTROL_H_ #define _X_EPIPHANY_CONTROL_H_ /* Host-side common interface to eSDK and Epiphany functionality. * * The x_epiphany_control structure provides a single location * where the esdk information needed by x-lib programs can be collected. * * platform: basic platform information as provided by e_get_platform_info * - does *not* include the list of external memory segments. * workgroup: an e_dev_t structure populated by e_open (from this the * mapped addresses of Epiphany resources can be determined) * external_memory_mappings: array of descriptors for shared memory * segments that have been mapped into process address space * num_external_memory_mappings: number of elements in the array */ #ifndef __epiphany__ #include <stdint.h> #include <e-hal.h> #include <x_types.h> typedef struct { int initialized; e_platform_t platform; e_epiphany_t workgroup; int num_external_memory_mappings; e_mem_t external_memory_mappings[]; } x_epiphany_control_t; /* Dynamically allocate an x_epiphany_control_t structure having enough space to * accommodate mappings for all known external memory segments. */ x_epiphany_control_t * x_alloc_epiphany_control(); /* Map a workgroup on the attached Epiphany platform as well as mapping all known * external memory segments. * In the case of x_map_epiphany_resources a workgroup of the desired size is opened * and the platform information structure is populated with the results of * e_get_platform_info. * If all of the workgroup size specifications are zero, a maximally sized workgroup * is opened. Otherwise the number of rows and columns is trimmed to fit the device. * If a NULL pointer is passed to x_map_epiphany_resources it will allocate a new * epiphany control structure. * * x_unmap_epiphany_resources closes the workgroup and frees the external memory * segments. */ x_epiphany_control_t * x_map_epiphany_resources (x_epiphany_control_t * epiphany_control, int first_row, int first_col, int rows, int cols); x_return_stat_t x_unmap_epiphany_resources (x_epiphany_control_t * epiphany_control); /* Use the mappings described in the Epiphany control structure to determine the * host-side address corresponding to the specified Epiphany-side address as seen * by the given core in the workgroup. * * Returns NULL if the Epiphany address is not mapped into host address space. * Note that Epiphany-side NULL pointers also result in a return value of NULL. */ void * x_epiphany_to_host_address (x_epiphany_control_t * epiphany_control, int row, int col, uint32_t epiphany_address); #endif #endif /* _X_EPIPHANY_CONTROL_H_ */
// 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(PKEY_Sync_Status, 0x7bd5533e, 0xaf15, 0x44db, 0xb8, 0xc8, 0xbd, 0x66, 0x24, 0xe1, 0xd0, 0x32);
// 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_Calendar_OrganizerName, 0xaaa660f9, 0x9865, 0x458e, 0xb4, 0x84, 0x01, 0xbc, 0x7f, 0xe3, 0x97, 0x3e);
#ifndef __BASE_MANAGER_H__ #define __BASE_MANAGER_H__ #include <MyGUI.h> #include "Base/StatisticInfo.h" #include "Base/InputFocusInfo.h" #include "InputManager.h" #include "PointerManager.h" #include <cocoa/CCObject.h> #include <CCApplication.h> #include <CCProtocols.h> namespace MyGUI { class Cocos2dPlatform; class Cocos2dLogManager; } namespace base { class BaseManager : public cocos2d::CCObject, public input::InputManager, public cocos2d::CCApplication, public cocos2d::CCDirectorDelegate { public: BaseManager(); virtual ~BaseManager(); virtual void prepare(); bool create(); void destroy(); int run(); void quit(); const std::string& getRootMedia(); void setResourceFilename(const std::string& _flename); void addResourceLocation(const std::string& _name, bool _recursive = false); typedef std::map<std::string, std::string> MapString; MapString getStatistic() { return MapString(); } /** @brief Implement CCDirector and CCScene init code here. @return true Initialize success, app continue. @return false Initialize failed, app terminate. */ virtual bool applicationDidFinishLaunching(); /** @brief The function be called when the application enter background @param the pointer of the application */ virtual void applicationDidEnterBackground(); /** @brief The function be called when the application enter foreground @param the pointer of the application */ virtual void applicationWillEnterForeground(); virtual void updateProjection(void); virtual void prePurge(); virtual void afterPurge(); virtual void setupResources(); virtual void createScene() {} virtual void destroyScene() {} void createGui(); void destroyGui(); private: MyGUI::Gui *mGUI; MyGUI::Cocos2dPlatform* mPlatform; MyGUI::Cocos2dLogManager* mCocos2dLogManager; MyGUI::ScriptBridge* mScriptBridge; bool m_hasQuited; std::string mPluginCfgName; std::string mResourceXMLName; std::string mResourceFileName; std::string mRootMedia; bool mShutdownNextLoop; }; } //namespace base #endif // __BASE_MANAGER_H__
// 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(WPD_MUSIC_LYRICS, 0xb324f56a, 0xdc5d, 0x46e5, 0xb6, 0xdf, 0xd2, 0xea, 0x41, 0x48, 0x88, 0xc6);
#import "objdcore.h" #import "CNCollection.h" #import "CNObject.h" @class CNClassType; @class CNString; @class CNDispatchQueue; @class CNChain; @class CNMHashSet; @class CNImHashSet; @class CNSet_impl; @class CNImSet_impl; @class CNMSet_impl; @class CNHashSetBuilder; @protocol CNSet; @protocol CNImSet; @protocol CNMSet; @protocol CNSet<CNIterable> - (NSString*)description; @end @interface CNSet_impl : CNIterable_impl<CNSet> + (instancetype)set_impl; - (instancetype)init; @end @protocol CNImSet<CNSet, CNImIterable> - (id<CNMSet>)mCopy; - (NSString*)description; @end @interface CNImSet_impl : CNSet_impl<CNImSet> + (instancetype)imSet_impl; - (instancetype)init; - (id<CNMSet>)mCopy; @end @protocol CNMSet<CNSet, CNMIterable> - (id<CNImSet>)im; - (id<CNImSet>)imCopy; - (NSString*)description; @end @interface CNMSet_impl : CNSet_impl<CNMSet> + (instancetype)set_impl; - (instancetype)init; - (id<CNImSet>)im; - (id<CNImSet>)imCopy; @end @interface CNHashSetBuilder : CNBuilder_impl { @public CNMHashSet* _set; } @property (nonatomic, readonly) CNMHashSet* set; + (instancetype)hashSetBuilderWithCapacity:(NSUInteger)capacity; - (instancetype)initWithCapacity:(NSUInteger)capacity; - (CNClassType*)type; - (void)appendItem:(id)item; - (CNImHashSet*)build; + (CNHashSetBuilder*)apply; - (NSString*)description; + (CNClassType*)type; @end
/* * The python header wrapper * * Copyright (C) 2011-2022, Joachim Metz <joachim.metz@gmail.com> * * Refer to AUTHORS for acknowledgements. * * 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 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 <https://www.gnu.org/licenses/>. */ #if !defined( _PYBDE_PYTHON_H ) #define _PYBDE_PYTHON_H #include <common.h> #if PY_MAJOR_VERSION < 3 /* Fix defines in pyconfig.h */ #undef _POSIX_C_SOURCE #undef _XOPEN_SOURCE /* Fix defines in pyport.h */ #undef HAVE_FSTAT #undef HAVE_STAT #undef HAVE_SSIZE_T #undef HAVE_INT32_T #undef HAVE_UINT32_T #undef HAVE_INT64_T #undef HAVE_UINT64_T #endif /* PY_MAJOR_VERSION < 3 */ /* Define PY_SSIZE_T_CLEAN to silence: * DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats * * PY_SSIZE_T_CLEAN was introduced in Python 2.5 */ #define PY_SSIZE_T_CLEAN #include <Python.h> /* Python compatibility macros */ #if !defined( PyMODINIT_FUNC ) #if PY_MAJOR_VERSION >= 3 #define PyMODINIT_FUNC PyObject * #else #define PyMODINIT_FUNC void #endif #endif /* !defined( PyMODINIT_FUNC ) */ #if !defined( PyVarObject_HEAD_INIT ) #define PyVarObject_HEAD_INIT( type, size ) \ PyObject_HEAD_INIT( type ) \ size, #endif /* !defined( PyVarObject_HEAD_INIT ) */ #if PY_MAJOR_VERSION >= 3 #define Py_TPFLAGS_HAVE_ITER 0 #endif #if !defined( Py_TYPE ) #define Py_TYPE( object ) \ ( ( (PyObject *) object )->ob_type ) #endif /* !defined( Py_TYPE ) */ #endif /* !defined( _PYBDE_PYTHON_H ) */
// // creditsLayer.h // gemgem // // Created by Yong-uk Choe on 12. 11. 30.. // Copyright 2012년 __MyCompanyName__. All rights reserved. // #import <Foundation/Foundation.h> #import "cocos2d.h" @interface creditsLayer : CCLayer { } +(CCScene *) scene; @end
/****************************************************************************** * Copyright (C) 2011 by Jerome Maye * * jerome.maye@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the Lesser GNU General Public License as published by* * the Free Software Foundation; either version 3 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * Lesser GNU General Public License for more details. * * * * You should have received a copy of the Lesser GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * ******************************************************************************/ /** \file Factor.h \brief This file defines the Factor class which represents a factor in a factor graph. */ #ifndef FACTOR_H #define FACTOR_H #include <dai/factor.h> /** \name Types definitions @{ */ /// Factor graph is implemented by libDAI typedef dai::Factor Factor; /** @} */ #endif // FACTOR_H
/* 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_LISTNAMEDSHADOWSFORTHINGREQUEST_P_H #define QTAWS_LISTNAMEDSHADOWSFORTHINGREQUEST_P_H #include "iotdataplanerequest_p.h" #include "listnamedshadowsforthingrequest.h" namespace QtAws { namespace IoTDataPlane { class ListNamedShadowsForThingRequest; class ListNamedShadowsForThingRequestPrivate : public IoTDataPlaneRequestPrivate { public: ListNamedShadowsForThingRequestPrivate(const IoTDataPlaneRequest::Action action, ListNamedShadowsForThingRequest * const q); ListNamedShadowsForThingRequestPrivate(const ListNamedShadowsForThingRequestPrivate &other, ListNamedShadowsForThingRequest * const q); private: Q_DECLARE_PUBLIC(ListNamedShadowsForThingRequest) }; } // namespace IoTDataPlane } // namespace QtAws #endif
// Created file "Lib\src\strmiids\X64\strmiids" 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(EVRConfig_AllowBatching, 0xe447df0a, 0x10ca, 0x4d17, 0xb1, 0x7e, 0x6a, 0x84, 0x0f, 0x8a, 0x3a, 0x4c);
#pragma once #include "../runtime/runtime.h" #include <string> #include <vector> #include <array> namespace sqf::runtime { class context; } class interactive_helper { typedef void (*interactive_callback)(interactive_helper&, std::string_view); struct command { std::vector<std::string> names; interactive_callback callback; std::string description; }; std::vector<command> m_commands; sqf::runtime::runtime& m_runtime; sqf::runtime::runtime::action m_runtime_apply_action; bool m_thread_die; bool m_exit; std::weak_ptr<sqf::runtime::context> m_context_selected; static const size_t buffer_size = 16384; char* m_buffer; void virtualmachine_thread(); public: template<size_t size> void register_command(std::array<std::string, size> names, std::string description, interactive_callback callback) { m_commands.push_back({ std::vector(names.begin(), names.end()), callback, description }); } interactive_helper(sqf::runtime::runtime& vm) : m_commands(), m_runtime(vm), m_runtime_apply_action(sqf::runtime::runtime::action::invalid), m_thread_die(false), m_exit(false), m_context_selected(), m_buffer(new char[buffer_size]) { } ~interactive_helper() { delete[] m_buffer; } void init(); void run(); std::vector<command>::const_iterator commands_begin() const { return m_commands.begin(); } std::vector<command>::const_iterator commands_end() const { return m_commands.end(); } sqf::runtime::runtime& runtime() const { return m_runtime; } void context_selected(std::shared_ptr<sqf::runtime::context> sptr) { m_context_selected = sptr; } std::shared_ptr<sqf::runtime::context> context_selected() const { return m_context_selected.lock(); } void print_welcome(); bool execute_next(sqf::runtime::runtime::action action) { if (m_runtime_apply_action == sqf::runtime::runtime::action::invalid) { m_runtime_apply_action = action; return true; } else { return false; } } };
// Created file "Lib\src\dxguid\X64\d3d9guid" 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(GUID_PROCESSOR_SETTINGS_SUBGROUP, 0x54533251, 0x82be, 0x4824, 0x96, 0xc1, 0x47, 0xb6, 0x0b, 0x74, 0x0d, 0x00);
// Created file "Lib\src\PortableDeviceGuids\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(GUID_DEVINTERFACE_CDCHANGER, 0x53f56312, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
/* * $Id: libnata.h 86 2012-07-30 05:33:07Z m-hirano $ */ #ifndef __LIBNATA_H__ #define __LIBNATA_H__ #include <nata/nata_includes.h> #include <nata/nata_macros.h> #ifdef NATA_API_POSIX #include <nata/nata_safe_syscall.h> #endif /* NATA_API_POSIX */ #include <nata/nata_util.h> #include <nata/nata_uid.h> #include <nata/nata_sha1.h> #endif /* ! __LIBNATA_H__ */
/* 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_DESCRIBEACCOUNTRESPONSE_P_H #define QTAWS_DESCRIBEACCOUNTRESPONSE_P_H #include "organizationsresponse_p.h" namespace QtAws { namespace Organizations { class DescribeAccountResponse; class DescribeAccountResponsePrivate : public OrganizationsResponsePrivate { public: explicit DescribeAccountResponsePrivate(DescribeAccountResponse * const q); void parseDescribeAccountResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(DescribeAccountResponse) Q_DISABLE_COPY(DescribeAccountResponsePrivate) }; } // namespace Organizations } // namespace QtAws #endif
// Created file "Lib\src\Uuid\i_webcheck" 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_ISubscriptionAgentControl, 0xa89e8ff0, 0x70f4, 0x11d1, 0xbc, 0x7f, 0x00, 0xc0, 0x4f, 0xd9, 0x29, 0xdb);
// Created file "Lib\src\Shell32\X64\shguid" 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(FOLDERTYPEID_SearchConnector, 0x982725ee, 0x6f47, 0x479e, 0xb4, 0x47, 0x81, 0x2b, 0xfa, 0x7d, 0x2e, 0x8f);
// Created file "Lib\src\Uuid\X64\hlinkuuid" 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_IHlink, 0x79eac9c3, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b); DEFINE_GUID(IID_IHlinkSite, 0x79eac9c2, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b); DEFINE_GUID(IID_IHlinkTarget, 0x79eac9c4, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b); DEFINE_GUID(IID_IHlinkFrame, 0x79eac9c5, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b); DEFINE_GUID(IID_IEnumHLITEM, 0x79eac9c6, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b); DEFINE_GUID(IID_IHlinkBrowseContext, 0x79eac9c7, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b); DEFINE_GUID(IID_IExtensionServices, 0x79eac9cb, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b);
/** @file @copyright Copyright (C) 2017 Michael Adam Copyright (C) 2017 Bernd Amend Copyright (C) 2017 Stefan Rommel 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 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 Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. */ #pragma once #include <string> namespace docmala { struct FileLocation { FileLocation(int line, int column, const std::string& fileName) : line(line) , column(column) , fileName(fileName) {} FileLocation() = default; int line = 0; int column = 0; std::string fileName = "internal"; bool valid() const { return line != 0; } bool operator<(const FileLocation& other) const { if (fileName != other.fileName) return fileName < other.fileName; if (line != other.line) return line < other.line; return column < other.column; } bool operator==(const FileLocation& other) const { return line == other.line && column == other.column && fileName == other.fileName; } bool operator!=(const FileLocation& other) const { return !(*this == other); } }; }
#ifndef MODELOMAESTRO_H #define MODELOMAESTRO_H #include "QueryModel.h" #include <QJsonObject> #include <QJsonDocument> #include <QJsonArray> namespace nQNav { namespace Models { using namespace nQNav::Net; class ModeloMaestro : public QueryModel { Q_OBJECT public: /** * @brief ModeloMaestro * @param parent */ explicit ModeloMaestro(QSettings *_appsettings=nullptr ,QObject *parent=0); /** SETTINGS **********************************************************************************************************/ protected: QString m_configroot; void loadconfig(); QSettings *m_settings; /** END SETTINGS *****************************************************************************************************/ /** * SQLITE MODEL **********************************************************************************************************************/ private: virtual bool populateSQL(QSqlQuery query, QVariantMap cols)=0; virtual void configQueries()=0; protected: //DATABASE MANAGER QString sValues(const int &count); void setTable(); bool login_ok(); void refreshModel(); bool createMasterTable(); QString m_query_createtable; void set_query_createtable(QString _query_createtable){this->m_query_createtable=_query_createtable;} QString appDB;// () = "master.sqlite"; void set_appDB(QString _appDB){this->appDB = _appDB;} QString m_query_bulkinsert; void set_query_bulkinsert(QString _query_bulkinsert){this->m_query_bulkinsert=_query_bulkinsert;} void syncLocalTable(const QJsonArray &allData); bool m_sincronizando; int m_porcientoSync; signals: void changed_porcientoSync(const QString &_tabla, const int &new_porcientoSync); void changed_sincronizando(const bool &new_sincronizado); /** END SQLITE ***************************************************************************************************/ /** VISTAS *******************************************************************************************************/ public: QString getNewQuery() const; void setNewQuery(const QString &query); QString getCurrentQuery() const; void setCurrentQuery(const QString &query); private: QString m_CurrentQuery;// = "select * from " + QString(appServer_tablename); QString m_NewQuery; protected: QString m_DefaultQuery;// = "select * from " + QString(appServer_tablename); /** END VISTAS ****************************************************************************************************/ /** NetWORK ******************************************************************************************************/ public: //bool execCustomQuery(const QByteArray &_query); void syncTable(); //void asyncTable(); protected: QString appServer_api;// = "/api/"; void set_appServer_api(QString _server_api){this->appServer_api = _server_api;} QString appServer_path;// = "/models/tabla/"; void set_appServer_path(QString _server_path){this->appServer_path=_server_path;} QString appServer_all;// = "/all"; void set_appServer_all(QString _server_all){this->appServer_all=_server_all;} QString appServer_tablename;// = "categorias_productos"; void set_appServer_tablename(QString _server_tablename){this->appServer_tablename=_server_tablename;} Login getLoginInfo(); protected slots: /** * Interface QNAVNET * @brief getReply * @param _ServerReply * Conector con el proceso de peticion Web */ void getReply(QJsonDocument _ServerReply); /** END NETWORK **************************************************************************************************************/ }; } // END NAMESPACE Services } // Models #endif // MODELOMAESTRO_H
// Created file "Lib\src\Uuid\X64\i_mshtml" 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_IHTMLTableRow2, 0x3050f4a1, 0x98b5, 0x11cf, 0xbb, 0x82, 0x00, 0xaa, 0x00, 0xbd, 0xce, 0x0b);
// -*- Mode:C++ -*- /************************************************************************\ * * * This file is part of AVANGO. * * * * Copyright 2007 - 2010 Fraunhofer-Gesellschaft zur Foerderung der * * angewandten Forschung (FhG), Munich, Germany. * * * * AVANGO 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, version 3. * * * * AVANGO 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 Lesser General Public * * License along with AVANGO. If not, see <http://www.gnu.org/licenses/>. * * * \************************************************************************/ #ifndef shade_types_vec4_H #define shade_types_vec4_H shade_types_vec4_H #include "../TypeBase.h" #include "Vec4Accessor.h" #include "local.h" namespace shade { template <class Qualifier = Type> class vec4 : public TypeBase<vec4<Qualifier>, Qualifier>, public types::Vec4Accessor { public: vec4(void); vec4(float x, float y, float z, float w); template <class Q> void copy_value(const vec4<Q>& source); /*virtual*/ void set(float x, float y, float z, float w); /*virtual*/ void get(float& x, float& y, float& z, float& w) const; /*virtual*/ void upload_uniform(boost::shared_ptr<GLSLWrapper>, shade::Type::LinkIndex) const; /*virtual*/ std::string get_uniq_id(void) const; /*virtual*/ void generate_constructor(formatter::Generator& generator) const; /*virtual*/ std::string get_constructor_str(void) const; /*virtual*/ std::string get_constructor_str(boost::shared_ptr<Type::State> state) const; private: float m_x, m_y, m_z, m_w; }; } // namespace shade #include "impl/vec4_impl.cpp" #endif /* shade_types_vec4_H */
// Created file "Lib\src\PortableDeviceGuids\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(WPD_DEVICE_SYNC_PARTNER, 0x26d4979a, 0xe643, 0x4626, 0x9e, 0x2b, 0x73, 0x6d, 0xc0, 0xc9, 0x2f, 0xdc);
/* 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_CREATEASSOCIATIONBATCHRESPONSE_H #define QTAWS_CREATEASSOCIATIONBATCHRESPONSE_H #include "ssmresponse.h" #include "createassociationbatchrequest.h" namespace QtAws { namespace SSM { class CreateAssociationBatchResponsePrivate; class QTAWSSSM_EXPORT CreateAssociationBatchResponse : public SsmResponse { Q_OBJECT public: CreateAssociationBatchResponse(const CreateAssociationBatchRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const CreateAssociationBatchRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(CreateAssociationBatchResponse) Q_DISABLE_COPY(CreateAssociationBatchResponse) }; } // namespace SSM } // namespace QtAws #endif
// Created file "Lib\src\Uuid\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(CLSID_PartitionMoniker, 0xecabb0c5, 0x7f19, 0x11d2, 0x97, 0x8e, 0x00, 0x00, 0xf8, 0x75, 0x7e, 0x2a);
/* 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_ENABLESTAGETRANSITIONRESPONSE_H #define QTAWS_ENABLESTAGETRANSITIONRESPONSE_H #include "codepipelineresponse.h" #include "enablestagetransitionrequest.h" namespace QtAws { namespace CodePipeline { class EnableStageTransitionResponsePrivate; class QTAWSCODEPIPELINE_EXPORT EnableStageTransitionResponse : public CodePipelineResponse { Q_OBJECT public: EnableStageTransitionResponse(const EnableStageTransitionRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const EnableStageTransitionRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(EnableStageTransitionResponse) Q_DISABLE_COPY(EnableStageTransitionResponse) }; } // namespace CodePipeline } // 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_DELETEPLAYBACKCONFIGURATIONRESPONSE_H #define QTAWS_DELETEPLAYBACKCONFIGURATIONRESPONSE_H #include "mediatailorresponse.h" #include "deleteplaybackconfigurationrequest.h" namespace QtAws { namespace MediaTailor { class DeletePlaybackConfigurationResponsePrivate; class QTAWSMEDIATAILOR_EXPORT DeletePlaybackConfigurationResponse : public MediaTailorResponse { Q_OBJECT public: DeletePlaybackConfigurationResponse(const DeletePlaybackConfigurationRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const DeletePlaybackConfigurationRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(DeletePlaybackConfigurationResponse) Q_DISABLE_COPY(DeletePlaybackConfigurationResponse) }; } // namespace MediaTailor } // namespace QtAws #endif
#include "mrctest.h" #include <mrc_diag.h> #include <mrc_params.h> #include <math.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> struct test_diag_params { int gdims[3]; int nproc[3]; bool use_diagsrv; int ldims[3]; int nproc_domain; }; #define VAR(x) (void *)offsetof(struct test_diag_params, x) static struct param test_diag_params_descr[] = { { "mx" , VAR(gdims[0]) , PARAM_INT(128) }, { "my" , VAR(gdims[1]) , PARAM_INT(64) }, { "mz" , VAR(gdims[2]) , PARAM_INT(32) }, { "npx" , VAR(nproc[0]) , PARAM_INT(1) }, { "npy" , VAR(nproc[1]) , PARAM_INT(1) }, { "npz" , VAR(nproc[2]) , PARAM_INT(1) }, { "use_diagsrv" , VAR(use_diagsrv) , PARAM_BOOL(false) }, {}, }; #undef VAR static void dump_field(struct mrc_fld *fld, int m, int rank_diagsrv, const char *fmt) { struct mrc_domain *domain = fld->domain; assert(domain); struct diag_format *format = diag_format_create(((struct mrc_obj *)domain)->comm, fmt); if (rank_diagsrv) { diag_format_set_param_int(format, "rank_diagsrv", rank_diagsrv); } diag_format_set_from_options(format); diag_format_view(format); diag_format_setup(format); diag_format_open(format, -1, DIAG_TYPE_3D, 0, 0., "timestr"); diag_format_write_field(format, 1., fld, m); diag_format_close(format); diag_format_destroy(format); } static void init_values(struct mrc_fld *f) { struct mrc_crds *crds = mrc_domain_get_crds(f->domain); mrc_fld_foreach(f, ix,iy,iz, 0, 0) { float xx = crds->crd[0][ix]; MRC_FLD(f, 0, ix,iy,iz) = 2.f + .2f * sin(xx); } mrc_fld_foreach_end; } static void do_test_diag(MPI_Comm comm, struct test_diag_params *par, int rank_diagsrv, const char *fmt) { struct mrc_domain_simple_params simple_par = { .ldims = { par->ldims[0], par->ldims[1], par->ldims[2] }, .nr_procs = { par->nproc[0], par->nproc[1], par->nproc[2] }, }; struct mrc_domain *domain = mrc_domain_create(comm, "simple"); struct mrc_crds *crds = mrc_domain_get_crds(domain); mrc_domain_simple_set_params(domain, &simple_par); mrc_crds_set_param_int(crds, "sw", SW_2); mrc_crds_set_param_double(crds, "xl", -30.); mrc_crds_set_param_double(crds, "yl", -20.); mrc_crds_set_param_double(crds, "zl", -20.); mrc_crds_set_param_double(crds, "xh", 50.); mrc_crds_set_param_double(crds, "yh", 20.); mrc_crds_set_param_double(crds, "zh", 20.); mrc_domain_set_from_options(domain); mrc_domain_view(domain); mrc_domain_setup(domain); struct mrc_fld fld; mrc_domain_fld_alloc(domain, &fld, 1, SW_2); fld.name[0] = strdup("test"); init_values(&fld); dump_field(&fld, 0, rank_diagsrv, fmt); mrc_fld_free(&fld); mrc_domain_destroy(domain); } static void test_diag(struct test_diag_params *par) { int rank, size; MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); assert(par->nproc_domain <= size); MPI_Comm comm; int color = MPI_UNDEFINED; if (rank < par->nproc_domain) { color = 0; } MPI_Comm_split(MPI_COMM_WORLD, color, rank, &comm); if (color == 0) { do_test_diag(comm, par, 0, "xdmf"); } if (comm != MPI_COMM_NULL) { MPI_Comm_free(&comm); } } static void test_diag_diagsrv(struct test_diag_params *par) { int rank, size; MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); int rank_diagsrv = par->nproc_domain; assert(rank_diagsrv < size); MPI_Comm comm; int color = MPI_UNDEFINED; if (rank < par->nproc_domain) { color = 0; } else if (rank == rank_diagsrv) { color = 1; } MPI_Comm_split(MPI_COMM_WORLD, color, rank, &comm); if (color == 0) { do_test_diag(comm, par, rank_diagsrv, "combined"); } else if (color == 1) { diagsrv_one("xdmf_serial", "cache", par->nproc_domain); } if (comm != MPI_COMM_NULL) { MPI_Comm_free(&comm); } } int main(int argc, char **argv) { mrctest_init(&argc, &argv); struct test_diag_params par; mrc_params_parse(&par, test_diag_params_descr, "test_diag", MPI_COMM_WORLD); mrc_params_print(&par, test_diag_params_descr, "test_diag", MPI_COMM_WORLD); for (int d = 0; d < 3; d++) { assert(par.gdims[d] % par.nproc[d] == 0); par.ldims[d] = par.gdims[d] / par.nproc[d]; } par.nproc_domain = par.nproc[0] * par.nproc[1] * par.nproc[2]; if (par.use_diagsrv) { test_diag_diagsrv(&par); } else { test_diag(&par); } mrctest_finalize(); return 0; }
// Created file "Lib\src\Uuid\X64\shguids" 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_IPropertyChange, 0xf917bc8a, 0x1bba, 0x4478, 0xa2, 0x45, 0x1b, 0xde, 0x03, 0xeb, 0x94, 0x31);
0.1.186.13
/* 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_STARTFHIRIMPORTJOBRESPONSE_H #define QTAWS_STARTFHIRIMPORTJOBRESPONSE_H #include "healthlakeresponse.h" #include "startfhirimportjobrequest.h" namespace QtAws { namespace HealthLake { class StartFHIRImportJobResponsePrivate; class QTAWSHEALTHLAKE_EXPORT StartFHIRImportJobResponse : public HealthLakeResponse { Q_OBJECT public: StartFHIRImportJobResponse(const StartFHIRImportJobRequest &request, QNetworkReply * const reply, QObject * const parent = 0); virtual const StartFHIRImportJobRequest * request() const Q_DECL_OVERRIDE; protected slots: virtual void parseSuccess(QIODevice &response) Q_DECL_OVERRIDE; private: Q_DECLARE_PRIVATE(StartFHIRImportJobResponse) Q_DISABLE_COPY(StartFHIRImportJobResponse) }; } // namespace HealthLake } // namespace QtAws #endif
#ifndef __hustmq_ha_ev_handler_20151016104222_h__ #define __hustmq_ha_ev_handler_20151016104222_h__ #include "hustmq_ha_handler.h" #include "hustmq_ha_utils.h" #include "hustmq_ha_request_handler.h" typedef struct { ngx_http_request_t * r; ngx_int_t * ev_timer_count; ngx_event_t ev; ngx_queue_t elem; } hustmq_ha_ev_node_t; typedef struct { c_dict_t(ngx_queue_t *) dict; // queue as key size_t size; } hustmq_ha_ev_dict_t; typedef int (*hustmq_ha_get_timeout_t)(ngx_http_hustmq_ha_main_conf_t * conf); typedef hustmq_ha_ev_node_t * (*hustmq_ha_create_ev_node_t)(ngx_http_request_t *r); typedef void (*hustmq_ha_before_active_t)(const hustmq_ha_message_queue_item_t * queue_item, hustmq_ha_ev_node_t * node); ngx_int_t hustmq_ha_ev_handler( const ngx_str_t * head, ngx_http_request_t *r, hustmq_ha_create_ev_node_t create, hustmq_ha_get_timeout_t get_timeout, ngx_int_t * ev_timer_count, hustmq_ha_ev_dict_t * ev_dict); void hustmq_ha_init_ev( ngx_log_t * log, hustmq_ha_ev_dict_t * ev_dict, ngx_event_t * ev_event, ngx_event_handler_pt handler); hustmq_ha_ev_node_t * hustmq_ha_pop_ev_node(ngx_queue_t * que); void hustmq_ha_active_ev(hustmq_ha_ev_dict_t * ev_dict, hustmq_ha_before_active_t before_active); #endif // __hustmq_ha_ev_handler_20151016104222_h__
#include "../../../../../../../5.8/Src/qtbase/src/corelib/io/qfileselector_p.h"
// Created file "Lib\src\ehstorguids\esguids" 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(GUID_POWERBUTTON_ACTION, 0x7648efa3, 0xdd9c, 0x4e3e, 0xb5, 0x66, 0x50, 0xf9, 0x29, 0x38, 0x62, 0x80);
/***************************************************************************** Copyright (c) 2010, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation 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. ****************************************************************************** * Contents: Native middle-level C interface to LAPACK function stptrs * Author: Intel Corporation * Generated October, 2010 *****************************************************************************/ #include "lapacke.h" #include "lapacke_utils.h" lapack_int LAPACKE_stptrs_work( int matrix_order, char uplo, char trans, char diag, lapack_int n, lapack_int nrhs, const float* ap, float* b, lapack_int ldb ) { lapack_int info = 0; if( matrix_order == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_stptrs( &uplo, &trans, &diag, &n, &nrhs, ap, b, &ldb, &info ); if( info < 0 ) { info = info - 1; } } else if( matrix_order == LAPACK_ROW_MAJOR ) { lapack_int ldb_t = MAX(1,n); float* b_t = NULL; float* ap_t = NULL; /* Check leading dimension(s) */ if( ldb < nrhs ) { info = -9; LAPACKE_xerbla( "LAPACKE_stptrs_work", info ); return info; } /* Allocate memory for temporary array(s) */ b_t = (float*)LAPACKE_malloc( sizeof(float) * ldb_t * MAX(1,nrhs) ); if( b_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_0; } ap_t = (float*) LAPACKE_malloc( sizeof(float) * ( MAX(1,n) * MAX(2,n+1) ) / 2 ); if( ap_t == NULL ) { info = LAPACK_TRANSPOSE_MEMORY_ERROR; goto exit_level_1; } /* Transpose input matrices */ LAPACKE_sge_trans( matrix_order, n, nrhs, b, ldb, b_t, ldb_t ); LAPACKE_stp_trans( matrix_order, uplo, diag, n, ap, ap_t ); /* Call LAPACK function and adjust info */ LAPACK_stptrs( &uplo, &trans, &diag, &n, &nrhs, ap_t, b_t, &ldb_t, &info ); if( info < 0 ) { info = info - 1; } /* Transpose output matrices */ LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, nrhs, b_t, ldb_t, b, ldb ); /* Release memory and exit */ LAPACKE_free( ap_t ); exit_level_1: LAPACKE_free( b_t ); exit_level_0: if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) { LAPACKE_xerbla( "LAPACKE_stptrs_work", info ); } } else { info = -1; LAPACKE_xerbla( "LAPACKE_stptrs_work", info ); } return info; }
// // UDOutputItem.h // Underdark // // Created by Virl on 18/03/16. // Copyright © 2016 Underdark. All rights reserved. // #import <Foundation/Foundation.h> #import "UDFrameData.h" @interface UDOutputItem : NSObject @property (nonatomic, readonly, nullable) NSData* data; @property (nonatomic, readonly, nullable) UDFrameData* frameData; @property (nonatomic, readonly, getter=isEnding) bool isEnding; + (nonnull UDOutputItem*) ending; - (nonnull instancetype) initWithData:(nullable NSData*)data frameData:(nullable UDFrameData*)frameData; @end
// 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_IMtsEvents, 0xbacedf4d, 0x74ab, 0x11d0, 0xb1, 0x62, 0x00, 0xaa, 0x00, 0xba, 0x32, 0x58);
#ifndef TRACKSMODEL_H #define TRACKSMODEL_H #include <QAbstractItemModel> #include "database.h" #define SUPPORTED_TYPES "*.mp3" class TracksModel : public QAbstractItemModel { Q_OBJECT public: enum Columns { stateColumn = 0, idColumn, lastPlayedColumn, trackColumn, artistColumn, albumColumn, tagsColumn, columnNumber }; TracksModel(QObject* parent = NULL); // QAbstractItemModel interface virtual QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex()) const; virtual QModelIndex parent(const QModelIndex &child) const; virtual int rowCount( const QModelIndex &parent = QModelIndex()) const; virtual int columnCount( const QModelIndex &parent = QModelIndex()) const; virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole) const; virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; bool isValidIndex(const QModelIndex &index) const; int columnForProperty(QString prop) const; // database Record* recordForIndex(const QModelIndex& index) const; Record* selectedRecord() const; // for selected record bool setMainFile(QString file); bool setMinusFile(QString file); bool addFile(QString file); bool removeFile(QString file); File* fileForName(QString file); bool addNewTag(QString tag, QString prop); bool deleteDbTag(QString tag); bool addTag(QString tag); // both new and existing bool removeTag(QString tag); QString printHtml(QString property = QString()) const; // for tables QStringList allTags() const; QStringList allCategories(QString type) const; QStringList allProperties() const; QStringList allBigProperties() const; QStringList allFiles() const; Property* propertyType(QString prop) const; bool addProperty(QString name, Property::Type type); public slots: void loadDB(); void clearFiles(); void scanPath(const QString& path); void importDB(const QString& path); void selectRecord(const QModelIndex& index); void saveRecord(); void revertRecord(); void newRecord(); void playFile(const QString& file); void updateRecord(); signals: void message(QString msg); void progressStart(int size, QString msg); void progressEnd(); void progress(int p); void recordSelected(Record* rec); void recordChanged(); void dbChanged(); void tagsChanged(); protected: File* readFile(QString filename); int insertTrack(Record *rec); void updateTrack(Record* rec, Record *origin); void fillFile(File *file); bool checkChanges(); private: QMap<int, Record*> mTracks; QMap<int, File*> mFiles; QMap<QString, Property*> mProperties; QMap<QString, Tag*> mTags; QList<int> mTrackIds; Record* mSelectedTrack; QMap<QString, int> mFileIds; QStringList mCatProps; QStringList mOrdProps; QStringList mBigProps; QMap<QString, QStringList> mCatTags; }; #endif // TRACKSMODEL_H
/*************************************************************************** * Copyright (C) 2009 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 TEST_U_COMMON_H #define TEST_U_COMMON_H #include "common_configuration.h" #include "common_signal_common.h" #if defined (GUI_SUPPORT) #include "common_ui_common.h" #endif // GUI_SUPPORT #include "net_common.h" struct Test_U_SignalHandlerConfiguration : Common_SignalHandlerConfiguration { Test_U_SignalHandlerConfiguration () : Common_SignalHandlerConfiguration () {} }; ////////////////////////////////////////// struct Test_U_Configuration { Test_U_Configuration () : allocatorConfiguration () , dispatchConfiguration () , signalHandlerConfiguration () , userData () {} struct Common_AllocatorConfiguration allocatorConfiguration; struct Common_EventDispatchConfiguration dispatchConfiguration; struct Test_U_SignalHandlerConfiguration signalHandlerConfiguration; struct Net_UserData userData; }; ////////////////////////////////////////// #if defined (GUI_SUPPORT) struct Test_U_UI_ProgressData { Test_U_UI_ProgressData () : state (NULL) {} struct Common_UI_State* state; }; struct Test_U_UI_CBData : Common_UI_CBData { Test_U_UI_CBData () : Common_UI_CBData () , allowUserRuntimeStatistic (true) , progressData () , UIState (NULL) { progressData.state = UIState; } bool allowUserRuntimeStatistic; struct Test_U_UI_ProgressData progressData; struct Common_UI_State* UIState; }; struct Test_U_UI_ThreadData { Test_U_UI_ThreadData () : CBData (NULL) , sessionId (0) {} struct Test_U_UI_CBData* CBData; size_t sessionId; }; #endif // GUI_SUPPORT #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_GETCUSTOMDATAIDENTIFIERRESPONSE_P_H #define QTAWS_GETCUSTOMDATAIDENTIFIERRESPONSE_P_H #include "macie2response_p.h" namespace QtAws { namespace Macie2 { class GetCustomDataIdentifierResponse; class GetCustomDataIdentifierResponsePrivate : public Macie2ResponsePrivate { public: explicit GetCustomDataIdentifierResponsePrivate(GetCustomDataIdentifierResponse * const q); void parseGetCustomDataIdentifierResponse(QXmlStreamReader &xml); private: Q_DECLARE_PUBLIC(GetCustomDataIdentifierResponse) Q_DISABLE_COPY(GetCustomDataIdentifierResponsePrivate) }; } // namespace Macie2 } // namespace QtAws #endif