├── .cproject ├── .gitignore ├── .project ├── Copyright.txt ├── LICENSE ├── README ├── Release ├── .gitignore ├── communications │ └── asio │ │ └── impl │ │ └── subdir.mk ├── makefile ├── objects.mk ├── source │ └── subdir.mk └── sources.mk ├── Sight_Client ├── Broadway │ ├── AUTHORS │ ├── Decoder │ │ ├── README.markdown │ │ ├── SDLMain.h │ │ ├── SDLMain.m │ │ ├── SoftAVC.cpp │ │ ├── SoftAVC.h │ │ ├── appender.py │ │ ├── avc.bc │ │ ├── fixups.py │ │ ├── hooks.js │ │ ├── inc │ │ │ ├── H264SwDecApi.h │ │ │ ├── basetype.h │ │ │ ├── extraFlags.h │ │ │ └── opttarget.h │ │ ├── jquery.extern.js │ │ ├── js │ │ │ ├── avc.js │ │ │ └── avc.wasm │ │ ├── library.js │ │ ├── make.py │ │ ├── obj │ │ │ ├── Decoder.o │ │ │ ├── H264SwDecApi.o │ │ │ ├── extraFlags.o │ │ │ ├── h264bsd_byte_stream.o │ │ │ ├── h264bsd_cavlc.o │ │ │ ├── h264bsd_conceal.o │ │ │ ├── h264bsd_deblocking.o │ │ │ ├── h264bsd_decoder.o │ │ │ ├── h264bsd_dpb.o │ │ │ ├── h264bsd_image.o │ │ │ ├── h264bsd_inter_prediction.o │ │ │ ├── h264bsd_intra_prediction.o │ │ │ ├── h264bsd_macroblock_layer.o │ │ │ ├── h264bsd_nal_unit.o │ │ │ ├── h264bsd_neighbour.o │ │ │ ├── h264bsd_pic_order_cnt.o │ │ │ ├── h264bsd_pic_param_set.o │ │ │ ├── h264bsd_reconstruct.o │ │ │ ├── h264bsd_seq_param_set.o │ │ │ ├── h264bsd_slice_data.o │ │ │ ├── h264bsd_slice_group_map.o │ │ │ ├── h264bsd_slice_header.o │ │ │ ├── h264bsd_storage.o │ │ │ ├── h264bsd_stream.o │ │ │ ├── h264bsd_transform.o │ │ │ ├── h264bsd_util.o │ │ │ ├── h264bsd_vlc.o │ │ │ └── h264bsd_vui.o │ │ ├── omxdl │ │ │ ├── arm11 │ │ │ │ ├── ARM_DELIVERY.TXT │ │ │ │ ├── ARM_MANIFEST.TXT │ │ │ │ ├── api │ │ │ │ │ ├── armCOMM.h │ │ │ │ │ ├── armCOMM_BitDec_s.h │ │ │ │ │ ├── armCOMM_Bitstream.h │ │ │ │ │ ├── armCOMM_IDCTTable.h │ │ │ │ │ ├── armCOMM_IDCT_s.h │ │ │ │ │ ├── armCOMM_MaskTable.h │ │ │ │ │ ├── armCOMM_Version.h │ │ │ │ │ ├── armCOMM_s.h │ │ │ │ │ ├── armOMX.h │ │ │ │ │ ├── omxtypes.h │ │ │ │ │ └── omxtypes_s.h │ │ │ │ ├── build_vc.pl │ │ │ │ ├── filelist_vc.txt │ │ │ │ ├── src │ │ │ │ │ ├── armCOMM.c │ │ │ │ │ ├── armCOMM_Bitstream.c │ │ │ │ │ ├── armCOMM_IDCTTable.c │ │ │ │ │ └── armCOMM_MaskTable.c │ │ │ │ └── vc │ │ │ │ │ ├── api │ │ │ │ │ ├── armVC.h │ │ │ │ │ ├── armVCCOMM_s.h │ │ │ │ │ ├── omxVC.h │ │ │ │ │ └── omxVC_s.h │ │ │ │ │ ├── comm │ │ │ │ │ └── src │ │ │ │ │ │ ├── omxVCCOMM_Copy16x16_s.s │ │ │ │ │ │ ├── omxVCCOMM_Copy8x8_s.s │ │ │ │ │ │ └── omxVCCOMM_ExpandFrame_I_s.s │ │ │ │ │ ├── m4p10 │ │ │ │ │ ├── api │ │ │ │ │ │ └── armVCM4P10_CAVLCTables.h │ │ │ │ │ └── src │ │ │ │ │ │ ├── armVCM4P10_Average_4x_Align_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_CAVLCTables.c │ │ │ │ │ │ ├── armVCM4P10_DeblockingChroma_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_DeblockingLuma_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_DecodeCoeffsToPair_s.s │ │ │ │ │ │ ├── armVCM4P10_DequantTables_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_Align_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_Copy_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_DiagCopy_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfDiagHorVer4x4_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfDiagVerHor4x4_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_Interpolate_Chroma_s.s │ │ │ │ │ │ ├── armVCM4P10_QuantTables_s.s │ │ │ │ │ │ ├── armVCM4P10_TransformResidual4x4_s.s │ │ │ │ │ │ ├── armVCM4P10_UnpackBlock4x4_s.s │ │ │ │ │ │ ├── omxVCM4P10_DeblockChroma_I.c │ │ │ │ │ │ ├── omxVCM4P10_DeblockLuma_I.c │ │ │ │ │ │ ├── omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c │ │ │ │ │ │ ├── omxVCM4P10_DecodeCoeffsToPairCAVLC.c │ │ │ │ │ │ ├── omxVCM4P10_DequantTransformResidualFromPairAndAdd_s.s │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingChroma_HorEdge_I_s.s │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingChroma_VerEdge_I_s.s │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingLuma_HorEdge_I_s.s │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingLuma_VerEdge_I_s.s │ │ │ │ │ │ ├── omxVCM4P10_InterpolateChroma.c │ │ │ │ │ │ ├── omxVCM4P10_InterpolateLuma_s.s │ │ │ │ │ │ ├── omxVCM4P10_PredictIntraChroma_8x8_s.s │ │ │ │ │ │ ├── omxVCM4P10_PredictIntra_16x16_s.s │ │ │ │ │ │ ├── omxVCM4P10_PredictIntra_4x4_s.s │ │ │ │ │ │ ├── omxVCM4P10_TransformDequantChromaDCFromPair_s.s │ │ │ │ │ │ └── omxVCM4P10_TransformDequantLumaDCFromPair_s.s │ │ │ │ │ ├── m4p2 │ │ │ │ │ ├── api │ │ │ │ │ │ ├── armVCM4P2_Huff_Tables_VLC.h │ │ │ │ │ │ └── armVCM4P2_ZigZag_Tables.h │ │ │ │ │ └── src │ │ │ │ │ │ ├── armVCM4P2_Clip8_s.s │ │ │ │ │ │ ├── armVCM4P2_DecodeVLCZigzag_AC_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P2_Huff_Tables_VLC.c │ │ │ │ │ │ ├── armVCM4P2_Lookup_Tables.c │ │ │ │ │ │ ├── armVCM4P2_SetPredDir_s.s │ │ │ │ │ │ ├── armVCM4P2_Zigzag_Tables.c │ │ │ │ │ │ ├── omxVCM4P2_DecodeBlockCoef_Inter.c │ │ │ │ │ │ ├── omxVCM4P2_DecodeBlockCoef_Intra.c │ │ │ │ │ │ ├── omxVCM4P2_DecodePadMV_PVOP_s.s │ │ │ │ │ │ ├── omxVCM4P2_DecodeVLCZigzag_Inter_s.s │ │ │ │ │ │ ├── omxVCM4P2_DecodeVLCZigzag_IntraACVLC_s.s │ │ │ │ │ │ ├── omxVCM4P2_DecodeVLCZigzag_IntraDCVLC_s.s │ │ │ │ │ │ ├── omxVCM4P2_FindMVpred_s.s │ │ │ │ │ │ ├── omxVCM4P2_IDCT8x8blk_s.s │ │ │ │ │ │ ├── omxVCM4P2_MCReconBlock_s.s │ │ │ │ │ │ ├── omxVCM4P2_PredictReconCoefIntra_s.s │ │ │ │ │ │ ├── omxVCM4P2_QuantInvInter_I_s.s │ │ │ │ │ │ └── omxVCM4P2_QuantInvIntra_I_s.s │ │ │ │ │ └── src │ │ │ │ │ └── armVC_Version.c │ │ │ ├── arm_neon │ │ │ │ ├── ARM_DELIVERY.TXT │ │ │ │ ├── ARM_MANIFEST.TXT │ │ │ │ ├── api │ │ │ │ │ ├── armCOMM.h │ │ │ │ │ ├── armCOMM_BitDec_s.h │ │ │ │ │ ├── armCOMM_Bitstream.h │ │ │ │ │ ├── armCOMM_IDCTTable.h │ │ │ │ │ ├── armCOMM_IDCT_s.h │ │ │ │ │ ├── armCOMM_MaskTable.h │ │ │ │ │ ├── armCOMM_Version.h │ │ │ │ │ ├── armCOMM_s.h │ │ │ │ │ ├── armOMX.h │ │ │ │ │ ├── omxtypes.h │ │ │ │ │ └── omxtypes_s.h │ │ │ │ ├── build_vc.pl │ │ │ │ ├── filelist_vc.txt │ │ │ │ ├── src │ │ │ │ │ ├── armCOMM.c │ │ │ │ │ ├── armCOMM_Bitstream.c │ │ │ │ │ ├── armCOMM_IDCTTable.c │ │ │ │ │ └── armCOMM_MaskTable.c │ │ │ │ └── vc │ │ │ │ │ ├── api │ │ │ │ │ ├── armVC.h │ │ │ │ │ ├── armVCCOMM_s.h │ │ │ │ │ ├── omxVC.h │ │ │ │ │ └── omxVC_s.h │ │ │ │ │ ├── comm │ │ │ │ │ └── src │ │ │ │ │ │ ├── omxVCCOMM_Copy16x16_s.s │ │ │ │ │ │ ├── omxVCCOMM_Copy8x8_s.s │ │ │ │ │ │ └── omxVCCOMM_ExpandFrame_I_s.s │ │ │ │ │ ├── m4p10 │ │ │ │ │ ├── api │ │ │ │ │ │ └── armVCM4P10_CAVLCTables.h │ │ │ │ │ ├── src │ │ │ │ │ │ ├── armVCM4P10_Average_4x_Align_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_CAVLCTables.c │ │ │ │ │ │ ├── armVCM4P10_DeblockingChroma_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_DeblockingLuma_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_DecodeCoeffsToPair_s.s │ │ │ │ │ │ ├── armVCM4P10_DequantTables_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_Align_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_Copy_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_DiagCopy_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfDiagHorVer4x4_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfDiagVerHor4x4_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P10_Interpolate_Chroma_s.s │ │ │ │ │ │ ├── armVCM4P10_QuantTables_s.s │ │ │ │ │ │ ├── armVCM4P10_TransformResidual4x4_s.s │ │ │ │ │ │ ├── armVCM4P10_UnpackBlock4x4_s.s │ │ │ │ │ │ ├── omxVCM4P10_DeblockChroma_I.c │ │ │ │ │ │ ├── omxVCM4P10_DeblockLuma_I.c │ │ │ │ │ │ ├── omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c │ │ │ │ │ │ ├── omxVCM4P10_DecodeCoeffsToPairCAVLC.c │ │ │ │ │ │ ├── omxVCM4P10_DequantTransformResidualFromPairAndAdd_s.s │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingChroma_HorEdge_I_s.s │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingChroma_VerEdge_I_s.s │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingLuma_HorEdge_I_s.s │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingLuma_VerEdge_I_s.s │ │ │ │ │ │ ├── omxVCM4P10_InterpolateChroma.c │ │ │ │ │ │ ├── omxVCM4P10_InterpolateLuma_s.s │ │ │ │ │ │ ├── omxVCM4P10_PredictIntraChroma_8x8_s.s │ │ │ │ │ │ ├── omxVCM4P10_PredictIntra_16x16_s.s │ │ │ │ │ │ ├── omxVCM4P10_PredictIntra_4x4_s.s │ │ │ │ │ │ ├── omxVCM4P10_TransformDequantChromaDCFromPair_s.s │ │ │ │ │ │ └── omxVCM4P10_TransformDequantLumaDCFromPair_s.s │ │ │ │ │ └── src_gcc │ │ │ │ │ │ ├── armVCM4P10_Average_4x_Align_unsafe_s.S │ │ │ │ │ │ ├── armVCM4P10_DeblockingChroma_unsafe_s.S │ │ │ │ │ │ ├── armVCM4P10_DeblockingLuma_unsafe_s.S │ │ │ │ │ │ ├── armVCM4P10_DecodeCoeffsToPair_s.S │ │ │ │ │ │ ├── armVCM4P10_DequantTables_s.S │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_Align_unsafe_s.S │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_Copy_unsafe_s.S │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_DiagCopy_unsafe_s.S │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfDiagHorVer4x4_unsafe_s.S │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfDiagVerHor4x4_unsafe_s.S │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe_s.S │ │ │ │ │ │ ├── armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe_s.S │ │ │ │ │ │ ├── armVCM4P10_Interpolate_Chroma_s.S │ │ │ │ │ │ ├── armVCM4P10_QuantTables_s.S │ │ │ │ │ │ ├── armVCM4P10_TransformResidual4x4_s.S │ │ │ │ │ │ ├── armVCM4P10_UnpackBlock4x4_s.S │ │ │ │ │ │ ├── omxVCM4P10_DeblockLuma_I.S │ │ │ │ │ │ ├── omxVCM4P10_DequantTransformResidualFromPairAndAdd_s.S │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingChroma_HorEdge_I_s.S │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingChroma_VerEdge_I_s.S │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingLuma_HorEdge_I_s.S │ │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingLuma_VerEdge_I_s.S │ │ │ │ │ │ ├── omxVCM4P10_InterpolateLuma_s.S │ │ │ │ │ │ ├── omxVCM4P10_PredictIntraChroma_8x8_s.S │ │ │ │ │ │ ├── omxVCM4P10_PredictIntra_16x16_s.S │ │ │ │ │ │ ├── omxVCM4P10_PredictIntra_4x4_s.S │ │ │ │ │ │ ├── omxVCM4P10_TransformDequantChromaDCFromPair_s.S │ │ │ │ │ │ └── omxVCM4P10_TransformDequantLumaDCFromPair_s.S │ │ │ │ │ ├── m4p2 │ │ │ │ │ ├── api │ │ │ │ │ │ ├── armVCM4P2_Huff_Tables_VLC.h │ │ │ │ │ │ └── armVCM4P2_ZigZag_Tables.h │ │ │ │ │ └── src │ │ │ │ │ │ ├── armVCM4P2_Clip8_s.s │ │ │ │ │ │ ├── armVCM4P2_DecodeVLCZigzag_AC_unsafe_s.s │ │ │ │ │ │ ├── armVCM4P2_Huff_Tables_VLC.c │ │ │ │ │ │ ├── armVCM4P2_Lookup_Tables.c │ │ │ │ │ │ ├── armVCM4P2_SetPredDir_s.s │ │ │ │ │ │ ├── armVCM4P2_Zigzag_Tables.c │ │ │ │ │ │ ├── omxVCM4P2_DecodeBlockCoef_Inter.c │ │ │ │ │ │ ├── omxVCM4P2_DecodeBlockCoef_Intra.c │ │ │ │ │ │ ├── omxVCM4P2_DecodePadMV_PVOP_s.s │ │ │ │ │ │ ├── omxVCM4P2_DecodeVLCZigzag_Inter_s.s │ │ │ │ │ │ ├── omxVCM4P2_DecodeVLCZigzag_IntraACVLC_s.s │ │ │ │ │ │ ├── omxVCM4P2_DecodeVLCZigzag_IntraDCVLC_s.s │ │ │ │ │ │ ├── omxVCM4P2_FindMVpred_s.s │ │ │ │ │ │ ├── omxVCM4P2_IDCT8x8blk_s.s │ │ │ │ │ │ ├── omxVCM4P2_MCReconBlock_s.s │ │ │ │ │ │ ├── omxVCM4P2_PredictReconCoefIntra_s.s │ │ │ │ │ │ ├── omxVCM4P2_QuantInvInter_I_s.s │ │ │ │ │ │ └── omxVCM4P2_QuantInvIntra_I_s.s │ │ │ │ │ └── src │ │ │ │ │ └── armVC_Version.c │ │ │ └── reference │ │ │ │ ├── ARM_DELIVERY.TXT │ │ │ │ ├── ARM_MANIFEST.TXT │ │ │ │ ├── api │ │ │ │ ├── armCOMM.h │ │ │ │ ├── armCOMM_Bitstream.h │ │ │ │ ├── armCOMM_Version.h │ │ │ │ ├── armOMX.h │ │ │ │ └── omxtypes.h │ │ │ │ ├── build_vc.pl │ │ │ │ ├── filelist_vc.txt │ │ │ │ ├── src │ │ │ │ ├── armCOMM.c │ │ │ │ └── armCOMM_Bitstream.c │ │ │ │ └── vc │ │ │ │ ├── api │ │ │ │ ├── armVC.h │ │ │ │ └── omxVC.h │ │ │ │ ├── comm │ │ │ │ └── src │ │ │ │ │ ├── armVCCOMM_Average.c │ │ │ │ │ ├── armVCCOMM_SAD.c │ │ │ │ │ ├── omxVCCOMM_Average_16x.c │ │ │ │ │ ├── omxVCCOMM_Average_8x.c │ │ │ │ │ ├── omxVCCOMM_ComputeTextureErrorBlock.c │ │ │ │ │ ├── omxVCCOMM_ComputeTextureErrorBlock_SAD.c │ │ │ │ │ ├── omxVCCOMM_Copy16x16.c │ │ │ │ │ ├── omxVCCOMM_Copy8x8.c │ │ │ │ │ ├── omxVCCOMM_ExpandFrame_I.c │ │ │ │ │ ├── omxVCCOMM_LimitMVToRect.c │ │ │ │ │ ├── omxVCCOMM_SAD_16x.c │ │ │ │ │ └── omxVCCOMM_SAD_8x.c │ │ │ │ ├── m4p10 │ │ │ │ ├── api │ │ │ │ │ └── armVCM4P10_CAVLCTables.h │ │ │ │ └── src │ │ │ │ │ ├── armVCM4P10_CAVLCTables.c │ │ │ │ │ ├── armVCM4P10_CompareMotionCostToMV.c │ │ │ │ │ ├── armVCM4P10_DeBlockPixel.c │ │ │ │ │ ├── armVCM4P10_DecodeCoeffsToPair.c │ │ │ │ │ ├── armVCM4P10_DequantTables.c │ │ │ │ │ ├── armVCM4P10_FwdTransformResidual4x4.c │ │ │ │ │ ├── armVCM4P10_InterpolateHalfDiag_Luma.c │ │ │ │ │ ├── armVCM4P10_InterpolateHalfHor_Luma.c │ │ │ │ │ ├── armVCM4P10_InterpolateHalfVer_Luma.c │ │ │ │ │ ├── armVCM4P10_Interpolate_Chroma.c │ │ │ │ │ ├── armVCM4P10_Interpolate_Luma.c │ │ │ │ │ ├── armVCM4P10_PredictIntraDC4x4.c │ │ │ │ │ ├── armVCM4P10_QuantTables.c │ │ │ │ │ ├── armVCM4P10_SADQuar.c │ │ │ │ │ ├── armVCM4P10_TransformResidual4x4.c │ │ │ │ │ ├── armVCM4P10_UnpackBlock2x2.c │ │ │ │ │ ├── armVCM4P10_UnpackBlock4x4.c │ │ │ │ │ ├── omxVCM4P10_Average_4x.c │ │ │ │ │ ├── omxVCM4P10_BlockMatch_Half.c │ │ │ │ │ ├── omxVCM4P10_BlockMatch_Integer.c │ │ │ │ │ ├── omxVCM4P10_BlockMatch_Quarter.c │ │ │ │ │ ├── omxVCM4P10_DeblockChroma_I.c │ │ │ │ │ ├── omxVCM4P10_DeblockLuma_I.c │ │ │ │ │ ├── omxVCM4P10_DecodeChromaDcCoeffsToPairCAVLC.c │ │ │ │ │ ├── omxVCM4P10_DecodeCoeffsToPairCAVLC.c │ │ │ │ │ ├── omxVCM4P10_DequantTransformResidualFromPairAndAdd.c │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingChroma_HorEdge_I.c │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingChroma_VerEdge_I.c │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingLuma_HorEdge_I.c │ │ │ │ │ ├── omxVCM4P10_FilterDeblockingLuma_VerEdge_I.c │ │ │ │ │ ├── omxVCM4P10_GetVLCInfo.c │ │ │ │ │ ├── omxVCM4P10_InterpolateChroma.c │ │ │ │ │ ├── omxVCM4P10_InterpolateHalfHor_Luma.c │ │ │ │ │ ├── omxVCM4P10_InterpolateHalfVer_Luma.c │ │ │ │ │ ├── omxVCM4P10_InterpolateLuma.c │ │ │ │ │ ├── omxVCM4P10_InvTransformDequant_ChromaDC.c │ │ │ │ │ ├── omxVCM4P10_InvTransformDequant_LumaDC.c │ │ │ │ │ ├── omxVCM4P10_InvTransformResidualAndAdd.c │ │ │ │ │ ├── omxVCM4P10_MEGetBufSize.c │ │ │ │ │ ├── omxVCM4P10_MEInit.c │ │ │ │ │ ├── omxVCM4P10_MotionEstimationMB.c │ │ │ │ │ ├── omxVCM4P10_PredictIntraChroma_8x8.c │ │ │ │ │ ├── omxVCM4P10_PredictIntra_16x16.c │ │ │ │ │ ├── omxVCM4P10_PredictIntra_4x4.c │ │ │ │ │ ├── omxVCM4P10_SADQuar_16x.c │ │ │ │ │ ├── omxVCM4P10_SADQuar_4x.c │ │ │ │ │ ├── omxVCM4P10_SADQuar_8x.c │ │ │ │ │ ├── omxVCM4P10_SAD_4x.c │ │ │ │ │ ├── omxVCM4P10_SATD_4x4.c │ │ │ │ │ ├── omxVCM4P10_SubAndTransformQDQResidual.c │ │ │ │ │ ├── omxVCM4P10_TransformDequantChromaDCFromPair.c │ │ │ │ │ ├── omxVCM4P10_TransformDequantLumaDCFromPair.c │ │ │ │ │ ├── omxVCM4P10_TransformQuant_ChromaDC.c │ │ │ │ │ └── omxVCM4P10_TransformQuant_LumaDC.c │ │ │ │ ├── m4p2 │ │ │ │ ├── api │ │ │ │ │ ├── armVCM4P2_DCT_Table.h │ │ │ │ │ ├── armVCM4P2_Huff_Tables_VLC.h │ │ │ │ │ └── armVCM4P2_ZigZag_Tables.h │ │ │ │ └── src │ │ │ │ │ ├── armVCM4P2_ACDCPredict.c │ │ │ │ │ ├── armVCM4P2_BlockMatch_Half.c │ │ │ │ │ ├── armVCM4P2_BlockMatch_Integer.c │ │ │ │ │ ├── armVCM4P2_CheckVLCEscapeMode.c │ │ │ │ │ ├── armVCM4P2_CompareMV.c │ │ │ │ │ ├── armVCM4P2_DCT_Table.c │ │ │ │ │ ├── armVCM4P2_DecodeVLCZigzag_intra.c │ │ │ │ │ ├── armVCM4P2_EncodeVLCZigzag_intra.c │ │ │ │ │ ├── armVCM4P2_FillVLCBuffer.c │ │ │ │ │ ├── armVCM4P2_FillVLDBuffer.c │ │ │ │ │ ├── armVCM4P2_GetVLCBits.c │ │ │ │ │ ├── armVCM4P2_Huff_Tables_VLC.c │ │ │ │ │ ├── armVCM4P2_PutVLCBits.c │ │ │ │ │ ├── armVCM4P2_SetPredDir.c │ │ │ │ │ ├── armVCM4P2_Zigzag_Tables.c │ │ │ │ │ ├── omxVCM4P2_BlockMatch_Half_16x16.c │ │ │ │ │ ├── omxVCM4P2_BlockMatch_Half_8x8.c │ │ │ │ │ ├── omxVCM4P2_BlockMatch_Integer_16x16.c │ │ │ │ │ ├── omxVCM4P2_BlockMatch_Integer_8x8.c │ │ │ │ │ ├── omxVCM4P2_DCT8x8blk.c │ │ │ │ │ ├── omxVCM4P2_DecodeBlockCoef_Inter.c │ │ │ │ │ ├── omxVCM4P2_DecodeBlockCoef_Intra.c │ │ │ │ │ ├── omxVCM4P2_DecodePadMV_PVOP.c │ │ │ │ │ ├── omxVCM4P2_DecodeVLCZigzag_Inter.c │ │ │ │ │ ├── omxVCM4P2_DecodeVLCZigzag_IntraACVLC.c │ │ │ │ │ ├── omxVCM4P2_DecodeVLCZigzag_IntraDCVLC.c │ │ │ │ │ ├── omxVCM4P2_EncodeMV.c │ │ │ │ │ ├── omxVCM4P2_EncodeVLCZigzag_Inter.c │ │ │ │ │ ├── omxVCM4P2_EncodeVLCZigzag_IntraACVLC.c │ │ │ │ │ ├── omxVCM4P2_EncodeVLCZigzag_IntraDCVLC.c │ │ │ │ │ ├── omxVCM4P2_FindMVpred.c │ │ │ │ │ ├── omxVCM4P2_IDCT8x8blk.c │ │ │ │ │ ├── omxVCM4P2_MCReconBlock.c │ │ │ │ │ ├── omxVCM4P2_MEGetBufSize.c │ │ │ │ │ ├── omxVCM4P2_MEInit.c │ │ │ │ │ ├── omxVCM4P2_MotionEstimationMB.c │ │ │ │ │ ├── omxVCM4P2_PredictReconCoefIntra.c │ │ │ │ │ ├── omxVCM4P2_QuantInter_I.c │ │ │ │ │ ├── omxVCM4P2_QuantIntra_I.c │ │ │ │ │ ├── omxVCM4P2_QuantInvInter_I.c │ │ │ │ │ ├── omxVCM4P2_QuantInvIntra_I.c │ │ │ │ │ ├── omxVCM4P2_TransRecBlockCoef_inter.c │ │ │ │ │ └── omxVCM4P2_TransRecBlockCoef_intra.c │ │ │ │ └── src │ │ │ │ └── armVC_Version.c │ │ ├── paint_1.js │ │ ├── paint_2.js │ │ └── src │ │ │ ├── Broadway.c │ │ │ ├── DecTestBench.c │ │ │ ├── Decoder.c │ │ │ ├── EvaluationTestBench.c │ │ │ ├── EvaluationTestBench.x │ │ │ ├── H264SwDecApi.c │ │ │ ├── TestBenchMultipleInstance.c │ │ │ ├── TestBenchMultipleInstance.x │ │ │ ├── arm11_asm │ │ │ ├── h264bsd_interpolate_chroma_hor.s │ │ │ ├── h264bsd_interpolate_chroma_hor_ver.s │ │ │ ├── h264bsd_interpolate_chroma_ver.s │ │ │ ├── h264bsd_interpolate_hor_half.s │ │ │ ├── h264bsd_interpolate_hor_quarter.s │ │ │ ├── h264bsd_interpolate_hor_ver_quarter.s │ │ │ ├── h264bsd_interpolate_mid_hor.s │ │ │ ├── h264bsd_interpolate_ver_half.s │ │ │ ├── h264bsd_interpolate_ver_quarter.s │ │ │ └── win_asm.bat │ │ │ ├── arm_neon_asm │ │ │ ├── h264bsdClearMbLayer.s │ │ │ ├── h264bsdCountLeadingZeros.s │ │ │ ├── h264bsdFillRow7.s │ │ │ ├── h264bsdFlushBits.s │ │ │ └── h264bsdWriteMacroblock.s │ │ │ ├── arm_neon_asm_gcc │ │ │ ├── asm_common.S │ │ │ ├── h264bsdClearMbLayer.S │ │ │ ├── h264bsdCountLeadingZeros.S │ │ │ ├── h264bsdFillRow7.S │ │ │ ├── h264bsdFlushBits.S │ │ │ └── h264bsdWriteMacroblock.S │ │ │ ├── extraFlags.c │ │ │ ├── h264bsd_byte_stream.c │ │ │ ├── h264bsd_byte_stream.h │ │ │ ├── h264bsd_cavlc.c │ │ │ ├── h264bsd_cavlc.h │ │ │ ├── h264bsd_cfg.h │ │ │ ├── h264bsd_conceal.c │ │ │ ├── h264bsd_conceal.h │ │ │ ├── h264bsd_container.h │ │ │ ├── h264bsd_deblocking.c │ │ │ ├── h264bsd_deblocking.h │ │ │ ├── h264bsd_decoder.c │ │ │ ├── h264bsd_decoder.h │ │ │ ├── h264bsd_dpb.c │ │ │ ├── h264bsd_dpb.h │ │ │ ├── h264bsd_image.c │ │ │ ├── h264bsd_image.h │ │ │ ├── h264bsd_inter_prediction.c │ │ │ ├── h264bsd_inter_prediction.h │ │ │ ├── h264bsd_intra_prediction.c │ │ │ ├── h264bsd_intra_prediction.h │ │ │ ├── h264bsd_macroblock_layer.c │ │ │ ├── h264bsd_macroblock_layer.h │ │ │ ├── h264bsd_nal_unit.c │ │ │ ├── h264bsd_nal_unit.h │ │ │ ├── h264bsd_neighbour.c │ │ │ ├── h264bsd_neighbour.h │ │ │ ├── h264bsd_pic_order_cnt.c │ │ │ ├── h264bsd_pic_order_cnt.h │ │ │ ├── h264bsd_pic_param_set.c │ │ │ ├── h264bsd_pic_param_set.h │ │ │ ├── h264bsd_reconstruct.c │ │ │ ├── h264bsd_reconstruct.h │ │ │ ├── h264bsd_sei.c │ │ │ ├── h264bsd_sei.h │ │ │ ├── h264bsd_seq_param_set.c │ │ │ ├── h264bsd_seq_param_set.h │ │ │ ├── h264bsd_slice_data.c │ │ │ ├── h264bsd_slice_data.h │ │ │ ├── h264bsd_slice_group_map.c │ │ │ ├── h264bsd_slice_group_map.h │ │ │ ├── h264bsd_slice_header.c │ │ │ ├── h264bsd_slice_header.h │ │ │ ├── h264bsd_storage.c │ │ │ ├── h264bsd_storage.h │ │ │ ├── h264bsd_stream.c │ │ │ ├── h264bsd_stream.h │ │ │ ├── h264bsd_transform.c │ │ │ ├── h264bsd_transform.h │ │ │ ├── h264bsd_util.c │ │ │ ├── h264bsd_util.h │ │ │ ├── h264bsd_vlc.c │ │ │ ├── h264bsd_vlc.h │ │ │ ├── h264bsd_vui.c │ │ │ └── h264bsd_vui.h │ ├── LICENSE │ ├── Player │ │ ├── Decoder.js │ │ ├── Player.js │ │ ├── YUVCanvas.js │ │ ├── avc.wasm │ │ ├── mozilla_story.mp4 │ │ ├── mp4.html │ │ ├── mp4.js │ │ ├── screen.css │ │ ├── storyDemo.html │ │ ├── stream.js │ │ ├── tree.mp4 │ │ └── treeDemo.html │ ├── README.markdown │ └── templates │ │ ├── DecoderPost.js │ │ └── DecoderPre.js ├── bytes.js ├── client.html ├── peripherals.js └── websocketConnection.js ├── communications ├── COPYING ├── LICENSE_1_0.txt ├── asio.hpp ├── asio │ ├── async_result.hpp │ ├── basic_datagram_socket.hpp │ ├── basic_deadline_timer.hpp │ ├── basic_io_object.hpp │ ├── basic_raw_socket.hpp │ ├── basic_seq_packet_socket.hpp │ ├── basic_serial_port.hpp │ ├── basic_signal_set.hpp │ ├── basic_socket.hpp │ ├── basic_socket_acceptor.hpp │ ├── basic_socket_iostream.hpp │ ├── basic_socket_streambuf.hpp │ ├── basic_stream_socket.hpp │ ├── basic_streambuf.hpp │ ├── basic_streambuf_fwd.hpp │ ├── basic_waitable_timer.hpp │ ├── buffer.hpp │ ├── buffered_read_stream.hpp │ ├── buffered_read_stream_fwd.hpp │ ├── buffered_stream.hpp │ ├── buffered_stream_fwd.hpp │ ├── buffered_write_stream.hpp │ ├── buffered_write_stream_fwd.hpp │ ├── buffers_iterator.hpp │ ├── completion_condition.hpp │ ├── connect.hpp │ ├── coroutine.hpp │ ├── datagram_socket_service.hpp │ ├── deadline_timer.hpp │ ├── deadline_timer_service.hpp │ ├── detail │ │ ├── addressof.hpp │ │ ├── array.hpp │ │ ├── array_fwd.hpp │ │ ├── assert.hpp │ │ ├── atomic_count.hpp │ │ ├── base_from_completion_cond.hpp │ │ ├── bind_handler.hpp │ │ ├── buffer_resize_guard.hpp │ │ ├── buffer_sequence_adapter.hpp │ │ ├── buffered_stream_storage.hpp │ │ ├── call_stack.hpp │ │ ├── chrono_time_traits.hpp │ │ ├── completion_handler.hpp │ │ ├── config.hpp │ │ ├── consuming_buffers.hpp │ │ ├── cstdint.hpp │ │ ├── date_time_fwd.hpp │ │ ├── deadline_timer_service.hpp │ │ ├── dependent_type.hpp │ │ ├── descriptor_ops.hpp │ │ ├── descriptor_read_op.hpp │ │ ├── descriptor_write_op.hpp │ │ ├── dev_poll_reactor.hpp │ │ ├── epoll_reactor.hpp │ │ ├── event.hpp │ │ ├── eventfd_select_interrupter.hpp │ │ ├── fd_set_adapter.hpp │ │ ├── fenced_block.hpp │ │ ├── function.hpp │ │ ├── gcc_arm_fenced_block.hpp │ │ ├── gcc_hppa_fenced_block.hpp │ │ ├── gcc_sync_fenced_block.hpp │ │ ├── gcc_x86_fenced_block.hpp │ │ ├── handler_alloc_helpers.hpp │ │ ├── handler_cont_helpers.hpp │ │ ├── handler_invoke_helpers.hpp │ │ ├── handler_tracking.hpp │ │ ├── handler_type_requirements.hpp │ │ ├── hash_map.hpp │ │ ├── impl │ │ │ ├── buffer_sequence_adapter.ipp │ │ │ ├── descriptor_ops.ipp │ │ │ ├── dev_poll_reactor.hpp │ │ │ ├── dev_poll_reactor.ipp │ │ │ ├── epoll_reactor.hpp │ │ │ ├── epoll_reactor.ipp │ │ │ ├── eventfd_select_interrupter.ipp │ │ │ ├── handler_tracking.ipp │ │ │ ├── kqueue_reactor.hpp │ │ │ ├── kqueue_reactor.ipp │ │ │ ├── pipe_select_interrupter.ipp │ │ │ ├── posix_event.ipp │ │ │ ├── posix_mutex.ipp │ │ │ ├── posix_thread.ipp │ │ │ ├── posix_tss_ptr.ipp │ │ │ ├── reactive_descriptor_service.ipp │ │ │ ├── reactive_serial_port_service.ipp │ │ │ ├── reactive_socket_service_base.ipp │ │ │ ├── resolver_service_base.ipp │ │ │ ├── select_reactor.hpp │ │ │ ├── select_reactor.ipp │ │ │ ├── service_registry.hpp │ │ │ ├── service_registry.ipp │ │ │ ├── signal_set_service.ipp │ │ │ ├── socket_ops.ipp │ │ │ ├── socket_select_interrupter.ipp │ │ │ ├── strand_service.hpp │ │ │ ├── strand_service.ipp │ │ │ ├── task_io_service.hpp │ │ │ ├── task_io_service.ipp │ │ │ ├── throw_error.ipp │ │ │ ├── timer_queue_ptime.ipp │ │ │ ├── timer_queue_set.ipp │ │ │ ├── win_event.ipp │ │ │ ├── win_iocp_handle_service.ipp │ │ │ ├── win_iocp_io_service.hpp │ │ │ ├── win_iocp_io_service.ipp │ │ │ ├── win_iocp_serial_port_service.ipp │ │ │ ├── win_iocp_socket_service_base.ipp │ │ │ ├── win_mutex.ipp │ │ │ ├── win_object_handle_service.ipp │ │ │ ├── win_static_mutex.ipp │ │ │ ├── win_thread.ipp │ │ │ ├── win_tss_ptr.ipp │ │ │ ├── winrt_ssocket_service_base.ipp │ │ │ ├── winrt_timer_scheduler.hpp │ │ │ ├── winrt_timer_scheduler.ipp │ │ │ └── winsock_init.ipp │ │ ├── io_control.hpp │ │ ├── keyword_tss_ptr.hpp │ │ ├── kqueue_reactor.hpp │ │ ├── limits.hpp │ │ ├── local_free_on_block_exit.hpp │ │ ├── macos_fenced_block.hpp │ │ ├── mutex.hpp │ │ ├── noncopyable.hpp │ │ ├── null_event.hpp │ │ ├── null_fenced_block.hpp │ │ ├── null_mutex.hpp │ │ ├── null_reactor.hpp │ │ ├── null_signal_blocker.hpp │ │ ├── null_socket_service.hpp │ │ ├── null_static_mutex.hpp │ │ ├── null_thread.hpp │ │ ├── null_tss_ptr.hpp │ │ ├── object_pool.hpp │ │ ├── old_win_sdk_compat.hpp │ │ ├── op_queue.hpp │ │ ├── operation.hpp │ │ ├── pipe_select_interrupter.hpp │ │ ├── pop_options.hpp │ │ ├── posix_event.hpp │ │ ├── posix_fd_set_adapter.hpp │ │ ├── posix_mutex.hpp │ │ ├── posix_signal_blocker.hpp │ │ ├── posix_static_mutex.hpp │ │ ├── posix_thread.hpp │ │ ├── posix_tss_ptr.hpp │ │ ├── push_options.hpp │ │ ├── reactive_descriptor_service.hpp │ │ ├── reactive_null_buffers_op.hpp │ │ ├── reactive_serial_port_service.hpp │ │ ├── reactive_socket_accept_op.hpp │ │ ├── reactive_socket_connect_op.hpp │ │ ├── reactive_socket_recv_op.hpp │ │ ├── reactive_socket_recvfrom_op.hpp │ │ ├── reactive_socket_recvmsg_op.hpp │ │ ├── reactive_socket_send_op.hpp │ │ ├── reactive_socket_sendto_op.hpp │ │ ├── reactive_socket_service.hpp │ │ ├── reactive_socket_service_base.hpp │ │ ├── reactor.hpp │ │ ├── reactor_fwd.hpp │ │ ├── reactor_op.hpp │ │ ├── reactor_op_queue.hpp │ │ ├── regex_fwd.hpp │ │ ├── resolve_endpoint_op.hpp │ │ ├── resolve_op.hpp │ │ ├── resolver_service.hpp │ │ ├── resolver_service_base.hpp │ │ ├── scoped_lock.hpp │ │ ├── scoped_ptr.hpp │ │ ├── select_interrupter.hpp │ │ ├── select_reactor.hpp │ │ ├── service_registry.hpp │ │ ├── shared_ptr.hpp │ │ ├── signal_blocker.hpp │ │ ├── signal_handler.hpp │ │ ├── signal_init.hpp │ │ ├── signal_op.hpp │ │ ├── signal_set_service.hpp │ │ ├── socket_holder.hpp │ │ ├── socket_ops.hpp │ │ ├── socket_option.hpp │ │ ├── socket_select_interrupter.hpp │ │ ├── socket_types.hpp │ │ ├── solaris_fenced_block.hpp │ │ ├── static_mutex.hpp │ │ ├── std_event.hpp │ │ ├── std_mutex.hpp │ │ ├── std_static_mutex.hpp │ │ ├── std_thread.hpp │ │ ├── strand_service.hpp │ │ ├── task_io_service.hpp │ │ ├── task_io_service_operation.hpp │ │ ├── task_io_service_thread_info.hpp │ │ ├── thread.hpp │ │ ├── thread_info_base.hpp │ │ ├── throw_error.hpp │ │ ├── throw_exception.hpp │ │ ├── timer_queue.hpp │ │ ├── timer_queue_base.hpp │ │ ├── timer_queue_ptime.hpp │ │ ├── timer_queue_set.hpp │ │ ├── timer_scheduler.hpp │ │ ├── timer_scheduler_fwd.hpp │ │ ├── tss_ptr.hpp │ │ ├── type_traits.hpp │ │ ├── variadic_templates.hpp │ │ ├── wait_handler.hpp │ │ ├── wait_op.hpp │ │ ├── weak_ptr.hpp │ │ ├── win_event.hpp │ │ ├── win_fd_set_adapter.hpp │ │ ├── win_fenced_block.hpp │ │ ├── win_iocp_handle_read_op.hpp │ │ ├── win_iocp_handle_service.hpp │ │ ├── win_iocp_handle_write_op.hpp │ │ ├── win_iocp_io_service.hpp │ │ ├── win_iocp_null_buffers_op.hpp │ │ ├── win_iocp_operation.hpp │ │ ├── win_iocp_overlapped_op.hpp │ │ ├── win_iocp_overlapped_ptr.hpp │ │ ├── win_iocp_serial_port_service.hpp │ │ ├── win_iocp_socket_accept_op.hpp │ │ ├── win_iocp_socket_connect_op.hpp │ │ ├── win_iocp_socket_recv_op.hpp │ │ ├── win_iocp_socket_recvfrom_op.hpp │ │ ├── win_iocp_socket_recvmsg_op.hpp │ │ ├── win_iocp_socket_send_op.hpp │ │ ├── win_iocp_socket_service.hpp │ │ ├── win_iocp_socket_service_base.hpp │ │ ├── win_iocp_thread_info.hpp │ │ ├── win_mutex.hpp │ │ ├── win_object_handle_service.hpp │ │ ├── win_static_mutex.hpp │ │ ├── win_thread.hpp │ │ ├── win_tss_ptr.hpp │ │ ├── wince_thread.hpp │ │ ├── winrt_async_manager.hpp │ │ ├── winrt_async_op.hpp │ │ ├── winrt_resolve_op.hpp │ │ ├── winrt_resolver_service.hpp │ │ ├── winrt_socket_connect_op.hpp │ │ ├── winrt_socket_recv_op.hpp │ │ ├── winrt_socket_send_op.hpp │ │ ├── winrt_ssocket_service.hpp │ │ ├── winrt_ssocket_service_base.hpp │ │ ├── winrt_timer_scheduler.hpp │ │ ├── winrt_utils.hpp │ │ ├── winsock_init.hpp │ │ └── wrapped_handler.hpp │ ├── error.hpp │ ├── error_code.hpp │ ├── generic │ │ ├── basic_endpoint.hpp │ │ ├── datagram_protocol.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ └── impl │ │ │ │ └── endpoint.ipp │ │ ├── raw_protocol.hpp │ │ ├── seq_packet_protocol.hpp │ │ └── stream_protocol.hpp │ ├── handler_alloc_hook.hpp │ ├── handler_continuation_hook.hpp │ ├── handler_invoke_hook.hpp │ ├── handler_type.hpp │ ├── high_resolution_timer.hpp │ ├── impl │ │ ├── buffered_read_stream.hpp │ │ ├── buffered_write_stream.hpp │ │ ├── connect.hpp │ │ ├── error.ipp │ │ ├── error_code.ipp │ │ ├── handler_alloc_hook.ipp │ │ ├── io_service.hpp │ │ ├── io_service.ipp │ │ ├── read.hpp │ │ ├── read_at.hpp │ │ ├── read_until.hpp │ │ ├── serial_port_base.hpp │ │ ├── serial_port_base.ipp │ │ ├── spawn.hpp │ │ ├── src.cpp │ │ ├── src.hpp │ │ ├── use_future.hpp │ │ ├── write.hpp │ │ └── write_at.hpp │ ├── io_service.hpp │ ├── ip │ │ ├── address.hpp │ │ ├── address_v4.hpp │ │ ├── address_v6.hpp │ │ ├── basic_endpoint.hpp │ │ ├── basic_resolver.hpp │ │ ├── basic_resolver_entry.hpp │ │ ├── basic_resolver_iterator.hpp │ │ ├── basic_resolver_query.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ ├── impl │ │ │ │ └── endpoint.ipp │ │ │ └── socket_option.hpp │ │ ├── host_name.hpp │ │ ├── icmp.hpp │ │ ├── impl │ │ │ ├── address.hpp │ │ │ ├── address.ipp │ │ │ ├── address_v4.hpp │ │ │ ├── address_v4.ipp │ │ │ ├── address_v6.hpp │ │ │ ├── address_v6.ipp │ │ │ ├── basic_endpoint.hpp │ │ │ └── host_name.ipp │ │ ├── multicast.hpp │ │ ├── resolver_query_base.hpp │ │ ├── resolver_service.hpp │ │ ├── tcp.hpp │ │ ├── udp.hpp │ │ ├── unicast.hpp │ │ └── v6_only.hpp │ ├── is_read_buffered.hpp │ ├── is_write_buffered.hpp │ ├── local │ │ ├── basic_endpoint.hpp │ │ ├── connect_pair.hpp │ │ ├── datagram_protocol.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ └── impl │ │ │ │ └── endpoint.ipp │ │ └── stream_protocol.hpp │ ├── placeholders.hpp │ ├── posix │ │ ├── basic_descriptor.hpp │ │ ├── basic_stream_descriptor.hpp │ │ ├── descriptor_base.hpp │ │ ├── stream_descriptor.hpp │ │ └── stream_descriptor_service.hpp │ ├── raw_socket_service.hpp │ ├── read.hpp │ ├── read_at.hpp │ ├── read_until.hpp │ ├── seq_packet_socket_service.hpp │ ├── serial_port.hpp │ ├── serial_port_base.hpp │ ├── serial_port_service.hpp │ ├── signal_set.hpp │ ├── signal_set_service.hpp │ ├── socket_acceptor_service.hpp │ ├── socket_base.hpp │ ├── spawn.hpp │ ├── ssl.hpp │ ├── ssl │ │ ├── basic_context.hpp │ │ ├── context.hpp │ │ ├── context_base.hpp │ │ ├── context_service.hpp │ │ ├── detail │ │ │ ├── buffered_handshake_op.hpp │ │ │ ├── engine.hpp │ │ │ ├── handshake_op.hpp │ │ │ ├── impl │ │ │ │ ├── engine.ipp │ │ │ │ └── openssl_init.ipp │ │ │ ├── io.hpp │ │ │ ├── openssl_init.hpp │ │ │ ├── openssl_types.hpp │ │ │ ├── password_callback.hpp │ │ │ ├── read_op.hpp │ │ │ ├── shutdown_op.hpp │ │ │ ├── stream_core.hpp │ │ │ ├── verify_callback.hpp │ │ │ └── write_op.hpp │ │ ├── error.hpp │ │ ├── impl │ │ │ ├── context.hpp │ │ │ ├── context.ipp │ │ │ ├── error.ipp │ │ │ ├── rfc2818_verification.ipp │ │ │ └── src.hpp │ │ ├── old │ │ │ ├── basic_context.hpp │ │ │ ├── context_service.hpp │ │ │ ├── detail │ │ │ │ ├── openssl_context_service.hpp │ │ │ │ ├── openssl_operation.hpp │ │ │ │ └── openssl_stream_service.hpp │ │ │ ├── stream.hpp │ │ │ └── stream_service.hpp │ │ ├── rfc2818_verification.hpp │ │ ├── stream.hpp │ │ ├── stream_base.hpp │ │ ├── stream_service.hpp │ │ ├── verify_context.hpp │ │ └── verify_mode.hpp │ ├── steady_timer.hpp │ ├── strand.hpp │ ├── stream_socket_service.hpp │ ├── streambuf.hpp │ ├── system_error.hpp │ ├── system_timer.hpp │ ├── thread.hpp │ ├── time_traits.hpp │ ├── unyield.hpp │ ├── use_future.hpp │ ├── version.hpp │ ├── wait_traits.hpp │ ├── waitable_timer_service.hpp │ ├── windows │ │ ├── basic_handle.hpp │ │ ├── basic_object_handle.hpp │ │ ├── basic_random_access_handle.hpp │ │ ├── basic_stream_handle.hpp │ │ ├── object_handle.hpp │ │ ├── object_handle_service.hpp │ │ ├── overlapped_ptr.hpp │ │ ├── random_access_handle.hpp │ │ ├── random_access_handle_service.hpp │ │ ├── stream_handle.hpp │ │ └── stream_handle_service.hpp │ ├── write.hpp │ ├── write_at.hpp │ └── yield.hpp └── websocketpp │ ├── CMakeLists.txt │ ├── base64 │ └── base64.hpp │ ├── client.hpp │ ├── close.hpp │ ├── common │ ├── asio.hpp │ ├── asio_ssl.hpp │ ├── chrono.hpp │ ├── connection_hdl.hpp │ ├── cpp11.hpp │ ├── functional.hpp │ ├── md5.hpp │ ├── memory.hpp │ ├── network.hpp │ ├── platforms.hpp │ ├── random.hpp │ ├── regex.hpp │ ├── stdint.hpp │ ├── system_error.hpp │ ├── thread.hpp │ ├── time.hpp │ └── type_traits.hpp │ ├── concurrency │ ├── basic.hpp │ └── none.hpp │ ├── config │ ├── asio.hpp │ ├── asio_client.hpp │ ├── asio_no_tls.hpp │ ├── asio_no_tls_client.hpp │ ├── boost_config.hpp │ ├── core.hpp │ ├── core_client.hpp │ ├── debug.hpp │ ├── debug_asio.hpp │ ├── debug_asio_no_tls.hpp │ ├── minimal_client.hpp │ └── minimal_server.hpp │ ├── connection.hpp │ ├── connection_base.hpp │ ├── endpoint.hpp │ ├── endpoint_base.hpp │ ├── error.hpp │ ├── extensions │ ├── extension.hpp │ └── permessage_deflate │ │ ├── disabled.hpp │ │ └── enabled.hpp │ ├── frame.hpp │ ├── http │ ├── constants.hpp │ ├── impl │ │ ├── parser.hpp │ │ ├── request.hpp │ │ └── response.hpp │ ├── parser.hpp │ ├── request.hpp │ └── response.hpp │ ├── impl │ ├── connection_impl.hpp │ ├── endpoint_impl.hpp │ └── utilities_impl.hpp │ ├── logger │ ├── basic.hpp │ ├── levels.hpp │ ├── stub.hpp │ └── syslog.hpp │ ├── message_buffer │ ├── alloc.hpp │ ├── message.hpp │ └── pool.hpp │ ├── processors │ ├── base.hpp │ ├── hybi00.hpp │ ├── hybi07.hpp │ ├── hybi08.hpp │ ├── hybi13.hpp │ └── processor.hpp │ ├── random │ ├── none.hpp │ └── random_device.hpp │ ├── roles │ ├── client_endpoint.hpp │ └── server_endpoint.hpp │ ├── server.hpp │ ├── sha1 │ └── sha1.hpp │ ├── transport │ ├── asio │ │ ├── base.hpp │ │ ├── connection.hpp │ │ ├── endpoint.hpp │ │ └── security │ │ │ ├── base.hpp │ │ │ ├── none.hpp │ │ │ └── tls.hpp │ ├── base │ │ ├── connection.hpp │ │ └── endpoint.hpp │ ├── debug │ │ ├── base.hpp │ │ ├── connection.hpp │ │ └── endpoint.hpp │ ├── iostream │ │ ├── base.hpp │ │ ├── connection.hpp │ │ └── endpoint.hpp │ └── stub │ │ ├── base.hpp │ │ ├── connection.hpp │ │ └── endpoint.hpp │ ├── uri.hpp │ ├── utf8_validator.hpp │ ├── utilities.hpp │ └── version.hpp ├── header ├── cBroadcastServer.h ├── cDummyRenderer.h ├── cKeyboardHandler.h ├── cMessageHandler.h ├── cMouseEventHandler.h ├── cNvPipeEncoder.h ├── cPNGEncoder.h ├── cStats.h ├── cTimer.h └── cTurboJpegEncoder.h └── source ├── cBroadcastServer.cpp └── example.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | /Debug/ 2 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sight_FrameServer 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 16 | full,incremental, 17 | 18 | 19 | 20 | 21 | 22 | org.eclipse.cdt.core.cnature 23 | org.eclipse.cdt.core.ccnature 24 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 25 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 26 | 27 | 28 | -------------------------------------------------------------------------------- /Release/.gitignore: -------------------------------------------------------------------------------- 1 | /Sight_Client/ 2 | -------------------------------------------------------------------------------- /Release/communications/asio/impl/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | CPP_SRCS += \ 7 | ../communications/asio/impl/src.cpp 8 | 9 | OBJS += \ 10 | ./communications/asio/impl/src.o 11 | 12 | CPP_DEPS += \ 13 | ./communications/asio/impl/src.d 14 | 15 | 16 | # Each subdirectory must supply rules for building sources it contributes 17 | communications/asio/impl/%.o: ../communications/asio/impl/%.cpp 18 | @echo 'Building file: $<' 19 | @echo 'Invoking: GCC C++ Compiler' 20 | g++ -I../communications -I../header -I../../../Programs/include -O3 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 21 | @echo 'Finished building: $<' 22 | @echo ' ' 23 | 24 | 25 | -------------------------------------------------------------------------------- /Release/makefile: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | -include ../makefile.init 6 | 7 | RM := rm -rf 8 | 9 | # All of the sources participating in the build are defined here 10 | -include sources.mk 11 | -include source/subdir.mk 12 | -include communications/asio/impl/subdir.mk 13 | -include subdir.mk 14 | -include objects.mk 15 | 16 | ifneq ($(MAKECMDGOALS),clean) 17 | ifneq ($(strip $(CC_DEPS)),) 18 | -include $(CC_DEPS) 19 | endif 20 | ifneq ($(strip $(C++_DEPS)),) 21 | -include $(C++_DEPS) 22 | endif 23 | ifneq ($(strip $(C_UPPER_DEPS)),) 24 | -include $(C_UPPER_DEPS) 25 | endif 26 | ifneq ($(strip $(CXX_DEPS)),) 27 | -include $(CXX_DEPS) 28 | endif 29 | ifneq ($(strip $(CPP_DEPS)),) 30 | -include $(CPP_DEPS) 31 | endif 32 | ifneq ($(strip $(C_DEPS)),) 33 | -include $(C_DEPS) 34 | endif 35 | endif 36 | 37 | -include ../makefile.defs 38 | 39 | # Add inputs and outputs from these tool invocations to the build variables 40 | 41 | # All Target 42 | all: Sight_FrameServer 43 | 44 | # Tool invocations 45 | Sight_FrameServer: $(OBJS) $(USER_OBJS) 46 | @echo 'Building target: $@' 47 | @echo 'Invoking: GCC C++ Linker' 48 | g++ -L../../../Programs/lib -o "Sight_FrameServer" $(OBJS) $(USER_OBJS) $(LIBS) 49 | @echo 'Finished building target: $@' 50 | @echo ' ' 51 | 52 | # Other Targets 53 | clean: 54 | -$(RM) $(CC_DEPS)$(C++_DEPS)$(EXECUTABLES)$(C_UPPER_DEPS)$(CXX_DEPS)$(OBJS)$(CPP_DEPS)$(C_DEPS) Sight_FrameServer 55 | -@echo ' ' 56 | 57 | .PHONY: all clean dependents 58 | .SECONDARY: 59 | 60 | -include ../makefile.targets 61 | -------------------------------------------------------------------------------- /Release/objects.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | USER_OBJS := 6 | 7 | LIBS := -lpthread -lpng -lturbojpeg -lNvPipe 8 | 9 | -------------------------------------------------------------------------------- /Release/source/subdir.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | # Add inputs and outputs from these tool invocations to the build variables 6 | CPP_SRCS += \ 7 | ../source/cBroadcastServer.cpp \ 8 | ../source/example.cpp 9 | 10 | OBJS += \ 11 | ./source/cBroadcastServer.o \ 12 | ./source/example.o 13 | 14 | CPP_DEPS += \ 15 | ./source/cBroadcastServer.d \ 16 | ./source/example.d 17 | 18 | 19 | # Each subdirectory must supply rules for building sources it contributes 20 | source/%.o: ../source/%.cpp 21 | @echo 'Building file: $<' 22 | @echo 'Invoking: GCC C++ Compiler' 23 | g++ -I../communications -I../header -I../../../Programs/include -O3 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" 24 | @echo 'Finished building: $<' 25 | @echo ' ' 26 | 27 | 28 | -------------------------------------------------------------------------------- /Release/sources.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Automatically-generated file. Do not edit! 3 | ################################################################################ 4 | 5 | C_UPPER_SRCS := 6 | CXX_SRCS := 7 | C++_SRCS := 8 | OBJ_SRCS := 9 | CC_SRCS := 10 | ASM_SRCS := 11 | CPP_SRCS := 12 | C_SRCS := 13 | O_SRCS := 14 | S_UPPER_SRCS := 15 | CC_DEPS := 16 | C++_DEPS := 17 | EXECUTABLES := 18 | C_UPPER_DEPS := 19 | CXX_DEPS := 20 | OBJS := 21 | CPP_DEPS := 22 | C_DEPS := 23 | 24 | # Every subdirectory with source files must be described here 25 | SUBDIRS := \ 26 | source \ 27 | communications/asio/impl \ 28 | 29 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/AUTHORS: -------------------------------------------------------------------------------- 1 | The following authors have all licensed their contributions to the project 2 | under the licensing terms detailed in LICENSE. 3 | 4 | Michael Bebenita 5 | Alon Zakai 6 | Andreas Gal 7 | Mathieu 'p01' Henri 8 | Matthias 'soliton4' Behrens 9 | Sam Leitch @oneam - provided the webgl canvas 10 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/README.markdown: -------------------------------------------------------------------------------- 1 | original sources: 2 | 3 | https://android.googlesource.com/platform/frameworks/av/+/master/media/libstagefright/codecs/on2/h264dec/ 4 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/SDLMain.h: -------------------------------------------------------------------------------- 1 | /* SDLMain.m - main entry point for our Cocoa-ized SDL app 2 | Initial Version: Darrell Walisser 3 | Non-NIB-Code & other changes: Max Horn 4 | 5 | Feel free to customize this file to suit your needs 6 | */ 7 | 8 | #ifndef _SDLMain_h_ 9 | #define _SDLMain_h_ 10 | 11 | #import 12 | 13 | @interface SDLMain : NSObject 14 | @end 15 | 16 | #endif /* _SDLMain_h_ */ 17 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/appender.py: -------------------------------------------------------------------------------- 1 | 2 | import os, sys 3 | 4 | src = open(sys.argv[1], 'a') 5 | src.write(open('hooks.js').read()) 6 | # src.write(open('paint_2.js', 'r').read()) 7 | src.close() -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/avc.bc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/avc.bc -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/fixups.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import os 3 | import re 4 | import sys 5 | import argparse 6 | 7 | parser = argparse.ArgumentParser(description='JS Fixups') 8 | parser.add_argument('file', help="file to process") 9 | args = parser.parse_args() 10 | 11 | file = open(args.file) 12 | 13 | text = file.read() 14 | 15 | pat = 'HEAP32\[(?P.*)+?P.*)>>?P.*)\]' 16 | pat = 'HEAP32\[(\w*?)\+(\d*?)>>2\]' 17 | # print pat 18 | 19 | rex = re.compile(pat, re.MULTILINE) 20 | 21 | def replace(match): 22 | # print match.group(0) 23 | base = match.group(1) 24 | offset = match.group(2) 25 | return "HEAP32[(" + base + ">>2)+(" + offset + ">>2)]" 26 | 27 | text = rex.sub(replace, text) 28 | 29 | print text -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/inc/basetype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #ifndef BASETYPE_H_INCLUDED 19 | #define BASETYPE_H_INCLUDED 20 | 21 | 22 | #ifdef __arm 23 | #define VOLATILE volatile 24 | #else 25 | #define VOLATILE 26 | #endif 27 | 28 | typedef unsigned char u8; 29 | typedef signed char i8; 30 | typedef unsigned short u16; 31 | typedef signed short i16; 32 | typedef unsigned int u32; 33 | typedef signed int i32; 34 | 35 | #if defined(VC1SWDEC_16BIT) || defined(MP4ENC_ARM11) 36 | typedef unsigned short u16x; 37 | typedef signed short i16x; 38 | #else 39 | typedef unsigned int u16x; 40 | typedef signed int i16x; 41 | #endif 42 | 43 | 44 | #ifndef NULL 45 | #ifdef __cplusplus 46 | #define NULL 0 47 | #else 48 | #define NULL ((void *)0) 49 | #endif 50 | #endif 51 | 52 | #endif /* BASETYPE_H_INCLUDED */ 53 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/inc/extraFlags.h: -------------------------------------------------------------------------------- 1 | #ifndef EXTRA_FLAGS_INCLUDED 2 | #define EXTRA_FLAGS_INCLUDED 3 | 4 | #include "basetype.h" 5 | 6 | //u32 gLastSlice; 7 | 8 | 9 | #endif -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/inc/opttarget.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/inc/opttarget.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/js/avc.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/js/avc.wasm -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/library.js: -------------------------------------------------------------------------------- 1 | var LibraryBroadway = { 2 | broadwayOnHeadersDecoded: function () { 3 | par_broadwayOnHeadersDecoded(); 4 | }, 5 | broadwayOnPictureDecoded: function ($buffer, width, height) { 6 | par_broadwayOnPictureDecoded($buffer, width, height); 7 | }, 8 | extern_emit_image: function($buffer, width, height, $otherBuffer){ 9 | par_broadwayOnPictureDecoded($buffer, width, height, $otherBuffer); 10 | } 11 | }; 12 | 13 | mergeInto(LibraryManager.library, LibraryBroadway); 14 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/Decoder.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/Decoder.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/H264SwDecApi.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/H264SwDecApi.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/extraFlags.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/extraFlags.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_byte_stream.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_byte_stream.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_cavlc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_cavlc.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_conceal.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_conceal.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_deblocking.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_deblocking.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_decoder.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_decoder.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_dpb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_dpb.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_image.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_image.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_inter_prediction.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_inter_prediction.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_intra_prediction.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_intra_prediction.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_macroblock_layer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_macroblock_layer.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_nal_unit.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_nal_unit.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_neighbour.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_neighbour.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_pic_order_cnt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_pic_order_cnt.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_pic_param_set.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_pic_param_set.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_reconstruct.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_reconstruct.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_seq_param_set.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_seq_param_set.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_slice_data.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_slice_data.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_slice_group_map.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_slice_group_map.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_slice_header.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_slice_header.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_storage.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_storage.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_stream.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_stream.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_transform.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_transform.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_util.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_util.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_vlc.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_vlc.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/obj/h264bsd_vui.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/obj/h264bsd_vui.o -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/api/armCOMM_IDCTTable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /** 18 | * 19 | * 20 | * File Name: armCOMM_IDCTTable.h 21 | * OpenMAX DL: v1.0.2 22 | * Revision: 9641 23 | * Date: Thursday, February 7, 2008 24 | * 25 | * 26 | * 27 | * 28 | * File : armCOMM_IDCTTable.h 29 | * Description : Contains declarations of tables for IDCT calculation. 30 | * 31 | */ 32 | 33 | #ifndef _armCOMM_IDCTTable_H_ 34 | #define _armCOMM_IDCTTable_H_ 35 | 36 | #include "omxtypes.h" 37 | 38 | /* Table of s(u)*A(u)*A(v)/16 at Q15 39 | * s(u)=1.0 0 <= u <= 5 40 | * s(6)=2.0 41 | * s(7)=4.0 42 | * A(0) = 2*sqrt(2) 43 | * A(u) = 4*cos(u*pi/16) for (u!=0) 44 | */ 45 | extern const OMX_U16 armCOMM_IDCTPreScale [64]; 46 | extern const OMX_U16 armCOMM_IDCTCoef [4]; 47 | 48 | #endif /* _armCOMM_IDCTTable_H_ */ 49 | 50 | 51 | /* End of File */ 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/api/armCOMM_MaskTable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /** 18 | * 19 | * File Name: armCOMM_MaskTable.h 20 | * OpenMAX DL: v1.0.2 21 | * Revision: 9641 22 | * Date: Thursday, February 7, 2008 23 | * 24 | * 25 | * 26 | * 27 | * Mask Table to mask the end of array 28 | */ 29 | 30 | 31 | 32 | #ifndef _ARMCOMM_MASKTABLE_H_ 33 | #define _ARMCOMM_MASKTABLE_H_ 34 | 35 | #define MaskTableSize 72 36 | 37 | /* Mask table */ 38 | 39 | extern const OMX_U16 armCOMM_qMaskTable16[MaskTableSize]; 40 | extern const OMX_U8 armCOMM_qMaskTable8[MaskTableSize]; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/api/omxtypes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/arm11/api/omxtypes.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/vc/api/armVC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/arm11/vc/api/armVC.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/vc/api/omxVC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/arm11/vc/api/omxVC.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/vc/api/omxVC_s.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/arm11/vc/api/omxVC_s.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/vc/m4p10/api/armVCM4P10_CAVLCTables.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /* ---------------------------------------------------------------- 18 | * 19 | * 20 | * File Name: armVCM4P10_CAVLCTables.h 21 | * OpenMAX DL: v1.0.2 22 | * Revision: 9641 23 | * Date: Thursday, February 7, 2008 24 | * 25 | * 26 | * 27 | * 28 | * Header file for optimized H.264 CALVC tables 29 | * 30 | */ 31 | 32 | #ifndef ARMVCM4P10_CAVLCTABLES_H 33 | #define ARMVCM4P10_CAVLCTABLES_H 34 | 35 | /* CAVLC tables */ 36 | 37 | extern const OMX_U16 *armVCM4P10_CAVLCCoeffTokenTables[18]; 38 | extern const OMX_U16 *armVCM4P10_CAVLCTotalZeroTables[15]; 39 | extern const OMX_U16 *armVCM4P10_CAVLCTotalZeros2x2Tables[3]; 40 | extern const OMX_U16 *armVCM4P10_CAVLCRunBeforeTables[15]; 41 | extern const OMX_U8 armVCM4P10_ZigZag_4x4[16]; 42 | extern const OMX_U8 armVCM4P10_ZigZag_2x2[4]; 43 | extern const OMX_S8 armVCM4P10_SuffixToLevel[7]; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/vc/m4p10/src/armVCM4P10_DeblockingChroma_unsafe_s.s: -------------------------------------------------------------------------------- 1 | ;// 2 | ;// Copyright (C) 2007-2008 ARM Limited 3 | ;// 4 | ;// Licensed under the Apache License, Version 2.0 (the "License"); 5 | ;// you may not use this file except in compliance with the License. 6 | ;// You may obtain a copy of the License at 7 | ;// 8 | ;// http://www.apache.org/licenses/LICENSE-2.0 9 | ;// 10 | ;// Unless required by applicable law or agreed to in writing, software 11 | ;// distributed under the License is distributed on an "AS IS" BASIS, 12 | ;// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ;// See the License for the specific language governing permissions and 14 | ;// limitations under the License. 15 | ;// 16 | ;// 17 | ;// 18 | ;// File Name: armVCM4P10_DeblockingChroma_unsafe_s.s 19 | ;// OpenMAX DL: v1.0.2 20 | ;// Revision: 9641 21 | ;// Date: Thursday, February 7, 2008 22 | ;// 23 | ;// 24 | ;// 25 | ;// 26 | 27 | INCLUDE omxtypes_s.h 28 | INCLUDE armCOMM_s.h 29 | 30 | M_VARIANTS ARM1136JS 31 | 32 | 33 | 34 | END 35 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/arm11/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /** 18 | * 19 | * File Name: armVCM4P2_Huff_Tables_VLC.h 20 | * OpenMAX DL: v1.0.2 21 | * Revision: 9641 22 | * Date: Thursday, February 7, 2008 23 | * 24 | * 25 | * 26 | * 27 | * 28 | * File: armVCM4P2_Huff_Tables.h 29 | * Description: Declares Tables used for Hufffman coding and decoding 30 | * in MP4P2 codec. 31 | * 32 | */ 33 | 34 | #ifndef _OMXHUFFTAB_H_ 35 | #define _OMXHUFFTAB_H_ 36 | 37 | 38 | extern const OMX_U16 armVCM4P2_IntraVlcL0L1[200]; 39 | 40 | 41 | extern const OMX_U16 armVCM4P2_InterVlcL0L1[200]; 42 | 43 | extern const OMX_U16 armVCM4P2_aIntraDCLumaChromaIndex[64]; 44 | //extern const OMX_U16 armVCM4P2_aIntraDCChromaIndex[32]; 45 | extern const OMX_U16 armVCM4P2_aVlcMVD[124]; 46 | 47 | extern const OMX_U8 armVCM4P2_InterL0L1LMAX[73]; 48 | extern const OMX_U8 armVCM4P2_InterL0L1RMAX[35]; 49 | extern const OMX_U8 armVCM4P2_IntraL0L1LMAX[53]; 50 | extern const OMX_U8 armVCM4P2_IntraL0L1RMAX[40] 51 | 52 | #endif /* _OMXHUFFTAB_H_ */ 53 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /** 18 | * 19 | * File Name: armVCM4P2_ZigZag_Tables.h 20 | * OpenMAX DL: v1.0.2 21 | * Revision: 9641 22 | * Date: Thursday, February 7, 2008 23 | * 24 | * 25 | * 26 | * 27 | * 28 | * File: armVCM4P2_Zigzag_Tables.h 29 | * Description: Declares Tables used for Zigzag scan in MP4P2 codec. 30 | * 31 | */ 32 | 33 | #ifndef _OMXZIGZAGTAB_H 34 | #define _OMXZIGZAGTAB_H 35 | 36 | extern const OMX_U8 armVCM4P2_aClassicalZigzagScan [192]; 37 | //extern const OMX_U8 armVCM4P2_aHorizontalZigzagScan [64]; 38 | //extern const OMX_U8 armVCM4P2_aVerticalZigzagScan [64]; 39 | 40 | #endif /* _OMXZIGZAGTAB_H_ */ 41 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm11/vc/src/armVC_Version.c: -------------------------------------------------------------------------------- 1 | #include "omxtypes.h" 2 | #include "armCOMM_Version.h" 3 | 4 | #ifdef ARM_INCLUDE_VERSION_DESCRIPTIONS 5 | const char * const omxVC_VersionDescription = "ARM OpenMAX DL v" ARM_VERSION_STRING " Rel=" OMX_ARM_RELEASE_TAG " Arch=" OMX_ARM_BUILD_ARCHITECTURE " Tools=" OMX_ARM_BUILD_TOOLCHAIN ; 6 | #endif /* ARM_INCLUDE_VERSION_DESCRIPTIONS */ 7 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/api/armCOMM_IDCTTable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /** 18 | * 19 | * 20 | * File Name: armCOMM_IDCTTable.h 21 | * OpenMAX DL: v1.0.2 22 | * Revision: 12290 23 | * Date: Wednesday, April 9, 2008 24 | * 25 | * 26 | * 27 | * 28 | * File : armCOMM_IDCTTable.h 29 | * Description : Contains declarations of tables for IDCT calculation. 30 | * 31 | */ 32 | 33 | #ifndef _armCOMM_IDCTTable_H_ 34 | #define _armCOMM_IDCTTable_H_ 35 | 36 | #include "omxtypes.h" 37 | 38 | /* Table of s(u)*A(u)*A(v)/16 at Q15 39 | * s(u)=1.0 0 <= u <= 5 40 | * s(6)=2.0 41 | * s(7)=4.0 42 | * A(0) = 2*sqrt(2) 43 | * A(u) = 4*cos(u*pi/16) for (u!=0) 44 | */ 45 | extern const OMX_U16 armCOMM_IDCTPreScale [64]; 46 | extern const OMX_U16 armCOMM_IDCTCoef [4]; 47 | 48 | #endif /* _armCOMM_IDCTTable_H_ */ 49 | 50 | 51 | /* End of File */ 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/api/armCOMM_MaskTable.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /** 18 | * 19 | * File Name: armCOMM_MaskTable.h 20 | * OpenMAX DL: v1.0.2 21 | * Revision: 12290 22 | * Date: Wednesday, April 9, 2008 23 | * 24 | * 25 | * 26 | * 27 | * Mask Table to mask the end of array 28 | */ 29 | 30 | 31 | 32 | #ifndef _ARMCOMM_MASKTABLE_H_ 33 | #define _ARMCOMM_MASKTABLE_H_ 34 | 35 | #define MaskTableSize 72 36 | 37 | /* Mask table */ 38 | 39 | extern const OMX_U16 armCOMM_qMaskTable16[MaskTableSize]; 40 | extern const OMX_U8 armCOMM_qMaskTable8[MaskTableSize]; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/api/omxtypes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/arm_neon/api/omxtypes.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/api/armVC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/api/armVC.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/api/omxVC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/api/omxVC.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/m4p10/api/armVCM4P10_CAVLCTables.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /* ---------------------------------------------------------------- 18 | * 19 | * 20 | * File Name: armVCM4P10_CAVLCTables.h 21 | * OpenMAX DL: v1.0.2 22 | * Revision: 12290 23 | * Date: Wednesday, April 9, 2008 24 | * 25 | * 26 | * 27 | * 28 | * Header file for optimized H.264 CALVC tables 29 | * 30 | */ 31 | 32 | #ifndef ARMVCM4P10_CAVLCTABLES_H 33 | #define ARMVCM4P10_CAVLCTABLES_H 34 | 35 | /* CAVLC tables */ 36 | 37 | extern const OMX_U16 *armVCM4P10_CAVLCCoeffTokenTables[18]; 38 | extern const OMX_U16 *armVCM4P10_CAVLCTotalZeroTables[15]; 39 | extern const OMX_U16 *armVCM4P10_CAVLCTotalZeros2x2Tables[3]; 40 | extern const OMX_U16 *armVCM4P10_CAVLCRunBeforeTables[15]; 41 | extern const OMX_U8 armVCM4P10_ZigZag_4x4[16]; 42 | extern const OMX_U8 armVCM4P10_ZigZag_2x2[4]; 43 | extern const OMX_S8 armVCM4P10_SuffixToLevel[7]; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/m4p10/src/omxVCM4P10_DecodeCoeffsToPairCAVLC.c -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/m4p10/src_gcc/armVCM4P10_UnpackBlock4x4_s.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /* 18 | * 19 | */ 20 | 21 | .eabi_attribute 24, 1 22 | .eabi_attribute 25, 1 23 | 24 | .arm 25 | .fpu neon 26 | .text 27 | .syntax unified 28 | 29 | .global armVCM4P10_UnpackBlock4x4 30 | armVCM4P10_UnpackBlock4x4: 31 | PUSH {r4-r8,lr} 32 | LDR r2,[r0,#0] 33 | MOV r7,#0x1f 34 | MOV r4,#0 35 | MOV r5,#0 36 | LDRB r3,[r2],#1 37 | STRD r4,r5,[r1,#0] 38 | STRD r4,r5,[r1,#8] 39 | STRD r4,r5,[r1,#0x10] 40 | STRD r4,r5,[r1,#0x18] 41 | unpackLoop: 42 | TST r3,#0x10 43 | LDRSBNE r5,[r2,#1] 44 | LDRBNE r4,[r2],#2 45 | AND r6,r7,r3,LSL #1 46 | LDRSBEQ r4,[r2],#1 47 | ORRNE r4,r4,r5,LSL #8 48 | TST r3,#0x20 49 | LDRBEQ r3,[r2],#1 50 | STRH r4,[r1,r6] 51 | BEQ unpackLoop 52 | STR r2,[r0,#0] 53 | POP {r4-r8,pc} 54 | .end 55 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_Huff_Tables_VLC.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /** 18 | * 19 | * File Name: armVCM4P2_Huff_Tables_VLC.h 20 | * OpenMAX DL: v1.0.2 21 | * Revision: 12290 22 | * Date: Wednesday, April 9, 2008 23 | * 24 | * 25 | * 26 | * 27 | * 28 | * File: armVCM4P2_Huff_Tables.h 29 | * Description: Declares Tables used for Hufffman coding and decoding 30 | * in MP4P2 codec. 31 | * 32 | */ 33 | 34 | #ifndef _OMXHUFFTAB_H_ 35 | #define _OMXHUFFTAB_H_ 36 | 37 | 38 | extern const OMX_U16 armVCM4P2_IntraVlcL0L1[200]; 39 | 40 | 41 | extern const OMX_U16 armVCM4P2_InterVlcL0L1[200]; 42 | 43 | extern const OMX_U16 armVCM4P2_aIntraDCLumaChromaIndex[64]; 44 | //extern const OMX_U16 armVCM4P2_aIntraDCChromaIndex[32]; 45 | extern const OMX_U16 armVCM4P2_aVlcMVD[124]; 46 | 47 | extern const OMX_U8 armVCM4P2_InterL0L1LMAX[73]; 48 | extern const OMX_U8 armVCM4P2_InterL0L1RMAX[35]; 49 | extern const OMX_U8 armVCM4P2_IntraL0L1LMAX[53]; 50 | extern const OMX_U8 armVCM4P2_IntraL0L1RMAX[40] 51 | 52 | #endif /* _OMXHUFFTAB_H_ */ 53 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /** 18 | * 19 | * File Name: armVCM4P2_ZigZag_Tables.h 20 | * OpenMAX DL: v1.0.2 21 | * Revision: 12290 22 | * Date: Wednesday, April 9, 2008 23 | * 24 | * 25 | * 26 | * 27 | * 28 | * File: armVCM4P2_Zigzag_Tables.h 29 | * Description: Declares Tables used for Zigzag scan in MP4P2 codec. 30 | * 31 | */ 32 | 33 | #ifndef _OMXZIGZAGTAB_H 34 | #define _OMXZIGZAGTAB_H 35 | 36 | extern const OMX_U8 armVCM4P2_aClassicalZigzagScan [192]; 37 | //extern const OMX_U8 armVCM4P2_aHorizontalZigzagScan [64]; 38 | //extern const OMX_U8 armVCM4P2_aVerticalZigzagScan [64]; 39 | 40 | #endif /* _OMXZIGZAGTAB_H_ */ 41 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/arm_neon/vc/src/armVC_Version.c: -------------------------------------------------------------------------------- 1 | #include "omxtypes.h" 2 | #include "armCOMM_Version.h" 3 | 4 | #ifdef ARM_INCLUDE_VERSION_DESCRIPTIONS 5 | const char * const omxVC_VersionDescription = "ARM OpenMAX DL v" ARM_VERSION_STRING " Rel=" OMX_ARM_RELEASE_TAG " Arch=" OMX_ARM_BUILD_ARCHITECTURE " Tools=" OMX_ARM_BUILD_TOOLCHAIN ; 6 | #endif /* ARM_INCLUDE_VERSION_DESCRIPTIONS */ 7 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/api/armCOMM_Version.h: -------------------------------------------------------------------------------- 1 | /* Guard the header against multiple inclusion. */ 2 | #ifndef __ARM_COMM_VERSION_H__ 3 | #define __ARM_COMM_VERSION_H__ 4 | 5 | 6 | /* The following line should be in omxtypes.h but hasn't been approved by OpenMAX yet */ 7 | #define OMX_VERSION 102 8 | 9 | /* We need to define these macros in order to convert a #define number into a #define string. */ 10 | #define ARM_QUOTE(a) #a 11 | #define ARM_INDIRECT(A) ARM_QUOTE(A) 12 | 13 | /* Convert the OMX_VERSION number into a string that can be used, for example, to print it out. */ 14 | #define ARM_VERSION_STRING ARM_INDIRECT(OMX_VERSION) 15 | 16 | 17 | /* Define this in order to turn on ARM version/release/build strings in each domain */ 18 | #define ARM_INCLUDE_VERSION_DESCRIPTIONS 19 | 20 | #ifdef ARM_INCLUDE_VERSION_DESCRIPTIONS 21 | extern const char * const omxAC_VersionDescription; 22 | extern const char * const omxIC_VersionDescription; 23 | extern const char * const omxIP_VersionDescription; 24 | extern const char * const omxSP_VersionDescription; 25 | extern const char * const omxVC_VersionDescription; 26 | #endif /* ARM_INCLUDE_VERSION_DESCRIPTIONS */ 27 | 28 | 29 | /* The following entries should be automatically updated by the release script */ 30 | /* They are used in the ARM version strings defined for each domain. */ 31 | 32 | /* The release tag associated with this release of the library. - used for source and object releases */ 33 | #define OMX_ARM_RELEASE_TAG "r0p0-00bet1" 34 | 35 | /* The ARM architecture used to build any objects or executables in this release. */ 36 | #define OMX_ARM_BUILD_ARCHITECTURE "ANSI C" 37 | 38 | /* The ARM Toolchain used to build any objects or executables in this release. */ 39 | #define OMX_ARM_BUILD_TOOLCHAIN "ARM RVCT 3.1" 40 | 41 | 42 | #endif /* __ARM_COMM_VERSION_H__ */ 43 | 44 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/api/omxtypes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/reference/api/omxtypes.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/vc/api/armVC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/reference/vc/api/armVC.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/vc/api/omxVC.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/reference/vc/api/omxVC.h -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/vc/m4p10/api/armVCM4P10_CAVLCTables.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /* ---------------------------------------------------------------- 18 | * 19 | * 20 | * File Name: armVCM4P10_CAVLCTables.h 21 | * OpenMAX DL: v1.0.2 22 | * Revision: 9641 23 | * Date: Thursday, February 7, 2008 24 | * 25 | * 26 | * 27 | * 28 | * ---------------------------------------------------------------- 29 | * File: armVCM4P10_CAVLCTables.h 30 | * ---------------------------------------------------------------- 31 | * 32 | * Header file for ARM implementation of OpenMAX VCM4P10 33 | * 34 | */ 35 | 36 | #ifndef ARMVCM4P10_CAVLCTABLES_H 37 | #define ARMVCM4P10_CAVLCTABLES_H 38 | 39 | /* CAVLC tables */ 40 | 41 | extern const OMX_U8 armVCM4P10_CAVLCTrailingOnes[62]; 42 | extern const OMX_U8 armVCM4P10_CAVLCTotalCoeff[62]; 43 | extern const ARM_VLC32 *armVCM4P10_CAVLCCoeffTokenTables[5]; 44 | extern const ARM_VLC32 armVCM4P10_CAVLCLevelPrefix[17]; 45 | extern const ARM_VLC32 *armVCM4P10_CAVLCTotalZeroTables[15]; 46 | extern const ARM_VLC32 *armVCM4P10_CAVLCTotalZeros2x2Tables[3]; 47 | extern const ARM_VLC32 *armVCM4P10_CAVLCRunBeforeTables[7]; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/vc/m4p10/src/armVCM4P10_DequantTables.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /* ---------------------------------------------------------------- 18 | * 19 | * 20 | * File Name: armVCM4P10_DequantTables.c 21 | * OpenMAX DL: v1.0.2 22 | * Revision: 9641 23 | * Date: Thursday, February 7, 2008 24 | * 25 | * 26 | * 27 | * 28 | * H.264 inverse quantize tables 29 | * 30 | */ 31 | 32 | #include "omxtypes.h" 33 | #include "armOMX.h" 34 | #include "omxVC.h" 35 | #include "armVC.h" 36 | 37 | 38 | const OMX_U8 armVCM4P10_PosToVCol4x4[16] = 39 | { 40 | 0, 2, 0, 2, 41 | 2, 1, 2, 1, 42 | 0, 2, 0, 2, 43 | 2, 1, 2, 1 44 | }; 45 | 46 | const OMX_U8 armVCM4P10_PosToVCol2x2[4] = 47 | { 48 | 0, 2, 49 | 2, 1 50 | }; 51 | 52 | const OMX_U8 armVCM4P10_VMatrix[6][3] = 53 | { 54 | { 10, 16, 13 }, 55 | { 11, 18, 14 }, 56 | { 13, 20, 16 }, 57 | { 14, 23, 18 }, 58 | { 16, 25, 20 }, 59 | { 18, 29, 23 } 60 | }; 61 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/vc/m4p10/src/armVCM4P10_QuantTables.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /* ---------------------------------------------------------------- 18 | * 19 | * 20 | * File Name: armVCM4P10_QuantTables.c 21 | * OpenMAX DL: v1.0.2 22 | * Revision: 9641 23 | * Date: Thursday, February 7, 2008 24 | * 25 | * 26 | * 27 | * 28 | * H.264 inverse quantize tables 29 | * 30 | */ 31 | 32 | #include "omxtypes.h" 33 | #include "armOMX.h" 34 | #include "omxVC.h" 35 | 36 | #include "armVC.h" 37 | 38 | const OMX_U32 armVCM4P10_MFMatrix[6][3] = 39 | { 40 | {13107, 5243, 8066}, 41 | {11916, 4660, 7490}, 42 | {10082, 4194, 6554}, 43 | { 9362, 3647, 5825}, 44 | { 8192, 3355, 5243}, 45 | { 7282, 2893, 4559} 46 | }; 47 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/vc/m4p2/api/armVCM4P2_DCT_Table.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /** 18 | * 19 | * File Name: armVCM4P2_DCT_Table.h 20 | * OpenMAX DL: v1.0.2 21 | * Revision: 9641 22 | * Date: Thursday, February 7, 2008 23 | * 24 | * 25 | * 26 | * 27 | * 28 | * File: armVCM4P2_DCT_Table.h 29 | * Description: Declares Tables used for DCT/IDCT module 30 | * in MP4P2 codec. 31 | * 32 | */ 33 | 34 | #ifndef _OMXDCTTAB_H_ 35 | #define _OMXDCTTAB_H_ 36 | 37 | extern const OMX_F64 armVCM4P2_preCalcDCTCos[8][8]; 38 | 39 | #endif /* _OMXDCTTAB_H_ */ 40 | 41 | 42 | /* End of file */ 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/vc/m4p2/api/armVCM4P2_ZigZag_Tables.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007-2008 ARM Limited 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | /** 18 | * 19 | * File Name: armVCM4P2_ZigZag_Tables.h 20 | * OpenMAX DL: v1.0.2 21 | * Revision: 9641 22 | * Date: Thursday, February 7, 2008 23 | * 24 | * 25 | * 26 | * 27 | * 28 | * File: armVCM4P2_Zigzag_Tables.h 29 | * Description: Declares Tables used for Zigzag scan in MP4P2 codec. 30 | * 31 | */ 32 | 33 | #ifndef _OMXZIGZAGTAB_H_ 34 | #define _OMXZIGZAGTAB_H_ 35 | 36 | extern const OMX_U8 armVCM4P2_aClassicalZigzagScan [64]; 37 | extern const OMX_U8 armVCM4P2_aHorizontalZigzagScan [64]; 38 | extern const OMX_U8 armVCM4P2_aVerticalZigzagScan [64]; 39 | 40 | #endif /* _OMXZIGZAGTAB_H_ */ 41 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/vc/m4p2/src/armVCM4P2_BlockMatch_Half.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/reference/vc/m4p2/src/armVCM4P2_BlockMatch_Half.c -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/vc/m4p2/src/armVCM4P2_BlockMatch_Integer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/omxdl/reference/vc/m4p2/src/armVCM4P2_BlockMatch_Integer.c -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/omxdl/reference/vc/src/armVC_Version.c: -------------------------------------------------------------------------------- 1 | #include "omxtypes.h" 2 | #include "armCOMM_Version.h" 3 | 4 | #ifdef ARM_INCLUDE_VERSION_DESCRIPTIONS 5 | const char * const omxVC_VersionDescription = "ARM OpenMAX DL v" ARM_VERSION_STRING " Rel=" OMX_ARM_RELEASE_TAG " Arch=" OMX_ARM_BUILD_ARCHITECTURE " Tools=" OMX_ARM_BUILD_TOOLCHAIN ; 6 | #endif /* ARM_INCLUDE_VERSION_DESCRIPTIONS */ 7 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/paint_1.js: -------------------------------------------------------------------------------- 1 | function getSurface() { 2 | var surface = SDL.surfaces[SDL.screen]; 3 | if (!surface.image) { 4 | surface.image = surface.ctx.getImageData(0, 0, surface.width, surface.height); 5 | var data = surface.image.data; 6 | var num = data.length; 7 | for (var i = 0; i < num/4; i++) { 8 | data[i*4+3] = 255; // opacity, as canvases blend alpha 9 | } 10 | } 11 | return surface; 12 | } 13 | 14 | Module['paint'] = function ($luma, $cb, $cr, w, h) { 15 | for (var y1,y2,u,v,ruv,guv,buv,j,w_2=w>>1,W=w*4, surface = getSurface(), d=surface.image.data, r=0; h-=2;) { 16 | for (j=w_2; j--;) { 17 | u = IHEAP[$cr++]; 18 | v = IHEAP[$cb++]; 19 | ruv = 409*u-56992; 20 | guv = 34784-208*u-100*v; 21 | buv = 516*v-70688; 22 | 23 | y2 = IHEAP[$luma+w]*298; 24 | y1 = IHEAP[$luma++]*298; 25 | d[r+W] = y2+ruv>>8; 26 | d[r++] = y1+ruv>>8; 27 | d[r+W] = y2+guv>>8; 28 | d[r++] = y1+guv>>8; 29 | d[r+W] = y2+buv>>8; 30 | d[r++] = y1+buv>>8; 31 | r++; 32 | 33 | y2 = IHEAP[$luma+w]*298; 34 | y1 = IHEAP[$luma++]*298; 35 | d[r+W] = y2+ruv>>8; 36 | d[r++] = y1+ruv>>8; 37 | d[r+W] = y2+guv>>8; 38 | d[r++] = y1+guv>>8; 39 | d[r+W] = y2+buv>>8; 40 | d[r++] = y1+buv>>8; 41 | r++; 42 | } 43 | r+=W; 44 | $luma+=w; 45 | } 46 | surface.ctx.putImageData(surface.image, 0, 0 ); 47 | } 48 | 49 | _paint = function ($luma, $cb, $cr, w, h) { 50 | Module['paint'] ($luma, $cb, $cr, w, h); 51 | } 52 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/paint_2.js: -------------------------------------------------------------------------------- 1 | function getSurface() { 2 | var surface = SDL.surfaces[SDL.screen]; 3 | if (!surface.image) { 4 | surface.image = surface.ctx.getImageData(0, 0, surface.width, surface.height); 5 | var data = surface.image.data; 6 | var num = data.length; 7 | for (var i = 0; i < num/4; i++) { 8 | data[i*4+3] = 255; // opacity, as canvases blend alpha 9 | } 10 | } 11 | return surface; 12 | } 13 | 14 | Module['paint'] = function ($luma, $cb, $cr, w, h) { 15 | for (var y1,y2,u,v,ruv,guv,buv,j,w_2=w>>1,W=w*4, surface = getSurface(), d=surface.image.data, r=0; h-=2;) { 16 | for (j=w_2; j--;) { 17 | u = HEAPU8[$cr++]; 18 | v = HEAPU8[$cb++]; 19 | ruv = 409*u-56992; 20 | guv = 34784-208*u-100*v; 21 | buv = 516*v-70688; 22 | 23 | y2 = HEAPU8[$luma+w]*298; 24 | y1 = HEAPU8[$luma++]*298; 25 | d[r+W] = y2+ruv>>8; 26 | d[r++] = y1+ruv>>8; 27 | d[r+W] = y2+guv>>8; 28 | d[r++] = y1+guv>>8; 29 | d[r+W] = y2+buv>>8; 30 | d[r++] = y1+buv>>8; 31 | r++; 32 | 33 | y2 = HEAPU8[$luma+w]*298; 34 | y1 = HEAPU8[$luma++]*298; 35 | d[r+W] = y2+ruv>>8; 36 | d[r++] = y1+ruv>>8; 37 | d[r+W] = y2+guv>>8; 38 | d[r++] = y1+guv>>8; 39 | d[r+W] = y2+buv>>8; 40 | d[r++] = y1+buv>>8; 41 | r++; 42 | } 43 | r+=W; 44 | $luma+=w; 45 | } 46 | surface.ctx.putImageData(surface.image, 0, 0 ); 47 | } 48 | 49 | _paint = function ($luma, $cb, $cr, w, h) { 50 | Module['paint'] ($luma, $cb, $cr, w, h); 51 | } -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/src/arm11_asm/win_asm.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | set ASMFLAGS= -checkreglist -CPU ARM1136 -PreDefine "H264DEC_WINASM SETL {TRUE}" 3 | set ASM="D:\Program Files\Microsoft Visual Studio 8\VC\ce\bin\x86_arm\armasm" 4 | echo on 5 | 6 | %ASM% %ASMFLAGS% h264bsd_interpolate_chroma_ver.s 7 | %ASM% %ASMFLAGS% h264bsd_interpolate_chroma_hor.s 8 | %ASM% %ASMFLAGS% h264bsd_interpolate_hor_half.s 9 | %ASM% %ASMFLAGS% h264bsd_interpolate_hor_quarter.s 10 | %ASM% %ASMFLAGS% h264bsd_interpolate_hor_ver_quarter.s 11 | %ASM% %ASMFLAGS% h264bsd_interpolate_ver_half.s 12 | %ASM% %ASMFLAGS% h264bsd_interpolate_ver_quarter.s 13 | 14 | rem %ASM% %ASMFLAGS% h264bsd_interpolate_chroma_hor_ver.s 15 | rem %ASM% %ASMFLAGS% h264bsd_interpolate_mid_hor.s 16 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/src/arm_neon_asm/h264bsdClearMbLayer.s: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (C) 2009 The Android Open Source Project 3 | ; 4 | ; Licensed under the Apache License, Version 2.0 (the "License"); 5 | ; you may not use this file except in compliance with the License. 6 | ; You may obtain a copy of the License at 7 | ; 8 | ; http://www.apache.org/licenses/LICENSE-2.0 9 | ; 10 | ; Unless required by applicable law or agreed to in writing, software 11 | ; distributed under the License is distributed on an "AS IS" BASIS, 12 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ; See the License for the specific language governing permissions and 14 | ; limitations under the License. 15 | ; 16 | 17 | REQUIRE8 18 | PRESERVE8 19 | 20 | AREA |.text|, CODE 21 | 22 | EXPORT h264bsdClearMbLayer 23 | 24 | ; Input / output registers 25 | pMbLayer RN 0 26 | size RN 1 27 | pTmp RN 2 28 | step RN 3 29 | 30 | ; -- NEON registers -- 31 | 32 | qZero QN Q0.U8 33 | 34 | ;/*------------------------------------------------------------------------------ 35 | ; 36 | ; Function: h264bsdClearMbLayer 37 | ; 38 | ; Functional description: 39 | ; 40 | ; Inputs: 41 | ; 42 | ; Outputs: 43 | ; 44 | ; Returns: 45 | ; 46 | ;------------------------------------------------------------------------------*/ 47 | 48 | h264bsdClearMbLayer 49 | 50 | VMOV qZero, #0 51 | ADD pTmp, pMbLayer, #16 52 | MOV step, #32 53 | SUBS size, size, #64 54 | 55 | loop 56 | VST1 qZero, [pMbLayer], step 57 | SUBS size, size, #64 58 | VST1 qZero, [pTmp], step 59 | VST1 qZero, [pMbLayer], step 60 | VST1 qZero, [pTmp], step 61 | BCS loop 62 | 63 | BX lr 64 | END 65 | 66 | 67 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/src/arm_neon_asm/h264bsdCountLeadingZeros.s: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (C) 2009 The Android Open Source Project 3 | ; 4 | ; Licensed under the Apache License, Version 2.0 (the "License"); 5 | ; you may not use this file except in compliance with the License. 6 | ; You may obtain a copy of the License at 7 | ; 8 | ; http://www.apache.org/licenses/LICENSE-2.0 9 | ; 10 | ; Unless required by applicable law or agreed to in writing, software 11 | ; distributed under the License is distributed on an "AS IS" BASIS, 12 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ; See the License for the specific language governing permissions and 14 | ; limitations under the License. 15 | ; 16 | 17 | REQUIRE8 18 | PRESERVE8 19 | 20 | AREA |.text|, CODE 21 | 22 | EXPORT h264bsdCountLeadingZeros 23 | 24 | ; Input / output registers 25 | value RN 0 26 | 27 | ; -- NEON registers -- 28 | 29 | ;/*------------------------------------------------------------------------------ 30 | ; 31 | ; Function: h264bsdCountLeadingZeros 32 | ; 33 | ; Functional description: 34 | ; 35 | ; Inputs: 36 | ; 37 | ; Outputs: 38 | ; 39 | ; Returns: 40 | ; 41 | ;------------------------------------------------------------------------------*/ 42 | 43 | h264bsdCountLeadingZeros 44 | 45 | CLZ value, value 46 | BX lr 47 | END 48 | 49 | 50 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/src/arm_neon_asm_gcc/asm_common.S: -------------------------------------------------------------------------------- 1 | @ 2 | @ Copyright (C) 2009 The Android Open Source Project 3 | @ 4 | @ Licensed under the Apache License, Version 2.0 (the "License"); 5 | @ you may not use this file except in compliance with the License. 6 | @ You may obtain a copy of the License at 7 | @ 8 | @ http://www.apache.org/licenses/LICENSE-2.0 9 | @ 10 | @ Unless required by applicable law or agreed to in writing, software 11 | @ distributed under the License is distributed on an "AS IS" BASIS, 12 | @ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @ See the License for the specific language governing permissions and 14 | @ limitations under the License. 15 | @ 16 | 17 | 18 | 19 | 20 | .macro REQUIRE8 21 | .eabi_attribute 24, 1 22 | .endm 23 | 24 | .macro PRESERVE8 25 | .eabi_attribute 25, 1 26 | .endm 27 | 28 | 29 | .macro function name, export=0 30 | .if \export 31 | .global \name 32 | .endif 33 | .type \name, %function 34 | \name: 35 | .endm 36 | 37 | .macro endfunction 38 | .endm 39 | 40 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/src/arm_neon_asm_gcc/h264bsdClearMbLayer.S: -------------------------------------------------------------------------------- 1 | @ 2 | @ Copyright (C) 2009 The Android Open Source Project 3 | @ 4 | @ Licensed under the Apache License, Version 2.0 (the "License"); 5 | @ you may not use this file except in compliance with the License. 6 | @ You may obtain a copy of the License at 7 | @ 8 | @ http://www.apache.org/licenses/LICENSE-2.0 9 | @ 10 | @ Unless required by applicable law or agreed to in writing, software 11 | @ distributed under the License is distributed on an "AS IS" BASIS, 12 | @ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @ See the License for the specific language governing permissions and 14 | @ limitations under the License. 15 | @ 16 | 17 | #include "asm_common.S" 18 | 19 | PRESERVE8 20 | 21 | .fpu neon 22 | .text 23 | 24 | /* Input / output registers */ 25 | #define pMbLayer r0 26 | #define size r1 27 | #define pTmp r2 28 | #define step r3 29 | 30 | /* -- NEON registers -- */ 31 | 32 | #define qZero Q0 33 | 34 | /*------------------------------------------------------------------------------ 35 | 36 | Function: h264bsdClearMbLayer 37 | 38 | Functional description: 39 | 40 | Inputs: 41 | 42 | Outputs: 43 | 44 | Returns: 45 | 46 | ------------------------------------------------------------------------------*/ 47 | 48 | function h264bsdClearMbLayer, export=1 49 | 50 | VMOV.I8 qZero, #0 51 | ADD pTmp, pMbLayer, #16 52 | MOV step, #32 53 | SUBS size, size, #64 54 | 55 | loop: 56 | VST1.8 {qZero}, [pMbLayer], step 57 | SUBS size, size, #64 58 | VST1.8 {qZero}, [pTmp], step 59 | VST1.8 {qZero}, [pMbLayer], step 60 | VST1.8 {qZero}, [pTmp], step 61 | BCS loop 62 | 63 | BX lr 64 | 65 | endfunction 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/src/arm_neon_asm_gcc/h264bsdCountLeadingZeros.S: -------------------------------------------------------------------------------- 1 | @ 2 | @ Copyright (C) 2009 The Android Open Source Project 3 | @ 4 | @ Licensed under the Apache License, Version 2.0 (the "License"); 5 | @ you may not use this file except in compliance with the License. 6 | @ You may obtain a copy of the License at 7 | @ 8 | @ http://www.apache.org/licenses/LICENSE-2.0 9 | @ 10 | @ Unless required by applicable law or agreed to in writing, software 11 | @ distributed under the License is distributed on an "AS IS" BASIS, 12 | @ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @ See the License for the specific language governing permissions and 14 | @ limitations under the License. 15 | @ 16 | #include "asm_common.S" 17 | 18 | PRESERVE8 19 | .arm 20 | .text 21 | 22 | 23 | /* Input / output registers */ 24 | #define value r0 25 | 26 | /* -- NEON registers -- */ 27 | 28 | /*------------------------------------------------------------------------------ 29 | 30 | Function: h264bsdCountLeadingZeros 31 | 32 | Functional description: 33 | 34 | Inputs: 35 | 36 | Outputs: 37 | 38 | Returns: 39 | 40 | ------------------------------------------------------------------------------*/ 41 | 42 | function h264bsdCountLeadingZeros, export=1 43 | 44 | CLZ value, value 45 | BX lr 46 | 47 | endfunction 48 | 49 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/src/extraFlags.c: -------------------------------------------------------------------------------- 1 | #include "extraFlags.h" 2 | 3 | //u32 gLastSlice = 0; -------------------------------------------------------------------------------- /Sight_Client/Broadway/Decoder/src/h264bsd_nal_unit.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Decoder/src/h264bsd_nal_unit.c -------------------------------------------------------------------------------- /Sight_Client/Broadway/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Project Authors (see AUTHORS file) 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | * 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. 8 | * Neither the names of the Project Authors nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 9 | 10 | 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. 11 | 12 | -- 13 | 14 | The 3-clause BSD above applies to all code except for code originating 15 | from the Android project (the .cpp files in Avc/). Those files are under 16 | the Android project's Apache 2.0 license. 17 | 18 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Player/avc.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Player/avc.wasm -------------------------------------------------------------------------------- /Sight_Client/Broadway/Player/mozilla_story.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Player/mozilla_story.mp4 -------------------------------------------------------------------------------- /Sight_Client/Broadway/Player/stream.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Stream = (function stream() { 4 | function constructor(url) { 5 | this.url = url; 6 | } 7 | 8 | constructor.prototype = { 9 | readAll: function(progress, complete) { 10 | var xhr = new XMLHttpRequest(); 11 | var async = true; 12 | xhr.open("GET", this.url, async); 13 | xhr.responseType = "arraybuffer"; 14 | if (progress) { 15 | xhr.onprogress = function (event) { 16 | progress(xhr.response, event.loaded, event.total); 17 | }; 18 | } 19 | xhr.onreadystatechange = function (event) { 20 | if (xhr.readyState === 4) { 21 | complete(xhr.response); 22 | // var byteArray = new Uint8Array(xhr.response); 23 | // var array = Array.prototype.slice.apply(byteArray); 24 | // complete(array); 25 | } 26 | } 27 | xhr.send(null); 28 | } 29 | }; 30 | return constructor; 31 | })(); 32 | 33 | 34 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/Player/tree.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/benjha/Sight_FrameServer/d721bd6d4014441070ebd28a5955dc90a8cbde4f/Sight_Client/Broadway/Player/tree.mp4 -------------------------------------------------------------------------------- /Sight_Client/Broadway/Player/treeDemo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 |
26 |
27 | Broadway.js - H.264 Decoding in JavaScript w/ asm.js 28 |
29 | Click to Download and Play (The entire file is downloaded before playback begins. Once the file is cached, playback begins much faster.)

