Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
softyboy #1
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Subject: Manage the Privacy List
Hello,

Any body tell me how can manage the privacy list,
first i would like to get the privacy list - i have user PrivacyManager
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
  • use GetLists to get the name of all Lists
  • use GetList to get a privacy list by name

and please read the XMPP core for more details about privacy lists.

Alex
Avatar
softyboy #3
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
thanks alex,

i know and use these method but could you tell me in which event get the all privacy list.
This post was edited on 2006-09-14, 15:11 by softyboy.
Avatar
Jabberer #4
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
There are no events. You request the list manual and can define a callback for the result of your request.
Software Developer
AG-Software
Avatar
softyboy #5
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Thanks jabberer ,

can you post sample code bcause i don't understand sample library code.

I use the mathod,
Privacymanager.getlists()

and after executing this method where we find the list.
Avatar
Jabberer #6
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
You have to define a callback in your GetLists() call.
Look in the MiniClient sample how this works. We use this everywhere. The vCard code is a good example. It requests the VCard and you get the VCard result in the defined callback.
Software Developer
AG-Software
Avatar
softyboy #7
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
thanks jabbere ,

i will try

agian thanks for nice help.
Avatar
softyboy #8
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
In reply to post #6
Hello Alex and Jabberer

i m follow your vcardresult methos in miniclient

First i have create constuctor

 Public Sub New(ByVal UserJid As Jid, ByVal XMPPCon As XmppClientConnection)

        XMPPConnection = XMPPCon
        m_PrivacyManager = New PrivacyManager(XMPPConnection)
         Dim piq As PrivacyIq = New PrivacyIq(client.IqType.get, New Jid(UserJid.Bare))
        packetid = piq.Id
        XMPPCon.IqGrabber.SendIq(piq, AddressOf GetLists, Nothing)

End Sub
method are ..

Public Sub GetLists(ByVal sender As Object, ByVal query As agsXMPP.protocol.client.IQ, ByVal data As Object)
            If InvokeRequired Then
                BeginInvoke(CType(AddressOf GetLists, IqCB), New Object() {sender, query, data})
                Return
            End If

            If query.Type = IqType.result Then           

               Dim mList as List=query.List    -- it returns error. ( ex. of vcard like dim vcard as vcard=query.vcard)

            End If          
End Sub

pls help me.
Avatar
Alex #9
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
There exists no List property. This is the reason why you will get compiler errors.
If there is a List object in your result you have to parse it with the SelectSingleElement function.

Alex
Avatar
softyboy #10
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
thanks for Reply alex,

Actualy i  would like to get privacy list of all users.
pls give me a suitable example.

Parwej Ahamad
Avatar
Alex #11
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #9
you can retrieve only your own privacy lists, not the list of other users.
Avatar
softyboy #12
Member since Sep 2006 · 31 posts · Location: india
Group memberships: Members
Show profile · Link to this post
Thanks Alex,

but how

Parwej Ahamad
Avatar
Alex #13
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
i told you before how it works.

before posting tons of questions in our forms please
  • get familiar with xmpp
  • study all our examples
  • read the documentation
  • study the source code
  • get familiar with the object in the agsXMPP SDK (agsXMPP is highly Object-oriented)
  • read this forum

If you have done this and run into a problems or have a question then post it here with
  • your source code snippets
  • your xml debug

We don't have the time to write examples for all of your questions. You have to engage yourself with the SDK and figure out how it works or make use of our professional services for consulting, programming and support. Therefor contact sales@ag-software.de.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS