pub struct PaymentServer { /* private fields */ }
Expand description

| This class handles payment requests from | clicking on bitcoin: URIs | | This is somewhat tricky, because we have to | deal with the situation where the user clicks | on a link during startup/initialization, when | the splash-screen is up but the main window | (and the Send Coins tab) is not. | | So, the strategy is: | | Create the server, and register the event | handler, when the application is created. Save | any URIs received at or during startup in | a list. | | When startup is finished and the main window is | shown, a signal is sent to slot uiReady(), | which emits a receivedURI() signal for any | payment requests that happened during startup. | | After startup, receivedURI() happens as usual. | | This class has one more feature: a static | method that finds URIs passed in the command | line and, if a server is running in another | process, sends them to the server. |

Implementations§

source§

impl PaymentServer

source

pub fn received_payment_request(&mut self, _0: SendCoinsRecipient)

| Fired when a valid payment request is | received |

source

pub fn message(&mut self, title: &String, message: &String, style: u32)

| Fired when a message should be reported | to the user |

source

pub fn ipc_parse_command_line(&mut self, argc: i32, argv: &[*mut u8])

| Parse URIs on command line | | Returns false on error | | Sending to the server is done synchronously, | at startup. If the server isn’t already | running, startup continues, and the | items in savedPaymentRequest will | be handled when uiReady() is called. | | Warning: ipcSendCommandLine() is | called early in init, so don’t use “Q_EMIT | message()”, but “QMessageBox::”! |

source

pub fn ipc_send_command_line(&mut self) -> bool

| Returns true if there were URIs on the | command line which were successfully sent | to an already-running process. | | Note: if a payment request is given, | SelectParams(MAIN/TESTNET) will be called | so we startup in the right mode.

| Sending to the server is done synchronously, at | startup. | | If the server isn’t already running, startup | continues, and the items in savedPaymentRequest | will be handled when uiReady() is called. |

source

pub fn new(parent: *mut u32, start_local_server: Option<bool>) -> Self

| parent should be QApplication object |

source

pub fn event_filter(&mut self, object: *mut u32, event: *mut u32) -> bool

source

pub fn ui_ready(&mut self)

| Signal this when the main window’s UI | is ready to display payment requests | to the user |

source

pub fn handle_uri_or_file(&mut self, s: &String)

| Handle an incoming URI, URI with local | file scheme or file |

source

pub fn handle_uri_connection(&mut self)

source

pub fn set_options_model(&mut self, options_model: *mut OptionsModel)

| OptionsModel is used for getting proxy | settings and display unit |

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,

§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> StaticUpcast<T> for T

§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V