30 |
31 | 32 | -------------------------------------------------------------------------------- /Sight_Client/Broadway/templates/DecoderPre.js: -------------------------------------------------------------------------------- 1 | // universal module definition 2 | (function (root, factory) { 3 | if (typeof define === 'function' && define.amd) { 4 | // AMD. Register as an anonymous module. 5 | define([], factory); 6 | } else if (typeof exports === 'object') { 7 | // Node. Does not work with strict CommonJS, but 8 | // only CommonJS-like environments that support module.exports, 9 | // like Node. 10 | module.exports = factory(); 11 | } else { 12 | // Browser globals (root is window) 13 | root.Decoder = factory(); 14 | } 15 | }(this, function () { 16 | 17 | var global; 18 | 19 | function initglobal(){ 20 | global = this; 21 | if (!global){ 22 | if (typeof window != "undefined"){ 23 | global = window; 24 | }else if (typeof self != "undefined"){ 25 | global = self; 26 | }; 27 | }; 28 | }; 29 | initglobal(); 30 | 31 | 32 | function error(message) { 33 | console.error(message); 34 | console.trace(); 35 | }; 36 | 37 | 38 | function assert(condition, message) { 39 | if (!condition) { 40 | error(message); 41 | }; 42 | }; 43 | 44 | 45 | 46 | 47 | var getModule = function(par_broadwayOnHeadersDecoded, par_broadwayOnPictureDecoded){ 48 | 49 | 50 | /*var ModuleX = { 51 | 'print': function(text) { console.log('stdout: ' + text); }, 52 | 'printErr': function(text) { console.log('stderr: ' + text); } 53 | };*/ 54 | 55 | 56 | /* 57 | 58 | The reason why this is all packed into one file is that this file can also function as worker. 59 | you can integrate the file into your build system and provide the original file to be loaded into a worker. 60 | 61 | */ 62 | 63 | //var Module = (function(){ 64 | 65 | 66 | -------------------------------------------------------------------------------- /communications/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) 2 | 3 | Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | -------------------------------------------------------------------------------- /communications/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /communications/asio/basic_streambuf_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // basic_streambuf_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BASIC_STREAMBUF_FWD_HPP 12 | #define ASIO_BASIC_STREAMBUF_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_NO_IOSTREAM) 21 | 22 | #include 23 | 24 | namespace asio { 25 | 26 | template > 27 | class basic_streambuf; 28 | 29 | } // namespace asio 30 | 31 | #endif // !defined(ASIO_NO_IOSTREAM) 32 | 33 | #endif // ASIO_BASIC_STREAMBUF_FWD_HPP 34 | -------------------------------------------------------------------------------- /communications/asio/buffered_read_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_read_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_READ_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_READ_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_read_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_READ_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /communications/asio/buffered_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /communications/asio/buffered_write_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_write_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_write_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /communications/asio/deadline_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // deadline_timer.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DEADLINE_TIMER_HPP 12 | #define ASIO_DEADLINE_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_DATE_TIME) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/detail/socket_types.hpp" // Must come before posix_time. 24 | #include "asio/basic_deadline_timer.hpp" 25 | 26 | #include 27 | 28 | namespace asio { 29 | 30 | /// Typedef for the typical usage of timer. Uses a UTC clock. 31 | typedef basic_deadline_timer deadline_timer; 32 | 33 | } // namespace asio 34 | 35 | #endif // defined(ASIO_HAS_BOOST_DATE_TIME) 36 | // || defined(GENERATING_DOCUMENTATION) 37 | 38 | #endif // ASIO_DEADLINE_TIMER_HPP 39 | -------------------------------------------------------------------------------- /communications/asio/detail/addressof.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/addressof.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ADDRESSOF_HPP 12 | #define ASIO_DETAIL_ADDRESSOF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_ADDRESSOF) 21 | # include 22 | #else // defined(ASIO_HAS_STD_ADDRESSOF) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_ADDRESSOF) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_ADDRESSOF) 30 | using std::addressof; 31 | #else // defined(ASIO_HAS_STD_ADDRESSOF) 32 | using boost::addressof; 33 | #endif // defined(ASIO_HAS_STD_ADDRESSOF) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_ADDRESSOF_HPP 39 | -------------------------------------------------------------------------------- /communications/asio/detail/array.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ARRAY_HPP 12 | #define ASIO_DETAIL_ARRAY_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_ARRAY) 21 | # include 22 | #else // defined(ASIO_HAS_STD_ARRAY) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_ARRAY) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_ARRAY) 30 | using std::array; 31 | #else // defined(ASIO_HAS_STD_ARRAY) 32 | using boost::array; 33 | #endif // defined(ASIO_HAS_STD_ARRAY) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_ARRAY_HPP 39 | -------------------------------------------------------------------------------- /communications/asio/detail/array_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ARRAY_FWD_HPP 12 | #define ASIO_DETAIL_ARRAY_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace boost { 21 | 22 | template 23 | class array; 24 | 25 | } // namespace boost 26 | 27 | // Standard library components can't be forward declared, so we'll have to 28 | // include the array header. Fortunately, it's fairly lightweight and doesn't 29 | // add significantly to the compile time. 30 | #if defined(ASIO_HAS_STD_ARRAY) 31 | # include 32 | #endif // defined(ASIO_HAS_STD_ARRAY) 33 | 34 | #endif // ASIO_DETAIL_ARRAY_FWD_HPP 35 | -------------------------------------------------------------------------------- /communications/asio/detail/assert.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/assert.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ASSERT_HPP 12 | #define ASIO_DETAIL_ASSERT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_ASSERT) 21 | # include 22 | #else // defined(ASIO_HAS_BOOST_ASSERT) 23 | # include 24 | #endif // defined(ASIO_HAS_BOOST_ASSERT) 25 | 26 | #if defined(ASIO_HAS_BOOST_ASSERT) 27 | # define ASIO_ASSERT(expr) BOOST_ASSERT(expr) 28 | #else // defined(ASIO_HAS_BOOST_ASSERT) 29 | # define ASIO_ASSERT(expr) assert(expr) 30 | #endif // defined(ASIO_HAS_BOOST_ASSERT) 31 | 32 | #endif // ASIO_DETAIL_ASSERT_HPP 33 | -------------------------------------------------------------------------------- /communications/asio/detail/atomic_count.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/atomic_count.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ATOMIC_COUNT_HPP 12 | #define ASIO_DETAIL_ATOMIC_COUNT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | // Nothing to include. 22 | #elif defined(ASIO_HAS_STD_ATOMIC) 23 | # include 24 | #else // defined(ASIO_HAS_STD_ATOMIC) 25 | # include 26 | #endif // defined(ASIO_HAS_STD_ATOMIC) 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | #if !defined(ASIO_HAS_THREADS) 32 | typedef long atomic_count; 33 | inline void increment(atomic_count& a, long b) { 34 | a += b; 35 | } 36 | #elif defined(ASIO_HAS_STD_ATOMIC) 37 | typedef std::atomic atomic_count; 38 | inline void increment(atomic_count& a, long b) {a += b;} 39 | #else // defined(ASIO_HAS_STD_ATOMIC) 40 | typedef boost::detail::atomic_count atomic_count; 41 | inline void increment(atomic_count& a, long b) {while (b > 0) ++a, --b;} 42 | #endif // defined(ASIO_HAS_STD_ATOMIC) 43 | 44 | } 45 | // namespace detail 46 | }// namespace asio 47 | 48 | #endif // ASIO_DETAIL_ATOMIC_COUNT_HPP 49 | -------------------------------------------------------------------------------- /communications/asio/detail/buffer_resize_guard.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/buffer_resize_guard.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP 12 | #define ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/limits.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | // Helper class to manage buffer resizing in an exception safe way. 27 | template 28 | class buffer_resize_guard 29 | { 30 | public: 31 | // Constructor. 32 | buffer_resize_guard(Buffer& buffer) 33 | : buffer_(buffer), 34 | old_size_(buffer.size()) 35 | { 36 | } 37 | 38 | // Destructor rolls back the buffer resize unless commit was called. 39 | ~buffer_resize_guard() 40 | { 41 | if (old_size_ != (std::numeric_limits::max)()) 42 | { 43 | buffer_.resize(old_size_); 44 | } 45 | } 46 | 47 | // Commit the resize transaction. 48 | void commit() 49 | { 50 | old_size_ = (std::numeric_limits::max)(); 51 | } 52 | 53 | private: 54 | // The buffer being managed. 55 | Buffer& buffer_; 56 | 57 | // The size of the buffer at the time the guard was constructed. 58 | size_t old_size_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // ASIO_DETAIL_BUFFER_RESIZE_GUARD_HPP 67 | -------------------------------------------------------------------------------- /communications/asio/detail/cstdint.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/cstdint.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_CSTDINT_HPP 12 | #define ASIO_DETAIL_CSTDINT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_CSTDINT) 21 | # include 22 | #else // defined(ASIO_HAS_CSTDINT) 23 | # include 24 | #endif // defined(ASIO_HAS_CSTDINT) 25 | 26 | namespace asio { 27 | 28 | #if defined(ASIO_HAS_CSTDINT) 29 | using std::int16_t; 30 | using std::uint16_t; 31 | using std::int32_t; 32 | using std::uint32_t; 33 | using std::int64_t; 34 | using std::uint64_t; 35 | #else // defined(ASIO_HAS_CSTDINT) 36 | using boost::int16_t; 37 | using boost::uint16_t; 38 | using boost::int32_t; 39 | using boost::uint32_t; 40 | using boost::int64_t; 41 | using boost::uint64_t; 42 | #endif // defined(ASIO_HAS_CSTDINT) 43 | 44 | } // namespace asio 45 | 46 | #endif // ASIO_DETAIL_CSTDINT_HPP 47 | -------------------------------------------------------------------------------- /communications/asio/detail/date_time_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/date_time_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_DATE_TIME_FWD_HPP 12 | #define ASIO_DETAIL_DATE_TIME_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace boost { 21 | namespace date_time { 22 | 23 | template 24 | class base_time; 25 | 26 | } // namespace date_time 27 | namespace posix_time { 28 | 29 | class ptime; 30 | 31 | } // namespace posix_time 32 | } // namespace boost 33 | 34 | #endif // ASIO_DETAIL_DATE_TIME_FWD_HPP 35 | -------------------------------------------------------------------------------- /communications/asio/detail/dependent_type.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/dependent_type.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_DEPENDENT_TYPE_HPP 12 | #define ASIO_DETAIL_DEPENDENT_TYPE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | struct dependent_type 27 | { 28 | typedef T type; 29 | }; 30 | 31 | } // namespace detail 32 | } // namespace asio 33 | 34 | #include "asio/detail/pop_options.hpp" 35 | 36 | #endif // ASIO_DETAIL_DEPENDENT_TYPE_HPP 37 | -------------------------------------------------------------------------------- /communications/asio/detail/event.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/event.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_EVENT_HPP 12 | #define ASIO_DETAIL_EVENT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_event.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_event.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_event.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_event.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::condition_variable are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_event event; 37 | #elif defined(ASIO_WINDOWS) 38 | typedef win_event event; 39 | #elif defined(ASIO_HAS_PTHREADS) 40 | typedef posix_event event; 41 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 42 | typedef std_event event; 43 | #endif 44 | 45 | } // namespace detail 46 | } // namespace asio 47 | 48 | #endif // ASIO_DETAIL_EVENT_HPP 49 | -------------------------------------------------------------------------------- /communications/asio/detail/fd_set_adapter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/fd_set_adapter.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FD_SET_ADAPTER_HPP 12 | #define ASIO_DETAIL_FD_SET_ADAPTER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #include "asio/detail/posix_fd_set_adapter.hpp" 23 | #include "asio/detail/win_fd_set_adapter.hpp" 24 | 25 | namespace asio { 26 | namespace detail { 27 | 28 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 29 | typedef win_fd_set_adapter fd_set_adapter; 30 | #else 31 | typedef posix_fd_set_adapter fd_set_adapter; 32 | #endif 33 | 34 | } // namespace detail 35 | } // namespace asio 36 | 37 | #endif // !defined(ASIO_WINDOWS_RUNTIME) 38 | 39 | #endif // ASIO_DETAIL_FD_SET_ADAPTER_HPP 40 | -------------------------------------------------------------------------------- /communications/asio/detail/function.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/function.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FUNCTION_HPP 12 | #define ASIO_DETAIL_FUNCTION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_FUNCTION) 21 | # include 22 | #else // defined(ASIO_HAS_STD_FUNCTION) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_FUNCTION) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_FUNCTION) 30 | using std::function; 31 | #else // defined(ASIO_HAS_STD_FUNCTION) 32 | using boost::function; 33 | #endif // defined(ASIO_HAS_STD_FUNCTION) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_FUNCTION_HPP 39 | -------------------------------------------------------------------------------- /communications/asio/detail/gcc_hppa_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/gcc_hppa_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__GNUC__) && (defined(__hppa) || defined(__hppa__)) 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | class gcc_hppa_fenced_block 28 | : private noncopyable 29 | { 30 | public: 31 | enum half_t { half }; 32 | enum full_t { full }; 33 | 34 | // Constructor for a half fenced block. 35 | explicit gcc_hppa_fenced_block(half_t) 36 | { 37 | } 38 | 39 | // Constructor for a full fenced block. 40 | explicit gcc_hppa_fenced_block(full_t) 41 | { 42 | barrier(); 43 | } 44 | 45 | // Destructor. 46 | ~gcc_hppa_fenced_block() 47 | { 48 | barrier(); 49 | } 50 | 51 | private: 52 | static void barrier() 53 | { 54 | // This is just a placeholder and almost certainly not sufficient. 55 | __asm__ __volatile__ ("" : : : "memory"); 56 | } 57 | }; 58 | 59 | } // namespace detail 60 | } // namespace asio 61 | 62 | #include "asio/detail/pop_options.hpp" 63 | 64 | #endif // defined(__GNUC__) && (defined(__hppa) || defined(__hppa__)) 65 | 66 | #endif // ASIO_DETAIL_GCC_HPPA_FENCED_BLOCK_HPP 67 | -------------------------------------------------------------------------------- /communications/asio/detail/gcc_sync_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/gcc_sync_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__GNUC__) \ 21 | && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \ 22 | && !defined(__INTEL_COMPILER) && !defined(__ICL) \ 23 | && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__) 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class gcc_sync_fenced_block 31 | : private noncopyable 32 | { 33 | public: 34 | enum half_or_full_t {half, full}; 35 | 36 | // Constructor. 37 | explicit gcc_sync_fenced_block(half_or_full_t) 38 | : value_(0) 39 | { 40 | __sync_lock_test_and_set(&value_, 1); 41 | } 42 | 43 | // Destructor. 44 | ~gcc_sync_fenced_block() 45 | { 46 | __sync_lock_release(&value_); 47 | } 48 | 49 | private: 50 | int value_; 51 | }; 52 | 53 | } // namespace detail 54 | } // namespace asio 55 | 56 | #include "asio/detail/pop_options.hpp" 57 | 58 | #endif // defined(__GNUC__) 59 | // && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) 60 | // && !defined(__INTEL_COMPILER) && !defined(__ICL) 61 | // && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__) 62 | 63 | #endif // ASIO_DETAIL_GCC_SYNC_FENCED_BLOCK_HPP 64 | -------------------------------------------------------------------------------- /communications/asio/detail/handler_cont_helpers.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/handler_cont_helpers.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 12 | #define ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/addressof.hpp" 20 | #include "asio/handler_continuation_hook.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | // Calls to asio_handler_is_continuation must be made from a namespace that 25 | // does not contain overloads of this function. This namespace is defined here 26 | // for that purpose. 27 | namespace asio_handler_cont_helpers { 28 | 29 | template 30 | inline bool is_continuation(Context& context) 31 | { 32 | #if !defined(ASIO_HAS_HANDLER_HOOKS) 33 | return false; 34 | #else 35 | using asio::asio_handler_is_continuation; 36 | return asio_handler_is_continuation( 37 | asio::detail::addressof(context)); 38 | #endif 39 | } 40 | 41 | } // namespace asio_handler_cont_helpers 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 46 | -------------------------------------------------------------------------------- /communications/asio/detail/impl/posix_event.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_event.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_event.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | posix_event::posix_event() 32 | : state_(0) 33 | { 34 | int error = ::pthread_cond_init(&cond_, 0); 35 | asio::error_code ec(error, 36 | asio::error::get_system_category()); 37 | asio::detail::throw_error(ec, "event"); 38 | } 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // defined(ASIO_HAS_PTHREADS) 46 | 47 | #endif // ASIO_DETAIL_IMPL_POSIX_EVENT_IPP 48 | -------------------------------------------------------------------------------- /communications/asio/detail/impl/posix_mutex.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_mutex.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_mutex.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | posix_mutex::posix_mutex() 32 | { 33 | int error = ::pthread_mutex_init(&mutex_, 0); 34 | asio::error_code ec(error, 35 | asio::error::get_system_category()); 36 | asio::detail::throw_error(ec, "mutex"); 37 | } 38 | 39 | } // namespace detail 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // defined(ASIO_HAS_PTHREADS) 45 | 46 | #endif // ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 47 | -------------------------------------------------------------------------------- /communications/asio/detail/impl/posix_tss_ptr.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_tss_ptr.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_tss_ptr.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | void posix_tss_ptr_create(pthread_key_t& key) 32 | { 33 | int error = ::pthread_key_create(&key, 0); 34 | asio::error_code ec(error, 35 | asio::error::get_system_category()); 36 | asio::detail::throw_error(ec, "tss"); 37 | } 38 | 39 | } // namespace detail 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // defined(ASIO_HAS_PTHREADS) 45 | 46 | #endif // ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 47 | -------------------------------------------------------------------------------- /communications/asio/detail/impl/win_event.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/win_event.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_WIN_EVENT_IPP 12 | #define ASIO_DETAIL_IMPL_WIN_EVENT_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS) 21 | 22 | #include "asio/detail/throw_error.hpp" 23 | #include "asio/detail/win_event.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | win_event::win_event() 32 | : state_(0) 33 | { 34 | events_[0] = ::CreateEvent(0, true, false, 0); 35 | if (!events_[0]) 36 | { 37 | DWORD last_error = ::GetLastError(); 38 | asio::error_code ec(last_error, 39 | asio::error::get_system_category()); 40 | asio::detail::throw_error(ec, "event"); 41 | } 42 | 43 | events_[1] = ::CreateEvent(0, false, false, 0); 44 | if (!events_[1]) 45 | { 46 | DWORD last_error = ::GetLastError(); 47 | ::CloseHandle(events_[0]); 48 | asio::error_code ec(last_error, 49 | asio::error::get_system_category()); 50 | asio::detail::throw_error(ec, "event"); 51 | } 52 | } 53 | 54 | win_event::~win_event() 55 | { 56 | ::CloseHandle(events_[0]); 57 | ::CloseHandle(events_[1]); 58 | } 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // defined(ASIO_WINDOWS) 66 | 67 | #endif // ASIO_DETAIL_IMPL_WIN_EVENT_IPP 68 | -------------------------------------------------------------------------------- /communications/asio/detail/impl/win_tss_ptr.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/win_tss_ptr.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 12 | #define ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS) 21 | 22 | #include "asio/detail/throw_error.hpp" 23 | #include "asio/detail/win_tss_ptr.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | DWORD win_tss_ptr_create() 32 | { 33 | #if defined(UNDER_CE) 34 | enum { out_of_indexes = 0xFFFFFFFF }; 35 | #else 36 | enum { out_of_indexes = TLS_OUT_OF_INDEXES }; 37 | #endif 38 | 39 | DWORD tss_key = ::TlsAlloc(); 40 | if (tss_key == out_of_indexes) 41 | { 42 | DWORD last_error = ::GetLastError(); 43 | asio::error_code ec(last_error, 44 | asio::error::get_system_category()); 45 | asio::detail::throw_error(ec, "tss"); 46 | } 47 | return tss_key; 48 | } 49 | 50 | } // namespace detail 51 | } // namespace asio 52 | 53 | #include "asio/detail/pop_options.hpp" 54 | 55 | #endif // defined(ASIO_WINDOWS) 56 | 57 | #endif // ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 58 | -------------------------------------------------------------------------------- /communications/asio/detail/keyword_tss_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/keyword_tss_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 12 | #define ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class keyword_tss_ptr 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | keyword_tss_ptr() 36 | { 37 | } 38 | 39 | // Destructor. 40 | ~keyword_tss_ptr() 41 | { 42 | } 43 | 44 | // Get the value. 45 | operator T*() const 46 | { 47 | return value_; 48 | } 49 | 50 | // Set the value. 51 | void operator=(T* value) 52 | { 53 | value_ = value; 54 | } 55 | 56 | private: 57 | static ASIO_THREAD_KEYWORD T* value_; 58 | }; 59 | 60 | template 61 | ASIO_THREAD_KEYWORD T* keyword_tss_ptr::value_; 62 | 63 | } // namespace detail 64 | } // namespace asio 65 | 66 | #include "asio/detail/pop_options.hpp" 67 | 68 | #endif // defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION) 69 | 70 | #endif // ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 71 | -------------------------------------------------------------------------------- /communications/asio/detail/limits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/limits.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_LIMITS_HPP 12 | #define ASIO_DETAIL_LIMITS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_LIMITS) 21 | # include 22 | #else // defined(ASIO_HAS_BOOST_LIMITS) 23 | # include 24 | #endif // defined(ASIO_HAS_BOOST_LIMITS) 25 | 26 | #endif // ASIO_DETAIL_LIMITS_HPP 27 | -------------------------------------------------------------------------------- /communications/asio/detail/local_free_on_block_exit.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/local_free_on_block_exit.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 12 | #define ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/socket_types.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class local_free_on_block_exit 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor blocks all signals for the calling thread. 35 | explicit local_free_on_block_exit(void* p) 36 | : p_(p) 37 | { 38 | } 39 | 40 | // Destructor restores the previous signal mask. 41 | ~local_free_on_block_exit() 42 | { 43 | ::LocalFree(p_); 44 | } 45 | 46 | private: 47 | void* p_; 48 | }; 49 | 50 | } // namespace detail 51 | } // namespace asio 52 | 53 | #include "asio/detail/pop_options.hpp" 54 | 55 | #endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__) 56 | 57 | #endif // ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 58 | -------------------------------------------------------------------------------- /communications/asio/detail/macos_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/macos_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__MACH__) && defined(__APPLE__) 21 | 22 | #include 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | class macos_fenced_block 30 | : private noncopyable 31 | { 32 | public: 33 | enum half_t { half }; 34 | enum full_t { full }; 35 | 36 | // Constructor for a half fenced block. 37 | explicit macos_fenced_block(half_t) 38 | { 39 | } 40 | 41 | // Constructor for a full fenced block. 42 | explicit macos_fenced_block(full_t) 43 | { 44 | OSMemoryBarrier(); 45 | } 46 | 47 | // Destructor. 48 | ~macos_fenced_block() 49 | { 50 | OSMemoryBarrier(); 51 | } 52 | }; 53 | 54 | } // namespace detail 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // defined(__MACH__) && defined(__APPLE__) 60 | 61 | #endif // ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 62 | -------------------------------------------------------------------------------- /communications/asio/detail/mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/mutex.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_MUTEX_HPP 12 | #define ASIO_DETAIL_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_mutex.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_mutex.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_mutex.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_mutex.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::mutex are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_mutex mutex; 37 | #elif defined(ASIO_WINDOWS) 38 | typedef win_mutex mutex; 39 | #elif defined(ASIO_HAS_PTHREADS) 40 | typedef posix_mutex mutex; 41 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 42 | typedef std_mutex mutex; 43 | #endif 44 | 45 | } 46 | // namespace detail 47 | }// namespace asio 48 | 49 | #endif // ASIO_DETAIL_MUTEX_HPP 50 | -------------------------------------------------------------------------------- /communications/asio/detail/noncopyable.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/noncopyable.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NONCOPYABLE_HPP 12 | #define ASIO_DETAIL_NONCOPYABLE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | class noncopyable { 26 | protected: 27 | noncopyable() { 28 | } 29 | ~noncopyable() { 30 | } 31 | private: 32 | noncopyable(const noncopyable&); 33 | const noncopyable& operator=(const noncopyable&); 34 | }; 35 | 36 | } // namespace detail 37 | 38 | using asio::detail::noncopyable; 39 | 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // ASIO_DETAIL_NONCOPYABLE_HPP 45 | -------------------------------------------------------------------------------- /communications/asio/detail/null_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/push_options.hpp" 19 | 20 | namespace asio { 21 | namespace detail { 22 | 23 | class null_fenced_block: private noncopyable { 24 | public: 25 | enum half_or_full_t { 26 | half, full 27 | }; 28 | 29 | // Constructor. 30 | explicit null_fenced_block(half_or_full_t) { 31 | } 32 | 33 | // Destructor. 34 | ~null_fenced_block() { 35 | } 36 | }; 37 | 38 | } // namespace detail 39 | } // namespace asio 40 | 41 | #include "asio/detail/pop_options.hpp" 42 | 43 | #endif // ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 44 | -------------------------------------------------------------------------------- /communications/asio/detail/null_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_MUTEX_HPP 12 | #define ASIO_DETAIL_NULL_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/scoped_lock.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class null_mutex 31 | : private noncopyable 32 | { 33 | public: 34 | typedef asio::detail::scoped_lock scoped_lock; 35 | 36 | // Constructor. 37 | null_mutex() 38 | { 39 | } 40 | 41 | // Destructor. 42 | ~null_mutex() 43 | { 44 | } 45 | 46 | // Lock the mutex. 47 | void lock() 48 | { 49 | } 50 | 51 | // Unlock the mutex. 52 | void unlock() 53 | { 54 | } 55 | }; 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // !defined(ASIO_HAS_THREADS) 63 | 64 | #endif // ASIO_DETAIL_NULL_MUTEX_HPP 65 | -------------------------------------------------------------------------------- /communications/asio/detail/null_reactor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_reactor.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_REACTOR_HPP 12 | #define ASIO_DETAIL_NULL_REACTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #include "asio/io_service.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | class null_reactor 30 | : public asio::detail::service_base 31 | { 32 | public: 33 | // Constructor. 34 | null_reactor(asio::io_service& io_service) 35 | : asio::detail::service_base(io_service) 36 | { 37 | } 38 | 39 | // Destructor. 40 | ~null_reactor() 41 | { 42 | } 43 | 44 | // Destroy all user-defined handler objects owned by the service. 45 | void shutdown_service() 46 | { 47 | } 48 | 49 | // No-op because should never be called. 50 | void run(bool /*block*/, op_queue& /*ops*/) 51 | { 52 | } 53 | 54 | // No-op. 55 | void interrupt() 56 | { 57 | } 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // defined(ASIO_WINDOWS_RUNTIME) 66 | 67 | #endif // ASIO_DETAIL_NULL_REACTOR_HPP 68 | -------------------------------------------------------------------------------- /communications/asio/detail/null_signal_blocker.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_signal_blocker.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP 12 | #define ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) \ 21 | || defined(ASIO_WINDOWS) \ 22 | || defined(ASIO_WINDOWS_RUNTIME) \ 23 | || defined(__CYGWIN__) \ 24 | || defined(__SYMBIAN32__) 25 | 26 | #include "asio/detail/noncopyable.hpp" 27 | 28 | #include "asio/detail/push_options.hpp" 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | class null_signal_blocker 34 | : private noncopyable 35 | { 36 | public: 37 | // Constructor blocks all signals for the calling thread. 38 | null_signal_blocker() 39 | { 40 | } 41 | 42 | // Destructor restores the previous signal mask. 43 | ~null_signal_blocker() 44 | { 45 | } 46 | 47 | // Block all signals for the calling thread. 48 | void block() 49 | { 50 | } 51 | 52 | // Restore the previous signal mask. 53 | void unblock() 54 | { 55 | } 56 | }; 57 | 58 | } // namespace detail 59 | } // namespace asio 60 | 61 | #include "asio/detail/pop_options.hpp" 62 | 63 | #endif // !defined(ASIO_HAS_THREADS) 64 | // || defined(ASIO_WINDOWS) 65 | // || defined(ASIO_WINDOWS_RUNTIME) 66 | // || defined(__CYGWIN__) 67 | // || defined(__SYMBIAN32__) 68 | 69 | #endif // ASIO_DETAIL_NULL_SIGNAL_BLOCKER_HPP 70 | -------------------------------------------------------------------------------- /communications/asio/detail/null_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/scoped_lock.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | struct null_static_mutex 30 | { 31 | typedef asio::detail::scoped_lock scoped_lock; 32 | 33 | // Initialise the mutex. 34 | void init() 35 | { 36 | } 37 | 38 | // Lock the mutex. 39 | void lock() 40 | { 41 | } 42 | 43 | // Unlock the mutex. 44 | void unlock() 45 | { 46 | } 47 | 48 | int unused_; 49 | }; 50 | 51 | #define ASIO_NULL_STATIC_MUTEX_INIT { 0 } 52 | 53 | } // namespace detail 54 | } // namespace asio 55 | 56 | #include "asio/detail/pop_options.hpp" 57 | 58 | #endif // !defined(ASIO_HAS_THREADS) 59 | 60 | #endif // ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 61 | -------------------------------------------------------------------------------- /communications/asio/detail/null_thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_thread.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_THREAD_HPP 12 | #define ASIO_DETAIL_NULL_THREAD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class null_thread: private noncopyable { 32 | public: 33 | // Constructor. 34 | template 35 | null_thread(Function, unsigned int = 0) { 36 | asio::detail::throw_error(asio::error::operation_not_supported, 37 | "thread"); 38 | } 39 | 40 | // Destructor. 41 | ~null_thread() { 42 | } 43 | 44 | // Wait for the thread to exit. 45 | void join() { 46 | } 47 | }; 48 | 49 | } // namespace detail 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // !defined(ASIO_HAS_THREADS) 55 | 56 | #endif // ASIO_DETAIL_NULL_THREAD_HPP 57 | -------------------------------------------------------------------------------- /communications/asio/detail/null_tss_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_tss_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_TSS_PTR_HPP 12 | #define ASIO_DETAIL_NULL_TSS_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class null_tss_ptr 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | null_tss_ptr() 36 | : value_(0) 37 | { 38 | } 39 | 40 | // Destructor. 41 | ~null_tss_ptr() 42 | { 43 | } 44 | 45 | // Get the value. 46 | operator T*() const 47 | { 48 | return value_; 49 | } 50 | 51 | // Set the value. 52 | void operator=(T* value) 53 | { 54 | value_ = value; 55 | } 56 | 57 | private: 58 | T* value_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // !defined(ASIO_HAS_THREADS) 67 | 68 | #endif // ASIO_DETAIL_NULL_TSS_PTR_HPP 69 | -------------------------------------------------------------------------------- /communications/asio/detail/operation.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/operation.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_OPERATION_HPP 12 | #define ASIO_DETAIL_OPERATION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_IOCP) 21 | # include "asio/detail/win_iocp_operation.hpp" 22 | #else 23 | # include "asio/detail/task_io_service_operation.hpp" 24 | #endif 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_IOCP) 30 | typedef win_iocp_operation operation; 31 | #else 32 | typedef task_io_service_operation operation; 33 | #endif 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_OPERATION_HPP 39 | -------------------------------------------------------------------------------- /communications/asio/detail/posix_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/posix_static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include 23 | #include "asio/detail/scoped_lock.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | struct posix_static_mutex 31 | { 32 | typedef asio::detail::scoped_lock scoped_lock; 33 | 34 | // Initialise the mutex. 35 | void init() 36 | { 37 | // Nothing to do. 38 | } 39 | 40 | // Lock the mutex. 41 | void lock() 42 | { 43 | (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL. 44 | } 45 | 46 | // Unlock the mutex. 47 | void unlock() 48 | { 49 | (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL. 50 | } 51 | 52 | ::pthread_mutex_t mutex_; 53 | }; 54 | 55 | #define ASIO_POSIX_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER } 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // defined(ASIO_HAS_PTHREADS) 63 | 64 | #endif // ASIO_DETAIL_POSIX_STATIC_MUTEX_HPP 65 | -------------------------------------------------------------------------------- /communications/asio/detail/reactor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_HPP 12 | #define ASIO_DETAIL_REACTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/reactor_fwd.hpp" 19 | 20 | #if defined(ASIO_HAS_EPOLL) 21 | # include "asio/detail/epoll_reactor.hpp" 22 | #elif defined(ASIO_HAS_KQUEUE) 23 | # include "asio/detail/kqueue_reactor.hpp" 24 | #elif defined(ASIO_HAS_DEV_POLL) 25 | # include "asio/detail/dev_poll_reactor.hpp" 26 | #elif defined(ASIO_WINDOWS_RUNTIME) 27 | # include "asio/detail/null_reactor.hpp" 28 | #else 29 | # include "asio/detail/select_reactor.hpp" 30 | #endif 31 | 32 | #endif // ASIO_DETAIL_REACTOR_HPP 33 | -------------------------------------------------------------------------------- /communications/asio/detail/reactor_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_FWD_HPP 12 | #define ASIO_DETAIL_REACTOR_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace asio { 21 | namespace detail { 22 | 23 | #if defined(ASIO_WINDOWS_RUNTIME) 24 | typedef class null_reactor reactor; 25 | #elif defined(ASIO_HAS_IOCP) 26 | typedef class select_reactor reactor; 27 | #elif defined(ASIO_HAS_EPOLL) 28 | typedef class epoll_reactor reactor; 29 | #elif defined(ASIO_HAS_KQUEUE) 30 | typedef class kqueue_reactor reactor; 31 | #elif defined(ASIO_HAS_DEV_POLL) 32 | typedef class dev_poll_reactor reactor; 33 | #else 34 | typedef class select_reactor reactor; 35 | #endif 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #endif // ASIO_DETAIL_REACTOR_FWD_HPP 41 | -------------------------------------------------------------------------------- /communications/asio/detail/reactor_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_OP_HPP 12 | #define ASIO_DETAIL_REACTOR_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class reactor_op: public operation { 27 | public: 28 | // The error code to be passed to the completion handler. 29 | asio::error_code ec_; 30 | 31 | // The number of bytes transferred, to be passed to the completion handler. 32 | std::size_t bytes_transferred_; 33 | 34 | // Perform the operation. Returns true if it is finished. 35 | bool perform() { 36 | return perform_func_(this); 37 | } 38 | 39 | protected: 40 | typedef bool (*perform_func_type)(reactor_op*); 41 | 42 | reactor_op(perform_func_type perform_func, func_type complete_func) : 43 | operation(complete_func), bytes_transferred_(0), perform_func_( 44 | perform_func) { 45 | } 46 | 47 | private: 48 | perform_func_type perform_func_; 49 | }; 50 | 51 | } // namespace detail 52 | } // namespace asio 53 | 54 | #include "asio/detail/pop_options.hpp" 55 | 56 | #endif // ASIO_DETAIL_REACTOR_OP_HPP 57 | -------------------------------------------------------------------------------- /communications/asio/detail/regex_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/regex_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REGEX_FWD_HPP 12 | #define ASIO_DETAIL_REGEX_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if defined(ASIO_HAS_BOOST_REGEX) 19 | 20 | #include 21 | #include 22 | 23 | namespace boost { 24 | 25 | template 26 | struct sub_match; 27 | 28 | template 29 | class match_results; 30 | 31 | } // namespace boost 32 | 33 | #endif // defined(ASIO_HAS_BOOST_REGEX) 34 | 35 | #endif // ASIO_DETAIL_REGEX_FWD_HPP 36 | -------------------------------------------------------------------------------- /communications/asio/detail/scoped_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/scoped_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SCOPED_PTR_HPP 12 | #define ASIO_DETAIL_SCOPED_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | class scoped_ptr 27 | { 28 | public: 29 | // Constructor. 30 | explicit scoped_ptr(T* p = 0) 31 | : p_(p) 32 | { 33 | } 34 | 35 | // Destructor. 36 | ~scoped_ptr() 37 | { 38 | delete p_; 39 | } 40 | 41 | // Access. 42 | T* get() 43 | { 44 | return p_; 45 | } 46 | 47 | // Access. 48 | T* operator->() 49 | { 50 | return p_; 51 | } 52 | 53 | // Dereference. 54 | T& operator*() 55 | { 56 | return *p_; 57 | } 58 | 59 | // Reset pointer. 60 | void reset(T* p = 0) 61 | { 62 | delete p_; 63 | p_ = p; 64 | } 65 | 66 | private: 67 | // Disallow copying and assignment. 68 | scoped_ptr(const scoped_ptr&); 69 | scoped_ptr& operator=(const scoped_ptr&); 70 | 71 | T* p_; 72 | }; 73 | 74 | } // namespace detail 75 | } // namespace asio 76 | 77 | #include "asio/detail/pop_options.hpp" 78 | 79 | #endif // ASIO_DETAIL_SCOPED_PTR_HPP 80 | -------------------------------------------------------------------------------- /communications/asio/detail/select_interrupter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/select_interrupter.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SELECT_INTERRUPTER_HPP 12 | #define ASIO_DETAIL_SELECT_INTERRUPTER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) 23 | # include "asio/detail/socket_select_interrupter.hpp" 24 | #elif defined(ASIO_HAS_EVENTFD) 25 | # include "asio/detail/eventfd_select_interrupter.hpp" 26 | #else 27 | # include "asio/detail/pipe_select_interrupter.hpp" 28 | #endif 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) 34 | typedef socket_select_interrupter select_interrupter; 35 | #elif defined(ASIO_HAS_EVENTFD) 36 | typedef eventfd_select_interrupter select_interrupter; 37 | #else 38 | typedef pipe_select_interrupter select_interrupter; 39 | #endif 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #endif // !defined(ASIO_WINDOWS_RUNTIME) 45 | 46 | #endif // ASIO_DETAIL_SELECT_INTERRUPTER_HPP 47 | -------------------------------------------------------------------------------- /communications/asio/detail/shared_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/shared_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SHARED_PTR_HPP 12 | #define ASIO_DETAIL_SHARED_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_SHARED_PTR) 21 | # include 22 | #else // defined(ASIO_HAS_STD_SHARED_PTR) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_SHARED_PTR) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_SHARED_PTR) 30 | using std::shared_ptr; 31 | #else // defined(ASIO_HAS_STD_SHARED_PTR) 32 | using boost::shared_ptr; 33 | #endif // defined(ASIO_HAS_STD_SHARED_PTR) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_SHARED_PTR_HPP 39 | -------------------------------------------------------------------------------- /communications/asio/detail/signal_blocker.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_blocker.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_BLOCKER_HPP 12 | #define ASIO_DETAIL_SIGNAL_BLOCKER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) || defined(ASIO_WINDOWS) \ 21 | || defined(ASIO_WINDOWS_RUNTIME) \ 22 | || defined(__CYGWIN__) || defined(__SYMBIAN32__) 23 | # include "asio/detail/null_signal_blocker.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_signal_blocker.hpp" 26 | #else 27 | # error Only Windows and POSIX are supported! 28 | #endif 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | #if !defined(ASIO_HAS_THREADS) || defined(ASIO_WINDOWS) \ 34 | || defined(ASIO_WINDOWS_RUNTIME) \ 35 | || defined(__CYGWIN__) || defined(__SYMBIAN32__) 36 | typedef null_signal_blocker signal_blocker; 37 | #elif defined(ASIO_HAS_PTHREADS) 38 | typedef posix_signal_blocker signal_blocker; 39 | #endif 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #endif // ASIO_DETAIL_SIGNAL_BLOCKER_HPP 45 | -------------------------------------------------------------------------------- /communications/asio/detail/signal_init.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_init.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_INIT_HPP 12 | #define ASIO_DETAIL_SIGNAL_INIT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS) && !defined(__CYGWIN__) 21 | 22 | #include 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class signal_init { 31 | public: 32 | // Constructor. 33 | signal_init() { 34 | std::signal(Signal, SIG_IGN); 35 | } 36 | }; 37 | 38 | } // namespace detail 39 | } // namespace asio 40 | 41 | #include "asio/detail/pop_options.hpp" 42 | 43 | #endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__) 44 | 45 | #endif // ASIO_DETAIL_SIGNAL_INIT_HPP 46 | -------------------------------------------------------------------------------- /communications/asio/detail/signal_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_OP_HPP 12 | #define ASIO_DETAIL_SIGNAL_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class signal_op: public operation { 27 | public: 28 | // The error code to be passed to the completion handler. 29 | asio::error_code ec_; 30 | 31 | // The signal number to be passed to the completion handler. 32 | int signal_number_; 33 | 34 | protected: 35 | signal_op(func_type func) : 36 | operation(func), signal_number_(0) { 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_SIGNAL_OP_HPP 46 | -------------------------------------------------------------------------------- /communications/asio/detail/solaris_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/solaris_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__sun) 21 | 22 | #include 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | class solaris_fenced_block 30 | : private noncopyable 31 | { 32 | public: 33 | enum half_t {half}; 34 | enum full_t {full}; 35 | 36 | // Constructor for a half fenced block. 37 | explicit solaris_fenced_block(half_t) 38 | { 39 | } 40 | 41 | // Constructor for a full fenced block. 42 | explicit solaris_fenced_block(full_t) 43 | { 44 | membar_consumer(); 45 | } 46 | 47 | // Destructor. 48 | ~solaris_fenced_block() 49 | { 50 | membar_producer(); 51 | } 52 | }; 53 | 54 | } // namespace detail 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // defined(__sun) 60 | 61 | #endif // ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 62 | -------------------------------------------------------------------------------- /communications/asio/detail/static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_static_mutex.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_static_mutex.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_static_mutex.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_static_mutex.hpp" 28 | #else 29 | # error Only Windows and POSIX are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_static_mutex static_mutex; 37 | # define ASIO_STATIC_MUTEX_INIT ASIO_NULL_STATIC_MUTEX_INIT 38 | #elif defined(ASIO_WINDOWS) 39 | typedef win_static_mutex static_mutex; 40 | # define ASIO_STATIC_MUTEX_INIT ASIO_WIN_STATIC_MUTEX_INIT 41 | #elif defined(ASIO_HAS_PTHREADS) 42 | typedef posix_static_mutex static_mutex; 43 | # define ASIO_STATIC_MUTEX_INIT ASIO_POSIX_STATIC_MUTEX_INIT 44 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 45 | typedef std_static_mutex static_mutex; 46 | # define ASIO_STATIC_MUTEX_INIT ASIO_STD_STATIC_MUTEX_INIT 47 | #endif 48 | 49 | } 50 | // namespace detail 51 | }// namespace asio 52 | 53 | #endif // ASIO_DETAIL_STATIC_MUTEX_HPP 54 | -------------------------------------------------------------------------------- /communications/asio/detail/std_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_MUTEX_HPP 12 | #define ASIO_DETAIL_STD_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/scoped_lock.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class std_event; 32 | 33 | class std_mutex 34 | : private noncopyable 35 | { 36 | public: 37 | typedef asio::detail::scoped_lock scoped_lock; 38 | 39 | // Constructor. 40 | std_mutex() 41 | { 42 | } 43 | 44 | // Destructor. 45 | ~std_mutex() 46 | { 47 | } 48 | 49 | // Lock the mutex. 50 | void lock() 51 | { 52 | mutex_.lock(); 53 | } 54 | 55 | // Unlock the mutex. 56 | void unlock() 57 | { 58 | mutex_.unlock(); 59 | } 60 | 61 | private: 62 | friend class std_event; 63 | std::mutex mutex_; 64 | }; 65 | 66 | } // namespace detail 67 | } // namespace asio 68 | 69 | #include "asio/detail/pop_options.hpp" 70 | 71 | #endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 72 | 73 | #endif // ASIO_DETAIL_STD_MUTEX_HPP 74 | -------------------------------------------------------------------------------- /communications/asio/detail/std_thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_thread.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_THREAD_HPP 12 | #define ASIO_DETAIL_STD_THREAD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_THREAD) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class std_thread 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | template 36 | std_thread(Function f, unsigned int = 0) 37 | : thread_(f) 38 | { 39 | } 40 | 41 | // Destructor. 42 | ~std_thread() 43 | { 44 | join(); 45 | } 46 | 47 | // Wait for the thread to exit. 48 | void join() 49 | { 50 | if (thread_.joinable()) 51 | thread_.join(); 52 | } 53 | 54 | private: 55 | std::thread thread_; 56 | }; 57 | 58 | } // namespace detail 59 | } // namespace asio 60 | 61 | #include "asio/detail/pop_options.hpp" 62 | 63 | #endif // defined(ASIO_HAS_STD_THREAD) 64 | 65 | #endif // ASIO_DETAIL_STD_THREAD_HPP 66 | -------------------------------------------------------------------------------- /communications/asio/detail/task_io_service_thread_info.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/task_io_service_thread_info.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TASK_IO_SERVICE_THREAD_INFO_HPP 12 | #define ASIO_DETAIL_TASK_IO_SERVICE_THREAD_INFO_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/op_queue.hpp" 19 | #include "asio/detail/thread_info_base.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class task_io_service; 27 | class task_io_service_operation; 28 | 29 | struct task_io_service_thread_info : public thread_info_base 30 | { 31 | op_queue private_op_queue; 32 | long private_outstanding_work; 33 | }; 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #include "asio/detail/pop_options.hpp" 39 | 40 | #endif // ASIO_DETAIL_TASK_IO_SERVICE_THREAD_INFO_HPP 41 | -------------------------------------------------------------------------------- /communications/asio/detail/thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/thread.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THREAD_HPP 12 | #define ASIO_DETAIL_THREAD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_thread.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # if defined(UNDER_CE) 24 | # include "asio/detail/wince_thread.hpp" 25 | # else 26 | # include "asio/detail/win_thread.hpp" 27 | # endif 28 | #elif defined(ASIO_HAS_PTHREADS) 29 | # include "asio/detail/posix_thread.hpp" 30 | #elif defined(ASIO_HAS_STD_THREAD) 31 | # include "asio/detail/std_thread.hpp" 32 | #else 33 | # error Only Windows, POSIX and std::thread are supported! 34 | #endif 35 | 36 | namespace asio { 37 | namespace detail { 38 | 39 | #if !defined(ASIO_HAS_THREADS) 40 | typedef null_thread thread; 41 | #elif defined(ASIO_WINDOWS) 42 | # if defined(UNDER_CE) 43 | typedef wince_thread thread; 44 | # else 45 | typedef win_thread thread; 46 | # endif 47 | #elif defined(ASIO_HAS_PTHREADS) 48 | typedef posix_thread thread; 49 | #elif defined(ASIO_HAS_STD_THREAD) 50 | typedef std_thread thread; 51 | #endif 52 | 53 | } 54 | // namespace detail 55 | }// namespace asio 56 | 57 | #endif // ASIO_DETAIL_THREAD_HPP 58 | -------------------------------------------------------------------------------- /communications/asio/detail/throw_error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/throw_error.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THROW_ERROR_HPP 12 | #define ASIO_DETAIL_THROW_ERROR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/error_code.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | ASIO_DECL void do_throw_error(const asio::error_code& err); 27 | 28 | ASIO_DECL void do_throw_error(const asio::error_code& err, 29 | const char* location); 30 | 31 | inline void throw_error(const asio::error_code& err) { 32 | if (err) 33 | do_throw_error(err); 34 | } 35 | 36 | inline void throw_error(const asio::error_code& err, const char* location) { 37 | if (err) 38 | do_throw_error(err, location); 39 | } 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #include "asio/detail/pop_options.hpp" 45 | 46 | #if defined(ASIO_HEADER_ONLY) 47 | # include "asio/detail/impl/throw_error.ipp" 48 | #endif // defined(ASIO_HEADER_ONLY) 49 | 50 | #endif // ASIO_DETAIL_THROW_ERROR_HPP 51 | -------------------------------------------------------------------------------- /communications/asio/detail/throw_exception.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/throw_exception.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THROW_EXCEPTION_HPP 12 | #define ASIO_DETAIL_THROW_EXCEPTION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 21 | # include 22 | #endif // defined(ASIO_BOOST_THROW_EXCEPTION) 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | #if defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 28 | using boost::throw_exception; 29 | #else // defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 30 | 31 | // Declare the throw_exception function for all targets. 32 | template 33 | void throw_exception(const Exception& e); 34 | 35 | // Only define the throw_exception function when exceptions are enabled. 36 | // Otherwise, it is up to the application to provide a definition of this 37 | // function. 38 | # if !defined(ASIO_NO_EXCEPTIONS) 39 | template 40 | void throw_exception(const Exception& e) 41 | { 42 | throw e; 43 | } 44 | # endif // !defined(ASIO_NO_EXCEPTIONS) 45 | 46 | #endif // defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 47 | 48 | } // namespace detail 49 | } // namespace asio 50 | 51 | #endif // ASIO_DETAIL_THROW_EXCEPTION_HPP 52 | -------------------------------------------------------------------------------- /communications/asio/detail/timer_scheduler.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_scheduler.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TIMER_SCHEDULER_HPP 12 | #define ASIO_DETAIL_TIMER_SCHEDULER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/timer_scheduler_fwd.hpp" 20 | 21 | #if defined(ASIO_WINDOWS_RUNTIME) 22 | # include "asio/detail/winrt_timer_scheduler.hpp" 23 | #elif defined(ASIO_HAS_IOCP) 24 | # include "asio/detail/win_iocp_io_service.hpp" 25 | #elif defined(ASIO_HAS_EPOLL) 26 | # include "asio/detail/epoll_reactor.hpp" 27 | #elif defined(ASIO_HAS_KQUEUE) 28 | # include "asio/detail/kqueue_reactor.hpp" 29 | #elif defined(ASIO_HAS_DEV_POLL) 30 | # include "asio/detail/dev_poll_reactor.hpp" 31 | #else 32 | # include "asio/detail/select_reactor.hpp" 33 | #endif 34 | 35 | #endif // ASIO_DETAIL_TIMER_SCHEDULER_HPP 36 | -------------------------------------------------------------------------------- /communications/asio/detail/timer_scheduler_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_scheduler_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 12 | #define ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace asio { 21 | namespace detail { 22 | 23 | #if defined(ASIO_WINDOWS_RUNTIME) 24 | typedef class winrt_timer_scheduler timer_scheduler; 25 | #elif defined(ASIO_HAS_IOCP) 26 | typedef class win_iocp_io_service timer_scheduler; 27 | #elif defined(ASIO_HAS_EPOLL) 28 | typedef class epoll_reactor timer_scheduler; 29 | #elif defined(ASIO_HAS_KQUEUE) 30 | typedef class kqueue_reactor timer_scheduler; 31 | #elif defined(ASIO_HAS_DEV_POLL) 32 | typedef class dev_poll_reactor timer_scheduler; 33 | #else 34 | typedef class select_reactor timer_scheduler; 35 | #endif 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #endif // ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 41 | -------------------------------------------------------------------------------- /communications/asio/detail/wait_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/wait_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WAIT_OP_HPP 12 | #define ASIO_DETAIL_WAIT_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class wait_op: public operation { 27 | public: 28 | // The error code to be passed to the completion handler. 29 | asio::error_code ec_; 30 | 31 | protected: 32 | wait_op(func_type func) : 33 | operation(func) { 34 | } 35 | }; 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #include "asio/detail/pop_options.hpp" 41 | 42 | #endif // ASIO_DETAIL_WAIT_OP_HPP 43 | -------------------------------------------------------------------------------- /communications/asio/detail/weak_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/weak_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WEAK_PTR_HPP 12 | #define ASIO_DETAIL_WEAK_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_SHARED_PTR) 21 | # include 22 | #else // defined(ASIO_HAS_STD_SHARED_PTR) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_SHARED_PTR) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_SHARED_PTR) 30 | using std::weak_ptr; 31 | #else // defined(ASIO_HAS_STD_SHARED_PTR) 32 | using boost::weak_ptr; 33 | #endif // defined(ASIO_HAS_STD_SHARED_PTR) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_WEAK_PTR_HPP 39 | -------------------------------------------------------------------------------- /communications/asio/detail/win_iocp_thread_info.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/win_iocp_thread_info.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 12 | #define ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/thread_info_base.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | struct win_iocp_thread_info: public thread_info_base { 26 | }; 27 | 28 | } // namespace detail 29 | } // namespace asio 30 | 31 | #include "asio/detail/pop_options.hpp" 32 | 33 | #endif // ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 34 | -------------------------------------------------------------------------------- /communications/asio/detail/winrt_async_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/winrt_async_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WINRT_ASYNC_OP_HPP 12 | #define ASIO_DETAIL_WINRT_ASYNC_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | template 27 | class winrt_async_op: public operation { 28 | public: 29 | // The error code to be passed to the completion handler. 30 | asio::error_code ec_; 31 | 32 | // The result of the operation, to be passed to the completion handler. 33 | TResult result_; 34 | 35 | protected: 36 | winrt_async_op(func_type complete_func) : 37 | operation(complete_func), result_() { 38 | } 39 | }; 40 | 41 | template<> 42 | class winrt_async_op : public operation { 43 | public: 44 | // The error code to be passed to the completion handler. 45 | asio::error_code ec_; 46 | 47 | protected: 48 | winrt_async_op(func_type complete_func) : 49 | operation(complete_func) { 50 | } 51 | }; 52 | 53 | } // namespace detail 54 | } // namespace asio 55 | 56 | #include "asio/detail/pop_options.hpp" 57 | 58 | #endif // ASIO_DETAIL_WINRT_ASYNC_OP_HPP 59 | -------------------------------------------------------------------------------- /communications/asio/handler_continuation_hook.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // handler_continuation_hook.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_HANDLER_CONTINUATION_HOOK_HPP 12 | #define ASIO_HANDLER_CONTINUATION_HOOK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | /// Default continuation function for handlers. 25 | /** 26 | * Asynchronous operations may represent a continuation of the asynchronous 27 | * control flow associated with the current handler. The implementation can use 28 | * this knowledge to optimise scheduling of the handler. 29 | * 30 | * Implement asio_handler_is_continuation for your own handlers to indicate 31 | * when a handler represents a continuation. 32 | * 33 | * The default implementation of the continuation hook returns false. 34 | * 35 | * @par Example 36 | * @code 37 | * class my_handler; 38 | * 39 | * bool asio_handler_is_continuation(my_handler* context) 40 | * { 41 | * return true; 42 | * } 43 | * @endcode 44 | */ 45 | inline bool asio_handler_is_continuation(...) 46 | { 47 | return false; 48 | } 49 | 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_HANDLER_CONTINUATION_HOOK_HPP 55 | -------------------------------------------------------------------------------- /communications/asio/impl/serial_port_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/serial_port_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | // 11 | 12 | #ifndef ASIO_IMPL_SERIAL_PORT_BASE_HPP 13 | #define ASIO_IMPL_SERIAL_PORT_BASE_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #include "asio/detail/push_options.hpp" 20 | 21 | namespace asio { 22 | 23 | inline serial_port_base::baud_rate::baud_rate(unsigned int rate) : 24 | value_(rate) { 25 | } 26 | 27 | inline unsigned int serial_port_base::baud_rate::value() const { 28 | return value_; 29 | } 30 | 31 | inline serial_port_base::flow_control::type serial_port_base::flow_control::value() const { 32 | return value_; 33 | } 34 | 35 | inline serial_port_base::parity::type serial_port_base::parity::value() const { 36 | return value_; 37 | } 38 | 39 | inline serial_port_base::stop_bits::type serial_port_base::stop_bits::value() const { 40 | return value_; 41 | } 42 | 43 | inline unsigned int serial_port_base::character_size::value() const { 44 | return value_; 45 | } 46 | 47 | } // namespace asio 48 | 49 | #include "asio/detail/pop_options.hpp" 50 | 51 | #endif // ASIO_IMPL_SERIAL_PORT_BASE_HPP 52 | -------------------------------------------------------------------------------- /communications/asio/impl/src.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/src.cpp 3 | // ~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #if defined(_MSC_VER) \ 12 | || defined(__BORLANDC__) \ 13 | || defined(__DMC__) 14 | # pragma message ( \ 15 | "This file is deprecated. " \ 16 | "Please #include instead.") 17 | #elif defined(__GNUC__) \ 18 | || defined(__HP_aCC) \ 19 | || defined(__SUNPRO_CC) \ 20 | || defined(__IBMCPP__) 21 | # warning "This file is deprecated." 22 | # warning "Please #include instead." 23 | #endif 24 | 25 | #include "asio/impl/src.hpp" 26 | -------------------------------------------------------------------------------- /communications/asio/ip/host_name.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/host_name.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_HOST_NAME_HPP 12 | #define ASIO_IP_HOST_NAME_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | #include "asio/error_code.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | /// Get the current host name. 28 | ASIO_DECL std::string host_name(); 29 | 30 | /// Get the current host name. 31 | ASIO_DECL std::string host_name(asio::error_code& ec); 32 | 33 | } // namespace ip 34 | } // namespace asio 35 | 36 | #include "asio/detail/pop_options.hpp" 37 | 38 | #if defined(ASIO_HEADER_ONLY) 39 | # include "asio/ip/impl/host_name.ipp" 40 | #endif // defined(ASIO_HEADER_ONLY) 41 | 42 | #endif // ASIO_IP_HOST_NAME_HPP 43 | -------------------------------------------------------------------------------- /communications/asio/ip/impl/address.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_ADDRESS_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, const address& addr) { 30 | asio::error_code ec; 31 | std::string s = addr.to_string(ec); 32 | if (ec) { 33 | if (os.exceptions() & std::basic_ostream::failbit) 34 | asio::detail::throw_error(ec); 35 | else 36 | os.setstate(std::basic_ostream::failbit); 37 | } else 38 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 39 | os << os.widen(*i); 40 | return os; 41 | } 42 | 43 | } // namespace ip 44 | } // namespace asio 45 | 46 | #include "asio/detail/pop_options.hpp" 47 | 48 | #endif // !defined(ASIO_NO_IOSTREAM) 49 | 50 | #endif // ASIO_IP_IMPL_ADDRESS_HPP 51 | -------------------------------------------------------------------------------- /communications/asio/ip/impl/address_v4.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address_v4.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_ADDRESS_V4_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_V4_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, const address_v4& addr) { 30 | asio::error_code ec; 31 | std::string s = addr.to_string(ec); 32 | if (ec) { 33 | if (os.exceptions() & std::basic_ostream::failbit) 34 | asio::detail::throw_error(ec); 35 | else 36 | os.setstate(std::basic_ostream::failbit); 37 | } else 38 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 39 | os << os.widen(*i); 40 | return os; 41 | } 42 | 43 | } // namespace ip 44 | } // namespace asio 45 | 46 | #include "asio/detail/pop_options.hpp" 47 | 48 | #endif // !defined(ASIO_NO_IOSTREAM) 49 | 50 | #endif // ASIO_IP_IMPL_ADDRESS_V4_HPP 51 | -------------------------------------------------------------------------------- /communications/asio/ip/impl/address_v6.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/address_v6.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_ADDRESS_V6_HPP 12 | #define ASIO_IP_IMPL_ADDRESS_V6_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, const address_v6& addr) { 30 | asio::error_code ec; 31 | std::string s = addr.to_string(ec); 32 | if (ec) { 33 | if (os.exceptions() & std::basic_ostream::failbit) 34 | asio::detail::throw_error(ec); 35 | else 36 | os.setstate(std::basic_ostream::failbit); 37 | } else 38 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 39 | os << os.widen(*i); 40 | return os; 41 | } 42 | 43 | } // namespace ip 44 | } // namespace asio 45 | 46 | #include "asio/detail/pop_options.hpp" 47 | 48 | #endif // !defined(ASIO_NO_IOSTREAM) 49 | 50 | #endif // ASIO_IP_IMPL_ADDRESS_V6_HPP 51 | -------------------------------------------------------------------------------- /communications/asio/ip/impl/basic_endpoint.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/basic_endpoint.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 12 | #define ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, 30 | const basic_endpoint& endpoint) { 31 | asio::ip::detail::endpoint tmp_ep(endpoint.address(), endpoint.port()); 32 | asio::error_code ec; 33 | std::string s = tmp_ep.to_string(ec); 34 | if (ec) { 35 | if (os.exceptions() & std::basic_ostream::failbit) 36 | asio::detail::throw_error(ec); 37 | else 38 | os.setstate(std::basic_ostream::failbit); 39 | } else 40 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 41 | os << os.widen(*i); 42 | return os; 43 | } 44 | 45 | } // namespace ip 46 | } // namespace asio 47 | 48 | #include "asio/detail/pop_options.hpp" 49 | 50 | #endif // !defined(ASIO_NO_IOSTREAM) 51 | 52 | #endif // ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 53 | -------------------------------------------------------------------------------- /communications/asio/ip/impl/host_name.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/host_name.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_HOST_NAME_IPP 12 | #define ASIO_IP_IMPL_HOST_NAME_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/socket_ops.hpp" 20 | #include "asio/detail/throw_error.hpp" 21 | #include "asio/detail/winsock_init.hpp" 22 | #include "asio/ip/host_name.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ip { 28 | 29 | std::string host_name() 30 | { 31 | char name[1024]; 32 | asio::error_code ec; 33 | if (asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0) 34 | { 35 | asio::detail::throw_error(ec); 36 | return std::string(); 37 | } 38 | return std::string(name); 39 | } 40 | 41 | std::string host_name(asio::error_code& ec) 42 | { 43 | char name[1024]; 44 | if (asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0) 45 | return std::string(); 46 | return std::string(name); 47 | } 48 | 49 | } // namespace ip 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_IP_IMPL_HOST_NAME_IPP 55 | -------------------------------------------------------------------------------- /communications/asio/is_read_buffered.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_read_buffered.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IS_READ_BUFFERED_HPP 12 | #define ASIO_IS_READ_BUFFERED_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/buffered_read_stream_fwd.hpp" 20 | #include "asio/buffered_stream_fwd.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | 26 | namespace detail { 27 | 28 | template 29 | char is_read_buffered_helper(buffered_stream* s); 30 | 31 | template 32 | char is_read_buffered_helper(buffered_read_stream* s); 33 | 34 | struct is_read_buffered_big_type { 35 | char data[10]; 36 | }; 37 | is_read_buffered_big_type is_read_buffered_helper(...); 38 | 39 | } // namespace detail 40 | 41 | /// The is_read_buffered class is a traits class that may be used to determine 42 | /// whether a stream type supports buffering of read data. 43 | template 44 | class is_read_buffered { 45 | public: 46 | #if defined(GENERATING_DOCUMENTATION) 47 | /// The value member is true only if the Stream type supports buffering of 48 | /// read data. 49 | static const bool value; 50 | #else 51 | ASIO_STATIC_CONSTANT(bool, 52 | value = sizeof(detail::is_read_buffered_helper((Stream*)0)) == 1); 53 | #endif 54 | }; 55 | 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // ASIO_IS_READ_BUFFERED_HPP 61 | -------------------------------------------------------------------------------- /communications/asio/is_write_buffered.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_write_buffered.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IS_WRITE_BUFFERED_HPP 12 | #define ASIO_IS_WRITE_BUFFERED_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/buffered_stream_fwd.hpp" 20 | #include "asio/buffered_write_stream_fwd.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | 26 | namespace detail { 27 | 28 | template 29 | char is_write_buffered_helper(buffered_stream* s); 30 | 31 | template 32 | char is_write_buffered_helper(buffered_write_stream* s); 33 | 34 | struct is_write_buffered_big_type { char data[10]; }; 35 | is_write_buffered_big_type is_write_buffered_helper(...); 36 | 37 | } // namespace detail 38 | 39 | /// The is_write_buffered class is a traits class that may be used to determine 40 | /// whether a stream type supports buffering of written data. 41 | template 42 | class is_write_buffered 43 | { 44 | public: 45 | #if defined(GENERATING_DOCUMENTATION) 46 | /// The value member is true only if the Stream type supports buffering of 47 | /// written data. 48 | static const bool value; 49 | #else 50 | ASIO_STATIC_CONSTANT(bool, 51 | value = sizeof(detail::is_write_buffered_helper((Stream*)0)) == 1); 52 | #endif 53 | }; 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IS_WRITE_BUFFERED_HPP 60 | -------------------------------------------------------------------------------- /communications/asio/posix/stream_descriptor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // posix/stream_descriptor.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_POSIX_STREAM_DESCRIPTOR_HPP 12 | #define ASIO_POSIX_STREAM_DESCRIPTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/posix/basic_stream_descriptor.hpp" 24 | 25 | namespace asio { 26 | namespace posix { 27 | 28 | /// Typedef for the typical usage of a stream-oriented descriptor. 29 | typedef basic_stream_descriptor<> stream_descriptor; 30 | 31 | } // namespace posix 32 | } // namespace asio 33 | 34 | #endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR) 35 | // || defined(GENERATING_DOCUMENTATION) 36 | 37 | #endif // ASIO_POSIX_STREAM_DESCRIPTOR_HPP 38 | -------------------------------------------------------------------------------- /communications/asio/serial_port.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // serial_port.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | // 11 | 12 | #ifndef ASIO_SERIAL_PORT_HPP 13 | #define ASIO_SERIAL_PORT_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #include "asio/detail/config.hpp" 20 | 21 | #if defined(ASIO_HAS_SERIAL_PORT) \ 22 | || defined(GENERATING_DOCUMENTATION) 23 | 24 | #include "asio/basic_serial_port.hpp" 25 | 26 | namespace asio { 27 | 28 | /// Typedef for the typical usage of a serial port. 29 | typedef basic_serial_port<> serial_port; 30 | 31 | } // namespace asio 32 | 33 | #endif // defined(ASIO_HAS_SERIAL_PORT) 34 | // || defined(GENERATING_DOCUMENTATION) 35 | 36 | #endif // ASIO_SERIAL_PORT_HPP 37 | -------------------------------------------------------------------------------- /communications/asio/signal_set.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // signal_set.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SIGNAL_SET_HPP 12 | #define ASIO_SIGNAL_SET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/basic_signal_set.hpp" 20 | 21 | namespace asio { 22 | 23 | /// Typedef for the typical usage of a signal set. 24 | typedef basic_signal_set<> signal_set; 25 | 26 | } // namespace asio 27 | 28 | #endif // ASIO_SIGNAL_SET_HPP 29 | -------------------------------------------------------------------------------- /communications/asio/ssl.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl.hpp 3 | // ~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_HPP 12 | #define ASIO_SSL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/ssl/basic_context.hpp" 19 | #include "asio/ssl/context.hpp" 20 | #include "asio/ssl/context_base.hpp" 21 | #include "asio/ssl/context_service.hpp" 22 | #include "asio/ssl/error.hpp" 23 | #include "asio/ssl/rfc2818_verification.hpp" 24 | #include "asio/ssl/stream.hpp" 25 | #include "asio/ssl/stream_base.hpp" 26 | #include "asio/ssl/stream_service.hpp" 27 | #include "asio/ssl/verify_context.hpp" 28 | #include "asio/ssl/verify_mode.hpp" 29 | 30 | #endif // ASIO_SSL_HPP 31 | -------------------------------------------------------------------------------- /communications/asio/ssl/basic_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/basic_context.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_BASIC_CONTEXT_HPP 12 | #define ASIO_SSL_BASIC_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/old/basic_context.hpp" 22 | #endif // defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | 29 | #if defined(ASIO_ENABLE_OLD_SSL) 30 | 31 | using asio::ssl::old::basic_context; 32 | 33 | #endif // defined(ASIO_ENABLE_OLD_SSL) 34 | 35 | } 36 | // namespace ssl 37 | }// namespace asio 38 | 39 | #include "asio/detail/pop_options.hpp" 40 | 41 | #endif // ASIO_SSL_BASIC_CONTEXT_HPP 42 | -------------------------------------------------------------------------------- /communications/asio/ssl/context_service.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/context_service.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_CONTEXT_SERVICE_HPP 12 | #define ASIO_SSL_CONTEXT_SERVICE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/old/context_service.hpp" 22 | #endif // defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | 29 | #if defined(ASIO_ENABLE_OLD_SSL) 30 | 31 | using asio::ssl::old::context_service; 32 | 33 | #endif // defined(ASIO_ENABLE_OLD_SSL) 34 | 35 | } // namespace ssl 36 | } // namespace asio 37 | 38 | #include "asio/detail/pop_options.hpp" 39 | 40 | #endif // ASIO_SSL_CONTEXT_SERVICE_HPP 41 | -------------------------------------------------------------------------------- /communications/asio/ssl/detail/handshake_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/handshake_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 12 | #define ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/detail/engine.hpp" 22 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | namespace detail { 29 | 30 | #if !defined(ASIO_ENABLE_OLD_SSL) 31 | 32 | class handshake_op { 33 | public: 34 | handshake_op(stream_base::handshake_type type) : 35 | type_(type) { 36 | } 37 | 38 | engine::want operator()(engine& eng, asio::error_code& ec, 39 | std::size_t& bytes_transferred) const { 40 | bytes_transferred = 0; 41 | return eng.handshake(type_, ec); 42 | } 43 | 44 | template 45 | void call_handler(Handler& handler, const asio::error_code& ec, 46 | const std::size_t&) const { 47 | handler(ec); 48 | } 49 | 50 | private: 51 | stream_base::handshake_type type_; 52 | }; 53 | 54 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 55 | 56 | } // namespace detail 57 | } // namespace ssl 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 63 | -------------------------------------------------------------------------------- /communications/asio/ssl/detail/openssl_types.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/openssl_types.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 12 | #define ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | #include 21 | #if !defined(OPENSSL_NO_ENGINE) 22 | # include 23 | #endif // !defined(OPENSSL_NO_ENGINE) 24 | #include 25 | #include 26 | #include "asio/detail/socket_types.hpp" 27 | 28 | #endif // ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 29 | -------------------------------------------------------------------------------- /communications/asio/ssl/detail/shutdown_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/shutdown_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 12 | #define ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/detail/engine.hpp" 22 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | namespace detail { 29 | 30 | #if !defined(ASIO_ENABLE_OLD_SSL) 31 | 32 | class shutdown_op 33 | { 34 | public: 35 | engine::want operator()(engine& eng, 36 | asio::error_code& ec, 37 | std::size_t& bytes_transferred) const 38 | { 39 | bytes_transferred = 0; 40 | return eng.shutdown(ec); 41 | } 42 | 43 | template 44 | void call_handler(Handler& handler, 45 | const asio::error_code& ec, 46 | const std::size_t&) const 47 | { 48 | handler(ec); 49 | } 50 | }; 51 | 52 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 53 | 54 | } // namespace detail 55 | } // namespace ssl 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 61 | -------------------------------------------------------------------------------- /communications/asio/ssl/detail/verify_callback.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/verify_callback.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 12 | #define ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/verify_context.hpp" 22 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | namespace detail { 29 | 30 | #if !defined(ASIO_ENABLE_OLD_SSL) 31 | 32 | class verify_callback_base { 33 | public: 34 | virtual ~verify_callback_base() { 35 | } 36 | 37 | virtual bool call(bool preverified, verify_context& ctx) = 0; 38 | }; 39 | 40 | template 41 | class verify_callback: public verify_callback_base { 42 | public: 43 | explicit verify_callback(VerifyCallback callback) : 44 | callback_(callback) { 45 | } 46 | 47 | virtual bool call(bool preverified, verify_context& ctx) { 48 | return callback_(preverified, ctx); 49 | } 50 | 51 | private: 52 | VerifyCallback callback_; 53 | }; 54 | 55 | #endif // !defined(ASIO_ENABLE_OLD_SSL) 56 | 57 | } // namespace detail 58 | } // namespace ssl 59 | } // namespace asio 60 | 61 | #include "asio/detail/pop_options.hpp" 62 | 63 | #endif // ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 64 | -------------------------------------------------------------------------------- /communications/asio/ssl/error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/error.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_ERROR_HPP 12 | #define ASIO_SSL_ERROR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/error_code.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace error { 25 | 26 | enum ssl_errors 27 | { 28 | }; 29 | 30 | extern ASIO_DECL 31 | const asio::error_category& get_ssl_category(); 32 | 33 | static const asio::error_category& ssl_category 34 | = asio::error::get_ssl_category(); 35 | 36 | } // namespace error 37 | } // namespace asio 38 | 39 | #if defined(ASIO_HAS_STD_SYSTEM_ERROR) 40 | namespace std { 41 | 42 | template<> struct is_error_code_enum 43 | { 44 | static const bool value = true; 45 | }; 46 | 47 | } // namespace std 48 | #endif // defined(ASIO_HAS_STD_SYSTEM_ERROR) 49 | 50 | namespace asio { 51 | namespace error { 52 | 53 | inline asio::error_code make_error_code(ssl_errors e) 54 | { 55 | return asio::error_code( 56 | static_cast(e), get_ssl_category()); 57 | } 58 | 59 | } // namespace error 60 | } // namespace asio 61 | 62 | #include "asio/detail/pop_options.hpp" 63 | 64 | #if defined(ASIO_HEADER_ONLY) 65 | # include "asio/ssl/impl/error.ipp" 66 | #endif // defined(ASIO_HEADER_ONLY) 67 | 68 | #endif // ASIO_SSL_ERROR_HPP 69 | -------------------------------------------------------------------------------- /communications/asio/ssl/impl/error.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/impl/error.ipp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_IMPL_ERROR_IPP 12 | #define ASIO_SSL_IMPL_ERROR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/ssl/error.hpp" 20 | #include "asio/ssl/detail/openssl_init.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace error { 26 | 27 | namespace detail { 28 | 29 | class ssl_category : public asio::error_category 30 | { 31 | public: 32 | const char* name() const ASIO_ERROR_CATEGORY_NOEXCEPT 33 | { 34 | return "asio.ssl"; 35 | } 36 | 37 | std::string message(int value) const 38 | { 39 | const char* s = ::ERR_reason_error_string(value); 40 | return s ? s : "asio.ssl error"; 41 | } 42 | }; 43 | 44 | } // namespace detail 45 | 46 | const asio::error_category& get_ssl_category() 47 | { 48 | static detail::ssl_category instance; 49 | return instance; 50 | } 51 | 52 | } // namespace error 53 | } // namespace asio 54 | 55 | #include "asio/detail/pop_options.hpp" 56 | 57 | #endif // ASIO_SSL_IMPL_ERROR_IPP 58 | -------------------------------------------------------------------------------- /communications/asio/ssl/impl/src.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/ssl/src.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_IMPL_SRC_HPP 12 | #define ASIO_SSL_IMPL_SRC_HPP 13 | 14 | #define ASIO_SOURCE 15 | 16 | #include "asio/detail/config.hpp" 17 | 18 | #if defined(ASIO_HEADER_ONLY) 19 | # error Do not compile Asio library source with ASIO_HEADER_ONLY defined 20 | #endif 21 | 22 | #include "asio/ssl/impl/context.ipp" 23 | #include "asio/ssl/impl/error.ipp" 24 | #include "asio/ssl/detail/impl/engine.ipp" 25 | #include "asio/ssl/detail/impl/openssl_init.ipp" 26 | #include "asio/ssl/impl/rfc2818_verification.ipp" 27 | 28 | #endif // ASIO_SSL_IMPL_SRC_HPP 29 | -------------------------------------------------------------------------------- /communications/asio/ssl/stream_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/stream_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_STREAM_BASE_HPP 12 | #define ASIO_SSL_STREAM_BASE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace ssl { 24 | 25 | /// The stream_base class is used as a base for the asio::ssl::stream 26 | /// class template so that we have a common place to define various enums. 27 | class stream_base { 28 | public: 29 | /// Different handshake types. 30 | enum handshake_type { 31 | /// Perform handshaking as a client. 32 | client, 33 | 34 | /// Perform handshaking as a server. 35 | server 36 | }; 37 | 38 | protected: 39 | /// Protected destructor to prevent deletion through this type. 40 | ~stream_base() { 41 | } 42 | }; 43 | 44 | } // namespace ssl 45 | } // namespace asio 46 | 47 | #include "asio/detail/pop_options.hpp" 48 | 49 | #endif // ASIO_SSL_STREAM_BASE_HPP 50 | -------------------------------------------------------------------------------- /communications/asio/ssl/stream_service.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/stream_service.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_STREAM_SERVICE_HPP 12 | #define ASIO_SSL_STREAM_SERVICE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_ENABLE_OLD_SSL) 21 | # include "asio/ssl/old/stream_service.hpp" 22 | #endif // defined(ASIO_ENABLE_OLD_SSL) 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ssl { 28 | 29 | #if defined(ASIO_ENABLE_OLD_SSL) 30 | 31 | using asio::ssl::old::stream_service; 32 | 33 | #endif // defined(ASIO_ENABLE_OLD_SSL) 34 | 35 | } 36 | // namespace ssl 37 | }// namespace asio 38 | 39 | #include "asio/detail/pop_options.hpp" 40 | 41 | #endif // ASIO_SSL_STREAM_SERVICE_HPP 42 | -------------------------------------------------------------------------------- /communications/asio/streambuf.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // streambuf.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_STREAMBUF_HPP 12 | #define ASIO_STREAMBUF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_NO_IOSTREAM) 21 | 22 | #include "asio/basic_streambuf.hpp" 23 | 24 | namespace asio { 25 | 26 | /// Typedef for the typical usage of basic_streambuf. 27 | typedef basic_streambuf<> streambuf; 28 | 29 | } // namespace asio 30 | 31 | #endif // !defined(ASIO_NO_IOSTREAM) 32 | 33 | #endif // ASIO_STREAMBUF_HPP 34 | -------------------------------------------------------------------------------- /communications/asio/unyield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // unyield.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifdef reenter 12 | # undef reenter 13 | #endif 14 | 15 | #ifdef yield 16 | # undef yield 17 | #endif 18 | 19 | #ifdef fork 20 | # undef fork 21 | #endif 22 | -------------------------------------------------------------------------------- /communications/asio/version.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // version.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_VERSION_HPP 12 | #define ASIO_VERSION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | // ASIO_VERSION % 100 is the sub-minor version 19 | // ASIO_VERSION / 100 % 1000 is the minor version 20 | // ASIO_VERSION / 100000 is the major version 21 | #define ASIO_VERSION 101006 // 1.10.6 22 | 23 | #endif // ASIO_VERSION_HPP 24 | -------------------------------------------------------------------------------- /communications/asio/wait_traits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // wait_traits.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_WAIT_TRAITS_HPP 12 | #define ASIO_WAIT_TRAITS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/push_options.hpp" 19 | 20 | namespace asio { 21 | 22 | /// Wait traits suitable for use with the basic_waitable_timer class template. 23 | template 24 | struct wait_traits 25 | { 26 | /// Convert a clock duration into a duration used for waiting. 27 | /** 28 | * @returns @c d. 29 | */ 30 | static typename Clock::duration to_wait_duration( 31 | const typename Clock::duration& d) 32 | { 33 | return d; 34 | } 35 | }; 36 | 37 | } // namespace asio 38 | 39 | #include "asio/detail/pop_options.hpp" 40 | 41 | #endif // ASIO_WAIT_TRAITS_HPP 42 | -------------------------------------------------------------------------------- /communications/asio/windows/object_handle.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // windows/object_handle.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2011 Boris Schaeling (boris@highscore.de) 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | // 11 | 12 | #ifndef ASIO_WINDOWS_OBJECT_HANDLE_HPP 13 | #define ASIO_WINDOWS_OBJECT_HANDLE_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #include "asio/detail/config.hpp" 20 | 21 | #if defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \ 22 | || defined(GENERATING_DOCUMENTATION) 23 | 24 | #include "asio/windows/basic_object_handle.hpp" 25 | 26 | namespace asio { 27 | namespace windows { 28 | 29 | /// Typedef for the typical usage of an object handle. 30 | typedef basic_object_handle<> object_handle; 31 | 32 | } // namespace windows 33 | } // namespace asio 34 | 35 | #endif // defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) 36 | // || defined(GENERATING_DOCUMENTATION) 37 | 38 | #endif // ASIO_WINDOWS_OBJECT_HANDLE_HPP 39 | -------------------------------------------------------------------------------- /communications/asio/windows/random_access_handle.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // windows/random_access_handle.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_HPP 12 | #define ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/windows/basic_random_access_handle.hpp" 24 | 25 | namespace asio { 26 | namespace windows { 27 | 28 | /// Typedef for the typical usage of a random-access handle. 29 | typedef basic_random_access_handle<> random_access_handle; 30 | 31 | } // namespace windows 32 | } // namespace asio 33 | 34 | #endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) 35 | // || defined(GENERATING_DOCUMENTATION) 36 | 37 | #endif // ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_HPP 38 | -------------------------------------------------------------------------------- /communications/asio/windows/stream_handle.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // windows/stream_handle.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_WINDOWS_STREAM_HANDLE_HPP 12 | #define ASIO_WINDOWS_STREAM_HANDLE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/windows/basic_stream_handle.hpp" 24 | 25 | namespace asio { 26 | namespace windows { 27 | 28 | /// Typedef for the typical usage of a stream-oriented handle. 29 | typedef basic_stream_handle<> stream_handle; 30 | 31 | } // namespace windows 32 | } // namespace asio 33 | 34 | #endif // defined(ASIO_HAS_WINDOWS_STREAM_HANDLE) 35 | // || defined(GENERATING_DOCUMENTATION) 36 | 37 | #endif // ASIO_WINDOWS_STREAM_HANDLE_HPP 38 | -------------------------------------------------------------------------------- /communications/asio/yield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // yield.hpp 3 | // ~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "coroutine.hpp" 12 | 13 | #ifndef reenter 14 | # define reenter(c) ASIO_CORO_REENTER(c) 15 | #endif 16 | 17 | #ifndef yield 18 | # define yield ASIO_CORO_YIELD 19 | #endif 20 | 21 | #ifndef fork 22 | # define fork ASIO_CORO_FORK 23 | #endif 24 | -------------------------------------------------------------------------------- /communications/websocketpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | init_target("websocketpp") 2 | final_target () 3 | -------------------------------------------------------------------------------- /communications/websocketpp/client.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Peter Thorson. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above copyright 9 | * notice, this list of conditions and the following disclaimer in the 10 | * documentation and/or other materials provided with the distribution. 11 | * * Neither the name of the WebSocket++ Project nor the 12 | * names of its contributors may be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL PETER THORSON BE LIABLE FOR ANY 19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | 28 | #ifndef WEBSOCKETPP_CLIENT_HPP 29 | #define WEBSOCKETPP_CLIENT_HPP 30 | 31 | #include 32 | 33 | #endif //WEBSOCKETPP_CLIENT_HPP 34 | -------------------------------------------------------------------------------- /communications/websocketpp/server.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014, Peter Thorson. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above copyright 9 | * notice, this list of conditions and the following disclaimer in the 10 | * documentation and/or other materials provided with the distribution. 11 | * * Neither the name of the WebSocket++ Project nor the 12 | * names of its contributors may be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL PETER THORSON BE LIABLE FOR ANY 19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | * 26 | */ 27 | 28 | #ifndef WEBSOCKETPP_SERVER_HPP 29 | #define WEBSOCKETPP_SERVER_HPP 30 | 31 | #include 32 | 33 | #endif //WEBSOCKETPP_SERVER_HPP 34 | -------------------------------------------------------------------------------- /header/cKeyboardHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Distributed under the OSI-approved Apache License, Version 2.0. See 3 | * accompanying file Copyright.txt for details. 4 | */ 5 | 6 | #ifndef CKEYBOARDHANDLER_H_ 7 | #define CKEYBOARDHANDLER_H_ 8 | 9 | #define KEY_EVENT 4 // according to the RFB protocol 10 | 11 | class cKeyboardHandler { 12 | public: 13 | enum { 14 | UP, DOWN 15 | }; 16 | 17 | cKeyboardHandler() { 18 | key = -1, state = UP; 19 | } 20 | ; 21 | ~cKeyboardHandler() { 22 | } 23 | ; 24 | 25 | void setState(int state_) { 26 | state = state_; 27 | } 28 | ; 29 | 30 | void setKey(int keyMask) { 31 | key = keyMask; 32 | }; 33 | 34 | void refresh(bool flag) 35 | { 36 | if (flag == false) // reset keyboard state 37 | { 38 | key = -1, state = UP; 39 | } 40 | isRefresh = flag; 41 | } 42 | ; 43 | 44 | int getState() { 45 | return state; 46 | } 47 | ; 48 | int getKey() { 49 | return key; 50 | } 51 | ; 52 | bool refreshed() { 53 | return isRefresh; 54 | } 55 | ; 56 | 57 | void parse(std::stringstream *value) { 58 | int keyMask = (unsigned char) value->str().data()[4] * 255 59 | + (unsigned char) value->str().data()[5] * 255 60 | + (unsigned char) value->str().data()[6] * 255 61 | + (unsigned char) value->str().data()[7]; 62 | 63 | setState(value->str().data()[1]); 64 | setKey(keyMask); 65 | refresh(true); 66 | 67 | //if (getState() == cKeyboardHandler::DOWN) 68 | // std::cout << "cKeyboardHandler Key: " << getKey() << std::endl; 69 | } 70 | ; 71 | 72 | private: 73 | int key; 74 | int state; 75 | bool isRefresh; 76 | }; 77 | 78 | #endif /* CKEYBOARDHANDLER_H_ */ 79 | -------------------------------------------------------------------------------- /header/cMessageHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Distributed under the OSI-approved Apache License, Version 2.0. See 3 | * accompanying file Copyright.txt for details. 4 | */ 5 | #ifndef CMESSAGE_H_ 6 | #define CMESSAGE_H_ 7 | 8 | #define MESSAGE_EVENT 0 // from websockets client 9 | 10 | class cMessageHandler 11 | { 12 | public: 13 | cMessageHandler ( ) { }; 14 | ~cMessageHandler ( ) { }; 15 | 16 | void parse ( std::stringstream *value ) 17 | { 18 | std::cout << value->str().data()[0] << std::endl; 19 | std::cout << value->str().data()[1] << std::endl; 20 | }; 21 | 22 | private: 23 | }; 24 | 25 | 26 | 27 | #endif /* CMESSAGE_H_ */ 28 | -------------------------------------------------------------------------------- /header/cStats.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "cTimer.h" 4 | 5 | 6 | /** 7 | * Author: Tim Biedert 8 | * biedert@cs.uni-kl.de 9 | * @brief Returns some measured value per second. 10 | * 11 | */ 12 | class RateStats 13 | { 14 | public: 15 | RateStats() 16 | { 17 | this->reset(); 18 | } 19 | 20 | void reset() 21 | { 22 | this->x = 0.0f; 23 | this->timer.reset(); 24 | } 25 | 26 | void add(float v) 27 | { 28 | this->x += v; 29 | } 30 | 31 | float getRate(float interval) 32 | { 33 | // Update rate 34 | float elapsed = this->timer.getElapsedMilliseconds(); 35 | if (elapsed >= interval) 36 | { 37 | this->rate = this->x / (0.001f * elapsed); 38 | this->reset(); 39 | } 40 | 41 | return this->rate; 42 | } 43 | 44 | private: 45 | float x = 0.0f; 46 | float rate = 0.0f; 47 | cTimer timer; 48 | }; 49 | 50 | 51 | 52 | class AverageStats 53 | { 54 | public: 55 | AverageStats() 56 | { 57 | this->reset(); 58 | } 59 | 60 | void reset() 61 | { 62 | this->x = 0.0f; 63 | this->n = 0; 64 | this->timer.reset(); 65 | } 66 | 67 | void add(float v) 68 | { 69 | this->x += v; 70 | ++this->n; 71 | } 72 | 73 | float getAverage(float interval) 74 | { 75 | // Update average 76 | float elapsed = this->timer.getElapsedMilliseconds(); 77 | if (elapsed >= interval) 78 | { 79 | this->average = this->n > 0 ? (this->x / this->n) : 0.0f; 80 | this->reset(); 81 | } 82 | return this->average; 83 | } 84 | 85 | private: 86 | float x = 0.0f; 87 | uint32_t n = 0; 88 | float average = 0.0f; 89 | cTimer timer; 90 | }; 91 | 92 | 93 | -------------------------------------------------------------------------------- /header/cTimer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Distributed under the OSI-approved Apache License, Version 2.0. See 3 | * accompanying file Copyright.txt for details. 4 | */ 5 | #ifndef CTIMER_H_ 6 | #define CTIMER_H_ 7 | 8 | #include 9 | 10 | // timer class based on https://github.com/NVIDIA/NvPipe/blob/master/examples/utils.h 11 | class cTimer 12 | { 13 | public: 14 | cTimer() 15 | { 16 | reset(); 17 | } 18 | 19 | void reset() 20 | { 21 | time = std::chrono::high_resolution_clock::now(); 22 | } 23 | 24 | double getElapsedSeconds() const 25 | { 26 | return 1.0e-6 * std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - time).count(); 27 | } 28 | 29 | double getElapsedMilliseconds() const 30 | { 31 | return 1.0e-3 * std::chrono::duration_cast(std::chrono::high_resolution_clock::now() - time).count(); 32 | } 33 | 34 | private: 35 | std::chrono::high_resolution_clock::time_point time; 36 | }; 37 | 38 | 39 | #endif /* CTIMER_H_ */ 40 | --------------------------------------------------------------------------------