Package net.java.sip.communicator.service.protocol.ServerStoredDetails

Examples of net.java.sip.communicator.service.protocol.ServerStoredDetails.ImageDetail


     * @return the account image content.
     */
    public ImageDetail getAccountImage()
        throws OperationFailedException
    {
        ImageDetail imageDetail;

        try
        {
            ContentType presContent = xCapClient.getPresContent(
                    PRES_CONTENT_IMAGE_NAME);
View Full Code Here


        return AccountInfoUtils.getImage(this.accountInfoOpSet);
    }

    public void setAvatar(byte[] avatar)
    {
        ImageDetail oldDetail = null;
        ImageDetail newDetail = new ImageDetail("avatar", avatar);

        Iterator<GenericDetail> imageDetails = this.accountInfoOpSet
                .getDetails(ServerStoredDetails.ImageDetail.class);
        if (imageDetails.hasNext())
        {
View Full Code Here

     * @return the account image content.
     */
    public ImageDetail getAccountImage()
        throws OperationFailedException
    {
        ImageDetail imageDetail;

        try
        {
            ContentType presContent = xCapClient.getPresContent(
                    PRES_CONTENT_IMAGE_NAME);
View Full Code Here

        List<T> result = new Vector<T>();

        if (ImageDetail.class.isAssignableFrom(detailClass) &&
                isImageDetailSupported())
        {
            ImageDetail imageDetail = getAccountImage();
            if (imageDetail != null)
            {
                @SuppressWarnings("unchecked")
                T t = (T) getAccountImage();
View Full Code Here

    {
        List<GenericDetail> result = new ArrayList<GenericDetail>();
        if (ImageDetail.class.isAssignableFrom(detailClass) &&
                isImageDetailSupported())
        {
            ImageDetail imageDetail = getAccountImage();
            if (imageDetail != null)
            {
                result.add(getAccountImage());
            }
        }
View Full Code Here

    public Iterator<GenericDetail> getAllAvailableDetails()
    {
        List<GenericDetail> details = new ArrayList<GenericDetail>();
        if (isImageDetailSupported())
        {
            ImageDetail imageDetail = getAccountImage();
            if (imageDetail != null)
            {
                details.add(getAccountImage());
            }
        }
View Full Code Here

                    "Max count for this detail is already reached");
        }
        if (ImageDetail.class.isAssignableFrom(detail.getClass()) &&
                isImageDetailSupported())
        {
            ImageDetail imageDetail = (ImageDetail) detail;
            putImageDetail(imageDetail);
            accountImage = imageDetail;
            isAccountImageLoaded = true;
        }
        else if(DisplayNameDetail.class.isAssignableFrom(detail.getClass()))
View Full Code Here

                    synchronized(this)
                    {
                        byte[] img = byteBlock.toByteArray();

                        if(img != null && img.length > 0)
                            accountImage = new ImageDetail("Account Image", img);

                        this.notifyAll();
                    }
                }
            }
View Full Code Here

        if(detailClass.equals(ImageDetail.class)
                && (contact.getImage() != null))
        {
            List<ImageDetail> res = new Vector<ImageDetail>();

            res.add(new ImageDetail("Image", contact.getImage()));

            @SuppressWarnings("unchecked")
            Iterator<T> tIt = (Iterator<T>) res.iterator();

            return tIt;
View Full Code Here

     * belongs.
     */
    public static byte[] getImage(
            OperationSetServerStoredAccountInfo accountInfoOpSet)
    {
        ImageDetail image = null;
        Iterator<GenericDetail> imageDetails
            =  accountInfoOpSet.getDetails(ImageDetail.class);

        if (imageDetails.hasNext())
            image = (ImageDetail) imageDetails.next();

        return (image != null)
            ? image.getBytes()
            : null;
    }
View Full Code Here

TOP

Related Classes of net.java.sip.communicator.service.protocol.ServerStoredDetails.ImageDetail

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.