After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735919 - Remove access to RestProxyCallPrivate data from derived classes
Remove access to RestProxyCallPrivate data from derived classes
Status: RESOLVED FIXED
Product: librest
Classification: Platform
Component: proxy
git master
Other Linux
: Normal normal
: ---
Assigned To: librest-maint
librest-maint
Depends on:
Blocks:
 
 
Reported: 2014-09-02 19:41 UTC by Christophe Fergeau
Modified: 2014-09-03 08:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
oauth: Remove direct access to RestProxyCallPrivate (3.99 KB, patch)
2014-09-02 19:42 UTC, Christophe Fergeau
committed Details | Review
flickr: Remove direct access to RestProxyCallPrivate (1.75 KB, patch)
2014-09-02 19:42 UTC, Christophe Fergeau
committed Details | Review
lastfm: Remove direct access to RestProxyCallPrivate (1.95 KB, patch)
2014-09-02 19:42 UTC, Christophe Fergeau
committed Details | Review
Move RestProxyCallPrivate to rest-proxy-call.c (3.74 KB, patch)
2014-09-02 19:42 UTC, Christophe Fergeau
committed Details | Review
Add private rest_proxy_call_get_url() (1.46 KB, patch)
2014-09-02 19:53 UTC, Christophe Fergeau
none Details | Review

Description Christophe Fergeau 2014-09-02 19:41:08 UTC
The fact that subclasses access RestProxyCallPrivateData caused some regressions after the change from bgo #708359. This patch series removes this direct access.
Comment 1 Christophe Fergeau 2014-09-02 19:42:24 UTC
Created attachment 285172 [details] [review]
oauth: Remove direct access to RestProxyCallPrivate

OAuthProxyCall was directly accessing private RestProxyCall data.
With the addition of rest_proxy_call_get_url(), OAuthProxyCall can be
implemented without directly accessing these members.
Comment 2 Christophe Fergeau 2014-09-02 19:42:31 UTC
Created attachment 285173 [details] [review]
flickr: Remove direct access to RestProxyCallPrivate

Now that FlickrProxyCall no longer directly modifies RestProxyCall::url,
it's trivial to remove all accesses to RestProxyCallPrivate.
Comment 3 Christophe Fergeau 2014-09-02 19:42:39 UTC
Created attachment 285174 [details] [review]
lastfm: Remove direct access to RestProxyCallPrivate

Now that LastFMProxyCall no longer directly modifies RestProxyCall::url,
it's trivial to remove all accesses to RestProxyCallPrivate.
Comment 4 Christophe Fergeau 2014-09-02 19:42:46 UTC
Created attachment 285175 [details] [review]
Move RestProxyCallPrivate to rest-proxy-call.c

It was in a separate rest-proxy-call.h header which allowed derived
classes to access RestProxyCall private data without any control.
Better to go through explicit methods to do that.
Comment 5 Christophe Fergeau 2014-09-02 19:53:37 UTC
Created attachment 285186 [details] [review]
Add private rest_proxy_call_get_url()

This will be used by OAuthProxyCall so that it does not have to poke
directly at RestProxyCallPrivate.
Comment 6 Marc-Andre Lureau 2014-09-02 20:58:58 UTC
it looks like the last patch should be first.
series looks good otherwise
Comment 7 Christophe Fergeau 2014-09-03 07:45:06 UTC
Yep, last patch is first in my git history, I just missed it when attaching the patches.
Comment 8 Christophe Fergeau 2014-09-03 08:57:05 UTC
Attachment 285172 [details] pushed as a721391 - oauth: Remove direct access to RestProxyCallPrivate
Attachment 285173 [details] pushed as 9030b86 - flickr: Remove direct access to RestProxyCallPrivate
Attachment 285174 [details] pushed as 3ec0311 - lastfm: Remove direct access to RestProxyCallPrivate
Attachment 285175 [details] pushed as 73984ab - Move RestProxyCallPrivate to rest-proxy-call.c