Class HistoryMessageOption
-
- All Implemented Interfaces:
public class HistoryMessageOption
zhoujt
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
HistoryMessageOption.PullOrder
-
Constructor Summary
Constructors Constructor Description HistoryMessageOption()
HistoryMessageOption(long dataTime, int count, HistoryMessageOption.PullOrder pullOrder)
-
Method Summary
Modifier and Type Method Description long
getDataTime()
Retrieves the starting point for message retrieval. void
setDataTime(long dataTime)
Sets the starting point for message retrieval. int
getCount()
Specifies the number of messages to retrieve, with a maximum of 100. void
setCount(int count)
Sets the number of messages to retrieve, with a maximum of 100. int
getOrder()
Get the pull order. void
setOrder(HistoryMessageOption.PullOrder pullOrder)
int
describeContents()
void
writeToParcel(Parcel dest, int flags)
int
getRemoteCount()
boolean
isForward()
int
getFirstLocalCount()
long
getFirstTime()
String
toString()
-
-
Constructor Detail
-
HistoryMessageOption
HistoryMessageOption()
-
HistoryMessageOption
HistoryMessageOption(long dataTime, int count, HistoryMessageOption.PullOrder pullOrder)
-
-
Method Detail
-
getDataTime
long getDataTime()
Retrieves the starting point for message retrieval. This corresponds to the `sentTime` in the message. If no messages exist in the local database, pass `0` for the first retrieval. Otherwise, pass the `sentTime` of the earliest message to fetch the latest `count` messages.
- Returns:
The starting point for message retrieval. This corresponds to the `sentTime` in the message. If no messages exist in the local database, pass `0` for the first retrieval. Otherwise, pass the `sentTime` of the earliest message to fetch the latest `count` messages.
-
setDataTime
void setDataTime(long dataTime)
Sets the starting point for message retrieval. This corresponds to the `sentTime` in the message. If there are no messages in the local database, pass `0` for the first retrieval. Otherwise, pass the `sentTime` of the earliest message to retrieve the latest `count` messages.
- Parameters:
dataTime
- The starting point for message retrieval.
-
getCount
int getCount()
Specifies the number of messages to retrieve, with a maximum of 100.
- Returns:
The number of messages to retrieve, up to a maximum of 100.
-
setCount
void setCount(int count)
Sets the number of messages to retrieve, with a maximum of 100.
- Parameters:
count
- Specifies the number of messages to retrieve, with a maximum of 100.
-
getOrder
int getOrder()
Get the pull order. 0: Descending order, combined with the passed timestamp parameter, retrieves messages with increasing send time; 1: Ascending order, combined with the passed timestamp parameter, retrieves messages with decreasing send time.
- Returns:
The pull order. 0: Descending order, combined with the passed timestamp parameter, retrieves messages with increasing send time; 1: Ascending order, combined with the passed timestamp parameter, retrieves messages with decreasing send time.
-
setOrder
void setOrder(HistoryMessageOption.PullOrder pullOrder)
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
getRemoteCount
int getRemoteCount()
-
isForward
boolean isForward()
-
getFirstLocalCount
int getFirstLocalCount()
-
getFirstTime
long getFirstTime()
-
toString
String toString()
-
-
-
-