tigase.jaxmpp.android.chat

## Class ChatProvider

- java.lang.Object
- - tigase.jaxmpp.android.chat.ChatProvider

-     public class ChatProvider
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `ChatProvider.Listener`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ChatProvider(android.content.Context context, android.database.sqlite.SQLiteOpenHelper dbHelper, ChatProvider.Listener listener)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `close(SessionObject sessionObject, long chatId)`
    `long` | `createChat(SessionObject sessionObject, JID fromJid, String threadId)`
    `long` | `createMuc(SessionObject sessionObject, JID fromJid, String nickname, String password)`
    `Object[]` | `getChat(SessionObject sessionObject, JID jid, String threadId)` Get parameters needed to create proper Chat instance from DB
    `List<Object[]>` | `getChats(SessionObject sessionObject)` Get parameters needed to create proper Chat instances from DB
    `List<Object[]>` | `getRooms(SessionObject sessionObject)`
    `boolean` | `isChatOpenFor(SessionObject sessionObject, BareJID jid)`
    `void` | `resetRoomState(int state)`
    `void` | `updateRoomState(SessionObject sessionObject, BareJID room, int state)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ChatProvider

          public ChatProvider(android.content.Context context,
                              android.database.sqlite.SQLiteOpenHelper dbHelper,
                              ChatProvider.Listener listener)

  - ### Method Detail

    - #### close

          public boolean close(SessionObject sessionObject,
                               long chatId)

    - #### createChat

          public long createChat(SessionObject sessionObject,
                                 JID fromJid,
                                 String threadId)
                          throws JaxmppException

      Throws:
        `JaxmppException`

    - #### createMuc

          public long createMuc(SessionObject sessionObject,
                                JID fromJid,
                                String nickname,
                                String password)

    - #### getChat

          public Object[] getChat(SessionObject sessionObject,
                                  JID jid,
                                  String threadId)

      Get parameters needed to create proper Chat instance from DB
      Parameters:
        `sessionObject` -
        `jid` -
        `threadId` -
      Returns:
        Array of objects { Long id, String threadId, String resourceId }

    - #### getChats

          public List<Object[]> getChats(SessionObject sessionObject)

      Get parameters needed to create proper Chat instances from DB
      Parameters:
        `sessionObject` -
      Returns:
        List of arrays of objects { Long id, BareJID jid, String threadId, String resourceId }

    - #### isChatOpenFor

          public boolean isChatOpenFor(SessionObject sessionObject,
                                       BareJID jid)

    - #### getRooms

          public List<Object[]> getRooms(SessionObject sessionObject)

    - #### updateRoomState

          public void updateRoomState(SessionObject sessionObject,
                                      BareJID room,
                                      int state)

    - #### resetRoomState

          public void resetRoomState(int state)

Copyright © 2006–2016 Tigase. All rights reserved.