> Actually, scratch that. They should stay
> in libnwam_impl.h, since they will only be
> used under the hood by the libnwam calls
> Anurag described to get the active objects.
> door_if.c in nwamd  has a #include for
> libnwam_impl.h. I don't think stuff like
> this belongs in the public header since it's
> only needed by the daemon, but I could
> be wrong.
>   
That's right. 

> I think what we need to do is modify
> nwamd/door_if.c to handle ENM, loc and NCP
> requests and return the active entity
> (or entities in the case of ENMs).
I'll add a new request action (NWAM_ACTION_ACTIVE) to ask for the 
currently active entities, and have door_swtich() handle these request.

Also, I'll complete door_switch() by having it handle the 
activate/deactivate requests.  This will mean having nwamd_*_enable() 
and nwamd_*_disable() for all three entities.

pseudocode along the lines of ...

    switch (request_type) :
    ...
    case NWAM_REQUEST_TYPE_<foo>_ACTION:
        switch (action) {
        case NWAM_ACTION_[DE]ACTIVATE:
            object = nwam_object_find(<foo>, name)
            int ret = nwamd_<foo>_[dis,en]able(object)
            set status for return object depending on value of ret
            break;
        case NWAM_ACTION_ACTIVE:
            object_list = nwamd_get_object_list(<foo>)
            loop through objects to find object->object_state == ONLINE
            set req_name in return object to object->name
            break;
    }
    ...


Thanks,
Anurag


> Alan
> _______________________________________________
> nwam-dev mailing list
> nwam-dev at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/nwam-dev
>   

Reply via email to