Git Product home page Git Product logo

xep-0055's Introduction

This is a module for XMPPFramework . It just implement the client part of XEP-0055.

##How to use?

Set up it

It is easy to use. First, get the source code of XMPPFramework, and put it in your project.

Then, get a copy of XEP-005(just this project), by:

get clone https://github.com/dbsGen/XEP-0055.git

And put XEP-0055 in XMPPFramework/Extensions ,just like:

screenshots

Code

1,Init:

_xmppSearchModule = [[XMPPSearchModule alloc] initWithDispatchQueue:_queue];
_xmppSearchModule.searchHost = @"YOUR_SEARCH_HOST_HERE";
[_xmppSearchModule activate:_xmppStream];

2,Get the Search Fields:

Using -askForFields to get the fields.

If use this method you will implement -searchModelGetFields: in the delegate.

While -searchModelGetFields: be invoked, result will be Non-empty.

Then, [result copyForSingleFields] to get the single fields, the return is a array of XMPPSearchNode. And [result copyForTableFields] to get the data forms fields, the return is a array of XMPPSearchNode.

3,Fill the fields

If you know your XMPP server you can skip the step 2, and make your fields.

Make your fields or copy from XMPPSearchResult to the get the fields. The fields will be instances of XMPPSearchNode's subclasses.

They are defined in XMPPSearchNode.h.

4,Send the search fields to server and get the result

- (void)searchWithFields:(NSArray*)fields userData:(id)userData;

fields is the fields just said in step 3. And the method support you

to transfer a userData , the userData will be get in the delegate of -searchModel:result:userData: .

The result is a instance of XMPPSearchReported.

##Others

Maybe, you can find this some thing in XEP-0055 I had not implemented in this project, you can fork this project and add them.

xep-0055's People

Contributors

dbsgen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.