X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-c-bindings%2Finclude%2Frust_types.h;h=9c8d6ee52151c2f2bf1b9971853e5680e72e1def;hb=6291176e0e4acfa50a2c61d8704e139f601cb5d3;hp=3b6821aa6c9703a969702185a68f03fd461e78ee;hpb=343aacc50c73e18ddb1ec52570c5050bdccd09ca;p=rust-lightning diff --git a/lightning-c-bindings/include/rust_types.h b/lightning-c-bindings/include/rust_types.h index 3b6821aa..9c8d6ee5 100644 --- a/lightning-c-bindings/include/rust_types.h +++ b/lightning-c-bindings/include/rust_types.h @@ -1,13 +1,48 @@ #if defined(__GNUC__) #define MUST_USE_STRUCT __attribute__((warn_unused)) +#define MUST_USE_RES __attribute__((warn_unused_result)) #else #define MUST_USE_STRUCT +#define MUST_USE_RES #endif -#if defined(__GNUC__) -#define MUST_USE_RES __attribute__((warn_unused_result)) +#if defined(__clang__) +#define NONNULL_PTR _Nonnull #else -#define MUST_USE_RES +#define NONNULL_PTR #endif +struct nativeTxCreationKeysOpaque; +typedef struct nativeTxCreationKeysOpaque LDKnativeTxCreationKeys; +struct nativeChannelPublicKeysOpaque; +typedef struct nativeChannelPublicKeysOpaque LDKnativeChannelPublicKeys; +struct nativeHTLCOutputInCommitmentOpaque; +typedef struct nativeHTLCOutputInCommitmentOpaque LDKnativeHTLCOutputInCommitment; +struct nativeChannelTransactionParametersOpaque; +typedef struct nativeChannelTransactionParametersOpaque LDKnativeChannelTransactionParameters; +struct nativeCounterpartyChannelTransactionParametersOpaque; +typedef struct nativeCounterpartyChannelTransactionParametersOpaque LDKnativeCounterpartyChannelTransactionParameters; +struct nativeDirectedChannelTransactionParametersOpaque; +typedef struct nativeDirectedChannelTransactionParametersOpaque LDKnativeDirectedChannelTransactionParameters; +struct nativeHolderCommitmentTransactionOpaque; +typedef struct nativeHolderCommitmentTransactionOpaque LDKnativeHolderCommitmentTransaction; +struct nativeBuiltCommitmentTransactionOpaque; +typedef struct nativeBuiltCommitmentTransactionOpaque LDKnativeBuiltCommitmentTransaction; +struct nativeCommitmentTransactionOpaque; +typedef struct nativeCommitmentTransactionOpaque LDKnativeCommitmentTransaction; +struct nativeTrustedCommitmentTransactionOpaque; +typedef struct nativeTrustedCommitmentTransactionOpaque LDKnativeTrustedCommitmentTransaction; +struct nativeMessageHandlerOpaque; +typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler; +typedef struct LDKSocketDescriptor LDKSocketDescriptor; +struct nativePeerHandleErrorOpaque; +typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError; +struct nativePeerManagerOpaque; +typedef struct nativePeerManagerOpaque LDKnativePeerManager; +struct nativeInitFeaturesOpaque; +typedef struct nativeInitFeaturesOpaque LDKnativeInitFeatures; +struct nativeNodeFeaturesOpaque; +typedef struct nativeNodeFeaturesOpaque LDKnativeNodeFeatures; +struct nativeChannelFeaturesOpaque; +typedef struct nativeChannelFeaturesOpaque LDKnativeChannelFeatures; struct nativeChannelHandshakeConfigOpaque; typedef struct nativeChannelHandshakeConfigOpaque LDKnativeChannelHandshakeConfig; struct nativeChannelHandshakeLimitsOpaque; @@ -16,28 +51,26 @@ struct nativeChannelConfigOpaque; typedef struct nativeChannelConfigOpaque LDKnativeChannelConfig; struct nativeUserConfigOpaque; typedef struct nativeUserConfigOpaque LDKnativeUserConfig; -struct nativeChainWatchedUtilOpaque; -typedef struct nativeChainWatchedUtilOpaque LDKnativeChainWatchedUtil; -struct nativeBlockNotifierOpaque; -typedef struct nativeBlockNotifierOpaque LDKnativeBlockNotifier; -struct nativeChainWatchInterfaceUtilOpaque; -typedef struct nativeChainWatchInterfaceUtilOpaque LDKnativeChainWatchInterfaceUtil; +struct nativeNetworkGraphOpaque; +typedef struct nativeNetworkGraphOpaque LDKnativeNetworkGraph; +struct nativeLockedNetworkGraphOpaque; +typedef struct nativeLockedNetworkGraphOpaque LDKnativeLockedNetworkGraph; +struct nativeNetGraphMsgHandlerOpaque; +typedef struct nativeNetGraphMsgHandlerOpaque LDKnativeNetGraphMsgHandler; +struct nativeDirectionalChannelInfoOpaque; +typedef struct nativeDirectionalChannelInfoOpaque LDKnativeDirectionalChannelInfo; +struct nativeChannelInfoOpaque; +typedef struct nativeChannelInfoOpaque LDKnativeChannelInfo; +struct nativeRoutingFeesOpaque; +typedef struct nativeRoutingFeesOpaque LDKnativeRoutingFees; +struct nativeNodeAnnouncementInfoOpaque; +typedef struct nativeNodeAnnouncementInfoOpaque LDKnativeNodeAnnouncementInfo; +struct nativeNodeInfoOpaque; +typedef struct nativeNodeInfoOpaque LDKnativeNodeInfo; +struct nativeChainMonitorOpaque; +typedef struct nativeChainMonitorOpaque LDKnativeChainMonitor; struct nativeOutPointOpaque; typedef struct nativeOutPointOpaque LDKnativeOutPoint; -struct LDKChannelKeys; -typedef struct LDKChannelKeys LDKChannelKeys; -struct nativeInMemoryChannelKeysOpaque; -typedef struct nativeInMemoryChannelKeysOpaque LDKnativeInMemoryChannelKeys; -struct nativeKeysManagerOpaque; -typedef struct nativeKeysManagerOpaque LDKnativeKeysManager; -struct nativeChannelManagerOpaque; -typedef struct nativeChannelManagerOpaque LDKnativeChannelManager; -struct nativeChannelDetailsOpaque; -typedef struct nativeChannelDetailsOpaque LDKnativeChannelDetails; -struct nativePaymentSendFailureOpaque; -typedef struct nativePaymentSendFailureOpaque LDKnativePaymentSendFailure; -struct nativeChannelManagerReadArgsOpaque; -typedef struct nativeChannelManagerReadArgsOpaque LDKnativeChannelManagerReadArgs; struct nativeChannelMonitorUpdateOpaque; typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate; struct nativeMonitorUpdateErrorOpaque; @@ -48,6 +81,26 @@ struct nativeHTLCUpdateOpaque; typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate; struct nativeChannelMonitorOpaque; typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor; +struct nativeChannelManagerOpaque; +typedef struct nativeChannelManagerOpaque LDKnativeChannelManager; +struct nativeChannelDetailsOpaque; +typedef struct nativeChannelDetailsOpaque LDKnativeChannelDetails; +struct nativePaymentSendFailureOpaque; +typedef struct nativePaymentSendFailureOpaque LDKnativePaymentSendFailure; +struct nativeChannelManagerReadArgsOpaque; +typedef struct nativeChannelManagerReadArgsOpaque LDKnativeChannelManagerReadArgs; +struct LDKChannelKeys; +typedef struct LDKChannelKeys LDKChannelKeys; +struct nativeInMemoryChannelKeysOpaque; +typedef struct nativeInMemoryChannelKeysOpaque LDKnativeInMemoryChannelKeys; +struct nativeKeysManagerOpaque; +typedef struct nativeKeysManagerOpaque LDKnativeKeysManager; +struct nativeRouteHopOpaque; +typedef struct nativeRouteHopOpaque LDKnativeRouteHop; +struct nativeRouteOpaque; +typedef struct nativeRouteOpaque LDKnativeRoute; +struct nativeRouteHintOpaque; +typedef struct nativeRouteHintOpaque LDKnativeRouteHint; struct nativeDecodeErrorOpaque; typedef struct nativeDecodeErrorOpaque LDKnativeDecodeError; struct nativeInitOpaque; @@ -104,51 +157,17 @@ struct nativeUnsignedChannelUpdateOpaque; typedef struct nativeUnsignedChannelUpdateOpaque LDKnativeUnsignedChannelUpdate; struct nativeChannelUpdateOpaque; typedef struct nativeChannelUpdateOpaque LDKnativeChannelUpdate; +struct nativeQueryChannelRangeOpaque; +typedef struct nativeQueryChannelRangeOpaque LDKnativeQueryChannelRange; +struct nativeReplyChannelRangeOpaque; +typedef struct nativeReplyChannelRangeOpaque LDKnativeReplyChannelRange; +struct nativeQueryShortChannelIdsOpaque; +typedef struct nativeQueryShortChannelIdsOpaque LDKnativeQueryShortChannelIds; +struct nativeReplyShortChannelIdsEndOpaque; +typedef struct nativeReplyShortChannelIdsEndOpaque LDKnativeReplyShortChannelIdsEnd; +struct nativeGossipTimestampFilterOpaque; +typedef struct nativeGossipTimestampFilterOpaque LDKnativeGossipTimestampFilter; struct nativeLightningErrorOpaque; typedef struct nativeLightningErrorOpaque LDKnativeLightningError; struct nativeCommitmentUpdateOpaque; typedef struct nativeCommitmentUpdateOpaque LDKnativeCommitmentUpdate; -struct nativeMessageHandlerOpaque; -typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler; -struct nativePeerHandleErrorOpaque; -typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError; -struct nativePeerManagerOpaque; -typedef struct nativePeerManagerOpaque LDKnativePeerManager; -struct nativeTxCreationKeysOpaque; -typedef struct nativeTxCreationKeysOpaque LDKnativeTxCreationKeys; -struct nativePreCalculatedTxCreationKeysOpaque; -typedef struct nativePreCalculatedTxCreationKeysOpaque LDKnativePreCalculatedTxCreationKeys; -struct nativeChannelPublicKeysOpaque; -typedef struct nativeChannelPublicKeysOpaque LDKnativeChannelPublicKeys; -struct nativeHTLCOutputInCommitmentOpaque; -typedef struct nativeHTLCOutputInCommitmentOpaque LDKnativeHTLCOutputInCommitment; -struct nativeLocalCommitmentTransactionOpaque; -typedef struct nativeLocalCommitmentTransactionOpaque LDKnativeLocalCommitmentTransaction; -struct nativeInitFeaturesOpaque; -typedef struct nativeInitFeaturesOpaque LDKnativeInitFeatures; -struct nativeNodeFeaturesOpaque; -typedef struct nativeNodeFeaturesOpaque LDKnativeNodeFeatures; -struct nativeChannelFeaturesOpaque; -typedef struct nativeChannelFeaturesOpaque LDKnativeChannelFeatures; -struct nativeRouteHopOpaque; -typedef struct nativeRouteHopOpaque LDKnativeRouteHop; -struct nativeRouteOpaque; -typedef struct nativeRouteOpaque LDKnativeRoute; -struct nativeRouteHintOpaque; -typedef struct nativeRouteHintOpaque LDKnativeRouteHint; -struct nativeNetworkGraphOpaque; -typedef struct nativeNetworkGraphOpaque LDKnativeNetworkGraph; -struct nativeLockedNetworkGraphOpaque; -typedef struct nativeLockedNetworkGraphOpaque LDKnativeLockedNetworkGraph; -struct nativeNetGraphMsgHandlerOpaque; -typedef struct nativeNetGraphMsgHandlerOpaque LDKnativeNetGraphMsgHandler; -struct nativeDirectionalChannelInfoOpaque; -typedef struct nativeDirectionalChannelInfoOpaque LDKnativeDirectionalChannelInfo; -struct nativeChannelInfoOpaque; -typedef struct nativeChannelInfoOpaque LDKnativeChannelInfo; -struct nativeRoutingFeesOpaque; -typedef struct nativeRoutingFeesOpaque LDKnativeRoutingFees; -struct nativeNodeAnnouncementInfoOpaque; -typedef struct nativeNodeAnnouncementInfoOpaque LDKnativeNodeAnnouncementInfo; -struct nativeNodeInfoOpaque; -typedef struct nativeNodeInfoOpaque LDKnativeNodeInfo;