Struct jami_rs::Jami [−][src]
Connect to the jami daemon
Implementations
impl Jami
[src]
pub fn select_jami_account(create_if_not: bool) -> Account
[src]
Retrieve account or create one if necessary. @param create_if_not Create if no account found @return the account
pub async fn handle_events<T: 'static + Debug + Send>(
tx: Sender<Event<T>>,
stop: Arc<AtomicBool>
) -> Result<(), Error>
[src]
tx: Sender<Event<T>>,
stop: Arc<AtomicBool>
) -> Result<(), Error>
Listen to daemon's signals
pub fn lookup_name(
account: &String,
name_service: &String,
name: &String
) -> bool
[src]
account: &String,
name_service: &String,
name: &String
) -> bool
Asynchronously lookup a name @param account @param name_service @param name @return if dbus is ok
pub fn lookup_address(
account: &String,
name_service: &String,
address: &String
) -> bool
[src]
account: &String,
name_service: &String,
address: &String
) -> bool
Asynchronously lookup an address @param account @param name_service @param address @return if dbus is ok
pub fn is_hash(string: &String) -> bool
[src]
pub fn add_account(
main_info: &str,
password: &str,
import_type: ImportType
) -> String
[src]
main_info: &str,
password: &str,
import_type: ImportType
) -> String
Add a new account @param main_info path or alias @param password @param from_archive if main_info is a path
pub fn get_account_list() -> Vec<Account>
[src]
Get current ring accounts @return current accounts
pub fn get_account(id: &str) -> Account
[src]
Build a new account with an id from the daemon @param id the account id to build @return the account retrieven
pub fn rm_account(id: &str)
[src]
Remove an account @param id the account id to remove
pub fn get_account_details(id: &str) -> HashMap<String, String>
[src]
Get account details @param id the account id to build @return the account details
pub fn set_account_details(id: &str, details: HashMap<String, String>)
[src]
Get account details @param id the account id to build
pub fn subscribe_presence(id: &str, uri: &str, flag: bool)
[src]
Subscribe to a member presence @param id the account id to build @param uri to subscribe @param flag true to subscribe else stop
pub fn add_contact(id: &String, uri: &String)
[src]
Add a new contact @param id Account id @param uri Uri of the contact
pub fn get_trust_requests(id: &String) -> Vec<String>
[src]
Get trusts requests from an account @param id Account id @return the list of trusts requests senders
pub fn send_trust_request(id: &String, to: &String, payloads: Vec<u8>)
[src]
Send a trust request to someone @param id Account id @param to Contact uri @param payloads VCard
pub fn accept_trust_request(id: &String, from: &String) -> bool
[src]
Accept a trust request @param id Account id @param from Contact uri @return if successful
pub fn discard_trust_request(id: &String, from: &String) -> bool
[src]
Discard a trust request @param id Account id @param from Contact uri @return if successful
pub fn get_members(id: &String, convid: &String) -> Vec<HashMap<String, String>>
[src]
Get current members for a conversation @param id Id of the account @param convid Id of the conversation @return current members
pub fn get_conversation_infos(
id: &String,
convid: &String
) -> HashMap<String, String>
[src]
id: &String,
convid: &String
) -> HashMap<String, String>
Get conversation's infos @param id Id of the account @param convid Id of the conversation @return current infos
pub fn update_conversation_infos(
id: &String,
convid: &String,
infos: HashMap<String, String>
)
[src]
id: &String,
convid: &String,
infos: HashMap<String, String>
)
Update conversation's i nfos @param id Id of the account @param convid Id of the conversation @param infos New infos
pub fn start_conversation(id: &String) -> String
[src]
Start conversation @param id Id of the account
pub fn get_conversations(id: &String) -> Vec<String>
[src]
Get current conversations for account @param id Id of the account @return current conversations
pub fn get_conversations_requests(id: &String) -> Vec<HashMap<String, String>>
[src]
Get current conversations requests for account @param id Id of the account @return current conversations requests
pub fn decline_request(id: &String, conv_id: &String)
[src]
Decline a conversation request @param id Id of the account @param conv_id Id of the conversation
pub fn accept_request(id: &String, conv_id: &String)
[src]
Accept a conversation request @param id Id of the account @param conv_id Id of the conversation
pub fn load_conversation(
account: &String,
conversation: &String,
from: &String,
size: u32
) -> u32
[src]
account: &String,
conversation: &String,
from: &String,
size: u32
) -> u32
Asynchronously load a conversation @param account @param conversation @param from "" if latest else the commit id @param size 0 if all else max number of messages to get @return the id of the request
pub fn rm_conversation(id: &String, conv_id: &String) -> bool
[src]
Remove a conversation for an account @param id Id of the account @param conv_id Id of the conversation @return if the conversation is removed
pub fn add_conversation_member(id: &String, conv_id: &String, hash: &String)
[src]
Invite a member to a conversation @param id Id of the account @param conv_id Id of the conversation @param hash Id of the member to invite
pub fn rm_conversation_member(id: &String, conv_id: &String, hash: &String)
[src]
Remove a member from a conversation @param id Id of the account @param conv_id Id of the conversation @param hash Id of the member to invite
pub fn send_conversation_message(
id: &String,
conv_id: &String,
message: &String,
parent: &String
) -> u64
[src]
id: &String,
conv_id: &String,
message: &String,
parent: &String
) -> u64
Remove a conversation for an account @param id Id of the account @param conv_id Id of the conversation @param hash Id of the member to invite @param hash Id of the member to invite
pub fn send_file(account_id: String, conv_id: String, path: String) -> u64
[src]
Send a file to a conversation @param account_id Related account @param conv_id Related conversation @param path Path of the file to send @return id of the transfer
pub fn accept_file_transfer(
id: &String,
conv_id: &String,
tid: u64,
path: &String
) -> u32
[src]
id: &String,
conv_id: &String,
tid: u64,
path: &String
) -> u32
Accepts a file transfer @param account_id Related account @param conv_id Related conversation @param tid File transfer to accepts @param path Path of the file to send @return if an error occurs
pub fn cancel_file_transfer(id: &String, conv_id: &String, tid: u64) -> u32
[src]
Cancel a file transfer @param account_id Related account @param conv_id Related conversation @param tid File transfer to accepts @return if an error occurs
pub fn data_transfer_info(
account_id: String,
conv_id: String,
tid: u64
) -> Option<DataTransferInfo>
[src]
account_id: String,
conv_id: String,
tid: u64
) -> Option<DataTransferInfo>
Get DataTransferInfo @param account_id Related account @param conv_id Related conversation @param tid File transfer to accepts @return if an error occurs or the info
Auto Trait Implementations
impl RefUnwindSafe for Jami
[src]
impl Send for Jami
[src]
impl Sync for Jami
[src]
impl Unpin for Jami
[src]
impl UnwindSafe for Jami
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,